![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
springcloud
文章平均质量分 50
用来记录springcloud的知识点,以及一些坑
一个不会代码的搬砖人
这个作者很懒,什么都没留下…
展开
-
springBoot接入nacos注册中心的两种方式
SpringBoot接入nacos注册中心的两种方式原创 2022-06-04 11:38:07 · 2922 阅读 · 2 评论 -
docker部署nacos
一、创建nacos数据库创建完数据库后,执行以下sql/* * Copyright 1999-2018 Alibaba Group Holding Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the Lic原创 2022-05-24 15:53:46 · 261 阅读 · 0 评论 -
重写collections的排序方法
Collections.sort(array, new Comparator<Student>() { @Override public int compare(Student o1, Student o2) { int i = o1.age-o2.age; int n = i==0?o1.name.compareTo(o2.name):i; return n; } .原创 2022-04-25 16:49:29 · 308 阅读 · 0 评论 -
springcloud之eureka集群
业务需求eureka简介引入依赖修改配置创建provider和consumer测试1.eureka简介Spring Cloud Eureka 是Spring Cloud Netflix 微服务套件中的一部分, 它基于Netflix Eureka 做了二次封装, 主要负责完成微服务架构中的服务治理功能。Spring Cloud 通过为Eureka 增加了Spring Boot 风格的自动化配置,我们只需通过简单引入依赖和注解配置就能让Spring Boot 构建的微服务应用轻松地与Eur原创 2021-11-30 11:06:25 · 739 阅读 · 2 评论 -
springcloud之openfegin
需求在使用restTemplate访问远程接口的时候,我们难以将接口管理起来,当接口变动的时候我们可能会修改多处。所以,需要通过springcloud的openfegin来解决这个问题。1.概念OpenFeign是一种声明式、模板化的HTTP客户端。在Spring Cloud中使用OpenFeign,可以做到使用HTTP请求访问远程服务,就像调用本地方法一样的,开发者完全感知不到这是在调用远程方法,更感知不到在访问HTTP请求。2.引入依赖 <dependency>原创 2021-12-06 09:44:50 · 579 阅读 · 0 评论