第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

初始化上下文:屬性占位符取決于 Maven 配置文件

初始化上下文:屬性占位符取決于 Maven 配置文件

元芳怎么了 2021-09-12 16:01:24
我有一個名為 provider.xml 的 spring 文件<context:property-placeholder location="classpath:META-INF/spring/${build.profile.id}/config.properties" />我有兩個不同的 config.properties 一個在 META-INF/spring/ws1 中,另一個在 META-INF/spring/ws2這是我的 pom.xml 的一部分<profiles>    <profile>        <id>ws1</id>        <properties>            <build.profile.id>ws1</build.profile.id>        </properties>    </profile>    <profile>        <id>ws2</id>        <properties>            <build.profile.id>ws2</build.profile.id>        </properties>    </profile></profiles>我收到此錯誤:Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListenerorg.springframework.beans.factory.BeanInitializationException: Could not load properties; nested exception is java.io.FileNotFoundException: class path resource [META-INF/spring/${build.profile.id}/config.properties] cannot be opened because it does not exist但是,如果我嘗試在沒有像這樣的變量的情況下閱讀它,它是有效的: <context:property-placeholder location="classpath:META-INF/spring/ws1/config.properties" /> 如何在 context:property-placeholder 中將其作為變量讀取?在我將此代碼添加到 provider.xml 之后<bean id="propertyPlaceholderConfigurer"class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"><property name="systemPropertiesModeName" value="SYSTEM_PROPERTIES_MODE_OVERRIDE" /><property name="searchSystemEnvironment" value="true" /></bean>
查看完整描述

2 回答

  • 2 回答
  • 0 關(guān)注
  • 130 瀏覽
慕課專欄
更多

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動學(xué)習(xí)伙伴

公眾號

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號