Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
[ERROR] [2019-04-21 23:38:36][org.springframework.boot.SpringApplication - 858]Application run failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'requestMappingHandlerMapping' defined in class path resource [org/springframework/boot/autoconfigure/web/servlet/WebMvcAutoConfiguration$EnableWebMvcConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping]: Factory method 'requestMappingHandlerMapping' threw exception; nested exception is java.lang.NullPointerException
Error creating bean with name 'requestMappingHandlerMapping' defined in class path resource

 

Error creating bean with name 'requestMappingHandlerMapping' defined in class path resource

Springboot项目添加请求拦截时报错,网上查了好多都是版本问题或者jdbc.properties 上面不能有任何空格,但是无论怎么改就是不行,就是启动不了

原因是:springBoot无法扫描到@Configuration注解的配置类(令我非常纳闷,只要添加@Configuration注解就报错)

解决:使用@Configuration注解的配置类无法生效,后来查询资料得知,应该让启动类和config的包在同一级目录下

相关文章:

  • 2021-10-30
  • 2021-12-24
  • 2021-09-07
  • 2021-11-27
  • 2021-06-24
  • 2021-10-18
  • 2022-01-23
  • 2021-06-20
猜你喜欢
  • 2022-01-20
  • 2021-05-22
  • 2021-06-15
  • 2021-06-30
  • 2021-05-30
  • 2021-10-25
  • 2021-06-12
相关资源
相似解决方案