连载地址
一、新建项目
新建一个Maven项目ac-spring-annotation
,加入spring-context
、junit
依赖
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.ac</groupId>
<artifactId>annotation</artifactId>
<version>0.0.1-SNAPSHOT</version>
<name>annotation</name>
<description>Spring Annotation Test</description>
<properties>
<java.version>18</java.version>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
<version>5.0.2.RELEASE</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>RELEASE</version>
</dependency>
</dependencies>
</project>
二、新建目录结构
- configuration:Spring配置阶段注解相关Demo
- injections:Spring注入阶段注解相关Demo
网友评论