package com.changhong.epc.demo.rest; import com.changhong.epc.constter.demo.DemoUrlConst; import com.changhong.epc.constter.system.DataSourceKey; import com.changhong.epc.constter.system.SystemClients; import com.changhong.epc.demo.service.tenant.log.ProessLogService; import com.iemsoft.framework.cloud.core.thread.Keys; import com.iemsoft.framework.cloud.core.thread.ThreadData; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RestController; import javax.annotation.Resource; @RestController public class DemoRest implements DemoUrlConst, SystemClients{ @Resource(name="proessLogService") private ProessLogService proessLogService; /** * 修改,测试清缓存 * @return */ @PostMapping("/save") public int save(){ ThreadData.set(Keys.DATA_SOURCE, DataSourceKey.TENANT_DATA_2_SOURCE); proessLogService.save(); return 0; } }