我们在写spring的配置文件的时候,有的时候可能会用到 P 标签,然后我们发现自己并没有p标签啊,那么我们一起来看我是怎么解决的。
首先在我们的xml文件的首部添上这句话:
xmlns:context="http://www.springframework.org/schema/context"
然后我们打出
xmlns:p=然后就会相应的提示:
还有一点需要注意的就是:
需要注意的是必须在xmlns:context="”这一行的下面打,否则也不会提示,如图所示位置即可提示,否则可能不提示
最终的代码:
xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:util="http://www.springframework.org/schema/util"
xmlns:context="http://www.springframework.org/schema/context"
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 http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util.xsd">
本人小白,如有错误,请指正,谢谢。