All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.zcj.web.businesslog.BusinessLogObjectHolder Maven / Gradle / Ivy

There is a newer version: 1.1.38
Show newest version
package com.zcj.web.businesslog;

import com.zcj.web.spring.SpringBeanUtil;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Component;
import org.springframework.web.context.WebApplicationContext;

import java.io.Serializable;

@Component
@Scope(scopeName = WebApplicationContext.SCOPE_SESSION)
public class BusinessLogObjectHolder implements Serializable {

    private static final long serialVersionUID = 1L;

    // 用于记录日志时识别修改的内容
    private T object = null;

    public void set(T obj) {
        this.object = obj;
    }

    public T get() {
        return object;
    }

    public static BusinessLogObjectHolder me() {
        return SpringBeanUtil.getBean(BusinessLogObjectHolder.class);
    }
    
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy