摘要: InitializingBean在读取到配置文件中的 属性 时,可以把这些值赋值给其他变量 public interface InitializingBean { void afterPropertiesSet() throws Exception; } application.yml words: 阅读全文
posted @ 2022-01-12 14:34 gain&get 阅读(100) 评论(0) 推荐(0)
摘要: RandomStringUtils.randomNumeric(生成随机数的长度) <dependency> <groupId>org.apache.commons</groupId> <artifactId>commons-lang3</artifactId> <version>3.12.0</v 阅读全文
posted @ 2022-01-12 14:19 gain&get 阅读(139) 评论(0) 推荐(0)
摘要: 在DBeaver中执行SQL文件 写入这个参数,导入的中文不会乱码 --default-character-set=utf8 阅读全文
posted @ 2022-01-06 13:57 gain&get 阅读(6138) 评论(0) 推荐(1)
摘要: 官网: https://www.elastic.co/cn/ elastic相关产品下载地址:https://www.elastic.co/cn/downloads/ ElasticSearch下载地址:https://www.elastic.co/cn/downloads/elasticsearc 阅读全文
posted @ 2021-12-29 14:21 gain&get 阅读(470) 评论(0) 推荐(0)
摘要: 在insert标签中添加属性: keyProperty="id" useGeneratedKeys="true"` keyProperty 的值 表示 返回给实体(返回给插入的实体,而不是返回值) useGeneratedKeys="true" 使用自增的键 阅读全文
posted @ 2021-12-28 21:43 gain&get 阅读(86) 评论(0) 推荐(0)
摘要: @Value 和 @ConfigurationProperties :这两者都可以读取配置文件中的数据 下面例子中的access.urls 的值只能通过 @ConfigurationProperties 得到 @Value 注解是无法获取的 access: urls: - /login.* - /j 阅读全文
posted @ 2021-12-28 21:13 gain&get 阅读(363) 评论(0) 推荐(0)
摘要: 未登录 阅读全文
posted @ 2021-12-24 21:29 gain&get 阅读(23) 评论(0) 推荐(0)
摘要: 新建 maven 工程 <build> <plugins> <!--mybatis代码自动生成插件--> <plugin> <groupId>org.mybatis.generator</groupId> <artifactId>mybatis-generator-maven-plugin</art 阅读全文
posted @ 2021-12-24 19:39 gain&get 阅读(40) 评论(0) 推荐(0)
摘要: 只对页面修改 application.yml # 关闭thymeleaf缓存 spring: thymeleaf: cache: false 进入浏览器F12(这步貌似也不需要) 手动更新 如果要更新页面,重新 build(快捷键ctrl + f9) 就行了,不需要重启 自动更新 每次窗口失去焦点就 阅读全文
posted @ 2021-12-14 11:23 gain&get 阅读(328) 评论(0) 推荐(0)
摘要: Redis安装2 操作系统版本 centos7 redis 版本 6.0.6 在虚拟机中创建mkdir -p /usr/local/app目录 把redis上传到app目录 进入cd /usr/local/app 目录,解压 tar -zxvf redis-6.0.16.tar.gz -C ./ * 阅读全文
posted @ 2021-12-08 10:56 gain&get 阅读(34) 评论(0) 推荐(0)