推荐 最新
D_Y_大师

sentinel做热点参数限流的源码是哪个类?

目前只看了滑动窗口的实现,但是如果有热点参数限流的话,想看一下怎么实现的 有大佬看过的,请教一下 或者有哪有这块限流算法的源码解析的文档,可以推荐推荐推荐

17
1
0
浏览量272
我买了30万的鞋子

使用spring cloud alibaba创建微服务,必须使用父子的工程结构吗?

我搭建一个微服务,有订单模块,库存模块,用户模块,快递模块等等,这些模块如果写在一个父项目下,那么将整个项目push到gitlab后,和其他模块无关的开发者也可以下载下来无关模块并查看其中代码并做出修改提交,这显然是不安全的。可不可以各模块单独做成仓库,开发者只能pull自己负责的模块进行开发。如果我上述的方法可行,应该如何实现呢?

0
1
0
浏览量207
加班使我熟睡

我想在spring cloud alibaba里面,让其他业务模块 的entity mapper service 都集中到 common 里面?

使用的是 spring cloud alibaba 2021.0.1 + spring boot 2.6.4 目录布局: 1、common模块:存放 model、mapper、service、impl、连接数据库、统一异常处理、redis josn数据格式化、统一响应、swagger、mp、cors 2、merchant模块(商户端):主要编辑controller对外开放api接口 3、supply模块(供货商):主要编辑controller对外开放api接口 问题描述: 目前在做 merchant模块,启动时提示错误: Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'requestMappingHandlerAdapter' defined in class path resource [org/springframework/boot/autoconfigure/web/servlet/WebMvcAutoConfiguration$EnableWebMvcConfiguration.class]: Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'springApplicationAdminRegistrar' defined in class path resource [org/springframework/boot/autoconfigure/admin/SpringApplicationAdminJmxAutoConfiguration.class]: Invocation of init method failed; nested exception is javax.management.InstanceAlreadyExistsException: org.springframework.boot:type=Admin,name=SpringApplication "de153284ee0293c1957a1adb5b4189c.png" (https://wmprod.oss-cn-shanghai.aliyuncs.com/c/user/20241005/8243f67869e656150c1229aeba1c8e5a.png) 尝试3~5小时没解决,特来思否求助大佬们 特别描述: 1、目前swagger2实际测试成功。将swagger2全部内容放到common模块,在商户端编写controller时,进行添加注解接口:启动 swagger2可以显示商户端的端口中打开文档地址显示controller中定义的接口文档 尝试失败过的方法: 1、在启动类上加包扫描:结果失败,提示另一个错误 // @SpringBootApplication @SpringBootApplication(scanBasePackages = "com.quanneng") @Slf4j @MapperScan("com.quanneng.mapper") public class MerchantApiApplication { …… } Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'requestMappingHandlerAdapter' defined in class path resource [org/springframework/boot/autoconfigure/web/servlet/WebMvcAutoConfiguration$EnableWebMvcConfiguration.class]: Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'springApplicationAdminRegistrar' defined in class path resource [org/springframework/boot/autoconfigure/admin/SpringApplicationAdminJmxAutoConfiguration.class]: Invocation of init method failed; nested exception is javax.management.InstanceAlreadyExistsException: org.springframework.boot:type=Admin,name=SpringApplication -->后百度,解决无果 2、尝试 @ComponentScan({"com.*"}) public class MerchantApiApplication { …… } Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'merchantController': Unsatisfied dependency expressed through field 'merchantService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'merchantService': Injection of resource dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'merchantMapper' defined in file [D:\biancheng\git_cangku_java_spring_cloud_alibaba\liuliang_mall_java\common\target\classes\com\quanneng\mapper\MerchantMapper.class]: Invocation of init method failed; nested exception is java.lang.IllegalArgumentException: Property 'sqlSessionFactory' or 'sqlSessionTemplate' are required -->配置了 mybatisPlusConfig 无果、添加 datasource 到 merchant 模块yml文件 无果。

0
1
0
浏览量198