{"action":"created","issue":{"url":"https://api.github.com/repos/spring-projects/spring-boot/issues/976","repository_url":"https://api.github.com/repos/spring-projects/spring-boot","labels_url":"https://api.github.com/repos/spring-projects/spring-boot/issues/976/labels{/name}","comments_url":"https://api.github.com/repos/spring-projects/spring-boot/issues/976/comments","events_url":"https://api.github.com/repos/spring-projects/spring-boot/issues/976/events","html_url":"https://github.com/spring-projects/spring-boot/issues/976","id":34484081,"number":976,"title":"Better support to externalize application.properties for container deployed war","user":{"login":"Polve","id":1634436,"avatar_url":"https://avatars.githubusercontent.com/u/1634436?v=3","gravatar_id":"","url":"https://api.github.com/users/Polve","html_url":"https://github.com/Polve","followers_url":"https://api.github.com/users/Polve/followers","following_url":"https://api.github.com/users/Polve/following{/other_user}","gists_url":"https://api.github.com/users/Polve/gists{/gist_id}","starred_url":"https://api.github.com/users/Polve/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Polve/subscriptions","organizations_url":"https://api.github.com/users/Polve/orgs","repos_url":"https://api.github.com/users/Polve/repos","events_url":"https://api.github.com/users/Polve/events{/privacy}","received_events_url":"https://api.github.com/users/Polve/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/spring-projects/spring-boot/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":9,"created_at":"2014-05-28T16:37:53Z","updated_at":"2016-05-04T07:28:14Z","closed_at":"2014-05-29T19:58:39Z","body":"Spring boot is great to generate jars with embedded tomcat but I find it very lacking for deploying to existing application servers (for example tomcat).\r\n\r\nThe problem is how to externalize the application.properties file: the only viable option I found is to start tomcat with an option similar to:\r\n-Dspring.config.location=file:/usr/local/myapp/application.properties\r\n\r\nBut this works for just _one_ spring boot application: how may I have more than one if I use several spring boot apps on my container?\r\n\r\nThe usual way to externalize configs is to pass them to the webapp via JNDI, so, my ideal would be to define an environment of this kind:\r\n  <Environment name=\"spring.properties.path\" value=\"/my/app.properties\" type=\"java.lang.String\" />\r\nautomatically picked up by the webapp.\r\n\r\nIs this possible to with the actual spring boot version or be implemented in the future?"},"comment":{"url":"https://api.github.com/repos/spring-projects/spring-boot/issues/comments/216765753","html_url":"https://github.com/spring-projects/spring-boot/issues/976#issuecomment-216765753","issue_url":"https://api.github.com/repos/spring-projects/spring-boot/issues/976","id":216765753,"user":{"login":"nickgrealy","id":1669373,"avatar_url":"https://avatars.githubusercontent.com/u/1669373?v=3","gravatar_id":"","url":"https://api.github.com/users/nickgrealy","html_url":"https://github.com/nickgrealy","followers_url":"https://api.github.com/users/nickgrealy/followers","following_url":"https://api.github.com/users/nickgrealy/following{/other_user}","gists_url":"https://api.github.com/users/nickgrealy/gists{/gist_id}","starred_url":"https://api.github.com/users/nickgrealy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nickgrealy/subscriptions","organizations_url":"https://api.github.com/users/nickgrealy/orgs","repos_url":"https://api.github.com/users/nickgrealy/repos","events_url":"https://api.github.com/users/nickgrealy/events{/privacy}","received_events_url":"https://api.github.com/users/nickgrealy/received_events","type":"User","site_admin":false},"created_at":"2016-05-04T07:28:14Z","updated_at":"2016-05-04T07:28:14Z","body":"Hi @dsyer, sorry to post on a closed issue... I just wanted to know if it's possible to directly configure [an individual application.properties property value using JNDI](http://stackoverflow.com/questions/36998579/spring-boot-setting-application-properties-using-jndi)?\r\n\r\ne.g. Use the following JNDI environment resource to configure `my.custom.property: foo` from `application.yml`\r\n```\r\njava:comp/env/my.custom.property = bar\r\n```\r\nThanks!"}}