Skip to content

Commit

Permalink
refactor(dependency): replace rxjava with rxjava3 during upgrade of s…
Browse files Browse the repository at this point in the history
…pring boot 3.0.x

While upgrading the spring boot to 3.0.13 and spring cloud 2022.0.5, encountered the below errors during build process of kork-stackdriver module:
```
> Task :kork-stackdriver:compileJava FAILED
/kork/kork-stackdriver/src/main/java/com/netflix/spinnaker/config/StackdriverConfig.java:41: error: package rx does not exist
import rx.Observable;
         ^
/kork/kork-stackdriver/src/main/java/com/netflix/spinnaker/config/StackdriverConfig.java:42: error: package rx does not exist
import rx.Scheduler;
         ^
/kork/kork-stackdriver/src/main/java/com/netflix/spinnaker/config/StackdriverConfig.java:43: error: package rx.schedulers does not exist
import rx.schedulers.Schedulers;
                    ^
3 errors
```
Spring boot 3.x deprecated and removed rxjava, and rxjava3 has been added. So, update the dependency.
https://github.com/spring-projects/spring-boot/wiki/Spring-Boot-3.0-Migration-Guide#rxjava
  • Loading branch information
j-sandy committed Dec 19, 2024
1 parent b847d01 commit cac2f84
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion kork-stackdriver/kork-stackdriver.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ apply plugin: "java-library"
dependencies {
api(platform(project(":spinnaker-dependencies")))

api "io.reactivex:rxjava"
api "io.reactivex.rxjava3:rxjava"
api "com.netflix.spectator:spectator-api"
api "com.google.apis:google-api-services-monitoring"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@
import com.netflix.spectator.controllers.filter.PrototypeMeasurementFilter;
import com.netflix.spectator.stackdriver.ConfigParams;
import com.netflix.spectator.stackdriver.StackdriverWriter;
import io.reactivex.rxjava3.core.Observable;
import io.reactivex.rxjava3.core.Scheduler;
import io.reactivex.rxjava3.schedulers.Schedulers;
import java.io.IOException;
import java.net.InetAddress;
import java.util.Date;
Expand All @@ -38,9 +41,6 @@
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.core.env.Environment;
import rx.Observable;
import rx.Scheduler;
import rx.schedulers.Schedulers;

@Configuration
@EnableConfigurationProperties({
Expand Down

0 comments on commit cac2f84

Please sign in to comment.