springboot-basic-security

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

Custom Validation

Activity: Custom validation Perform custom validation based on your business rulesOur example: Course Code must start with "KVT"Spring MVC calls our custom validationCustom validation returns Boolean value for pass/fail (true/false) Development Process Create custom validation rule Add validation rule to Customer classDisplay error message on HTML formUpdate confirmation page Breaking from up top //  "CourseCodeConstrainValidator.class" … Continue reading Custom Validation