![](https://img-blog.csdnimg.cn/20201014180756780.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
spring注解大全
文章平均质量分 65
daiyuenlong110
这个作者很懒,什么都没留下…
展开
-
RocketMQ 主从搭建
1、多种集群模式讲解1.1、单节点优点:本地开发测试,配置简单,同步刷盘消息一条都不会丢缺点:不可靠,如果宕机,会导致服务不可用1.2、主从(异步、同步双写) :优点:同步双写消息不丢失(把消息写入master和slave), 异步复制存在少量丢失 (把数据写入master,master把数据复制到slave),主节点宕机,从节点可以对外提供消息的消费,但是不支持写入缺点:主备有短暂消息延迟,毫秒级,目前不支持自动切换,需要脚本或者其他程序进行检测然后进行停止broker,重启让从节点成为主原创 2022-01-18 00:08:03 · 4321 阅读 · 0 评论 -
【SpringBoot学习笔记】运行错误:No fallback instance of type class found for feign client
[[报错情况:]]feign中使用Hystrix,报错:No fallback instance of type class found for feign client[源码:]@FeignClient(value = "eureka-client", configuration = FeignConfig.class, fallback = HiHystrix.class)public interface EurekaClientFeign { @GetMapping...原创 2021-11-25 23:01:48 · 1619 阅读 · 0 评论 -
ElasticSearch第七篇:SpringBoot集成ES
第一步:pom.xml <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-web</artifactId> </dependency> <dependency> <grou原创 2021-07-18 22:06:07 · 250 阅读 · 0 评论 -
Spring注解大全(三)
@ModelAttribute所有方法在调用前,先执行此@ModelAttribute方法.A.标注在有返回值的方法上当ModelAttribute设置了value,方法返回的值会以这个value为key,以参数接受到的值作为这个key对应的value,组成k-v键值对,存入到Model中,如下面的方法执行之后,最终相当于 model.addAttribute(“user_name”, name);假如@ModelAttribute没有自定义value,则相当于model.addAttr..转载 2021-01-30 23:38:47 · 79 阅读 · 0 评论 -
Spring注解大全(二)
@Pointcut定义切点,切点表达式(execution(权限访问符 返回值类型 方法所属的类名包路径.方法名(形参类型) 异常类型))@Aspect@Componentpublic class AfterThrowingAspect { //全路径execution(public String com.cnblogs.hellxz.test.Test.access(String,String)) @Pointcut("execution(* com.cnblogs.hell转载 2021-01-30 23:35:45 · 443 阅读 · 0 评论 -
Spring注解大全(一)
目录:@Controller @RestController @Service @Autowired @RequestMapping @RequestParam @NonNull @Nullable @Resource(等同于@Autowired) @Qualifier @Component @Repository @Scope @Bean @Transactional @Aspect @Pointcut @Before @AfterReturning...转载 2021-01-30 22:51:52 · 161 阅读 · 1 评论