1. maven依赖加上
<dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-tomcat</artifactId> <scope>provided</scope> </dependency>
2. 注释掉pom.xml里面的bootclasspath,没有的忽略。
3. jdk环境设置好,我这里用的是jdk1.8, 之前用的1.6出错。
4. java启动类加上
@Override protected SpringApplicationBuilder configure(SpringApplicationBuilder application) { return application.sources(ArchApplication.class); }