Create a project with dependency web along with"security" in it In the main application enable the security dependency using annotation @EnableWebSecurity Now create a package with a name "springconfig" and inside that create a class "SpringConfiguration". Annotate it as a @Configuration Extent the WebSecuriyConfigurationAdaptor and override two methods with the same name (configure) but with … Continue reading springboot-basic-security
Tag: Spring
SpringBoot RestCrud App
Visit http://start.spring.io and initialize project with below dependencies: Spring Web Spring Data Jpa: manage sql queries Mysql Driver: connect to db Projectlombok : auto configuring getter setter and constructor in Entity Devtools: auto restart the application on changes Thymeleaf: engine for creating frontend (avoid if frontend is not required and app can be tested by … Continue reading SpringBoot RestCrud App
Spring Interview Questions
Q : What is the need for a Component Scan? If you understand component scan, you understand Spring. The first step of defining Spring Beans is by adding the right annotation - @Component or @Service or @Repository. However, Spring does not know about the bean unless it knows where to search for it. This part … Continue reading Spring Interview Questions