diff --git a/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/AftersalesApplication.java b/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/AftersalesApplication.java index ec7941caf..ed1163063 100644 --- a/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/AftersalesApplication.java +++ b/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/AftersalesApplication.java @@ -27,7 +27,6 @@ import org.springblade.core.transaction.annotation.SeataCloudApplication; * @author Chill */ @BladeCloudApplication -@SeataCloudApplication //@EnableWebSocket public class AftersalesApplication { @@ -35,6 +34,7 @@ public class AftersalesApplication { BladeApplication.run(ModuleNameConstant.APPLICATION_AFTERSALES_NAME, AftersalesApplication.class, args); } + /** * 如果直接使用springboot的内置容器,而不是使用独立的servlet容器,就要注入ServerEndpointExporter,外部容器则不需要。 */ diff --git a/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/aspect/AsyncAnnotationAspect.java b/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/aspect/AsyncAnnotationAspect.java index ab25d4441..4057ca293 100644 --- a/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/aspect/AsyncAnnotationAspect.java +++ b/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/aspect/AsyncAnnotationAspect.java @@ -54,28 +54,28 @@ public class AsyncAnnotationAspect { * @return 返回被拦截方法的执行结果。 * @throws Throwable 如果执行过程中发生异常,则抛出。 */ - @Around("@annotation(org.springframework.amqp.rabbit.annotation.RabbitListener)") - public Object rabbitMethods(ProceedingJoinPoint joinPoint) throws Throwable { - // 在方法执行前,获取当前租户ID并设置到数据源上下文中 - String tenantId = AuthUtil.getTenantId(); - DynamicDataSourceContextHolder.push(tenantId); - // 执行原方法 - Object result = joinPoint.proceed(); - // 在方法执行后,从数据源上下文中移除租户ID - DynamicDataSourceContextHolder.poll(); - return result; - } - @Around("@annotation(org.springframework.amqp.rabbit.annotation.RabbitHandler)") - public Object rabbitHandlerMethods(ProceedingJoinPoint joinPoint) throws Throwable { - // 在方法执行前,获取当前租户ID并设置到数据源上下文中 - String tenantId = AuthUtil.getTenantId(); - DynamicDataSourceContextHolder.push(tenantId); - // 执行原方法 - Object result = joinPoint.proceed(); - // 在方法执行后,从数据源上下文中移除租户ID - DynamicDataSourceContextHolder.poll(); - return result; - } +// @Around("@annotation(org.springframework.amqp.rabbit.annotation.RabbitListener)") +// public Object rabbitMethods(ProceedingJoinPoint joinPoint) throws Throwable { +// // 在方法执行前,获取当前租户ID并设置到数据源上下文中 +// String tenantId = AuthUtil.getTenantId(); +// DynamicDataSourceContextHolder.push(tenantId); +// // 执行原方法 +// Object result = joinPoint.proceed(); +// // 在方法执行后,从数据源上下文中移除租户ID +// DynamicDataSourceContextHolder.poll(); +// return result; +// } +// @Around("@annotation(org.springframework.amqp.rabbit.annotation.RabbitHandler)") +// public Object rabbitHandlerMethods(ProceedingJoinPoint joinPoint) throws Throwable { +// // 在方法执行前,获取当前租户ID并设置到数据源上下文中 +// String tenantId = AuthUtil.getTenantId(); +// DynamicDataSourceContextHolder.push(tenantId); +// // 执行原方法 +// Object result = joinPoint.proceed(); +// // 在方法执行后,从数据源上下文中移除租户ID +// DynamicDataSourceContextHolder.poll(); +// return result; +// } } diff --git a/blade-service/logpm-factory/src/main/java/com/logpm/factory/config/RabbitMqConfiguration.java b/blade-service/logpm-factory/src/main/java/com/logpm/factory/config/RabbitMqConfiguration.java index c3bc207c4..8171a6d3c 100644 --- a/blade-service/logpm-factory/src/main/java/com/logpm/factory/config/RabbitMqConfiguration.java +++ b/blade-service/logpm-factory/src/main/java/com/logpm/factory/config/RabbitMqConfiguration.java @@ -27,7 +27,7 @@ import static io.protostuff.MapSchema.MessageFactories.HashMap; public class RabbitMqConfiguration { @Bean - public RabbitTemplate createRabbitTemplate(ConnectionFactory connectionFactory,CustomMessageConverter converter) { + public RabbitTemplate createRabbitTemplate(ConnectionFactory connectionFactory, CustomMessageConverter converter) { RabbitTemplate template = new RabbitTemplate(); template.setConnectionFactory(connectionFactory); template.setMandatory(true); diff --git a/blade-service/logpm-factory/src/main/java/com/logpm/factory/interceptor/LocalServerLoginAccountsInterceptor.java b/blade-service/logpm-factory/src/main/java/com/logpm/factory/interceptor/LocalServerLoginAccountsInterceptor.java index a0d700005..2c744732a 100644 --- a/blade-service/logpm-factory/src/main/java/com/logpm/factory/interceptor/LocalServerLoginAccountsInterceptor.java +++ b/blade-service/logpm-factory/src/main/java/com/logpm/factory/interceptor/LocalServerLoginAccountsInterceptor.java @@ -43,7 +43,7 @@ public class LocalServerLoginAccountsInterceptor extends HandlerInterceptorAdapt try { - JSONObject data =bladeRedis.get(CacheNames.LOCAL_SERVER_USER+"admin"); + JSONObject data =bladeRedis.get(CacheNames.LOCAL_SERVER_USER+"shujutongbu"); CustomHttpServletRequestWrapper wrappedRequest = new CustomHttpServletRequestWrapper(request); if(Objects.isNull(data)){ String url = "http://"+ LauncherConstant.loginAddr(AppConstant.DEV_CODE)+"/blade-auth/oauth/token"; diff --git a/blade-service/logpm-factory/src/main/resources/application.yml b/blade-service/logpm-factory/src/main/resources/application.yml index 245dc4cfd..6ccf9fc90 100644 --- a/blade-service/logpm-factory/src/main/resources/application.yml +++ b/blade-service/logpm-factory/src/main/resources/application.yml @@ -22,11 +22,8 @@ oss: #blade配置 blade: - #本地文件上传 - file: - remote-mode: true - upload-domain: http://localhost:8999 - remote-path: /usr/share/nginx/html + data-scope: + enabled: false logging: config: classpath:logback.xml diff --git a/blade-service/logpm-old-project/src/main/resources/application.yml b/blade-service/logpm-old-project/src/main/resources/application.yml index ab56f1cbd..54fc94c20 100644 --- a/blade-service/logpm-old-project/src/main/resources/application.yml +++ b/blade-service/logpm-old-project/src/main/resources/application.yml @@ -10,7 +10,10 @@ swagger: - org.springblade - com.logpm - +#blade配置 +blade: + data-scope: + enabled: false logging: config: classpath:logback.xml diff --git a/blade-service/logpm-supervise/src/main/java/com/logpm/supervise/SuperviseApplication.java b/blade-service/logpm-supervise/src/main/java/com/logpm/supervise/SuperviseApplication.java index 6447a3269..0dbf98df6 100644 --- a/blade-service/logpm-supervise/src/main/java/com/logpm/supervise/SuperviseApplication.java +++ b/blade-service/logpm-supervise/src/main/java/com/logpm/supervise/SuperviseApplication.java @@ -13,7 +13,6 @@ import org.springblade.core.transaction.annotation.SeataCloudApplication; * @author lmy */ @BladeCloudApplication -@SeataCloudApplication public class SuperviseApplication { public static void main(String[] args) { diff --git a/blade-service/logpm-supervise/src/main/java/com/logpm/supervise/aspect/AsyncAnnotationAspect.java b/blade-service/logpm-supervise/src/main/java/com/logpm/supervise/aspect/AsyncAnnotationAspect.java index d85373d55..f5f0be02b 100644 --- a/blade-service/logpm-supervise/src/main/java/com/logpm/supervise/aspect/AsyncAnnotationAspect.java +++ b/blade-service/logpm-supervise/src/main/java/com/logpm/supervise/aspect/AsyncAnnotationAspect.java @@ -54,28 +54,28 @@ public class AsyncAnnotationAspect { * @return 返回被拦截方法的执行结果。 * @throws Throwable 如果执行过程中发生异常,则抛出。 */ - @Around("@annotation(org.springframework.amqp.rabbit.annotation.RabbitListener)") - public Object rabbitMethods(ProceedingJoinPoint joinPoint) throws Throwable { - // 在方法执行前,获取当前租户ID并设置到数据源上下文中 - String tenantId = AuthUtil.getTenantId(); - DynamicDataSourceContextHolder.push(tenantId); - // 执行原方法 - Object result = joinPoint.proceed(); - // 在方法执行后,从数据源上下文中移除租户ID - DynamicDataSourceContextHolder.poll(); - return result; - } +// @Around("@annotation(org.springframework.amqp.rabbit.annotation.RabbitListener)") +// public Object rabbitMethods(ProceedingJoinPoint joinPoint) throws Throwable { +// // 在方法执行前,获取当前租户ID并设置到数据源上下文中 +// String tenantId = AuthUtil.getTenantId(); +// DynamicDataSourceContextHolder.push(tenantId); +// // 执行原方法 +// Object result = joinPoint.proceed(); +// // 在方法执行后,从数据源上下文中移除租户ID +// DynamicDataSourceContextHolder.poll(); +// return result; +// } - @Around("@annotation(org.springframework.amqp.rabbit.annotation.RabbitHandler)") - public Object rabbitHandlerMethods(ProceedingJoinPoint joinPoint) throws Throwable { - // 在方法执行前,获取当前租户ID并设置到数据源上下文中 - String tenantId = AuthUtil.getTenantId(); - DynamicDataSourceContextHolder.push(tenantId); - // 执行原方法 - Object result = joinPoint.proceed(); - // 在方法执行后,从数据源上下文中移除租户ID - DynamicDataSourceContextHolder.poll(); - return result; - } +// @Around("@annotation(org.springframework.amqp.rabbit.annotation.RabbitHandler)") +// public Object rabbitHandlerMethods(ProceedingJoinPoint joinPoint) throws Throwable { +// // 在方法执行前,获取当前租户ID并设置到数据源上下文中 +// String tenantId = AuthUtil.getTenantId(); +// DynamicDataSourceContextHolder.push(tenantId); +// // 执行原方法 +// Object result = joinPoint.proceed(); +// // 在方法执行后,从数据源上下文中移除租户ID +// DynamicDataSourceContextHolder.poll(); +// return result; +// } }