Not able to load external properties files with springboot in weblogic

拥有回忆 提交于 2019-12-04 16:04:55

So Below is the link to load external properties file.

https://docs.spring.io/spring-boot/docs/current/reference/html/boot-features-external-config.html

The code which you share will work in tomcat as under lib folder is the actual classpath so it will load while server start up, but it will not work with weblogic as weblogic classpath is user domain folder and not the lib folder.

Can you try to put application.properties file in user domain folder and it should work.

Find your user domain path in weblogic and put app. files there.

Below is the code you can find your weblogic user domain path/classpath :

 String appDomianPath= System.getProperty("user.dir"); 
 System.out.println(appDomianPath);
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!