Category Archives: Spring Framework

Dependency Injection, Aspect-Oriented Programming, MVC, Support JPA, JDBC,..

What is the behavior of the annotation @Autowired with regards to field injection, constructor injection, and method injection?

The following are the types of dependency injections (DI) that could be injected into your application: Constructor-based dependency injection Setter-based dependency injection Field-based dependency injection The constructor injection pattern It is more suitable for mandatory dependencies, and it makes a strong dependency contract It provides a more compact code structure than others It supports testing… Read More »

Creating a URL Shortener with Spring RESTful Web Service, Liquibase, and Postgresql

In this note I will create a URL shortening service using Spring Restful, Spring Boot, Liquibase, and PostgreSQL database.  In a similar way of some shortening services, such as goo.gl, tinyurl.com, and bit.ly, purpose of the shortened URL may be more convenience for website and provide detailed information on clicks a link receives. 1. URL Shortener Service. The service will… Read More »