master
YunaiV 2026-06-13 23:55:22 +08:00
commit cb5f6750ca
3 changed files with 19 additions and 12 deletions

View File

@ -30,6 +30,7 @@ import org.springframework.boot.context.properties.EnableConfigurationProperties
import org.springframework.boot.web.servlet.FilterRegistrationBean; import org.springframework.boot.web.servlet.FilterRegistrationBean;
import org.springframework.context.ApplicationContext; import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Primary; import org.springframework.context.annotation.Primary;
import org.springframework.data.redis.cache.BatchStrategies; import org.springframework.data.redis.cache.BatchStrategies;
import org.springframework.data.redis.cache.RedisCacheConfiguration; import org.springframework.data.redis.cache.RedisCacheConfiguration;
@ -172,13 +173,6 @@ public class YudaoTenantAutoConfiguration {
return new TenantRocketMQInitializer(); return new TenantRocketMQInitializer();
} }
// ========== Job ==========
@Bean
public TenantJobAspect tenantJobAspect(TenantFrameworkService tenantFrameworkService) {
return new TenantJobAspect(tenantFrameworkService);
}
// ========== Redis ========== // ========== Redis ==========
@Bean @Bean
@ -200,4 +194,17 @@ public class YudaoTenantAutoConfiguration {
return cacheManager; return cacheManager;
} }
// ========== Job ==========
@Configuration(proxyBeanMethods = false)
@ConditionalOnClass(name = "com.xxl.job.core.context.XxlJobContext")
public static class TenantJobConfiguration {
@Bean
public TenantJobAspect tenantJobAspect(TenantFrameworkService tenantFrameworkService) {
return new TenantJobAspect(tenantFrameworkService);
}
}
} }

View File

@ -75,8 +75,8 @@ spring:
username: root username: root
password: 123456 password: 123456
# tdengine: # IoT 数据库(需要 IoT 物联网再开启噢!) # tdengine: # IoT 数据库(需要 IoT 物联网再开启噢!)
# url: jdbc:TAOS-WS://127.0.0.1:6041/ruoyi_vue_pro # url: jdbc:TAOS-WS://127.0.0.1:6041/ruoyi_vue_pro?enableAutoReconnect=true # 参见https://t.zsxq.com/qaX9c开启 TDengine WebSocket 自动重连
# driver-class-name: com.taosdata.jdbc.rs.RestfulDriver # driver-class-name: com.taosdata.jdbc.ws.WebSocketDriver
# username: root # username: root
# password: taosdata # password: taosdata
# druid: # druid:

View File

@ -69,8 +69,8 @@ spring:
username: root username: root
password: 123456 password: 123456
# tdengine: # IoT 数据库(需要 IoT 物联网再开启噢!) # tdengine: # IoT 数据库(需要 IoT 物联网再开启噢!)
# url: jdbc:TAOS-WS://127.0.0.1:6041/ruoyi_vue_pro # url: jdbc:TAOS-WS://127.0.0.1:6041/ruoyi_vue_pro?enableAutoReconnect=true # 参见https://t.zsxq.com/qaX9c开启 TDengine WebSocket 自动重连
# driver-class-name: com.taosdata.jdbc.rs.RestfulDriver # driver-class-name: com.taosdata.jdbc.ws.WebSocketDriver
# username: root # username: root
# password: taosdata # password: taosdata
# druid: # druid: