
JAVAEE
文章平均质量分 59
tplina
这个作者很懒,什么都没留下…
展开
-
SpringBoot2 + redisson + sentinel
<spring-boot.version>2.3.7.RELEASE</spring-boot.version>1.引入依赖<dependency> <groupId>org.redisson</groupId> <artifactId>redisson-spring-boot-starter</artifactId> <versi..原创 2021-07-16 12:45:06 · 1192 阅读 · 0 评论 -
nginx 安装配置记录稿
1 nginx安装1.1 下载官方网址:http://nginx.org/en/download.html其中 “Stable version” 代表最新稳定版本我这里下载的是 nginx-1.16.1.tar.gz 压缩包1.2 上传至Linux下载完成后使用工具(如:xftp等)上传到 Linux 系统上1.2 准备安装1.2.1 安装依赖环境gcc环境yum install -y gcc-c++pcre库,用于解析正则表达式yum install -y pcre原创 2020-08-10 07:18:39 · 208 阅读 · 0 评论 -
SpringBoot Controller 返回值包装
@Componentpublic class ResponseBodyWrapFactoryBean implements InitializingBean { @Resource private RequestMappingHandlerAdapter adapter; @Override public void afterPropertiesSet() ...原创 2019-10-22 17:37:40 · 1843 阅读 · 0 评论 -
跨域报错 Access to XMLHttpRequest at has been blocked by CORS policy
@Configurationpublic class SystemCorsConfiguration { private CorsConfiguration buildConfig() { CorsConfiguration corsConfiguration = new CorsConfiguration(); corsConfiguration.se...原创 2019-07-17 17:28:17 · 4278 阅读 · 0 评论 -
SpringBoot2 整合 Shiro 基于URL的权限校验
概念模型用户与角色之间是一对一关联,角色与资源之间是多对多关联(关联关系用中间表来维护)Resource里面存储着系统的url路径模型字段都很简单,SQL及Model类就不再贴出来了.1.引入依赖<dependency> <groupId>org.apache.shiro</groupId> ...原创 2019-07-25 20:02:02 · 2469 阅读 · 0 评论 -
Gradle 5.3 引入lombok依赖
发现网上有些说法是这样的,但引入之后还是报错遂改成下面这样发现可以了(当时开发环境Gradle 5.3;Idea 2018.2;JDK 1.8)dependencies { compile "org.projectlombok:lombok:1.18.6" compileOnly 'org.projectlombok:lombok:1.18.6' an...原创 2019-08-24 22:21:43 · 1322 阅读 · 0 评论 -
项目没有问题,但是IDEA启动失败
idea 版本 2018.2用Idea的run/debug启动一个SpringBoot + Mybatis + dubbo 的项目报错,项目代码和配置文件都没有问题,用maven打包成jar,使用java -jar 命令可以启动成功! 但是在Idea中就是不可以....报IllegalStateException: No typehandler found for property...原创 2019-08-28 19:43:55 · 1354 阅读 · 0 评论 -
idea 显示 maven 侧边栏
idea 版本 2019.2当pom.xml文件不在项目根路径下(在某个子文件夹下面),这时加载项目可能不会出现maven侧边栏,解决办法:找到某个pom.xml文件,右击,选择Add as Maven Projec t即可...原创 2019-09-06 08:41:36 · 14768 阅读 · 2 评论 -
SpringBoot 整个Shiro doGetAuthorizationInfo方法未执行
使用的shiro jar版本<dependency> <groupId>org.apache.shiro</groupId> <artifactId>shiro-spring</artifactId> <version>1.3.2</versi...原创 2019-07-19 11:24:31 · 3960 阅读 · 0 评论 -
SqlSession XXX was not registered for synchronization because synchronization is not active 解决办法
当发现数据库引擎,方法为public ,try catch 都没问题时,如果项目整合了Shiro,就可能和Shiro框架有关,参考网上解决办法,1.Shiro中注入的Service使用@lazy注解延迟加载,如果Service在ShiroConfig类中注入(或使用),这个注解没有用在UserRealm中注入的Service使用该注解有效,2.直接使用Mapper(/Dao),...原创 2019-07-12 15:19:29 · 9196 阅读 · 0 评论 -
自定义Mapper 枚举处理器 IllegalArgumentException: No enum constant .... 的解决办法
1.定义通用枚举接口public interface BaseEnum<E extends Enum<?>, T> { /** * 获取枚举值 * * @return 枚举值 */ T getValue();}2.具体的枚举实现通用接口public enum UserStatusEnum implem...原创 2019-02-27 18:47:37 · 31337 阅读 · 4 评论 -
SpringBoot 使用@RequestBody 接收到的参数对象属性为空
前端使用axios发送Post请求给后端,后端使用@RequestBody接收,发现对象为空 原因,对象没有setter方法在对象上加上setter方法如果项目依赖lombok的话,直接在类上加上@Data注解就好了....原创 2019-02-27 13:59:38 · 23249 阅读 · 0 评论 -
mybatisPlus null 值更新问题
发现mybatisPlus会更新对象属性为null的值,与field-strategy配置有关mybatis-plus: global-config: db-config: field-strategy: not_null在3.1.0版本中,其选择的值有public enum FieldStrategy { IGNORED, NOT_NU...原创 2019-03-04 13:26:28 · 12948 阅读 · 4 评论 -
基于css,Vue的分页样式组件
1.css.page { font-weight: 900; width: 100%; height: 40px; text-align: center; color: #888; margin: 20px auto 0; background: #f2f2f2; line-height: 40px;}.pagelist ...转载 2019-03-04 17:38:18 · 881 阅读 · 0 评论 -
网页内容显示不全,TypeError: Cannot read property 'trace' of undefined错误
最近开发发现网页的部分内容不显示,控制台偶见Error in event handler for (unknown): TypeError: Cannot read property 'trace' of undefined错误.最后发现,是被广告拦截插件(Adblock Plus)拦截了.....比较粗暴的解决方法是,添加白名单/关闭该插件...原创 2019-03-14 16:57:17 · 2135 阅读 · 0 评论 -
layUI 数据表格重载时参数清空后,url请求仍然包含之前参数的解决方法
1. layUI 版本为layui-v2.4.52.情景再现 1).第一次有参数请求 2). 第二次清空参数请求3.比较粗暴的解决方案缺点是:你有更好的方法吗?...原创 2019-03-30 12:41:09 · 4090 阅读 · 3 评论 -
IntelliJ IDEA 2018 基本配置
转载:https://blog.youkuaiyun.com/chengyuqiang/article/details/80719143 1、修改JVM参数C:\Program Files\JetBrains\IntelliJ IDEA 2018.1.5\bin 编辑idea64.exe.vmoptions配置文件-Xms128m-Xmx750m-XX...转载 2019-04-04 10:11:17 · 567 阅读 · 0 评论 -
SpringBoot + WebSocket 定时推送
本文借鉴了网上的相关文章1.pom.xml<dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-websocket</artifactId></dependency>...转载 2019-06-19 20:10:43 · 1044 阅读 · 0 评论 -
yml 中参数 映射到POJO
1.yml文件person: name: lw age: 18 boss: false birth: 2019/06/29 maps: V1: K1 V2: abc list: [cat,dog,pig] dog: name: 旺财 age: 32.一个具体的类(注意:@ConfigurationProperties(prefi...原创 2019-06-29 20:07:39 · 716 阅读 · 0 评论 -
idea2019 复制错误提示信息
转载 2019-07-11 14:29:49 · 766 阅读 · 1 评论 -
Git 命令学习理解网站
https://learngitbranching.js.org/原创 2019-07-11 17:24:27 · 147 阅读 · 0 评论 -
MybatisPlus 代码生成
官网: https://mp.baomidou.com/guide/generator.html https://mp.baomidou.com/config/generator-config.html1.添加依赖 <dependency> <groupId>com.baomidou</grou...原创 2019-07-06 22:39:52 · 1088 阅读 · 0 评论 -
基于Mybatis和BaseService的批量操作(MySql)
1.通用Mapperimport tk.mybatis.mapper.common.Mapper;import tk.mybatis.mapper.common.MySqlMapper;/** * 基础mapper,实现增删改查,分页等基本功能 * * @param <T> 泛型参数 * @author lw * @since 2019年2月14日 13:48:1...原创 2019-02-21 21:45:21 · 1397 阅读 · 0 评论