First, there are a lot of solutions out there and I have already read a lot of them. But for some reason I don\'t get it working.
I am trying to outsource my config
Take out from META-INF
, put it in src/config
direct to config package in source , upon build it will go to /WEB-INF/classes/config/config.properties
and this.getClass().getResourceAsStream("/config/config.properties");
Update
and then I created a Service
Class in the same project which has a method.
public static InputStream getConfigAsInputStream(){
return Service.class.getResourceAsStream("/config/config.properties");
}
This works..!!
Compare yours