Springmvc获取properties中的内容实践
关于spring和springmvc的帖子很多,很多技术极少也很详细,也有关于获取properties内容的介绍。但是主流的几个帖子,我都尝试了,有些还是有问题,经过实测,给出其中一种方法。
1.spring-mvc.xml加入如下内容
xmlns:util="http://www.springframework.org/schema/util
http://www.springframework.org/schema/util
http://www.springframework.org/schema/util/spring-util-4.0.xsd
<?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:mvc="http://www.springframework.org/schema/