1. 程式人生 > >springboot 整合jsp版本war包Tomcat啟動不起來

springboot 整合jsp版本war包Tomcat啟動不起來

報錯資訊

2018-02-23 22:38:20.714  INFO 10560 --- [           main] com.shz.Springboot1Application           : Starting Springboot1Application on DESKTOP-GSII0EL with PID 10560 (F:\MyObject\springboot1\target\classes started by admin in F:\apache-tomcat-8.0.33)
2018-02-23 22:38:20.717  INFO 10560 --- [           main] com.shz.Springboot1Application           : No active profile set, falling back to default profiles: default
2018-02-23 22:38:20.784  INFO 10560 --- [           main] s.c.a.AnnotationConfigApplicationContext : Refreshing org.spring
[email protected]
58c1c010: startup date [Fri Feb 23 22:38:20 CST 2018]; root of context hierarchy 2018-02-23 22:38:22.191 WARN 10560 --- [ main] o.h.v.m.ParameterMessageInterpolator : HV000184: ParameterMessageInterpolator has been chosen, EL interpolation will not be supported 2018-02-23 22:38:23.108 WARN 10560 --- [ main] o.h.v.m.ParameterMessageInterpolator : HV000184: ParameterMessageInterpolator has been chosen, EL interpolation will not be supported 2018-02-23 22:38:23.416 INFO 10560 --- [ main] o.s.j.e.a.AnnotationMBeanExporter : Registering beans for JMX exposure on startup 2018-02-23 22:38:23.440 INFO 10560 --- [ main] com.shz.Springboot1Application : Started Springboot1Application in 3.267 seconds (JVM running for 4.742) 2018-02-23 22:38:23.441 INFO 10560 --- [ Thread-10] s.c.a.AnnotationConfigApplicationContext : Closing org.spring
[email protected]
58c1c010: startup date [Fri Feb 23 22:38:20 CST 2018]; root of context hierarchy 2018-02-23 22:38:23.443 INFO 10560 --- [ Thread-10] o.s.j.e.a.AnnotationMBeanExporter : Unregistering JMX-exposed beans on shutdown

我也看不懂,折騰好久一直以為包或者註解的原因,一直用這個在啟動

@SpringBootApplication
public class Springboot1Application {

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

IDEA還生成了一個這個檔案也不知道幹啥用的

public class ServletInitializer extends SpringBootServletInitializer {

	@Override
	protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
		return application.sources(Springboot1Application.class);
	}

}

最後才發現用Tomcat啟動可以成功

初學springboot,記錄一下