Tôi muốn biết liệu có khả năng đặt thuộc tính trong web.xml
bằng cách sử dụng tệp thuộc tính hay không. Ví dụ web.xml:Cách đặt giá trị trong web.xml bằng cách sử dụng tệp thuộc tính
<context-param>
<param-name>Map.MyJNDI</param-name>
<param-value>java:comp/env/jdbc/${my.computer}</param-value>
</context-param>
và application.properties
sẽ là:
# My computer's name
my.computer=eniac
Cảm ơn câu trả lời. Tomas
Kiểm tra sau đây: - http://stackoverflow.com/questions/15380817/properties-file-as-init-param-in-web-xml - http://stackoverflow.com/questions/12099008/how-to-include-values-from-properties-file-into-web-xml – Chepech