H
H
hudrogen2018-02-20 17:50:42
Java
hudrogen, 2018-02-20 17:50:42

What other ways are there to move property data from an application to Tomcat?

I have a property file in my application that stores data in the form of a key value. There is a task of removal of these data in Tomcat. Wandered the Internet, found one working solution:
1. I write my data in the CATALINA_HOME/conf/context.xml file

<Environment name="KEY1" value="VALUE1" type="java.lang.String" />

2. Inject value by key through spring annotation
@Value( "${KEY1}" ) 
private String userPassword

Interested in the question, what other approaches are there for data removal?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
P
piatachki, 2018-02-20
@piatachki

Wherever your heart desires. Implement your CustomProperties and that's it, end of story.
Note. www.opencodez.com/java/how-to-load-application-pro...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question