Home » spring

Tag Archives: spring

Dependency Injection Java Example

In this article, we will examine Dependency Injection in Java and some dependency injection examples. 1. Introduction In a previous article, we explored the topic of Inversion of Control and how this design principle is appropriately suited for creating loosely coupled software applications. The IoC principle states that certain tasks typically performed by a class – for example, creating objects ...

Read More »

Spring Hibernate Integration Example

In this post, we feature an example of Spring and Hibernate Integration. Undoubtedly Spring and Hibernate are the most popular frameworks in the Java enterprise development world. Spring is a highly modular and lightweight framework offer integration with several other frameworks. Hibernate is one among them. Hibernate is the most popular Object-relational Mapping framework which has made database related operations ...

Read More »

Spring Cloud Zipkin and Sleuth Example

Welcome readers, in this tutorial, we will show how to set up Spring Cloud Zipkin and Sleuth in a Spring Boot application. 1. Introduction Before starting the tutorial, we will look at the Spring Boot introduction. Spring boot is a module that provides rapid application development feature to the spring framework including auto-configuration, standalone-code, and production-ready code It creates applications ...

Read More »

JasperReports with Spring Boot

Welcome readers, in this tutorial, we will show how to use JasperReports with spring boot framework. 1. Introduction Spring boot is a module that provides rapid application development feature to the spring framework including auto-configuration, standalone-code, and production-ready code It creates applications that are packaged as jar and are directly started using embedded servlet container (such as Tomcat, Jetty or ...

Read More »

Spring @AliasFor Annotation Example

In this example, we will show how to use the @AliasFor annotation in Spring. 1. Introduction Annotations are decorators that provide metadata about classes, methods, parameters or fields. Depending on the annotation, metadata may be processed at compile-time and/or runtime. Examples of annotations include: JUnit annotations (@Test, @Before, @After)JPA annotations (@Entity, @Table, @Id)Spring Framework annotations (@Controller, @Configuration, @Autowired) Meta-annotations are ...

Read More »

Setting Up EhCache Without the XML Hassle

1. Introduction In this example, we will go over an easy way to set up EhCache without the XML hassle. This example utilizes the simplicity of Spring Boot and Spring’s Cache annotations. If you are on this page, I can assume you are likely familiar with EhCache. But, just in case, let’s do a short recap. EhCache is an open-source, ...

Read More »

Spring @Conditional Annotation Example

Welcome readers, in this tutorial, we will explore the @Conditional annotation of the spring framework. 1. Introduction Spring 4.0 introduced the @Conditional annotation in spring. It supports the “if-then-else ” conditional checking for bean registration. It offers a higher support level than the existing @Profile annotation in the spring framework. Developers can use the @Conditional annotation for the following reasons: ...

Read More »

Spring WebSockets Example

Hello there. Thank you for showing interest in Spring WebSockets Example. In this example we will learn how to send and receive messages between a browser and a server over a WebSocket. A WebSocket is used to build an interactive web application. WebSocket is a lightweight layer above TCP. We will be creating a football live commentary web application to ...

Read More »

Spring Cloud Zuul Gateway Example

Welcome readers, in this tutorial, we will explore an interesting and the last Spring Cloud component known as Zuul Gateway to implement a gateway for the microservices. 1. Introduction Spring Boot is a module that provides rapid application development feature to the spring framework including auto-configuration, standalone-code, and production-ready code It creates applications that are packaged as jar and are ...

Read More »

Spring Cloud Feign Client Example

Welcome readers, in this tutorial, we will explore an interesting Spring Cloud component known as Netflix Feign Client to implement a declarative REST client. 1. Introduction Spring Boot is a module that provides rapid application development feature to the spring framework including auto-configuration, standalone-code, and production-ready code It creates applications that are packaged as jar and are directly started using ...

Read More »