1、spring redis session超时配置
<bean class="org.springframework.session.data.redis.config.annotation.web.http.RedisHttpSessionConfiguration">
<!-- 过期时间4小时 -->
<property name="maxInactiveIntervalInSeconds" value="14400"></property>
</bean>
2、spring 事物使用
public void doDel(){
final List<Object[]> list = new ArrayList<Object[]>();
TsJdbcTemplate template = TsJdbcSingletonProvider.get().getTsJdbcTemplateByTable(TicketHelper.PLUGIN_ID, "TABLE");
template.execute(new TransactionCallbackWithoutResult() { @Override
protected void doInTransactionWithoutResult(TransactionStatus status) { TsJdbcSingletonProvider.get().getTsJdbcTemplateByTable(TicketHelper.PLUGIN_ID, "TABLE").batchUpdate("", list);
// 批量操作
}
});
}