Skip to content

Commit

Permalink
Fix beans priority
Browse files Browse the repository at this point in the history
  • Loading branch information
DKarim committed Jul 10, 2024
1 parent 813744f commit 004bdb8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,12 @@
package com.agorapulse.micronaut.newrelic.limitation;

import com.agorapulse.micronaut.newrelic.AsyncNewRelicInsightsService;
import io.micronaut.context.annotation.Replaces;
import io.micronaut.context.annotation.Requires;
import jakarta.inject.Singleton;

@Requires(beans = AsyncNewRelicInsightsService.class)
@Replaces(FallbackNewRelicLimitationsService.class)
@Singleton
public class AsyncNewRelicLimitationsService implements NewRelicLimitationsService {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,13 @@

import com.agorapulse.micronaut.newrelic.DefaultNewRelicInsightsService;
import io.micronaut.context.annotation.Primary;
import io.micronaut.context.annotation.Replaces;
import io.micronaut.context.annotation.Requires;
import jakarta.inject.Singleton;

@Primary
@Requires(beans = DefaultNewRelicInsightsService.class)
@Replaces(FallbackNewRelicLimitationsService.class)
@Singleton
public class DefaultNewRelicLimitationsService implements NewRelicLimitationsService {

Expand Down

0 comments on commit 004bdb8

Please sign in to comment.