问题: 解决: 对于底层 bean 调用mock非常好用 @MockBean 会… Read More
https://blog.csdn.net/menggudaoke/article/details/77884… Read More
问题: 单元测试中如何注入 FeignClient 解决: [crayon-67eb715a42… Read More
问题: 如果 定义的后端服务 中有
1 2 3 4 |
@GetMapping("/list") List<String> list( @NotNull @Valid TenantPageDto page ); |
通过 f… Read More
问题:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
@GetMapping("/list") public PageVo<String> list(@NotNull PageDto page) { } public class PageDto { @ApiModelProperty("当前页码,从1开始 [1..n]") private int pageNo; @ApiModelProperty("每页的大小") private int pageSize; @ApiModelProperty("排序列表,多个使用逗号隔开,") private String sort; @ApiModelProperty("排序类型,descending,asc") private String order; @ApiModelProperty("筛选列表") private Map<String, Object> filter; } |
该怎么传 queryS… Read More
问题: 解决:
1 2 3 4 5 6 7 8 9 10 11 12 13 |
@FeignClient(name="service1",url="http://localhost:8080/") class UserAPI { @GetMapping("/ocm/user") void getUser(); } @FeignClient(name="service1",url="http://localhost:8080/") class ProfileAPI { @GetMapping("/ocm/profile") void getUser(); } |
问题: 解决:
1 |
docker run -d -p 5672:5672 -p 15672:15672 --restart=on-failure --name rabbitmq_city -e RABBITMQ_DEFAULT_USER=aa -e RABBITMQ_DEFAULT_PASS=123456 rabbitmq:3-management |
https://blog.csdn.net/xexiyong/article/details/77742994… Read More
问题:
1 2 3 4 5 6 7 8 |
Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'org.springframework.boot.autoconfigure.web.servlet.WebMvcAutoConfiguration$EnableWebMvcConfiguration': Unsatisfied dependency expressed through method 'setConfigurers' parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'apiSecurityConfig': Unsatisfied dependency expressed through field 'apiGlobalInterceptor'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'apiGlobalInterceptor': Unsatisfied dependency expressed through field 'oAuthService'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'OAuthServiceImpl': Unsatisfied dependency expressed through field 'tokenClient'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'com.telsafe.common.auth.api.TokenClient': FactoryBean threw exception on object creation; nested exception is org.springframework.beans.factory.BeanCurrentlyInCreationException: Error creating bean with name 'mvcResourceUrlProvider': Requested bean is currently in creation: Is there an unresolvable circular reference? at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredMethodElement.inject(AutowiredAnnotationBeanPostProcessor.java:723) ~[spring-beans-5.2.10.RELEASE.jar!/:5.2.10.RELEASE] at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:130) ~[spring-beans-5.2.10.RELEASE.jar!/:5.2.10.RELEASE] at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessProperties(AutowiredAnnotationBeanPostProcessor.java:399) ~[spring-beans-5.2.10.RELEASE.jar!/:5.2.10.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1420) ~[spring-beans-5.2.10.RELEASE.jar!/:5.2.10.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:593) ~[spring-beans-5.2.10.RELEASE.jar!/:5.2.10.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:516) ~[spring-beans-5.2.10.RELEASE.jar!/:5.2.10.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:324) ~[spring-beans-5.2.10.RELEASE.jar!/:5.2.10.RELEASE] |
解决: … Read More
问题:
1 2 3 4 |
Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'documentationPluginsBootstrapper' defined in URL [jar:file:/C:/Users/tangfh/.m2/repository/io/springfox/springfox-spring-web/3.0.0/springfox-spring-web-3.0.0.jar!/springfox/documentation/spring/web/plugins/DocumentationPluginsBootstrapper.class]: Unsatisfied dependency expressed through constructor parameter 1; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'webMvcRequestHandlerProvider' defined in URL [jar:file:/C:/Users/tangfh/.m2/repository/io/springfox/springfox-spring-webmvc/3.0.0/springfox-spring-webmvc-3.0.0.jar!/springfox/documentation/spring/web/plugins/WebMvcRequestHandlerProvider.class]: Unsatisfied dependency expressed through constructor parameter 2; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'requestMappingHandlerMapping' defined in class path resource [org/springframework/boot/autoconfigure/web/servlet/WebMvcAutoConfiguration$EnableWebMvcConfiguration.class]: Invocation of init method failed; nested exception is java.lang.IllegalStateException: Ambiguous mapping. Cannot map 'com.telsafe.provider.basic.api.tenant.TenantClient' method com.telsafe.provider.basic.api.tenant.TenantClient#create(TenantDto) to {POST /tcm/v1/tenants/posttenant}: There is already 'tenantResource' bean method com.telsafe.service.basic.rest.TenantResource#create(TenantDto) mapped. |
解决: … Read More