FAQ Database Discussion Community

Custom Property Management with Spring 4.x

Reading this and that I could easily customize my environment in a web-app. My customization is pretty simple, I have some property files packaged in my deployable war file and I would like to have a local properties file on my web-server machine that will override those properties in case...

cleanest way to create multiple beans of the same class with different properties

Say I have this properties file: students.bill.firstname=John students.bill.lastname=Doe students.bill.age=20 students.jim.firstname=Jim students.jim.lastname=Wright students.jim.age=21 . . . I want an xml bean that contains a map of students that has their firstname as the key. Object example: Student.java public class Student { String firstname; String lastname; Integer age; } Classroom.java public class...

Shared properties with Spring Cloud Config

We are thinking of migrating our Spring system to use Spring Cloud Config. The system is made up of multiple services and some share properties for common resources such as the DB datasource. For these we have a 'base' config file which contains the commonly used properties in one place....