spring中路径的注入


@RequestMapping("${mgt}/file") //请求的路径的统一添加,需要在mvc层配置<context:property-placeholder location="classpath:config.properties"/>


使用参数的形式
@Value("#{filePath.fileDoMain}")
private String doMain;
需要配置<util:properties id="filePath" location="classpath:config.properties"/>
原文地址:https://www.cnblogs.com/chengyangyang/p/9698678.html