Maven 2 我的属性没有被注入到perso-servlet.xml(Maven2)中
我不明白为什么我的属性没有被注入到perso-servlet.xml中:Maven 2 我的属性没有被注入到perso-servlet.xml(Maven2)中,maven-2,settings,filtering,Maven 2,Settings,Filtering,我不明白为什么我的属性没有被注入到perso-servlet.xml中: <!-- Facebook OAuth helper --> <bean id="FacebookOAuthHelper" class="com.myapp.businessservices.common.facebook.FacebookOAuthHelper" p:apiKey="${facebook.apiKey}" p:secretkey="${facebook.secretke
<!-- Facebook OAuth helper -->
<bean id="FacebookOAuthHelper" class="com.myapp.businessservices.common.facebook.FacebookOAuthHelper"
p:apiKey="${facebook.apiKey}"
p:secretkey="${facebook.secretkey}"
p:clientId="${facebook.clientId}"
p:permissions="${facebook.permissions}"
p:serverIPRedirectURI="${facebook.serverIPRedirectURI}"
p:applicationRedirectURI="${facebook.applicationRedirectURI}"
p:authFilterURI="${facebook.authFilterURI}"/>
Tomcat部署正常
您能帮助我吗?Maven并没有真正“注入”属性(正如初始标记所建议的那样),Maven在将资源复制到构建目录时过滤资源,并在此过程中用值替换令牌
不幸的是,您没有展示任何东西来理解过滤是如何在您的项目中设置的,以及为什么在Tomcat下工作(是吗?),而不是“在调试模式下”
您需要告诉我们更多,解释上面的意思,您正在做什么,并显示您的pom.xml
的相关部分
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0
http://maven.apache.org/xsd/settings-1.0.0.xsd">
<profiles>
<profile>
<activation>
<!-- This must be set to true to tell maven that we want to use this profile (by default). -->
<activeByDefault>true</activeByDefault>
</activation>
<properties>
<!-- Enable the debug mode (for both Flex and Java modules)-->
<debug>true</debug>
<!-- Facebook plateform parameters -->
<!-- General Sharehunter application parameters -->
<facebook.apikey>xxxx</facebook.apikey>
<facebook.secretkey>yyyyyy</facebook.secretkey>
<facebook.clientId>zzzzz</facebook.clientId>
${facebook.apiKey} => for apiKey property,
${facebook.secretkey} => for secretkey property,
etc ...