Commit 1aef3e57 authored by Alex Segers's avatar Alex Segers

Merge branch 'bug-fix/AFP-91' into 'dev'

🔀  [AFP-91] 🐛 Fix dependency injection error in 'AnnotationConfig' (@asegers)

See merge request !40
parents 1be04ca2 e7f80d3a
Pipeline #1734 failed with stage
in 38 seconds
......@@ -2,27 +2,21 @@ package com.afp.ordermanagement.config;
import com.afp.ordermanagement.annotation.AccessTokenResolver;
import com.afp.ordermanagement.annotation.ManagerPayloadResolver;
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
import org.springframework.boot.autoconfigure.condition.ConditionalOnWebApplication;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.reactive.config.EnableWebFlux;
import org.springframework.web.reactive.config.WebFluxConfigurer;
import org.springframework.web.reactive.result.method.annotation.ArgumentResolverConfigurer;
@Configuration
//@ConditionalOnClass(EnableWebFlux.class) // checks that WebFlux is on the classpath
//@ConditionalOnWebApplication(type = ConditionalOnWebApplication.Type.REACTIVE)
//@EnableWebFlux
public class AnnotationConfig implements WebFluxConfigurer {
@Override
public void configureArgumentResolvers(ArgumentResolverConfigurer configurer) {
configurer.addCustomResolver(accessTokenResolver());
configurer.addCustomResolver(managerPayloadResolver());
public void configureArgumentResolvers(ArgumentResolverConfigurer config) {
config.addCustomResolver(accessTokenResolve());
config.addCustomResolver(managerPayloadResolver());
}
@Bean
public AccessTokenResolver accessTokenResolver() {
public AccessTokenResolver accessTokenResolve() {
return new AccessTokenResolver();
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment