坚决不要在默认包下使用扫描注解等操作,引发不可描述的异常
官方文档有一小段说明:
14.1 Using the “default” Package
When a class does not include a package declaration, it is considered to be in the “default package”. The use of the “default package” is generally discouraged and should be avoided. It can cause particular problems for Spring Boot applications that use the @ComponentScan, @EntityScan, or @SpringBootApplicationannotations, since every class from every jar is read.