> For the complete documentation index, see [llms.txt](https://jack80342.gitbook.io/spring-boot/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://jack80342.gitbook.io/spring-boot/iii.-using-spring-boot/14.-structuring-your-code/14.1.-using-the-default-package.md).

# 14.1. 使用"default"包

当类没有声明`package`时，它被认为处于`default package`下。通常不推荐使用`default package`，因为对于使用`@ComponentScan`，`@EntityScan`或`@SpringBootApplication`注解的Spring Boot应用来说，它会扫描每个jar中的类，这会造成一定的问题。

**注** 我们建议你遵循Java推荐的包命名规范，使用一个反转的域名（例如`com.example.project`）。
