How to configure spring-oauth2 to use jackson 2.x - spring

Currently Spring OAuth 2 (version 2.0.7) uses Jackson-mapper-asl 1.9.13.
Can I configure the spring-oauth2 to use Jackson 2.x ? How?

Actually, Spring Security OAuth2 allows you to use either of them. Just make sure that you use Jackson 2 classes in your code (ObjectMapper should be of type com.fasterxml.jackson.databind.ObjectMapper and not org.codehaus.jackson.map.ObjectMapper). Same with Annotations.
If you are still having problems, please share some sample code.

Related

Are extra reflection configurations needed for custom Spring Boot starter libraries when using Spring Native?

I am in the process of building a set of shared libraries using custom Spring Boot starter auto configuration per guidance from https://docs.spring.io/spring-boot/docs/2.6.7/reference/htmlsingle/#features.developing-auto-configuration. Great feature offered by Spring Boot by the way! My question is that how does Spring Native support these types of custom Spring Boot Starter libraries? Are extra reflection configurations or native hints required? I have been evaluating Spring Native and I am very excited about the performance boost it brings to Spring Boot apps! I am eagerly awaiting Spring Boot 3 GA to be released! Any advice on how Spring Boot 3 and/or Spring Native handles custom Spring Boot starter libraries and if any extra configurations are required will be greatly appreciated!
I reached out to Sébastien Deleuze, one of the members on Spring Native team, and his response to my question is as follows. Thanks Sébastien!
"Spring Native and the upcoming Spring Boot 3 should support this kind of autoconfiguration if they follow certain guidelines, like using #Configuration(proxyBeanMethods=false).
See https://docs.spring.io/spring-native/docs/current/reference/htmlsingle/#how-to-contribute-design for more details.
Spring Boot 3 will likely define more clearly the guidelines."

Using 'feign clients' without springboot is possible?

My framework is spring framework. core version is 4.3.16.RELEASE.
Not using springboot. It's one of the legacy project.
And I wanna know what can I use the feign client without springboot.
Is this possible? and where can I found document about that.
thanks for your help :)
Yes, it's possible. You can find the documentation on their Github page.
Feign wasn't integrated with Spring initially. There is another wrapper library called Spring Cloud OpenFeign, and with it, you can use Feign in Spring Boot & Cloud applications more convenient (eg., you can use Spring's #RequestMapping annotation instead of default Feign's #RequestLine).

How to swap Spring Boot mapper from Jackson to kotlinx.serialization

I would like my Spring Boot project to use kotlinx.serialization. I can't figure out how to swap the mapper correctly... If I wanted to use GSON, I could just note it in the props via spring.http.converters.preferred-json-mapper=gson.
Has anyone had success with this?
Just use Spring >= 5.3 and add corresponding kotlin plugin and serialization dependency. Spring switches serialization automatically. Details

Atmosphere without Jersey

I'm writing a web application and wanted to ask if it is possible to use Atmosphere Framework without using Jersey. Do equivalent annotations of e.g. #Produces exist in Atmosphere?
Yes you can use the #ManagedService annotation provided out of the box by the framework: https://github.com/Atmosphere/atmosphere/wiki/Getting-Started-with-the-ManagedService-Annotation

Spring Security without spring core?

I have a really simple question, that I just can't find the answer.
If I want to use only Spring Security, do I need Spring core or any other dependency?
In this link, in the bottom I see only spring security jars as dependencies, but still I couldn't get it to work. I only got it to work when I used a lot more of spring jars (core, context, and more).
So, what are the minimal dependencies I need for using Spring Security? All I need is an authorization and authentication framework, and I want as little dependencies as possible.
Thank you!
For every spring extension you need to use Srping core, because every extension is build on top of spring core

Resources