码迷,mamicode.com
首页 > 其他好文 > 详细

The prefix "p" for attribute "p:message" associated with an element type "bean"

时间:2018-09-19 17:19:22      阅读:201      评论:0      收藏:0      [点我收藏+]

标签:oca   att   com   sso   Fix   cat   encoding   xsd   原因   

报错的主要原因是因为,引用了spEL表达式,但是却没有引用相应的包

在bean.xml 中添加 xmlns:p="http://www.springframework.org/schema/p"

<?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:p="http://www.springframework.org/schema/p"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd">

<bean id="helloWorld" class="com.zjf.test.HelloWorld"
p:message="saynow" ></bean>

</beans>

The prefix "p" for attribute "p:message" associated with an element type "bean"

标签:oca   att   com   sso   Fix   cat   encoding   xsd   原因   

原文地址:https://www.cnblogs.com/zjf6666/p/9675375.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!