Is there a good reason why Spring Roo puts database.properties in META-INF / spring?

I am trying to understand why Spring Roo puts database.properties in META-INF / spring where it will be deployed as part of the WAR.

Of course, the database properties are environmentally dependent and must be outside the WAR, where can they be changed without rebuilding? I am going to change the line in application-context.xml to search for property files anywhere in the class path and move the file to where it will not be packed with WAR.

Is there something I am not getting here that will make me regret it?

+3
source share
2 answers

Spring PropertyPlaceholderConfigurer pathpath :

<context:property-placeholder 
    location="classpath*:META-INF/spring/*.properties,file:myapp*.properties"/>

myapp *.properties, ( ..), , war/ear/whatever. , .

+5

, , () database ,

  • database properties set
  • database properties remove
  • database properties list

, META-INF/spring.

+2

Source: https://habr.com/ru/post/1765446/


All Articles