作者:手机用户2502872597 | 来源:互联网 | 2023-10-11 14:06
贴上正确的配置
xmlns 3360 xsi=' http://www.w3.org/2001/XML架构-instance '
xmlns : AOP=' http://www.spring framework.org/schema/AOP '
xmlns : task=' http://www.spring framework.org/schema/task '
xmlns 3360 cOntext=' http://www.spring framework.org/schema/context '
xsi :方案位置=' http://www.spring framework.org/schema/beans
33558 www.spring framework.org/schema/beans/spring-beans.xsd
3358 www.spring framework.org/schema/AOP http://www.spring framework.org/schema/AOP/spring-AOP.xsd
3358 www.spring framework.org/schema/task http://www.spring framework.org/schema/task/spring-task.xsd
http://www.spring framework.org/schema/context http://www.spring framework.org/schema/context/spring-context.xst
一. xml标签的xsd版本
请不要在spring-beans.xsd文件中指定版本。 您也可以使用更高的版本(至少3.1 ),因为spring profile是从3.1版开始的。
.
xsi :方案位置=' http://www.spring framework.org/schema/beans
33558 www.spring framework.org/schema/beans/spring-beans.xsd
3358 www.spring framework.org/schema/AOP http://www.spring framework.org/schema/AOP/spring-AOP.xsd
3358 www.spring framework.org/schema/task http://www.spring framework.org/schema/task/spring-task.xsd
http://www.spring framework.org/schema/context http://www.spring framework.org/schema/context/spring-context.xst
2.dispatcher servlet的文件配置
web.xml包含dispatcher servlet的contextConfigLocation,必须在spring-dispatch.xml中添加spring profile的配置。 配置项目相同。
spring.profiles.active
prd
上下文配置
class path : config/spring/spring-context.XML
class path : config/spring/spring-security.XML
.
显示程序
org.spring framework.web.servlet.dispatcher servlet
上下文配置
class path : config/spring/spring-hessian-server.XML
class path : config/spring/spring-dispatch.XML
class path : config/spring/spring-security.XML
1
以上是本文的全部内容,希望对大家的学习有帮助。 另外,我希望你多支持谷点计划。