I'm pretty new to Java and there's a project I'm working on that I'm struggling with.
For the longest time we've had a really clunky build process for this app, where you have to manually go in and change values in the pom.xml file to switch from test to prod values. I'm trying to fix that so you can instead build using a profile flag, but I'm running into some trouble with one piece. There's an applicationContext.xml file that has the database URL hardcoded into it, and I want to be able to change that based on the profile, but I'm having trouble figuring out how to do that.
The line in question looks like this:
<property name="url" value="jdbc:mysql://databaseserver:3306/testDatabase" />
How can I have that load the property I'm setting up in my application.properties file?
app.database.url="jdbc:mysql://databaseserver:3306/testDatabase"