Home » Tag Archives: Spring

Tag Archives: Spring

Spring boot with Spring Security and jdbc Part 2

spring-interview-questions-answers

On a previous post we implemented security based on the default table schemas that Spring Security issues requests. Considering users and roles, application developers use a schema that fits their needs. Spring gives us the ability to specify the queries needed in order to retrieve information such as username, password and roles. Our custom tables will be pretty different from ...

Read More »

Spring boot with Spring Security and jdbc

spring-security-logo

Spring security Is a wonderful framework saving lots of time and effort from the developers. Also It is flexible enough to customize and bring it down to your needs. Working with JDBC and Spring Security is pretty easy and many actions are automated. This would be a minimal showcase. The gradle file contains dependencies such as spring-security, spring-jdbc and h2 ...

Read More »

Injecting authenticated user into Spring MVC @Controllers

spring-interview-questions-answers

Injecting injecting authenticated user into Spring MVC handler method can be done with @AuthenticationPrincipal annotation and AuthenticationPrincipalArgumentResolver that is an implementation of Spring MVS MethodArgumentResolver. AuthenticationPrincipalArgumentResolver is registered by default with web security configuration (e.g. when you enable security with @EnableWebSecurity). 1. Custom UserDetails Let’s assume we have our custom UserDetails implementation: import org.springframework.security.core.GrantedAuthority; import pl.codeleak.surveyapp.entities.Member; import java.util.Collection; public class ...

Read More »

RabbitMQ retries using Spring Integration

rabbitmq-logo

I recently read about an approach to retry with RabbitMQ here and wanted to try a similar approach with Spring Integration, which provides an awesome set of integration abstractions. TL;DR the problem being solved is to retry a message(in case of failures in processing) a few times with a large delay between retries(say 10 mins +). The approach makes use of ...

Read More »

Integrating with RabbitMQ using Spring Cloud Stream

spring-interview-questions-answers

In my previous post I wrote about a very simple integration scenario between two systems – one generating a work unit and another processing that work unit and how Spring Integration makes such integration very easy. Here I will demonstrate how this integration scenario can be simplified even further using Spring Cloud Stream I have the sample code available here – the right maven ...

Read More »

Deploy Spring Boot Application on Amazon Elastic Beanstalk

spring-interview-questions-answers

In this blog, we are going to see how to deploy a Spring boot application on Amazon ElasticBeanstalk. Amazon ElasticBeanstalk has a preconfigured Java environment, which could be used to deploy a Spring Boot JAR which has the servlet container inside it. For our example, we will use maven as the build tool here. Step 1 : The first step ...

Read More »

Spring Batch: Multiple Format Output Writer

spring-interview-questions-answers

Being a strong advocate of Spring Batch, I’ve always talked about the notion of Spring Batch providing developers with a framework that allows them to focus on solving business needs. By doing so, it allows developers to not spend an inordinate amount of time solving all of the technical aspects to support the solution. To illustrate what I mean by ...

Read More »

SpringOne Platform 2016 Retrospective

spring-interview-questions-answers

I recently wrapped up attending the SpringOne Platform conference in Las Vegas. This was my first time attending SpringOne; it was an experience listening to talks and having conversations with some of the top experts in software development. If you didn’t attend SpringOne, you’ll definitely want to read this post. We’ll go over these four themes and how to potentially ...

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:

  • Spring Interview QnA
  • Multithreading & Concurrency QnA
  • JPA Minibook
  • JVM Troubleshooting Guide
  • Advanced Java
  • Java Interview QnA
  • Java Design Patterns