通过本文主要向大家介绍了spring boot jsp,springmvc jsp,spring mvc jsp传值,spring jsp,springmvc不拦截jsp等相关知识,希望对您有所帮助,也希望大家支持linkedu.com www.linkedu.com
<%@ page import="org.springframework.web.context.support.WebApplicationContextUtils"%> <%@ page import="org.springframework.context.ApplicationContext"%> ServletContext sc = this.getServletConfig().getServletContext(); ApplicationContext ac2 = WebApplicationContextUtils.getWebApplicationContext(sc);</div>
要获取的对象 serv = (要获取的对象) ac2.getBean("spring配置文件中的id");