Accessing Properties in Spring Boot
Learn to use @PropertySource, @Value and @ConfigurationProperties annotations to register property files and inject configuration properties.
Learn to use @PropertySource, @Value and @ConfigurationProperties annotations to register property files and inject configuration properties.
Learn to modify the default embedded tomcat configurations via override respective properties in application.properties file in spring boot application.
Java configuration example to enable spring security with the help of @EnableWebSecurity annotation and WebSecurityConfigurerAdapter class.
In Spring, custom PropertyEditor implementation converts a custom object’s value to and from its native type representation into a String.
In Spring framework, if you want to create a bean by invoking a static factory-method, whose purpose is to encapsulate the object-creation process in a static method then you could use factory-method attribute. Read More : Spring FactoryBean Static factory method example If you want to create different EmployeeDTO objects …
If you have worked on Spring framework projects, then you must have seen spring context configuration files (e.g. applicationContext.xml) where in header you specify the schema references (.xsd) for various spring modules. In schema references, we mention the xml namespace and as well as schema version number. Well specifying schema …
Spring @Configuration annotation example. @Configuration annotation helps in Spring annotation based configuration. It is also called Spring Java Config.
HowToDoInJava provides tutorials and how-to guides on Java and related technologies.
It also shares the best practices, algorithms & solutions and frequently asked interview questions.