@Value gets the configuration file value and returns null

The @value gets the configuration file Value returns NULL
In custom parameters parser implementation HandlerMethodArgumentResolver subclasses, access to @ the Value label Value is null.
Example:

@Configuration
public class ArgumentResolverConfig extends WebMvcConfigurerAdapter {


    @Override
    public void addArgumentResolvers(List<HandlerMethodArgumentResolver> argumentResolvers) 
    {
        argumentResolvers.add(new UserArgumentResolver());
    }

}

Direct new UserArgumentResolver(), not managed by the Spring container, so use @value to get an invalid Value in the UserArgumentResolver
Revised:

@Configuration
public class ArgumentResolverConfig extends WebMvcConfigurerAdapter {

    @Bean
    public UserArgumentResolver getUserArgumentResolver(){
        return new UserArgumentResolver();
    }

    @Override
    public void addArgumentResolvers(List<HandlerMethodArgumentResolver> argumentResolvers) {
        argumentResolvers.add(getUserArgumentResolver());
    }
}

The @bean annotation is given to the Spring container-managed Bean, at which point @Value gets the configuration file Value.

Read More: