diff --git a/note.md b/note.md index e65b028..e1817c5 100644 --- a/note.md +++ b/note.md @@ -16,7 +16,9 @@ 渠道isli关联编码:999998-000000001920-2 -# 定时人物 sql +```sql + +# quartz sql # # In your Quartz properties file, you'll need to set # org.quartz.jobStore.driverDelegateClass = org.quartz.impl.jdbcjobstore.StdJDBCDelegate @@ -195,4 +197,6 @@ CREATE INDEX IDX_QRTZ_FT_JG ON QRTZ_FIRED_TRIGGERS(SCHED_NAME,JOB_GROUP); CREATE INDEX IDX_QRTZ_FT_T_G ON QRTZ_FIRED_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP); CREATE INDEX IDX_QRTZ_FT_TG ON QRTZ_FIRED_TRIGGERS(SCHED_NAME,TRIGGER_GROUP); -commit; \ No newline at end of file +commit; + +``` \ No newline at end of file diff --git a/src/main/java/cn/chjyj/szwh/service/impl/GoodsServiceImpl.java b/src/main/java/cn/chjyj/szwh/service/impl/GoodsServiceImpl.java index 3cb3a53..72c13ee 100644 --- a/src/main/java/cn/chjyj/szwh/service/impl/GoodsServiceImpl.java +++ b/src/main/java/cn/chjyj/szwh/service/impl/GoodsServiceImpl.java @@ -25,6 +25,7 @@ import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; +import org.springframework.transaction.PlatformTransactionManager; import java.text.SimpleDateFormat; import java.util.*; @@ -41,6 +42,11 @@ public class GoodsServiceImpl implements GoodsService { // 操作日志 @Autowired private OperationLogMapper operationLogMapper; + /** + * springboot 自带事物 + */ + @Autowired + private PlatformTransactionManager platformTransactionManager; @Override public List getGoodsList(int page) { diff --git a/urls.md b/urls.md index b55f179..665bb8d 100644 --- a/urls.md +++ b/urls.md @@ -18,5 +18,8 @@ 8. [SpringBoot+Quartz动态管理定时任务](https://blog.csdn.net/xy294636185/article/details/123951509) +9.[Spring Boot 手动使用事务PlatformTransactionManager](https://blog.csdn.net/prison123456/article/details/119778026) -10. [httpclient发送get,post,设置header](https://blog.csdn.net/x19910818a/article/details/78491676) \ No newline at end of file +10. [httpclient发送get,post,设置header](https://blog.csdn.net/x19910818a/article/details/78491676) + +11.[springboot手动新建事务和提交事务](https://blog.csdn.net/libingbojava/article/details/125008416) \ No newline at end of file