Wednesday, 10 May 2017

Using Profile Specific Property to Config. Dev. and Test Env.


Instead of loading different application property files, Spring Boot provides a simple way to setup different application properties according to build purposes.

Ref. to
profile specific properties 

Key points.
1) using the naming convention, i.e. application-{profile}.properties to define build specific property files.  for instance,  application-tst.properties

2) the profile specific property file can be triggered by adding the property spring.profile.active = tst  in application.properties file.

Please Note:
the property defined in the profile specific property file overrides the one defined in the application.properties. It doesn't mean the profile specific property file overrides the whole property definition defined in application.properties file.

I need to test the following way:
Spring Profile
Using Spring profile to make classes decorated by @Component or @Configuration to be alive.
Set @Profile("production") on @Component or @Configuration
spring.profiles.active=production

No comments:

Can Jackson Deserialize Java Time ZonedDateTime

Yes, but must include JSR310. Thus ZonedDateTime can be deserialized directly from JSON response to POJO field. <dependency> <g...