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

Posted zjf6666

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了The prefix "p" for attribute "p:message" associated with an element type "b相关的知识,希望对你有一定的参考价值。

报错的主要原因是因为,引用了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 "b的主要内容,如果未能解决你的问题,请参考以下文章