Resolution of properties in Spring context files still broken in latest EAP

Following bean definitions in spring context file. Module is maven module and ecm-filenet.properties is located in src/main/resources directory in module. All the properties are highlighted red and marked as unresolvable.

<context:property-placeholder
            ignore-unresolvable="true"
            ignore-resource-not-found="true"
            location="classpath:ecm-filenet.properties"/>


<!--  FileNet Document Store -->
    <bean id="fileNetDocumentStore"
          >
        <constructor-arg ref="documentProperties"/>
        <property name="filterRequireFileNumber" value="${vbms.ecm.filenet.filter.requireFileNumber}"/>
    </bean>

    <bean id="fileNetConnection"
          factory-method="getConnection">
        <constructor-arg value="${vbms.ecm.filenet.ce.uri}"/>
    </bean>

    <bean id="fileNetDomain"
          factory-method="getInstance">
        <constructor-arg ref="fileNetConnection"/>
        <constructor-arg value="${vbms.ecm.filenet.ce.domain}"/>
    </bean>

    <bean id="fileNetObjectStore"
          factory-method="getInstance">
        <constructor-arg ref="fileNetDomain"/>
        <constructor-arg value="${vbms.ecm.filenet.ce.objectstore}"/>
    </bean>

    <bean id="fileNetRootFolder" >
        <constructor-arg value="${vbms.ecm.filenet.ce.rootfolder}"/>
    </bean>

3 comments
Comment actions Permalink

Changing the property placeholder configurer bean tag from the original to the following and using the prefix and suffix when referencing the properties in other bean tags fixes the problem. I suspect the issue is "$" is also used for Maven properties and maybe IntelliJ can't resolve the Spring versus Maven properties in Maven modules.

<bean id="fileNetPropertyConfigurer"
          >
        <property name="placeholderPrefix" value="fileNetProperty{" />
        <property name="placeholderSuffix" value="}" />
        <property name="ignoreUnresolvablePlaceholders" value="true"/>
        <property name="ignoreResourceNotFound" value="true"/>
        <property name="locations">
            <list>
                <value>classpath:ecm-filenet.properties</value>
            </list>
        </property>
    </bean>

0
Comment actions Permalink

Hi Grant,


Could you navigate to "ecm-filenet.properties"(ctrl-b, ctrl-click) from  location="classpath:ecm-filenet.properties"?
Could you mark "resources" directory as source directory? Is the problem still here?

Serega

0
Comment actions Permalink

My resources folder is marked as a source folder and yes, I can navigate to it with command-b (on a mac). The problem remains until I modify the bean tag per my previous post. I'm pretty sure this a bug and not an IDE setup issue.

Property references that resolve using a prefix and suffix for the property placeholder look like the following:

<bean id="fileNetDocumentStore"
          >
        <constructor-arg ref="documentProperties"/>
        <property name="filterRequireFileNumber" value="fileNetProperty{vbms.ecm.filenet.filter.requireFileNumber}"/>
    </bean>





Grant
0

Please sign in to leave a comment.