In a spring project with java i am using the follo...
# spring
s
In a spring project with java i am using the following code
Copy code
@Configuration
@EnableWebMvc
@ComponentScan("com.lynas")
public class WebConfig extends WebMvcConfigurerAdapter {

    @Autowired
    InterceptorConfig interceptor;

}
here i get the interceptor properly the same when i do it in kotlin
Copy code
@Configuration
@EnableWebMvc
@ComponentScan("com.lynas")
open class WebConfig() : WebMvcConfigurerAdapter() {

    @Autowired
    lateinit var interceptor: InterceptorConfig

}
i am getting null when accessing interceptor can anybody tell me why and how to fix this