posts - 609,  comments - 13,  views - 64万
< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5

随笔分类 -  SpringBoot/SpringCloud

ES查询常用语法
摘要:1. ElasticSearch之查询返回结果各字段含义执行命令:索引库名称/_search空搜索的结果为: { "took": 2, # 该命令请求花费了多长时间,单位:毫秒。 "timed_out": false, # 搜索是否超时 "_shards": { # 搜索分片信息 "total": 阅读全文
posted @ 2024-10-22 16:34 邢帅杰 阅读(30) 评论(0) 推荐(0) 编辑
MySQL和Elasticsearch使用场景
摘要:来源:https://www.zhihu.com/question/637732937ES的底层实现:倒排索引正排索引(Forward Index)的实现方式为,通过文档ID去查找整个文档内容,适用于全部文档遍历或根据某个文档ID查找内容的场景。而倒排索引(Inverted Index)的实现方式, 阅读全文
posted @ 2024-10-22 13:51 邢帅杰 阅读(53) 评论(0) 推荐(0) 编辑
java解压rar,解压zip
摘要:解压zip package com.xcg.webapp.common; import java.io.File; import java.io.FileOutputStream; import java.io.IOException; import java.io.InputStream; imp 阅读全文
posted @ 2024-10-10 13:28 邢帅杰 阅读(122) 评论(0) 推荐(0) 编辑
SpringCloud Gateway鉴权
摘要:参考:https://blog.csdn.net/weixin_43296313/article/details/121126811基于从前的项目:https://www.cnblogs.com/xsj1989/p/18350213在网关项目下创建全局过滤器 package com.xcg.filt 阅读全文
posted @ 2024-09-02 16:17 邢帅杰 阅读(29) 评论(0) 推荐(0) 编辑
SpringCloud Gateway网关、Gateway断言Predicate介绍
摘要:基于从前的项目:https://www.cnblogs.com/xsj1989/p/18338930参考文章:https://blog.csdn.net/hong161688/article/details/140812734https://blog.csdn.net/qq_34417433/art 阅读全文
posted @ 2024-08-09 09:53 邢帅杰 阅读(62) 评论(0) 推荐(0) 编辑
Nacos配置Sentinel规则JSON说明
摘要:来源:https://blog.csdn.net/ohh_lang/article/details/136384205注意:Nacos配置的时候,不能要//注释,必须是纯JSON字符串,以下JSON上的注释是为了说明字段而已。bootstrap.yaml中的配置示例 server: port: 80 阅读全文
posted @ 2024-08-06 14:23 邢帅杰 阅读(619) 评论(0) 推荐(0) 编辑
Sentinel下载、安装、SpringCloud集成Sentinel,Sentinel持久化,Sentinel配合Nacos持久化
摘要:Sentinel官方文档:https://sentinelguard.io/zh-cn/docs/introduction.html注解支持,必看:https://github.com/alibaba/Sentinel/wiki/%E6%B3%A8%E8%A7%A3%E6%94%AF%E6%8C%8 阅读全文
posted @ 2024-08-02 15:56 邢帅杰 阅读(702) 评论(0) 推荐(0) 编辑
SpringCloud示例项目,使用的SpringBoot3.3.2,SpringCloud结合使用nacos/Openfeign,服务注册nacos总是在public命名空间下的问题
摘要:先启动nacos:https://www.cnblogs.com/xsj1989/p/18323636特别注意,SpringBoot、SpringCloud、Openfeign等依赖的版本必须相匹配,不然会报各种错。具体版本对应关系看官网。或者看:https://start.spring.io/ac 阅读全文
posted @ 2024-07-31 14:15 邢帅杰 阅读(600) 评论(0) 推荐(0) 编辑
最新nacos下载安装,版本号2.4.0,nacos持久化存储到本地mysql中,nacos配置登录账户密码
摘要:官网:https://nacos.io/zh-cn/docs/quickstart/quick-start1.下载地址:https://github.com/alibaba/nacos/releases网络不好,很难下载。直接使用git克隆,然后自己编译,这是最快的了。克隆:git clone ht 阅读全文
posted @ 2024-07-25 16:55 邢帅杰 阅读(1539) 评论(0) 推荐(0) 编辑
SpringBoot配置多数据源
摘要:参考:https://blog.csdn.net/qq_37759895/article/details/135742006pom.xml 我这里给出了我练习用的demo上的所有导入包,反正不会错。SpringBoot版本3.3.1 <?xml version="1.0" encoding="UTF 阅读全文
posted @ 2024-07-11 10:08 邢帅杰 阅读(312) 评论(0) 推荐(0) 编辑
SpringBoot拦截器中获取注解、拦截器中注入Service
摘要:拦截器中获取注解 来源:https://blog.csdn.net/wangmx1993328/article/details/81030268/ public class JWTInterceptor implements HandlerInterceptor { private SysSetti 阅读全文
posted @ 2024-07-04 14:56 邢帅杰 阅读(469) 评论(0) 推荐(0) 编辑
Mybatis使用foreach执行in语句、批量增删改查
摘要:参考:https://www.cnblogs.com/leeego-123/p/10725210.html一、xml文件中foreach的主要属性foreach元素的属性主要有 collection,item,index,separator,open,close。collection: 表示集合,数 阅读全文
posted @ 2024-07-03 16:28 邢帅杰 阅读(1200) 评论(0) 推荐(0) 编辑
SpringBoot3使用Druid连接Mysql数据库,连接oracle数据库,配置Druid监控, 连接SqlServer数据库
摘要:参考:https://www.cnblogs.com/XuXiaoCong/p/18064633pom引入包,启动器 <?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" x 阅读全文
posted @ 2024-07-02 15:14 邢帅杰 阅读(335) 评论(0) 推荐(0) 编辑
java之包管理dependencies与dependencyManagement
摘要:dependencyManagement 统一多模块的依赖版本如果你的项目有多个子模块,而且每个模块都需要引入依赖,但为了项目的正确运行,必须让所有的子项目(以下子项目即指子模块)使用依赖项的统一版本,才能保证测试的和发布的是相同的结果。 Maven 使用 dependencyManagement 阅读全文
posted @ 2024-06-17 16:46 邢帅杰 阅读(188) 评论(0) 推荐(0) 编辑
java打包jar、java引入本地jar包、java发布、java发包、java打包、java引入包
摘要:java把项目打包成jar步骤一、IDEA -> File -> Project Structure -> Artifacts -> + -> JAR -> From moduls with dependencies... -> 选择 Module 和 Main Class -> 选择 JAR fi 阅读全文
posted @ 2024-06-17 10:27 邢帅杰 阅读(1118) 评论(0) 推荐(0) 编辑
java字符串Base64互转
摘要:code package com.xcg.webapp.Common; import java.nio.charset.StandardCharsets; import java.util.Base64; /** * @author jay * @create 2024-04-29 11:13 */ 阅读全文
posted @ 2024-04-29 10:30 邢帅杰 阅读(292) 评论(0) 推荐(0) 编辑
mybatis只sql语句插入新行后返回主键自增列或者非自增列
摘要:1.执行完insert语句,返回自增列最新的值。两种方式 <insert id="create" parameterType="com.xcg.webapp.model.entity.Production" useGeneratedKeys="true" keyProperty="productio 阅读全文
posted @ 2024-04-25 16:07 邢帅杰 阅读(200) 评论(0) 推荐(0) 编辑
mybatis之sql查询配置文件resultType和resultMap
摘要:如果实体类的属性名称和数据库中的字段名称不一致,比如属性productName,数据库字段product_name。这时候mybatis查询返回的结果需要跟实体类自动映射 就需要配置一下映射关系。如果列名和属性名一样,那就不用配置映射关系了,直接使用resultType指定类就行。如果不想输入全类名 阅读全文
posted @ 2024-04-25 11:18 邢帅杰 阅读(120) 评论(0) 推荐(0) 编辑
MyBatis所有的jdbcType类型对应的javaType类型
摘要:来源:https://www.jb51.net/program/287517rew.htmMyBatis处理MySQL字段类型date与datetime1) DATETIME显示格式:yyyy-MM-dd HH:mm:ss时间范围:[ '1000-01-01 00:00:00'到'9999-12-3 阅读全文
posted @ 2024-04-23 17:36 邢帅杰 阅读(2375) 评论(0) 推荐(0) 编辑
SpringBoot3使用自带日志组件Logback
摘要:pom.xml <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-logging</artifactId> </dependency> application.yaml配置 阅读全文
posted @ 2024-04-23 11:08 邢帅杰 阅读(347) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示