Aspect oriented programming (AOP) is a programming model where we write independently executable code which adds additional behavior to the existing code without modifying the existing code. Wikipedia defines AOP as: In this article, I will show you how to… Read More ›
Spring
Configure Embedded H2 Console With Spring MVC Application
In our previous post we deployed a Spring MVC app using embedded H2 database to Tomcat. Browsing the data in an embedded DB is difficult because we cannot connect an external client to view the data. H2 provides a Web… Read More ›
How to Deploy Spring Application Without web.xml to Tomcat
Introduction Since the Servlet 3 specification web.xml is no longer needed for configuring your web application and has been replaced by using annotations. In this article, we will look at how to deploy a simple Spring-based application without web.xml to… Read More ›
Using Google reCaptcha with Spring Boot application
Introduction reCaptcha by Google is a library used to prevent bots from submitting data to your public forms or accessing your public data. In this post, we will look at how to integrate reCaptcha with a Spring Boot based web… Read More ›
Using Gmail as SMTP server from Java, Spring Boot apps
Gmail users can use Gmail’sĀ SMTP server smtp.gmail.com to send emails from their Spring Boot apps. For this let us do some setup in the app: Provide SMTP connection properties in the application.properties file: spring.mail.host=smtp.gmail.com spring.mail.username=<your gmail/google app email> spring.mail.password=***** spring.mail.port=587… Read More ›
Gotcha: Migrating from Spring Security 3.2.x to Spring Security 4.x
Here is a simple gotcha to keep in mind while migrating to newer Spring Security version 4.x from Spring Security 3.2.x What’s the problem? The Spring security configuration expressions hasRole(‘role_name’) and hasAuthority(‘role_name’) are no longer the same. The catch is:… Read More ›