Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade to Spring Boot 3 #292

Open
jimbethancourt opened this issue Jun 29, 2023 · 0 comments
Open

Upgrade to Spring Boot 3 #292

jimbethancourt opened this issue Jun 29, 2023 · 0 comments

Comments

@jimbethancourt
Copy link
Contributor

I've figured out how to get OpenRewrite migration recipes working and have run the Spring Boot 2.7 --> Spring Boot 3 recipe on the next_version branch and thought it would be a great way to try something big by running it on Galapagos.

Unfortunately Keycloak has been deprecated and I'm not familiar with implementing Spring Security's OAuth 2 authentication, so this will need to be addressed since I have commented out the SecurityConfig class at this time. It would likely make the most sense to create a separate branch for this work to be done on the galapagos repository before merging into main.

Can one of the Galapagos maintainers update the SecurityConfig class to use Spring Security OAuth 2?

@jimbethancourt jimbethancourt changed the title Upgrade to Spring Boot 3.x Upgrade to Spring Boot 3 Jun 29, 2023
jimbethancourt added a commit to jimbethancourt/galapagos that referenced this issue Jun 29, 2023
Please note:
- Galapagos is now on Java 17
- KafkaSenderImpl no longer needs KafkaFutureDecoupler since kafkaTemlate.send() now returns a CompletableFuture
- KafkaSenderImplTest now performs an assertFalse() as a result
- SecurityConfig has been commented out since Keycloak is deprecated and not supported in Spring Boot 3 / Spring 6. Unfortunately I don't know how to implement OAuth 2 at this time either.

I can't seem to figure out how to run it locally - I get a 401 error when I try to run it from my IDE with the demo,democonf,actuator profiles:

Could not access or read /service_accounts workaround endpoint: Server returned 401 for /service_accounts

OpenRewrite configuration used to perform migration:
```xml
<plugin>
	<groupId>org.openrewrite.maven</groupId>
	<artifactId>rewrite-maven-plugin</artifactId>
	<version>5.2.4</version>
	<configuration>
		<activeRecipes>
			<recipe>org.openrewrite.java.spring.boot3.UpgradeSpringBoot_3_0</recipe>
		</activeRecipes>
	</configuration>
	<dependencies>
		<dependency>
			<groupId>org.openrewrite.recipe</groupId>
			<artifactId>rewrite-spring</artifactId>
			<version>5.0.2</version>
		</dependency>
	</dependencies>
</plugin>
```
jimbethancourt added a commit to jimbethancourt/galapagos that referenced this issue Jul 13, 2023
…oaded method to KafkaFutureDecoupler to accept new return type of kafkaTemplate.send()
albrechtflo-hg added a commit that referenced this issue Jul 20, 2023
* #292 Migrated to Spring Boot 3 using OpenRewrite

* Galapagos is now on Java 17
* Convert HttpSecurity configuration to Spring Security 6.1
* Replaced Keycloak libs with Standard OAuth2 libs and configuration

---------

Co-authored-by: Florian Albrecht <53865486+albrechtflo-hg@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant