1. <?xml version="1.0" encoding="UTF-8"?>
    2. <project
    3. xmlns="http://maven.apache.org/POM/4.0.0"
    4. xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    5. xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    6. <modelVersion>4.0.0</modelVersion>
    7. <groupId>com.atguigu</groupId>
    8. <artifactId>springday02-ioc-01</artifactId>
    9. <version>1.0-SNAPSHOT</version>
    10. <packaging>jar</packaging>
    11. <dependencies>
    12. <!-- 基于Maven依赖传递性,导入spring-context依赖即可导入当前所需所有jar包 -->
    13. <dependency>
    14. <groupId>org.springframework</groupId>
    15. <artifactId>spring-context</artifactId>
    16. <version>5.3.1</version>
    17. </dependency>
    18. <!-- junit测试 -->
    19. <dependency>
    20. <groupId>junit</groupId>
    21. <artifactId>junit</artifactId>
    22. <version>4.12</version>
    23. <scope>test</scope>
    24. </dependency>
    25. </dependencies>
    26. </project>
    1. <!-- lombok建档的注释用来消除大量样板代码 -->
    2. <!-- 需要安装Lombok插件-->
    3. @Data
    4. getName、setName
    5. @AllArgsConstructor
    6. 全参构造器
    7. @NoArgsConstructor
    8. 无参构造器
    9. @ToString
    10. toString
    11. @EqualsAndHashCode
    12. hashCode和equals
    13. <dependency>
    14. <groupId>org.projectlombok</groupId>
    15. <artifactId>lombok</artifactId>
    16. <version>1.18.8</version>
    17. <scope>compile</scope>
    18. </dependency>