会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
yangruomao
首页
新随笔
订阅
管理
上一页
1
2
3
4
5
6
7
下一页
2021年12月19日
springboot 整合使用 rabbitmq
摘要: 配置 依赖 创建 rabbitmq 项目时,选择这个依赖 或者添加 maven <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-amqp</artifactId> </d
阅读全文
posted @ 2021-12-19 18:51 yangruomao
阅读(78)
评论(0)
推荐(0)
2021年12月18日
springboot 配置使用 Redis 缓存
摘要: SpringBoot 引入 Redis 相关依赖后,默认的缓存管理器会自动切换成 Redis 的。 配置完后有用的文章: docker 部署 Redis: https://www.cnblogs.com/acdongla/p/16389485.html 自动json序列化: https://www.
阅读全文
posted @ 2021-12-18 01:14 yangruomao
阅读(294)
评论(0)
推荐(0)
springboot 缓存注解的使用方法
摘要: 知识体系 注解 注解参数 SpEL 表达式 refer: 尚硅谷springboot课程ppt 使用缓存 可以添加添加日志配置方便查看状态 查看 cc.acongla.boot.mapper 包下的 debug 日志信息: 在 springboot 启动类中打开缓存 使用注解 值得注意的地方: @C
阅读全文
posted @ 2021-12-18 00:16 yangruomao
阅读(342)
评论(0)
推荐(0)
2021年12月11日
springboot 报错 sprintgboot Unknown column '字段名' in 'field list'
摘要: 使用 springboot + mybati plus 查询数据时报错 sprintgboot Unknown column '字段名' in 'field list' 如果 mybatis 配置无误,可以检查一下数据库表中的字段名。 我把表中驼峰命名改成下划线,就好了。
阅读全文
posted @ 2021-12-11 12:28 yangruomao
阅读(298)
评论(0)
推荐(0)
2021年12月7日
springboot 文件上传配置
摘要: application.yaml
阅读全文
posted @ 2021-12-07 11:15 yangruomao
阅读(86)
评论(0)
推荐(0)
2021年11月22日
html 处理文本实现自动换行
摘要: 利用正则讲 \n 替换为 br,插入html即可 场景:显示新闻 后端响应 json, 前端接受数据,将新闻显示在页面上 这里以 Vue 代码为例 文本显示为html 替换 使用正则替换 \n 为 br, /g 表示匹配全部 效果
阅读全文
posted @ 2021-11-22 01:24 yangruomao
阅读(1205)
评论(0)
推荐(0)
2021年11月16日
Redis 启动 配置AOF
摘要: RDB 默认开启,AOF 需手动开启,他们生成的文件都在 redis-service 目录下。 如果数据无所谓,可以单独使用RDB。 如果只做为缓存使用,RDB和AOF都不需要开启。 其他情况官方建议都开启。 数据文件位置示例: 开启 AOF 打开配置文件 修改 appendonly no 值为 y
阅读全文
posted @ 2021-11-16 13:53 yangruomao
阅读(546)
评论(0)
推荐(0)
2021年11月14日
redis 配置远程访问
摘要: 打开 redis 的配置文件 这里我是 vi /etc/redis.conf 可利用搜索功能 找到 bind 127.0.0.1 -::1 ,把这一行注释掉 找到 protected-mode yes 把 yes 改为 no 设置永久密码: 找到 requirepass 其后的值就是密码。 默认是被
阅读全文
posted @ 2021-11-14 14:32 yangruomao
阅读(207)
评论(0)
推荐(0)
2021年11月13日
git笔记
摘要: Git git 常用命令 设置用户签名 git config --global user.name 用户名 git config --global user.email 邮箱 初始化本地库 git init 查看本地库状态 git status 添加到暂存区 git add hello.txt #
阅读全文
posted @ 2021-11-13 00:51 yangruomao
阅读(40)
评论(0)
推荐(0)
2021年11月7日
使用 JSR303 校验
摘要: 使用 JSR303 校验 防止用户修改前端代码造成的bug 本次示例: 校验用户输入信息,然后保存在数据库中 导入依赖 <dependency> <groupId>org.hibernate.validator</groupId> <artifactId>hibernate-validator<
阅读全文
posted @ 2021-11-07 16:13 yangruomao
阅读(65)
评论(0)
推荐(0)
2021年11月2日
SpringMVC 测试 Controller 示例
摘要: 示例:模拟 /emps?pn=1 请求;拿到请求域;获取请求域对象;从请求域中拿对象 @RunWith(SpringJUnit4ClassRunner.class) @WebAppConfiguration @ContextConfiguration(locations = {"classpath:
阅读全文
posted @ 2021-11-02 10:11 yangruomao
阅读(74)
评论(0)
推荐(0)
2021年10月31日
MyBatis 逆向工程
摘要: 详情见 官方文档 目录结构 供参考 Maven依赖 <!-- mybatis-generator--> <!-- https://mvnrepository.com/artifact/org.mybatis.generator/mybatis-generator-core --> <dependen
阅读全文
posted @ 2021-10-31 12:20 yangruomao
阅读(47)
评论(0)
推荐(0)
2021年10月30日
mybatis 整合 ehcache
摘要: 官方文档: http://mybatis.org/ehcache-cache/ 1. 引入依赖 或 Maven <dependency> <groupId>net.sf.ehcache</groupId> <artifactId>ehcache-core</artifactId> <version>
阅读全文
posted @ 2021-10-30 12:18 yangruomao
阅读(75)
评论(0)
推荐(0)
2021年10月24日
SSM (mybatis plus) 整合配置
摘要: 结构 更新:+ mybatis plus maven依赖 spring相关 servlet和jsp mybatis相关 mysql驱动和c3p0连接池 junit4和jstl <dependencies> <!--spring相关--> <dependency> <groupId>org.sprin
阅读全文
posted @ 2021-10-24 14:39 yangruomao
阅读(692)
评论(0)
推荐(0)
mybatis报错:Invalid bound statement (not found)
摘要: **错误原因:**mapper文件不匹配 检查 mapper 文件有没有写错 检查 mapper 的导入配置,注意不能跨包导入 mapper 检查 target/classes 里有没有生成对应的 mapper 文件,如果没有,解决办法如下 在pom.xml中加入以下配置,并clean后重新编译 <
阅读全文
posted @ 2021-10-24 12:47 yangruomao
阅读(111)
评论(0)
推荐(0)
上一页
1
2
3
4
5
6
7
下一页
公告