3 回答

TA貢獻(xiàn)1805條經(jīng)驗 獲得超10個贊
必須使用2.0.0.0 spring boot父版本嗎?
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.0.0.RELEASE</version>
</parent>
這個 Missing 類位于 spring-aop 包中,如果您使用2.1.6.RELEASE版本spring-boot-starter-parent,spring-aop它將與依賴項一起自動包含在那里。
如果必須使用 2.0.0.RELEASE,則必須手動添加 spring-aop 依賴項:
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-aop</artifactId>
<version>5.1.8.RELEASE</version>
<scope>compile</scope>
</dependency>
根據(jù)您擁有的 spring 版本更改版本。
或者,您可以嘗試添加此依賴項:
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-aop</artifactId>
<version>2.0.0.RELEASE</version>
</dependency>

TA貢獻(xiàn)1864條經(jīng)驗 獲得超6個贊
看來您錯過了一個依賴項。嘗試將其添加到您的 pom.xml 中。
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-aop</artifactId>
<version>${spring-framework.version}</version>
</dependency>
添加回答
舉報