Home » Tag Archives: Spring (page 3)

Tag Archives: Spring

Spring boot and Spring data JPA integration

spring-interview-questions-answers

Nowadays spring and JPA integration has become a piece of cake thanks to Spring Boot and spring Data. I am gonna setup a postgresql server docker pull postgres #run the container docker run --name postgreslocal -e POSTGRES_PASSWORD=postgres -d postgres #get the ip docker inspect --format '{{ .NetworkSettings.IPAddress }}' postgreslocal #get the port docker inspect --format '{{ .NetworkSettings.Ports }}' postgreslocal Create ...

Read More »

Aspect Oriented Programming with Spring Boot

spring-interview-questions-answers

On a previous post I provided a simple example on how to achieve aspect orientation in spring by using a ProxyFactoryBean and implementing the MethodBeforeAdvice interface. On this example we will learn how to achieve aspect orientation by using Spring boot and Aspect4j annotations. Let’s start with our gradle file. group 'com.gkatzioura' version '1.0-SNAPSHOT' apply plugin: 'java' apply plugin: 'idea' ...

Read More »

Validating JWT with Spring Boot and Spring Security

spring-interview-questions-answers

For my current project I will have a REST API set up with Spring Boot (most likely running with BoxFuse). To be able to use the API endpoint the application will check that the incoming request has a valid JWT token provided earlier (by an API service that I trust). To implement this functionality I want to make use of ...

Read More »

Build a new Web Application from scratch using Spring boot, Thymeleaf, AngularJS – Part 3

spring-interview-questions-answers

In the previous blogs we built the landing page using Thymeleaf, Bower and Bootstrap and deployed it to Heroku. In this blog we will introduce some functionality with AngularJS for front end and Spring Boot Webservices at backend. We will begin with Login/Logout section. Lets begin with installing AngularJS in our application using bower. Introducing AngularJS $ bower install angular --save ...

Read More »

Content Negotiation in Spring Framework

spring-interview-questions-answers

1. Introduction With what we had done with BeanNameViewResolver, is that we just had created multiple bean views in Spring context to generate the expected output. Spring soon introduced the Content Negotiation strategy, where we can use the traditional [email protected] HTTP message converters, to return desired outputs in JSON or XML, along with some flexibility and dynamicity it provides with the configuration. Often ...

Read More »

Thymeleaf 3 – Get Started Quickly with Thymeleaf 3 and Spring MVC

spring-interview-questions-answers

Thymeleaf 3 release arrived. The new version brings plenty of new features like HTML5 support as well as Text templates support with no markup – [# th:utext="${thymeleaf.version}" /] , improved inline capabilities – <p>Thymeleaf [[${thymeleaf.version}]] is great!</p>, performence improvements and much more. The easiest way the get starter with Thymeleaf 3 and Spring MVC is by using Spring MVC 4 ...

Read More »

Understanding Transactional annotation in Spring

spring-interview-questions-answers

1. Introduction Spring provides support for both programmatic and declarative transactions . 1.1 Programmatic Transactions With programmatic transactions, transaction management code needs to be explicitly written so as to commit when everything is successful and rolling back if anything goes wrong. The transaction management code is tightly bound to the business logic in this case. 1.2 Declarative Transactions Declarative transactions ...

Read More »

Spring Boot and Database initialization

spring-interview-questions-answers

Spring boot is hands down a great framework, saving the developer a lot of time and energy when developing a spring application. One of its great features is database initialization. You can use spring boot in order to initialize your sql database. We will start with the gradle file group 'com.gkatzioura' version '1.0-SNAPSHOT' apply plugin: 'java' sourceCompatibility = 1.5 buildscript { repositories ...

Read More »

Want to take your Java skills to the next level?

Grab our programming books for FREE!

Here are some of the eBooks you will get:

  • Advanced Java Guide
  • Java Design Patterns
  • JMeter Tutorial
  • Java 8 Features Tutorial
  • JUnit Tutorial
  • JSF Programming Cookbook
  • Java Concurrency Essentials