解决IDEA中SpringBoot工程无法通过mainApplication启动
2017-12-27 15:17
645 查看
报错内容
在idea中创建完SpringBoot项目后,通过启动mainApplication不能启动成功报错如下:. ____ _ __ _ _ /\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \ ( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \ \\/ ___)| |_)| | | | | || (_| | ) ) ) ) ' |____| .__|_| |_|_| |_\__, | / / / / =========|_|==============|___/=/_/_/_/ :: Spring Boot :: (v1.5.9.RELEASE) 2017-12-27 15:24:31.291 INFO 4584 --- [ main] com.lpl.Springcloud1Application : Starting Springcloud1Application on lpl-PC with PID 4584 (D:\learn\idea\springcloud-1\target\classes started by lpl in D:\learn\idea\springcloud-1) 2017-12-27 15:24:31.295 INFO 4584 --- [ main] com.lpl.Springcloud1Application : No active profile set, falling back to default profiles: default 2017-12-27 15:24:31.423 INFO 4584 --- [ main] s.c.a.AnnotationConfigApplicationContext : Refreshing org.springframework.context.annotation.AnnotationConfigApplicationContext@27d415d9: startup date [Wed Dec 27 15:24:31 CST 2017]; root of context hierarchy 2017-12-27 15:24:32.835 WARN 4584 --- [ main] o.h.v.m.ParameterMessageInterpolator : HV000184: ParameterMessageInterpolator has been chosen, EL interpolation will not be supported 2017-12-27 15:24:33.272 INFO 4584 --- [ main] o.s.jdbc.datasource.init.ScriptUtils : Executing SQL script from class path resource [schema.sql] 2017-12-27 15:24:33.304 INFO 4584 --- [ main] o.s.jdbc.datasource.init.ScriptUtils : Executed SQL script from class path resource [schema.sql] in 32 ms. 2017-12-27 15:24:33.306 INFO 4584 --- [ main] o.s.jdbc.datasource.init.ScriptUtils : Executing SQL script from class path resource [data.sql] 2017-12-27 15:24:33.313 INFO 4584 --- [ main] o.s.jdbc.datasource.init.ScriptUtils : Executed SQL script from class path resource [data.sql] in 7 ms. 2017-12-27 15:24:33.425 INFO 4584 --- [ main] j.LocalContainerEntityManagerFactoryBean : Building JPA container EntityManagerFactory for persistence unit 'default' 2017-12-27 15:24:33.529 INFO 4584 --- [ main] o.hibe c43b rnate.jpa.internal.util.LogHelper : HHH000204: Processing PersistenceUnitInfo [ name: default ...] 2017-12-27 15:24:33.597 INFO 4584 --- [ main] org.hibernate.Version : HHH000412: Hibernate Core {5.0.12.Final} 2017-12-27 15:24:33.599 INFO 4584 --- [ main] org.hibernate.cfg.Environment : HHH000206: hibernate.properties not found 2017-12-27 15:24:33.600 INFO 4584 --- [ main] org.hibernate.cfg.Environment : HHH000021: Bytecode provider name : javassist 2017-12-27 15:24:33.641 INFO 4584 --- [ main] o.hibernate.annotations.common.Version : HCANN000001: Hibernate Commons Annotations {5.0.1.Final} 2017-12-27 15:24:33.753 INFO 4584 --- [ main] org.hibernate.dialect.Dialect : HHH000400: Using dialect: org.hibernate.dialect.H2Dialect 2017-12-27 15:24:34.302 INFO 4584 --- [ main] j.LocalContainerEntityManagerFactoryBean : Initialized JPA EntityManagerFactory for persistence unit 'default' 2017-12-27 15:24:34.537 WARN 4584 --- [ main] o.h.v.m.ParameterMessageInterpolator : HV000184: ParameterMessageInterpolator has been chosen, EL interpolation will not be supported 2017-12-27 15:24:34.791 INFO 4584 --- [ main] o.s.j.e.a.AnnotationMBeanExporter : Registering beans for JMX exposure on startup 2017-12-27 15:24:34.803 INFO 4584 --- [ main] com.lpl.Springcloud1Application : Started Springcloud1Application in 3.847 seconds (JVM running for 4.389) 2017-12-27 15:24:34.804 INFO 4584 --- [ Thread-3] s.c.a.AnnotationConfigApplicationContext : Closing org.springframework.context.annotation.AnnotationConfigApplicationContext@27d415d9: startup date [Wed Dec 27 15:24:31 CST 2017]; root of context hierarchy 2017-12-27 15:24:34.805 INFO 4584 --- [ Thread-3] o.s.j.e.a.AnnotationMBeanExporter : Unregistering JMX-exposed beans on shutdown 2017-12-27 15:24:34.805 INFO 4584 --- [ Thread-3] j.LocalContainerEntityManagerFactoryBean : Closing JPA EntityManagerFactory for persistence unit 'default' Process finished with exit code 0
解决方法
选择 File -> Project Structure->Modules->Dependencies找到 tomcat-embed-core 的jar包 作用域默认是provided ,把它改为 compile即可
相关文章推荐
- 如何在IDEA启动多个Spring Boot工程实例
- IDEA+gradle +SpringBoot 项目,bootrun 无法启动项目
- 解决SpringBoot项目打成jar包访问不了jsp模板的问题: SpringBoot项目集成jsp模板打成war包 然后通过java -jar 命令启动访问
- 在IDEA启动多个Spring Boot工程实例
- 解决maven同步的eclipse中的springboot项目无法启动问题
- SpringBoot_idea启动多个工程实例
- IDEA 创建spring boot项目无法启动
- IDEA中启动一个springboot项目(2)
- [IDEA][SpringBoot]web项目刚启动就结束
- IntelliJ IDEA中Spring Boot项目使用spring-boot-devtools无法实现热部署/热更新的问题解决
- intelij idea 快速启动 springboot项目
- 通过进入单用户模式解决linux中的rc.local修改后无法启动的问题
- spring-boot启动debug信息中non-fatal error解决
- maven工程启动找不到Spring ContextLoaderListener的解决办法
- spring-boot 使用 main函数 无法启动的问题完美 解决方案。
- 关于spring boot无法自动注入bean问题解决方案
- idea + spring-boot-devtools启动热部署
- idea创建spring boot程序,通过$Value注解获取application.properties乱码
- Springboot通过cors解决跨域问题(解决spring security oath2的/oauth/token跨域问题)