摘要: 下载 链接:https://pan.quark.cn/s/832dd1d42ac8 提取码:F1BY 配置 拷贝文件 解压后看到两个文件夹,将components文件夹中的内容拷贝到vue模板的src/components中,将static文件夹里的内容拷贝进static中 配置1 然后,在vue模 阅读全文
posted @ 2022-04-01 16:11 yangruomao 阅读(416) 评论(0) 推荐(0) 编辑
摘要: 获取当前页面链接的id值 如获取http://localhost:8001/get/1234 中的1234 这样即可获取当前页面的请求数据 阅读全文
posted @ 2022-04-01 15:39 yangruomao 阅读(673) 评论(0) 推荐(0) 编辑
摘要: 图中path即localhost:1234**/path** 阅读全文
posted @ 2022-04-01 15:36 yangruomao 阅读(26) 评论(0) 推荐(0) 编辑
摘要: 有时候不需要使用数据库,但因为有依赖的缘故springboot会自动加载数据库配置,如果没有配置就会报错,此时有两种解决办法 application.yaml 里配置一下数据库 启动类添加注解(推荐) @SpringBootApplication(exclude = DataSourceAutoCo 阅读全文
posted @ 2022-03-25 19:07 yangruomao 阅读(575) 评论(0) 推荐(0) 编辑
摘要: 安装babel工具 cnpm install --global babel-cli 验证安装 babel --version 安装es5解码器 cnpm install babel-preset-es2015 在项目的根目录下添加.babelrc配置文件,注意文件名和目录 { "presets": 阅读全文
posted @ 2022-03-19 10:06 yangruomao 阅读(170) 评论(0) 推荐(0) 编辑
摘要: 先将application.properties里的所有日志配置删除 resource 中粘贴logback-spring.xml 文件,文件名不要改 xml可配置内容: 日志保存到文件的路径、日志级别、开发环境 <?xml version="1.0" encoding="UTF-8"?> <con 阅读全文
posted @ 2022-03-12 11:35 yangruomao 阅读(796) 评论(0) 推荐(0) 编辑
摘要: 指定异常处理 返回类型R是我自己写的vo类 指定出现什么异常,执行这个方法 如果这里多个方法指定的异常有继承关系,会执行子异常方法 自定义异常处理 首先自定义一个异常,创建一个类继承RuntimeException,在里面添加属性即可 然后与上述步骤相同, 在@ControllerAdvice类中添 阅读全文
posted @ 2022-03-12 11:13 yangruomao 阅读(145) 评论(0) 推荐(0) 编辑
摘要: Wrapper 可以生成一个在线的文档,并且可以在里面方便的进行Rest风格测试 配置 maven <!--swagger--> <dependency> <groupId>io.springfox</groupId> <artifactId>springfox-swagger2</artifact 阅读全文
posted @ 2022-03-08 01:30 yangruomao 阅读(249) 评论(0) 推荐(0) 编辑
摘要: properties spring.jackson.date-format=yyyy-MM-dd HH:mm:ss spring.jackson.time-zone=GMT+8 响应Json效果 阅读全文
posted @ 2022-03-08 00:48 yangruomao 阅读(320) 评论(0) 推荐(0) 编辑
摘要: 该示例以product 为JavaBean对象,使用springdata集成ES,用productDao对ES进行方便的增删改查 环境配置 maven <parent> <groupId>org.springframework.boot</groupId> <artifactId>spring-bo 阅读全文
posted @ 2022-03-02 14:08 yangruomao 阅读(194) 评论(0) 推荐(0) 编辑
摘要: 0. 启动闪退 打开cmd运行看看错误信息,大概率是下面这个 1. 无法启动-Error: Could not create the Java Virtual Machine 报错全信息如下,低版本的会精简些,我用的低版本 Unrecognized VM option 'CMSParallelRem 阅读全文
posted @ 2022-02-01 18:35 yangruomao 阅读(3156) 评论(0) 推荐(0) 编辑
摘要: 简单使用 依赖 <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-security</artifactId> </dependency> 配置 创建配置类 @EnableW 阅读全文
posted @ 2021-12-22 22:05 yangruomao 阅读(89) 评论(0) 推荐(0) 编辑
摘要: 异步任务 在启动类中开启异步任务 将方法注解为异步任务 定时任务 在启动类中开启定时任务 方法标记注解,使用 cron 表达式配置定时任务 cron 表达式一览 cron = "*,* * * * * *" 这六个值分别代表 秒、分、小时、日期、月份、星期。 在星期值中,0和7代表周日,1-6代表周 阅读全文
posted @ 2021-12-22 15:54 yangruomao 阅读(29) 评论(0) 推荐(0) 编辑
摘要: 本文主要记录第一次部署 rabbitmq 和启动、关闭需要用到的命令 命令 # 启动rabbitmq,显示 active 表示启动成功 systemctl start rabbitmq-server # 查看rabbitmq状态 systemctl status rabbitmq-server # 阅读全文
posted @ 2021-12-19 19:14 yangruomao 阅读(649) 评论(0) 推荐(0) 编辑
摘要: 配置 依赖 创建 rabbitmq 项目时,选择这个依赖 或者添加 maven <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-amqp</artifactId> </d 阅读全文
posted @ 2021-12-19 18:51 yangruomao 阅读(55) 评论(0) 推荐(0) 编辑