package ink.wgink.properties; import org.springframework.boot.context.properties.ConfigurationProperties; import org.springframework.stereotype.Component; import java.util.ArrayList; import java.util.List; /** * When you feel like quitting. Think about why you started * 当你想要放弃的时候,想想当初你为何开始 * * @ClassName: TransactionProperties * @Description: 事务 * @Author: WangGeng * @Date: 2021/1/24 19:13 * @Version: 1.0 **/ @Component @ConfigurationProperties(prefix = "transaction") public class TransactionProperties { private List saveList; private List removeList; private List updateList; private List otherList; private List queryList; public List getSaveList() { if (saveList == null) { return new ArrayList<>(); } return saveList; } public void setSaveList(List saveList) { this.saveList = saveList; } public List getRemoveList() { if (removeList == null) { return new ArrayList<>(); } return removeList; } public void setRemoveList(List removeList) { this.removeList = removeList; } public List getUpdateList() { if (updateList == null) { return new ArrayList<>(); } return updateList; } public void setUpdateList(List updateList) { this.updateList = updateList; } public List getOtherList() { if (otherList == null) { return new ArrayList<>(); } return otherList; } public void setOtherList(List otherList) { this.otherList = otherList; } public List getQueryList() { if (queryList == null) { return new ArrayList<>(); } return queryList; } public void setQueryList(List queryList) { this.queryList = queryList; } @Override public String toString() { final StringBuilder sb = new StringBuilder("{"); sb.append("\"saveList\":") .append(saveList); sb.append(",\"removeList\":") .append(removeList); sb.append(",\"updateList\":") .append(updateList); sb.append(",\"otherList\":") .append(otherList); sb.append(",\"queryList\":") .append(queryList); sb.append('}'); return sb.toString(); } }