⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 basebean.java

📁 少有的JSf+Spring+Hibernate的网上购物车,适合要用jsf做项目的同仁参考
💻 JAVA
字号:
/*
 * JCatalog Project
 */
package catalog.view.bean;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
//
import catalog.view.servicelocator.ServiceLocator;

/**
 * @author <a href="mailto:derek_shen@hotmail.com">Derek Y. Shen</a>
 */
public class BaseBean {
	//the logger for this class
	protected final Log logger = LogFactory.getLog(this.getClass());
	
	//the service locator of the business services
	protected ServiceLocator serviceLocator;
	
	public BaseBean() {
	}
	
	public ServiceLocator getServiceLocator() {
		return this.serviceLocator;
	}
	
	public void setServiceLocator(ServiceLocator newServiceLocator) {
		this.logger.debug("service locator is set");
		this.serviceLocator = newServiceLocator;
		
		this.init();
	}
	
	/**
	 * Used to initialize the managed bean.
	 * <p>
	 * Called after the service locator is set.
	 * It is a workaround.
	 * <p>
	 * Once the JSF bean management facility can support init method,
	 * the init method can be configured and called from the JSF implementation directly.
	 */ 
	protected void init() {
	}
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -