Home » Tag Archives: Spring (page 10)

Tag Archives: Spring

5 Practical Tips for Building Your Spring Boot API

spring-interview-questions-answers

Building Identity Management, including authentication and authorization? Try Stormpath! Our REST API and robust Java SDK support can eliminate your security risk and can be implemented in minutes. Sign up, and never build auth again! Every API developer is looking for ways to manage their application more securely, without sacrificing speed or ease of implementing new features. To that end, ...

Read More »

Spring boot with Spring Security and NoSQL

In the previous post we set up a spring security configuration by providing custom queries for user and authority retrieval from an sql database. Nowadays many modern applications utilize NoSQL databases. Spring security does not come with an out of the box solution for NoSQL databases. In those case we need to provide a solution by Implementing a Custom UserDetailsService. ...

Read More »

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 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

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 »