Spring Boot lets you to run the same application more than once on a different port number. ClassPathResource. We can put application.properties file at any one of the following locations. Options. If your applications use the fairly typical setup of only using a single application.properties or application.yml file, then you’ll probably not notice any difference. Below the usage in our situation : 1 Configure Properties in application.properties File The properties related to database, hibernate and logging need to be configured in application.properties file. If you want to save configuration data in an external properties file, and then read them in spring application, you can use PropertyPlaceholderConfigurer class. We have different options to access properties in Spring: 1. Read value from application.properties Using @Value. Since this support mainly focuses on .properties and .yml files – working with JSON typically needs extra configuration.. We'll assume that the basic features are well known – and will focus on JSON specific aspects, here. Backing a ResourceBundle with Properties Files Tips. Webclient. By convention, this Spring configuration file is placed in the resources folder of the project and named application.properties.. Create the spring bean configuration java file and annotate the configuration java class with, Then you can read the properties in java code use. In Spring Boot, YAML files can be overridden by other YAML properties files. This class is used to test UserAccountDAO class methods. This class inject a DataSource object and use it to get MySQL database server connection and implements database table insert, update, delete and select sql command. The difference between java annotation and xml configuration version is how to get the userAccountDao spring bean by java annotation config. -->,