Issue
This project was not touched for 2 years. Following code is written in spring-security.xml
<b:bean id="mappings" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
<b:property name="location">
<b:value>classpath:/application.properties</b:value>
</b:property>
</b:bean>
<b:bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource"
destroy-method="close">
<b:property name="driverClassName" value="com.mysql.jdbc.Driver" />
<b:property name="url" value="${SPRING_DATASOURCE_URL}" />
<b:property name="username" value="${SPRING_DATASOURCE_USERNAME}" />
<b:property name="password" value="${SPRING_DATASOURCE_PASSWORD}" />
</b:bean>
I checked
src/main/resources
,
entire code base,
entire system (macOS level search) and I couldn't find application.properties.
What I know for sure is, when the application is run locally(in my laptop) it uses SPRING_DATASOURCE_URL
, USERNAME
and PASSWORD
to connect to remote AWS db.
Question: How can I debug and find out the location of the file?
PS: I did try file search etc. for search string 'SPRING_DATASOURCE_URL'
Solution
Moving my comment to answer.
Possibly the property file is in the server folder where the web app is deployed. Further investigation can be done by enabling Spring debug logs.
Answered By - Smile