How|How to load external property file in JBoss 7 classpath?
This page talks about how to bring application specific or external property file (any kind of file) into JBoss AS 7.x in the application classpath. Whenever we deploy our application into the application server like JBoss, it is good practice to seperate property files, configuration related files, etc out of deployment bundle. This way we can make sure that any configuration changes does not requires new build. We can edit the configurations in the external files and restart the application. Here are the steps to put external files into the JBoss AS 7.0 and above application classpath: 1) Create a new module for your application configuration files in the JBoss Create folder structure as shown below and place a file called module.xml inside the last folder. jboss-as-7-home-folder/modules/com/your-company/configuration/main/module.xml Update your module.xml file with below shown content:
You have already created folder structure, move all your property files under main folder, these files should be placed along with module.xml file. 3) Create jboss-deployment-structure.xml file in your application and map your module in the xml Create jboss-deployment-structure.xml file under your application WEB-INF directory of your WAR file. Update your jboss-deployment-structure.xml file with the given below content:
|
|||||||||
推荐阅读
- How|How Fear Works(PartⅡ)
- vue中的条件判断详解v-if|vue中的条件判断详解v-if v-else v-else-if v-show
- iview|iview upload 动态改变上传参数
- ImageLoaders 加载图像
- 清晨朗读327(How|清晨朗读327:How Successful People Network with Each Other)
- java|微软认真聆听了开源 .NET 开发社区的炮轰( 通过CLI 支持 Hot Reload 功能)
- 【Tomcat源码阅读分享】—(5)Tomcat中的ClassLoader
- 90天30个TED演讲|90天30个TED演讲 - Day 25: How to get your ideas to spread
- How|How to make tomato and egg noodles.
- jQuery动画