1、出现这样的错误:The type org.springframework.core.NestedRuntimeException cannot be resolved. It is indirectly referenced from required .class files怎样解决啊?!!

org.springframework.core.NestedRuntimeException
在org.springframework.core-3.0.5.RELEASE.jar中,导入就好了

 

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

因为application.Java 文件不能直接放在main/java文件夹下,必须要建一个包把他放进去

https://stackoverflow.com/documentation

 

3、spring-boot启动时出现

 

This application has no explicit mapping for /error, so you are seeing this as a fallback.

Wed Dec 14 16:35:25 CST 2016
There was an unexpected error (type=Not Found, status=404).
No message available

 

很像是没有读到你要访问的地址。

原因是【Application启动类放的位置不对】要将Application放在最外层,也就是要包含所有子包。

比如你的groupId是com.google,子包就是所谓的com.google.xxx,所以要将Application放在com.google包下。

请参考以下结论:spring-boot会自动加载启动类所在包下及其子包下的所有组件.

相关文章:

  • 2021-10-28
  • 2021-11-13
  • 2021-09-27
  • 2021-12-02
  • 2021-07-05
  • 2021-12-20
  • 2022-02-04
  • 2022-12-23
猜你喜欢
  • 2021-12-17
  • 2021-04-01
  • 2021-11-07
  • 2021-04-14
  • 2021-04-04
  • 2021-09-29
  • 2021-09-19
相关资源
相似解决方案