![](https://csdnimg.cn/release/download_crawler_static/86381301/bg4.jpg)
</bean>
<!-- mtFilter -->
<bean id="mtFilter"
class="com.sankuai.meituan.filter.spring.FilterFactoryBean">
<property name="appkey" value="mtoa" />
<property name="loginUrl" value="http://sso.sankuai.com" />
<property name="authUrl" value="http://upm.sankuai.com" />
<property name="successUrl" value="/" />
<property name="filters">
<map>
<entry key="ajaxauth" value-ref="ajaxAuthFilter" />
</map>
</property>
<property name="filterChainDefinitions">
<value>
/ = anon
/static/** = anon
/oa/xm/** = anon
/localhost/** = anon
/api/** = user
/service/** = user
/oa/pf/mds/dbconsole/** = ajaxauth
/oa/pf/bpm/oa.pf.bpm.task.commit.ext.action = ajaxauth
/** = user
</value>
</property>
</bean>
//将 applicationContext.xml 中的 namespace 从 3.0 升级到 3.1.xsd, 然后就
可以在 beans 加入不同环境的定义,在此定义了 pro(产品)和 dev(开发),
web.xml
<beans profile="prod">
//property-placeholder 引 入 properties 文 件 , 所 有 都 要 加
ignore-unresolvable=”true” , 避 免 多 个 <context:property-placeholder> 报
“Could not resolve placeholder”错误
<context:property-placeholder
ignore-unresolvable="true" location="classpath:mt.oa.properties"/>
<context:property-placeholder
ignore-unresolvable="true" location="classpath:mt.oa.data.properties" />
<context:property-placeholder
ignore-unresolvable="true" location="classpath:mt.oa.service.properties" />