java - 无法读取架构文档 http://www.springframework.org/schema/beans/spring-context.xsd
问题描述
当我使用 IntelliJ 使用 Spring 时收到以下错误消息:
未能读取架构文档' http://www.springframework.org/schema/beans/spring-context.xsd ',因为1)找不到该文档;2) 文件无法读取;3) 文档的根元素不是 .
这方面的帮助。
解决方案
@Indrajeet : The proper spring.xml or application-context.xml format :
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:mvc="http://www.springframework.org/schema/mvc"
xsi:schemaLocation="
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context.xsd
http://www.springframework.org/schema/mvc
http://www.springframework.org/schema/mvc/spring-mvc.xsd">
<context:component-scan base-package="com.demo" />
<mvc:annotation-driven/>
<bean
class="org.springframework.web.servlet.view.InternalResourceViewResolver">
<property name="prefix" value="/WEB-INF/view/" />
<property name="suffix" value=".jsp" />
</bean>
</beans>
推荐阅读
- java - 如何从不同的类中增加实例变量?
- visual-studio-code - 是否可以为键盘序列设置键盘快捷键?
- powerbi - 获取矩阵中每个月的上个月预测
- javascript - 如何在 react-intl 中使用数组字符串?
- testing - 如何使N个样本分布在jmeter中N> = M的M个线程上
- azure - Azure DevOps - 自定义任务 - 带有 Azure 身份验证的 PowerShell
- javascript - 使用 cPanel 中的新节点应用程序功能将文件同步到 S3
- java - ElasticSearch withJava API - 从一个类或现有对象映射一个复杂的类
- sql - 如何获得每个唯一列的特定行数?
- javascript - 如果用户猜到了,防止计数器再次增加