Skip to content

Commit

Permalink
feat: ny prosess task rest. Bruk felles-server (#2614)
Browse files Browse the repository at this point in the history
  • Loading branch information
mrsladek authored Dec 11, 2024
1 parent e787a17 commit 4aa2da5
Show file tree
Hide file tree
Showing 9 changed files with 28 additions and 13 deletions.
4 changes: 4 additions & 0 deletions domenetjenester/vedtak/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,10 @@
<groupId>no.nav.foreldrepenger.felles.integrasjon</groupId>
<artifactId>kafka-properties</artifactId>
</dependency>
<dependency>
<groupId>no.nav.foreldrepenger.felles</groupId>
<artifactId>felles-server</artifactId>
</dependency>

<dependency>
<groupId>io.swagger.core.v3</groupId>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,23 +1,24 @@
package no.nav.foreldrepenger.abakus.vedtak.kafka;


import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import jakarta.enterprise.context.ApplicationScoped;
import jakarta.inject.Inject;
import no.nav.vedtak.felles.integrasjon.kafka.KafkaConsumerManager;
import no.nav.vedtak.log.metrics.Controllable;
import no.nav.vedtak.log.metrics.LiveAndReadinessAware;
import no.nav.vedtak.server.Controllable;
import no.nav.vedtak.server.LiveAndReadinessAware;

@ApplicationScoped
public class VedtakConsumer implements LiveAndReadinessAware, Controllable {

private static final Logger LOG = LoggerFactory.getLogger(VedtakConsumer.class);

private KafkaConsumerManager<String, String> kcm;
private String topic;

VedtakConsumer() {
// CDI proxy
}

@Inject
Expand Down
6 changes: 3 additions & 3 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<parent>
<groupId>no.nav.foreldrepenger.felles</groupId>
<artifactId>fp-bom</artifactId>
<version>3.6.1</version>
<version>3.6.2</version>
</parent>

<groupId>no.nav.foreldrepenger.abakus</groupId>
Expand Down Expand Up @@ -36,7 +36,7 @@
<kontrakt.java.version>21</kontrakt.java.version>

<felles.version>7.4.3</felles.version>
<prosesstask.version>5.0.21</prosesstask.version>
<prosesstask.version>5.1.0</prosesstask.version>
<kontrakter.version>9.2.0</kontrakter.version>
<tidsserie.version>2.7.1</tidsserie.version>

Expand All @@ -54,7 +54,7 @@
<dependency>
<groupId>no.nav.foreldrepenger.felles</groupId>
<artifactId>fp-bom</artifactId>
<version>3.6.1</version>
<version>3.6.2</version>
<scope>import</scope>
<type>pom</type>
</dependency>
Expand Down
4 changes: 4 additions & 0 deletions web/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,10 @@
<groupId>no.nav.foreldrepenger.felles</groupId>
<artifactId>felles-util</artifactId>
</dependency>
<dependency>
<groupId>no.nav.foreldrepenger.felles</groupId>
<artifactId>felles-server</artifactId>
</dependency>

<!-- Database håndtering -->
<dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import no.nav.vedtak.log.metrics.LiveAndReadinessAware;
import no.nav.vedtak.server.LiveAndReadinessAware;

@ApplicationScoped
public class DatabaseHealthCheck implements LiveAndReadinessAware {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,15 @@
import jakarta.ws.rs.core.CacheControl;
import jakarta.ws.rs.core.Response;

import no.nav.vedtak.server.LivenessAware;

import no.nav.vedtak.server.ReadinessAware;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import io.swagger.v3.oas.annotations.Operation;
import no.nav.foreldrepenger.abakus.app.tjenester.ApplicationServiceStarter;
import no.nav.vedtak.log.metrics.LivenessAware;
import no.nav.vedtak.log.metrics.ReadinessAware;

@Path("/health")
@Produces(TEXT_PLAIN)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,15 @@
import java.util.concurrent.TimeUnit;
import java.util.stream.Collectors;

import no.nav.vedtak.server.Controllable;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import jakarta.enterprise.context.ApplicationScoped;
import jakarta.enterprise.inject.Any;
import jakarta.enterprise.inject.Instance;
import jakarta.inject.Inject;
import no.nav.vedtak.log.metrics.Controllable;

/**
* Initialiserer applikasjontjenester som implementer AppServiceHandler
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,16 @@

import java.util.List;

import no.nav.vedtak.server.LivenessAware;

import no.nav.vedtak.server.ReadinessAware;

import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
import org.mockito.Mock;

import no.nav.foreldrepenger.abakus.app.tjenester.ApplicationServiceStarter;
import no.nav.vedtak.log.metrics.LivenessAware;
import no.nav.vedtak.log.metrics.ReadinessAware;

import org.mockito.junit.jupiter.MockitoExtension;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,14 @@

import static org.mockito.Mockito.verify;

import no.nav.vedtak.server.Controllable;

import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
import org.mockito.Mock;
import org.mockito.junit.jupiter.MockitoExtension;

import no.nav.vedtak.log.metrics.Controllable;

@ExtendWith(MockitoExtension.class)
class ApplicationServiceStarterTest {
Expand Down

0 comments on commit 4aa2da5

Please sign in to comment.