Przeglądaj źródła

测试

Signed-off-by: EDZ <1>
EDZ 3 lat temu
rodzic
commit
451f6fc6cd

+ 3 - 0
src/main/java/net/chenlin/dp/modules/sys/service/impl/testU8ServiceImpl.java

@@ -5,6 +5,8 @@ import net.chenlin.dp.modules.sys.dao.TestU8Mapper;
 import net.chenlin.dp.modules.sys.service.testU8Service;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Propagation;
+import org.springframework.transaction.annotation.Transactional;
 
 
 /**
@@ -27,6 +29,7 @@ public class testU8ServiceImpl implements testU8Service {
 	 * @param upTime
 	 * @return
 	 */
+	@Transactional(propagation = Propagation.REQUIRES_NEW)
 	@Override
 	public int callGetMaxCode(String upTime) {
 		DynamicDataSource.setDataSource("slave-data-source");