<%@ page import="org.springframework.web.context.WebApplicationContext"%> <%@ page import="org.springframework.web.context.support.WebApplicationContextUtils"%> <%@ page import="org.springside.bookstore.plugins.quartz.service.BookStockChecker"%> <%@ taglib prefix="authz" uri="http://acegisecurity.org/authz"%> <%-- Author: calvin --%> <%@ page contentType="text/html;charset=UTF-8"%> <%@ include file="/common/taglibs.jsp"%> <%@ include file="/common/meta.jsp"%> " type="text/css" rel=stylesheet> <% //顺便demo一下纯jsp里怎么取得spring管理的bean. WebApplicationContext context = WebApplicationContextUtils .getWebApplicationContext(application); BookStockChecker checker = (BookStockChecker) context .getBean("bookStockChecker"); pageContext.setAttribute("books", checker.getLowStockBooks()); %>
书店管理后台
低库存图书
《${book.name}》 ${book.inventory}本
等待发货订单
当前登陆用户