Win a copy of OCP Oracle Certified Professional Java SE 11 Programmer I Study Guide: Exam 1Z0-815 this week in the Programmer Certification forum!
    Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Junilu Lacar
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Knute Snortum
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Ron McLeod
  • Carey Brown
Bartenders:
  • Paweł Baczyński
  • Piet Souris
  • Vijitha Kumara

spring property value and maven profile

 
Ranch Hand
Posts: 129
  • Mark post as helpful
  • send pies
  • Report post to moderator
Not sure if I should post it here or maven forum.  Just posted in maven but thought it may belong to a spring question.

In above example, I want "dbHost" have different values per environment.  So in maven pom.xml, if I set



When I use Maven to build the EAR/WAR, I pass  "-P prod" (meaning use prod profile), will the <bean> in applicationContext.xml auto get the value of "www.prod.url"  ?
 
Saloon Keeper
Posts: 21266
138
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
  • Report post to moderator
I think you can now post in both forums at the same time. But I answered you over there, so I'm locking this copy to avoid confusion.
 
Popeye has his spinach. I have this tiny ad:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
    Bookmark Topic Watch Topic
  • New Topic
Boost this thread!