Where is keycloak starter for Spring Boot? - spring-boot

I'd need to use keycloak in my Spring Boot project. I can see from the many tutorials that it should be available in the Spring Boot Initializr:
However I cannot find it (anymore?) neither with the Cloud app, nor with "spring init". Has it been removed as starter?
Thanks

Yes it has been removed, see this issue for more details. In general going to https://github.com/spring-io/start.spring.io and searching in issues could be an effective way to get some information about the evolution of the service in general.

Related

Azure Active Directory in Spring App Without Boot

I have been trying to set up a Spring Web application to use Azure Active Directory.
All the samples that I have found online are based on Spring Boot, is there a simple example that shows setting up spring framework web app only without using Spring Boot?
I am having no luck finding stuff, I am also trying to figure out how to convert all the spring boot autoconfig. Surely there is a sample somewhere that makes it easy to use for a Spring Framework only web-app?
I was able to figure this out somewhat. I'm very new to OAuth so still trying to learn as I go.
Basically I followed the Spring Reference and got things working using the override auto-configuration sections at https://docs.spring.io/spring-security/reference/servlet/oauth2/index.html
It also helped that I updated the Spring Framework versions to the latest and made sure I used the correct dependencies according to that reference site

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

is it possible to use OSGI with spring boot microservices? Please tell me in detail

I want to use ODL framework for SDN development, in that internally OSGI framework is used to (karaf). Apart from that i want to use spring boot and spring cloud to achieve cloud services also. It is possible to use these all framework as a single unit. and how we can achieve this please tell.
This questions is somewhat overly broad and generic, but I'll try to answer it anyway making two assumptions:
If you want to use Spring Boot / Cloud "in-process", that is within ODL/ Karaf, then the answer to that would be that such an architecture would make little sense. Karaf (not ODL) has some Spring support as far as I know, but you'll probably have a hard time to marry that "nicely" with ODL...
The architecture of ODL is that you define YANG models and the RPCs you define in them "automagically" get exposed as HTTP REST APIs (via something called RESTCONF), and you can then consume those from other applications.
But if by your question you just mean if you can write a separate new Spring Boot / Cloud application and from that invoke OpenDaylight services via remote RESTCONF, then the answer is that this is certainly possible - and the recommended way to write integrations.
BTW: In this context, you may also be interested in https://lighty.io.
PS: You could have a look at https://github.com/vorburger/opendaylight-simple/ for some inspiration as well; but that is a POC which is not ready for consumption by you.
It's possible to use Spring Boot in OSGI container.
Please, see my answer on similar question: Can Spring Boot be used with OSGi ? If not, any plans to have an OSGi Spring Boot?
Here's a link to Spring Boot + Apache Karaf demo app: https://github.com/StasKolodyuk/osgi-spring-boot-demo

BPMN for spring boot 2

We have started new project on spring stack and using latest versions. But we have workflow requirement and I used activiti in past. But as I see there is no spring boot 2 support for activiti and camunda. Can anybody suggest which BPM is best that can be integrated with spring boot 2.
You will find a bunch of Spring Boot 2 starters in the Flowable github repo.
The documentation explains step-by-step how to create a BPM enabled Spring Boot application. There is also the blog post The road to Spring Boot 2.0 that the improved support for Flowable within Spring Boot as part of the Flowable 6.3.0 release.
You ask for suggestions on which BPM is best. Well, I cannot be objective since I am part of the Flowable Team, but I can say that our Spring Boot implementation is pretty neat:
All engines are supported (BPMN, CMMN, DMN), both embedded and exposing their respective REST APIs.
There is an automatic configuration of Spring Security to use the Flowable IDM engine (in case no other custom security is configured).
There is no "EE" version of the starter. Flowable provides Spring Boot 2 support 100% Open Source.
The Spring Actuator integration is quite powerful.
Did I mention Open Source? ;-)
In order to get the all engines you would need to use the flowable-spring-boot-starter(-rest) dependency. The (-rest) needs to be used if you want the Flowable REST APIs to be automatically configured.
There is also the option to run the BPMN, CMMN or DMN engines in standalone mode. For that you would need one of the following dependencies:
flowable-spring-boot-starter-process(-rest)
flowable-spring-boot-starter-cmmn(-rest)
flowable-spring-boot-starter-dmn(-rest)
So, compare for yourself, but for me, it's pretty clear and of course I am open to discussion.
The Activiti is working on Activiti Cloud fully based on Spring Boot 2 and Spring Cloud Finchley (targeting kubernetes deployments, but it can be used outside kubernetes if that is not your thing) if you are looking for a BPMN runtime for Cloud Native applications. We are working hard on releasing the first Beta1 release at the moment, and we will very welcome feedback about it. Hope this helps.
If you use the camunda-bpm-spring-boot-starter you can write self contained services running camunda process engine with spring boot 2.

Spring or Spring boot

As part of a new web application project, I'm planning to learn Spring. I started to read through the Spring framework reference. While I was googling, I came across Spring boot. What I understood is that spring boot helps to build application much faster than spring by reducing configuration. Now I'm little confused whether should I continue learning spring or jump to spring boot. My intention is to understand how spring works as a framework rather than a few features. So please let me know, as a beginner what should I do? First, learn Spring and then spring boot or vice-versa.
Update
Ok, I know it's a while since I asked this question. I kind of have an answer (personal one)
I started with Spring Boot and so far built one Spring Boot REST application. Yes, as others said, Spring Boot, helps you to get started quickly and being new to some language/technology, I would love to see a working module ASAP. So Spring boot helps you with that.
Later depending on your interest, you can start exploring in-depth how Spring boot does that magic.
So, in summary, go with Spring Boot and then deep dive to understand the underlying concept. Again this is my opinion.
Thanks, everyone for your inputs/suggestions.
If you want to develop web applications especially micro-services, I will recommend that you should learn Spring Boot first.
The first reason is that there are many resources and examples on
web, so you can easily find what you need.
The second reason is that Spring Framework (including Spring Boot) is
suitable for PaaS environment especially Pivotal. Therefore you can
rapidly deploy your applications without too much effort.
First of all, learn how Spring applications work.
Spring applications are based on the Object Relation Model. You need to understand the annotations and why we use them. Then you have to learn how Spring MVC works. Up to here, both Spring and Spring Boot are similar. Basically, Spring Boot is made so that a Spring-based application can be made very easily. Spring Boot is very good framework for the Web and other.
After learning the above things, then you can jump easily onto Spring Boot. However, if you jump directly to Spring Boot you will see there are many such things which are not described in the Spring Boot tutorials, since many of them expect that you have some prior knowledge of Spring.

Resources