@Autowired
private RequestMappingHandlerMapping requestMappingHandlerMapping;
@Autowired
private ApplicationContext applicationContext;
@Autowired
private HttpServletRequest request;
Map<RequestMappingInfo, HandlerMethod> handlerMethods = requestMappingHandlerMapping.getHandlerMethods();
try {
HandlerExecutionChain handler = requestMappingHandlerMapping.getHandler(request);
org.springframework.web.method.HandlerMethod.HandlerMethod method = (org.springframework.web.method.HandlerMethod.HandlerMethod)handler.getHandler();
Object bean = method.getBean();
Class<?> beanType = method.getBeanType();标签:Autowiredprivate,getHandler,bean,获取,controller,requestMappingHandlerMapping,Hand From: https://www.cnblogs.com/xiaodu9499/p/16986842.html
System.out.println(
"11"
);
}catch (Exception e){
}