随笔分类 -  springBoot_cloud

摘要:我改的日志配置文件: <?xml version="1.0" encoding="UTF-8"?> <configuration scan="true" scanPeriod="60 seconds" debug="false"> <contextName>logback</contextName> 阅读全文
posted @ 2020-08-12 14:32 戈博折刀 阅读(443) 评论(0) 推荐(0)
摘要:mybatis-plus主键策略 阅读全文
posted @ 2020-08-05 14:54 戈博折刀 阅读(161) 评论(0) 推荐(0)
摘要:String dzDate = "20200804"; // dzDate = "\uFEFF20200804"; SimpleDateFormat sdf1 = new SimpleDateFormat("yyyyMMdd");//注意月份是MM SimpleDateFormat sdf2 = n 阅读全文
posted @ 2020-08-04 16:04 戈博折刀 阅读(15262) 评论(0) 推荐(0)
摘要:转: springboot简易集成mybatisPlus+多数据源 【我好用的配置文件: 1、pom:【注意druid吧版本要能获取到jar】 <?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org 阅读全文
posted @ 2020-08-04 10:57 戈博折刀 阅读(3085) 评论(0) 推荐(1)
摘要:多数据源@DS和@Transactional 阅读全文
posted @ 2020-07-31 09:31 戈博折刀 阅读(118) 评论(0) 推荐(0)
摘要:转: RestTemplate 请求参数格式JSON Springboot -- 用更优雅的方式发HTTP请求(RestTemplate详解) 阅读全文
posted @ 2020-07-23 17:17 戈博折刀 阅读(326) 评论(0) 推荐(0)
摘要:转: 使用IDEA创建一个springboot项目 阅读全文
posted @ 2020-07-22 15:28 戈博折刀 阅读(310) 评论(0) 推荐(0)
摘要:The Bean Validation API is on the classpath but no implementation could be found Unable to create a Configuration, because no Bean Validation provider 阅读全文
posted @ 2020-07-22 15:24 戈博折刀 阅读(13786) 评论(1) 推荐(1)
摘要:重点看评论: “还有一种情况就是该测试类在Test下的包名和java下的包名不一致导致的,亲测可以解决” 转: SpringBoot Unable to find a @SpringBootConfiguration, you need to use @ContextConfiguration 阅读全文
posted @ 2020-07-21 09:49 戈博折刀 阅读(255) 评论(0) 推荐(0)
摘要:转: spring cloud gateway自定义过滤器 关键点: 3、局部过滤器,需要实现GatewayFilter, Ordered,实现相关的方法 package com.yefengyu.gateway.localFilter; import com.yefengyu.gateway.ut 阅读全文
posted @ 2020-07-16 16:15 戈博折刀 阅读(1934) 评论(0) 推荐(0)
摘要:转: Dubbo想要个网关怎么办?试试整合Spring Cloud Gateway 阅读全文
posted @ 2020-07-15 10:57 戈博折刀 阅读(242) 评论(0) 推荐(0)
摘要:转: spring日志配置分别使用springboot自带日志,logbak日志以及log4j2日志 Springboot LOG日志输出 【我】简单总结,可以使用logback: 1、首先pom里加入依赖: <dependency> <groupId>org.slf4j</groupId> <ar 阅读全文
posted @ 2020-07-07 17:05 戈博折刀 阅读(665) 评论(0) 推荐(0)
摘要:注意: 1.配置文件格式设置为properties无法发布,js报错,可以设置为text格式2.springboot项目的配置文件不能为application,要为bootstrap 还有项目发布必须先启动nacos,配置dataid,如果nacos比子系统后启动,再去配dataid等信息,动态刷新 阅读全文
posted @ 2020-07-06 09:55 戈博折刀 阅读(8048) 评论(0) 推荐(0)
摘要:转: Springcloud gateway获取post请求内容 阅读全文
posted @ 2020-07-03 17:24 戈博折刀 阅读(1138) 评论(0) 推荐(0)
摘要:转: SpringCloud Alibaba——服务注册与发现(Nacos) 默-存 2019-01-21 11:39:48 13718 收藏 10分类专栏: springcloud版权一、Nacos简介 Nacos致力于帮助您发现、配置和管理微服务。Nacos提供了一组简单易用的特性集,帮助您快速 阅读全文
posted @ 2020-07-03 11:28 戈博折刀 阅读(271) 评论(0) 推荐(0)
摘要:转: [Springboot]Springboot2.0 Actuator配置后无法访问的问题解决. 按网友的方法添加依赖和配置属性后, 仍然无法访问.最后发现是导入的依赖问题.我导入的是spring-boot-actuator(此依赖在maven库中能找到, 所以这问题比较隐蔽).而正确的依赖是 阅读全文
posted @ 2020-07-02 17:08 戈博折刀 阅读(4289) 评论(0) 推荐(1)
摘要:确保在pom文件中加入 <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-actuator</artifactId> </dependency> 然后项目启动后,直接输入 阅读全文
posted @ 2020-07-02 11:28 戈博折刀 阅读(1789) 评论(0) 推荐(0)
摘要:gateway项目没问题,也拦截了,就是过滤器不生效,最终经同事指点发现 原因是 拷过来的项目中springboot的启动类不在包的最外层,导致过滤器的@Component注解没有生效,也就是bean没有在spring中实例化。 阅读全文
posted @ 2020-07-02 10:56 戈博折刀 阅读(7114) 评论(2) 推荐(2)
摘要:项目启动后,虽然是要注册到nacos的服务,但本身也是一个普通的web项目,可以直接用浏览器或postman测试 首先看配置文件: 可以发现端口是 9001,直接在浏览器里访问下: 虽然显示是404,但是只要页面显示上面的文字就是访问服务器成功了。 然后看具体的Controller 可以看到,访问资 阅读全文
posted @ 2020-06-16 16:27 戈博折刀 阅读(221) 评论(0) 推荐(0)
摘要:$("table tr").find("td:eq(1),td:eq(2),td:eq(4)").css("background-color", "red"); 阅读全文
posted @ 2019-05-09 17:41 戈博折刀 阅读(258) 评论(0) 推荐(0)