How can you make the Controller as an Extension use @autowire, because the injector variable via @autowire that is in the Controller is always null
my api
public interface ControllerExt extends ExtensionPoint { }
my controller
@Slf4j
@Extension
@RestController
@RequestMapping("/plugin")
public class PluginController implements ControllerExt {
@Autowired
private ApplicationContext appContext; /* this always null */
@Autowired
private PluginService serv; /* this always null */
@GetMapping("/abc/greetMVC")
public ResponseEntity<String> greetMVC(){
if (appContext != null) {
log.info(appContext.getId());
for (String a : appContext.getBeanDefinitionNames()) {
log.info("appContext " + a);
}
} else {
log.info("appContext null............");
}
log.info(serv.test("test"));
return ResponseEntity.ok().body("An endpoint defined by annotation in plugin : @greetMVC");
}
......
Thank's.
How can you make the Controller as an Extension use @autowire, because the injector variable via @autowire that is in the Controller is always null
my api
my controller
Thank's.