@Resource爆红
原因:
jdk11及之后的版本不支持@Resource了
解决方法:
1. 更换项目所用jdk为jdk1.8
2. 导入 javax.annotation-api
<!-- https://mvnrepository.com/artifact/javax.annotation/javax.annotation-api --> <dependency> <groupId>javax.annotation</groupId> <artifactId>javax.annotation-api</artifactId> <version>1.3.2</version> </dependency>