当你使用spring Config来写xml文件的时候,可能会报错误
报错提示里显式:
URI is not registered (Settings | Languages & Frameworks | Schemas and DTDs)Cannot resolve symbol 'http://www.springframework.org/schema/beans/spring-beans.xsd'
这里是因为我的maven仓库里并没有与spring有关的依赖
你在pom.xml文件中加入依赖:
<dependency> <groupId>org.springframework</groupId> <artifactId>spring-context</artifactId><version>5.2.8.RELEASE</version> </dependency>
之后刷新maven就可以了