摘要: 布局 布局文件为layouts 在layouts里创建一个test.vue的布局测试 <template> <div> 页面布局头部 <nuxt/> 页面布局尾部 </div> </template> <script> import Footer from '../components/Footer 阅读全文
posted @ 2023-10-28 01:18 lksses 阅读(4) 评论(0) 推荐(0) 编辑
摘要: 先准备测试数据 创建映射: post:http://localhost:9200/xc_course/doc/_mapping { "properties": { "description": { "type": "text", "analyzer": "ik_max_word", "search_ 阅读全文
posted @ 2023-09-23 15:11 lksses 阅读(6) 评论(0) 推荐(0) 编辑
摘要: 这里使用RestClient来搭建ES客户端 RestClient有两种: JavaLowLevelRESTClient和JavaHighLevelRESTClient 这里采用JavaHighLevelRESTClient 首先添加依赖: <dependency> <groupId>org.ela 阅读全文
posted @ 2023-09-16 15:29 lksses 阅读(25) 评论(0) 推荐(0) 编辑
摘要: 测试ik分词器: POST http://localhost:9200/_analyze Body的JSON数据1: {"text":"测试分词器,后面是测试内容:spring cloud实战","analyzer":"ik_max_word"} JSON测试数据2: {"text":"测试分词器, 阅读全文
posted @ 2023-09-15 22:24 lksses 阅读(25) 评论(0) 推荐(0) 编辑
摘要: 索引库相当于表,ES6.0之前有Type概念,9.0删除了,type相当于表,所以索引库也能看作数据库 文档(Document) Row记录 字段(Field) Columns列 创建索引库 PUT http://localhost:9200/索引库名称 || 也可以直接使用head可视化插件添加 阅读全文
posted @ 2023-09-15 14:39 lksses 阅读(7) 评论(0) 推荐(0) 编辑
摘要: db //查询当前使用的数据库 show dbs //查询所有的数据库 use 【dbname】 //使用数据库 ;如果没有这个数据库会直接创建这个数据库 db.createCollection("[collection_name]") //创建集合(在sql中叫表) 例子: db.createCo 阅读全文
posted @ 2023-07-07 16:41 lksses 阅读(7) 评论(0) 推荐(0) 编辑
摘要: PageHelper用来处理分页 首先添加依赖: <dependency> <groupId>com.github.pagehelper</groupId> <artifactId>pagehelper-spring-boot-starter</artifactId> <version>1.2.4< 阅读全文
posted @ 2023-07-01 17:11 lksses 阅读(20) 评论(0) 推荐(0) 编辑
摘要: 路由模式: 1、每个消费者监听自己的队列,并且设置routingkey。 2、生产者将消息发给交换机,由交换机根据routingkey来转发消息到指定的队列。 Routing模式是可以完成订阅模式的工作的,下面的代码在RoutingKey为“inform”的消息中有所体现 示例代码: 生产者: pu 阅读全文
posted @ 2023-05-20 11:00 lksses 阅读(28) 评论(0) 推荐(0) 编辑
摘要: RabbitMQ有以下几种工作模式: 1,Work Queues 工作队列 2,Publish/Subscribe 发布订阅 3,Routing 路由 4,Topics 通配符 5,Header Header转换器 6,RPC 远程过程调用 1.Work Queues 工作队列 work queue 阅读全文
posted @ 2023-05-19 15:16 lksses 阅读(53) 评论(0) 推荐(0) 编辑
摘要: 1,先导入要使用的依赖: <dependency> <groupId>com.rabbitmq</groupId> <artifactId>amqp-client</artifactId> <version>4.0.3</version><!--此版本与spring boot 1.5.9版本匹配-- 阅读全文
posted @ 2023-05-18 15:30 lksses 阅读(20) 评论(0) 推荐(0) 编辑