Properties values loaded for each environment just as Spring profiles style

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Properties values loaded for each environment just as Spring profiles style

Sergio Pedraza
Hi Guys, I want to ask you, what if I have Ratpack using spring and the idea is to load properties depending on the environment profiles, just like:

        public static void main(String... args) throws Exception {
                RxRatpack.initialize();

                Registry registry = Spring.spring(Application.class);


                RatpackServer.start(

                        server -> server
                                .registry(registry)
                                .handlers(chain -> chain
                                        .all(AuthenticationHandler.class)
                                        .path(PingHandler.class)
                                        .path(PING, PingHandler.class)
                                        .prefix(MYSERVICE, MyServiceActions.class)) );
        }

and I have different values for each property:

- application-dev.properties
- application-qa.properties
- application-prod.properties

The files above are the Spring properties files about the environment-profiles config and I want to load the values for the properties according the profile. All I want is to load the properties values for each environment respective.
Do you know how I can do that? or, is there another way in ratpack in order to achieve that goal?
Thanks in advance
Loading...