spring boot 启动失败

来源:2-3 Hello Spring Security

996木马

2017-12-01

 :: Spring Boot ::        (v1.5.9.RELEASE)


2017-12-01 00:46:44.124  INFO 16248 --- [           main] DemoApplication                          : No active profile set, falling back to default profiles: default

2017-12-01 00:46:44.140  INFO 16248 --- [           main] ationConfigEmbeddedWebApplicationContext : Refreshing org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext@48e92c5c: startup date [Fri Dec 01 00:46:44 CST 2017]; parent: org.springframework.context.annotation.AnnotationConfigApplicationContext@4f209819

2017-12-01 00:46:44.144  WARN 16248 --- [           main] ionWarningsApplicationContextInitializer : 


** WARNING ** : Your ApplicationContext is unlikely to start due to a @ComponentScan of the default package.



2017-12-01 00:48:04.890  WARN 16248 --- [           main] ationConfigEmbeddedWebApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanDefinitionStoreException: Failed to process import candidates for configuration class [org.springframework.boot.test.context.ImportsContextCustomizer$ImportsConfiguration]; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'org.springframework.boot.test.context.ImportsContextCustomizer$ImportsConfiguration' available

2017-12-01 00:48:04.896  INFO 16248 --- [           main] utoConfigurationReportLoggingInitializer : 


Error starting ApplicationContext. To display the auto-configuration report re-run your application with 'debug' enabled.

2017-12-01 00:48:04.938 ERROR 16248 --- [           main] o.s.b.d.LoggingFailureAnalysisReporter   : 


***************************

APPLICATION FAILED TO START

***************************


Description:


A component required a bean named 'org.springframework.boot.test.context.ImportsContextCustomizer$ImportsConfiguration' that could not be found.



Action:


Consider defining a bean named 'org.springframework.boot.test.context.ImportsContextCustomizer$ImportsConfiguration' in your configuration.



Process finished with exit code 1


写回答

2回答

JoJo

2017-12-04

你的启动类是不是没放到任何包里啊,代码贴下看看。

1
0

丶恶徒丶

2017-12-10

感觉像是摆放的位置不对  

0
0

Spring Security技术栈开发企业级认证与授权

Spring Security技术栈,REST风格开发常见接口,独立开发认证授权模块保证REST服务安全

2662 学习 · 1561 问题

查看课程