SpringBoot整合SpringMVC

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/qqq327954699/article/details/85036739

1.创建Maven项目,加入起步依赖spring-boot-starter-parent,创建项目的时候就加入

2.创建项目后加入SpringMVC依赖spring-boot-starter-web

3.创建启动类

@SpringBootApplication
public class SpringBootApplicationRunner {
	public static void main(String[] args) {
		SpringApplication.run(SpringBootApplicationRunner.class, args);
	}

}

4.运行启动类main()方法

5.访问http://localhost:8080

Whitelabel Error Page
This application has no explicit mapping for /error, so you are seeing this as a fallback.

Sun Dec 16 14:06:20 CST 2018
There was an unexpected error (type=Not Found, status=404).
No message available

猜你喜欢

转载自blog.csdn.net/qqq327954699/article/details/85036739