14.1 Using the “default” package
When a class doesn’t 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 @ComponentScan
, @EntityScan
or @SpringBootApplication
annotations, since every class from every jar, will be read.
Tip | |
---|---|
We recommend that you follow Java’s recommended package naming conventions and use a reversed domain name (for example, com.example.project ). |