Home » Tag Archives: Spring (page 7)

Tag Archives: Spring

Creating a REST API with Spring Boot and MongoDB

mongodb-logo

Spring Boot is an opinionated framework that simplifies the development of Spring applications. It frees us from the slavery of complex configuration files and helps us to create standalone Spring applications that don’t need an external servlet container. This sounds almost too good to be true, but Spring Boot can really do all this. This blog post demonstrates how easy ...

Read More »

Spring MVC 4 Quickstart Maven Archetype Improved

apache-maven-logo

Spring Boot allows getting started with Spring extremely easy. But there are still people interested in not using Spring Boot and bootstrap the application in a more classical way. Several years ago, I created an archetype (long before Spring Boot) that simplifies bootstrapping Spring web applications. Although Spring Boot is already some time on the market, Spring MVC 4 Quickstart ...

Read More »

Creating a REST API with Spring Boot and MongoDB

spring-interview-questions-answers

This year I greeted Christmas in a different fashion: I was a part of the Java Advent Calendar. Let’s boot up for Christmas: Spring Boot is an opinionated framework that simplifies the development of Spring applications. It frees us from the slavery of complex configuration files and helps us to create standalone Spring applications that don’t need an external servlet ...

Read More »

Spring Data JPA Tutorial: Getting the Required Dependencies

spring-interview-questions-answers

Before we can create an application that uses Spring Data JPA, we need to get the required dependencies. This blog post identifies the required components and describes how we can get them by using Maven. Let’s get started. Additional Reading: If you are not familiar with Spring Data JPA, you should read the following blog post before you continue reading ...

Read More »

Spring RestTemplate with a linked resource

spring-interview-questions-answers

Spring Data REST is an awesome project that provides mechanisms to expose the resources underlying a Spring Data based repository as REST resources. Exposing a service with a linked resource Consider two simple JPA based entities, Course and Teacher:           @Entity @Table(name = "teachers") public class Teacher { @Id @GeneratedValue(strategy = GenerationType.AUTO) @Column(name = "id") private ...

Read More »

Spring request-level memoization

spring-interview-questions-answers

Introduction Memoization is a method-level caching technique for speeding-up consecutive invocations. This post will demonstrate how you can achieve request-level repeatable reads for any data source, using Spring AOP only.         Spring Caching Spring offers a very useful caching abstracting, allowing you do decouple the application logic from the caching implementation details. Spring Caching uses an application-level ...

Read More »

Spring Data JPA Tutorial: Introduction

spring-interview-questions-answers

Creating repositories that use the Java Persistence API is a cumbersome process that takes a lot of time and requires a lot of boilerplate code. We can eliminate some boilerplate code by following these steps:                 Create an abstract base repository class that provides CRUD operations for entities. Create the concrete repository class ...

Read More »

Avoid unwanted component scanning of Spring Configuration

spring-interview-questions-answers

I came through interesting problem on Stack Overflow. Brett Ryan had problem that Spring Security configuration was initialized twice. When I was looking into his code I spot the problem. Let me show show the code. He has pretty standard Spring application (not using Spring Boot). Uses more modern Java servlet Configuration based on Spring’s AbstractAnnotationConfigDispatcherServletInitializer.         ...

Read More »

Black Box Testing of Spring Boot Microservice is so easy

spring-interview-questions-answers

When I needed to do prototyping, proof of concept or play with some new technology in free time, starting new project was always a little annoying barrier with Maven. Have to say that setting up Maven project is not hard and you can use Maven Archetypes. But Archetypes are often out of date. Who wants to play with old technologies? ...

Read More »
Do you want to know how to develop your skillset and become a ...

Subscribe to our newsletter to start Rocking right now!

To get you started we give you our best selling eBooks for FREE!
Get ready to Rock!
To download the books, please verify your email address by following the instructions found on the email we just sent you.

THANK YOU!

Close