diff --git a/build.gradle b/build.gradle index f88abda..33a83e7 100644 --- a/build.gradle +++ b/build.gradle @@ -34,6 +34,8 @@ dependencies { implementation 'org.springframework.boot:spring-boot-starter-web' implementation 'org.springframework.boot:spring-boot-starter-oauth2-client' implementation 'org.springframework.boot:spring-boot-starter-oauth2-resource-server' + //implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.2.0' + implementation 'io.netty:netty-resolver-dns-native-macos:4.1.82.Final:osx-aarch_64' implementation 'org.springframework.boot:spring-boot-starter-data-jpa' implementation 'org.flywaydb:flyway-core' diff --git a/src/main/java/no/fintlabs/FintKontrollConfiguration.java b/src/main/java/no/fintlabs/FintKontrollConfiguration.java index c283256..ee2670b 100644 --- a/src/main/java/no/fintlabs/FintKontrollConfiguration.java +++ b/src/main/java/no/fintlabs/FintKontrollConfiguration.java @@ -1,10 +1,9 @@ package no.fintlabs; +import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Import; - -@Configuration -@Import(no.fintlabs.securityconfig.FintKontrollSecurityConfig.class) -public class FintKontrollConfiguration { - -} \ No newline at end of file +import org.springframework.security.config.annotation.web.builders.HttpSecurity; +import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity; +import org.springframework.security.config.annotation.web.configurers.AbstractHttpConfigurer; +import org.springframework.security.web.SecurityFilterChain; diff --git a/src/main/java/no/fintlabs/user/UserService.java b/src/main/java/no/fintlabs/user/UserService.java index d2a625a..a8b68b4 100644 --- a/src/main/java/no/fintlabs/user/UserService.java +++ b/src/main/java/no/fintlabs/user/UserService.java @@ -53,8 +53,8 @@ private Consumer onSaveExistingUser(User user) { user.setId(existingUser.getId()); log.info("Update user: " + user.getId()); memberService.process(memberService.create(user)); - userRepository.save(user); - userEntityProducerService.publish(user); + User savedUser = userRepository.save(user); + userEntityProducerService.publish(savedUser); }; }