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

Support upgrades for Spring Cloud Stream #672

Open
seachicken opened this issue Jan 31, 2025 · 1 comment
Open

Support upgrades for Spring Cloud Stream #672

seachicken opened this issue Jan 31, 2025 · 1 comment
Labels
recipe Recipe requested

Comments

@seachicken
Copy link
Contributor

Hello, thanks for the fascinating tool! I ran the upgrade recipe to boot 2.7 on the below project using Maven CLI, but the application ran into an error when running because spring-cloud-stream-dependencies was not upgraded.

My Environment

  • Maven 3.9.9
  • OpenJDK 1.8.0_362
  • Spring Boot 1.5.2

Run:

mvn -U org.openrewrite.maven:rewrite-maven-plugin:run \
            -Drewrite.recipeArtifactCoordinates=org.openrewrite.recipe:rewrite-spring:LATEST \
            -Drewrite.activeRecipes=org.openrewrite.java.spring.boot2.UpgradeSpringBoot_2_7

Error occurred on runtime:

2025-01-31 17:49:39.771 ERROR 64501 --- [           main] o.s.boot.SpringApplication               : Application run failed

java.lang.IllegalArgumentException: Could not find class [org.springframework.boot.actuate.autoconfigure.EndpointAutoConfiguration]
	at org.springframework.util.ClassUtils.resolveClassName(ClassUtils.java:341) ~[spring-core-5.3.31.jar:5.3.31]
	at org.springframework.core.annotation.TypeMappedAnnotation.adapt(TypeMappedAnnotation.java:474) ~[spring-core-5.3.31.jar:5.3.31]
	at org.springframework.core.annotation.TypeMappedAnnotation.getValue(TypeMappedAnnotation.java:397) ~[spring-core-5.3.31.jar:5.3.31]
	at org.springframework.core.annotation.TypeMappedAnnotation.asMap(TypeMappedAnnotation.java:283) ~[spring-core-5.3.31.jar:5.3.31]
	at org.springframework.core.annotation.AbstractMergedAnnotation.asAnnotationAttributes(AbstractMergedAnnotation.java:193) ~[spring-core-5.3.31.jar:5.3.31]
	at org.springframework.core.type.AnnotatedTypeMetadata.getAnnotationAttributes(AnnotatedTypeMetadata.java:106) ~[spring-core-5.3.31.jar:5.3.31]
	at org.springframework.core.type.AnnotatedTypeMetadata.getAnnotationAttributes(AnnotatedTypeMetadata.java:81) ~[spring-core-5.3.31.jar:5.3.31]
	at org.springframework.context.annotation.AnnotationConfigUtils.attributesFor(AnnotationConfigUtils.java:285) ~[spring-context-5.3.31.jar:5.3.31]
	at org.springframework.context.annotation.AnnotationBeanNameGenerator.determineBeanNameFromAnnotation(AnnotationBeanNameGenerator.java:103) ~[spring-context-5.3.31.jar:5.3.31]
...

I read the OpenRewrite documentation but could not find a page for Spring Cloud Stream, so do you have plans to support upgrading Spring Cloud Stream? Or can I contribute by adding a recipe to rewrite-spring?

Originally posted by @seachicken in openrewrite/rewrite#4976

@timtebeek timtebeek added the recipe Recipe requested label Feb 3, 2025
@timtebeek
Copy link
Contributor

hi @seachicken ! Any help developing Spring Cloud Stream related recipes would be much appreciated! Feel free to start with a draft pull request containing a couple of tests of the migrations you'd like to see, and then we'll figure out the next steps from there.

@timtebeek timtebeek moved this to Recipes Wanted in OpenRewrite Feb 3, 2025
@timtebeek timtebeek changed the title Are there plans to support upgrades for Spring Cloud Stream? Support upgrades for Spring Cloud Stream Feb 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
recipe Recipe requested
Projects
Status: Recipes Wanted
Development

No branches or pull requests

2 participants