如何在spring quartz类中拿到ServletContext
ContextLoader.getCurrentWebApplicationContext().getServletContext()
web.xml里加个:
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>
ContextLoader.getCurrentWebApplicationContext().getServletContext()
web.xml里加个:
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>