在vue的项目中怎样修改浏览器窗口的 logo
摘要:第一种方案: 在public目录中的index.html <link rel="icon" href="<%= BASE_URL %>favicon.ico"> 图标的位置 public/favicon.ico 第二种方案 在main.js中引入 封装好的 js文件 var link = docum
阅读全文
解决:org.apache.ibatis.binding.BindingException: Invalid bound statement (not found)问题
摘要:即在mybatis中dao接口与mapper配置文件在做映射绑定的时候出现问题,简单说,就是接口与xml要么是找不到,要么是找到了却匹配不到。 接口名与Mybatis的映射文件名一定要一模一样; 还有其它情况的,可以参考这个链接指导处理下:https://blog.csdn.net/sundache
阅读全文
解决:The driver has not received any packets from the server.
摘要:这个报错要具体分情况分析; 我的解决方法是:jdbc:mysql://localhost:3306/qllnjc?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&server
阅读全文
生成二维码下载二维码
摘要://获取二维码 @RequestMapping(value = "/getQrcode") @ResponseBody public AjaxResult getQrcode(){ AjaxResult ajaxResult = null; //返回用来生成二维码的data String str =
阅读全文
解决:Records: 9646 Duplicates: 0 Warnings: 0
摘要:https://blog.csdn.net/xiaomei_haimi/article/details/81087037 还有一种可能是:导入的SQL文件里面的数据库名称与目前使用的数据库名不一样;处理:把SQL文件里面的数据库名修改和目前使用的数据库名一样,再导入。
阅读全文
日期类TemporalAdjuster使用
摘要:TemporalAdjuster类是一个函数式接口,只提供了一个方法: Temporal adjustInto(Temporal temporal); TemporalAdjusters类也有很多获取日期的方法,看代码: import java.time.DayOfWeek; import java
阅读全文
@PostConstruct
摘要:@PostContruct是Java自带的注解,在方法上加该注解会在项目启动的时候执行该方法,也可以理解为在spring容器初始化的时候执行该方法。 从Java EE5规范开始,Servlet中增加了两个影响Servlet生命周期的注解,@PostConstruct和@PreDestroy,这两个注
阅读全文
websocket、socket、mqtt的区别
摘要:websocket是在应用层,层次跟http一样,都是基于tcp协议的。websocet跟http不同的是,websocket是全双工通信,即服务端与客户端可以同时向对方传递消息。 socket是对tcp/ip协议族的封装的接口,可以通过socke操作tcp链接。Socket连接可以指定不同的传输层
阅读全文
Java中DecimalFormat用法
摘要:mportjava.text.DecimalFormat; public class TestNumberFormat{ public static void main(String[]args){ doublepi=3.1415927; //圆周率 //取一位整数 System.out.print
阅读全文
启动elasticsearch命令
摘要:grunt server https://www.jianshu.com/p/fb945c23e2e5
阅读全文
安装配置rocketmq
摘要:https://www.likecs.com/show-203531899.html
阅读全文
解决:(0x0000000080000000, 2147483648, 0) failed; error='页 面文件太小,无法完成操作。' (DOS error/errno=1455)
摘要:这是电脑的虚拟内存不足了; 可以关闭一些服务,我使用的是关闭服务的方式; 或者参考网上的其它方法设置更改内存大小:https://blog.51cto.com/u_12974309/2795757
阅读全文
启动elasticsearch
摘要:cd elasticsearch-7.7.0\bin .\elasticsearch.bat http://runoops.com/esinstall.html
阅读全文
@Accessors(chain = true)注解的作用
摘要:平时写代码的时候,用到@Getter,@Setter 以及@ToString注解便够了,那么这个@Accessors(chain = true)注解是用来干嘛的? 这个注解是来自与Lombok里的,具体的作用是开启链式编程,让我们写代码更加方便。
阅读全文
解决:Access denied for user 'root'@'localhost' (using password: YES)
摘要:这个问题要具体情况具体分析; 我遇到的情况是加上这个在连接MySQL的URL加上:&serverTimezone=GMT%2B8 这个信息就可以了。
阅读全文
解决:java: 无效的标记: --release
摘要:需要把项目的Java版本修改和本地安装的版本一样。
阅读全文
解决:Missing script: "dev"
摘要:这个问题要具体分析; 我遇到的情况是执行下面命令就可以成功启动项目了; npm install npm run serve
阅读全文
解决:1273 (HY000): Unknown collation: 'utf8mb4_0900_ai_ci'
摘要:错误提示:ERROR 1273 (HY000): Unknown collation: 'utf8mb4_0900_ai_ci' 是因为linux下MySQL版本不兼容导致的 我们需要做的是打开我们导出的的sql文件 • 把文件中的所有的utf8mb4_0900_ai_ci替换为utf8_gener
阅读全文
使用socket实现即时通讯
摘要:服务端和客户端分为两个不同的项目 服务端项目代码 package com.tszr; import com.alibaba.fastjson.JSONObject; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import jav
阅读全文
vue动态合并行和列
摘要:<script src="//unpkg.com/vue/dist/vue.js"></script> <script src="//unpkg.com/element-ui@2.14.1/lib/index.js"></script> <div id="app"> <template> <div>
阅读全文
Centos7配置node环境
摘要:https://www.jianshu.com/p/06865f508750
阅读全文
cenos7创建删除软连接ln -s
摘要:https://blog.csdn.net/jiangbenchu/article/details/99714680?spm=1001.2101.3001.6650.1&utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7ECT
阅读全文
Git使用git通过ssh连接linux:ssh 用户名@IP地址
摘要:Git使用git通过ssh连接linux:ssh 用户名@IP地址
阅读全文
centos7.5 设置Mysql开机自启动
摘要:https://blog.csdn.net/u011442726/article/details/122199335
阅读全文
vue+element跨行跨列合并
摘要:http://www.srcmini.com/646.html
阅读全文
java字符串-日期格式相互转换
摘要:https://wenku.baidu.com/view/bbcd3a3e2179168884868762caaedd3383c4b56d.html
阅读全文
mybatis plus 条件构造器queryWrapper学习
摘要:queryWrapper是mybatis plus中实现查询的对象封装操作类,他的层级关系如下 在上面的图片中, Wrapper : 条件构造抽象类,最顶端父类,抽象类中提供4个方法西面贴源码展示 AbstractWrapper : 用于查询条件封装,生成 sql 的 where 条件 Abstra
阅读全文
如何在Java中将列表转换为JSON数组?
摘要:import java.util.*; import org.json.simple.*; public class ConvertListToJSONArrayTest { public static void main(String[] args) { List<String> list = n
阅读全文
自动生成代码3
摘要:<?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:sc
阅读全文
解决:NoClassDefFoundError: freemarker/template/Configuration
摘要:解决方案(导入依赖即可): <dependency> <groupId>org.freemarker</groupId> <artifactId>freemarker</artifactId> <version>2.3.28</version> <scope>compile</scope> </de
阅读全文
自动生成代码2
摘要:package com.tszr.generator; import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.generator.AutoGenerator; import com.bao
阅读全文
自动生成代码
摘要:package com.tszr.generator; import com.baomidou.mybatisplus.annotation.DbType; import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.
阅读全文
解决:Spring Boot Configuration Annotation Processor not configured
摘要:原因 提示说明没有配置springboot的自动配置注解处理器,及spring-boot-configuration-processor。 在使用到ConfigurationProperties注解时无法识别。 在pom中增加spring-boot-configuration-processor组件
阅读全文
centos7安装MySQL8
摘要:https://www.cnblogs.com/secretmrj/p/15600144.html 安全后台启动MySQL # 完整命令 /usr/local/mysql8/bin/mysqld_safe --defaults-file=/usr/local/etc/my.cnf & # 添加PAT
阅读全文
StringUtils.isNotBlank介绍
摘要:StringUtils.isNotBlank() 判断某字符串是否为空或长度为0或由空白符构成: 示例: StringUtils.isBlank(null) = true StringUtils.isBlank("") = true StringUtils.isBlank(" ") = true S
阅读全文
判断对象是否为空/不为空工具类
摘要:import java.util.Optional; public final class NullUtil { private static final String NULL_STRING = "null"; private static final int NULL_STRING_LENGTH
阅读全文
@TableField(exist=false)注解
摘要:@TableField(exist=false)注解加在bean属性上,表示当前属性不是数据库的字段,但在项目中必须使用。 @ApiModelProperty(position = 12, value = "注销时间") private LocalDateTime zxsj; /** * 开始时间
阅读全文
@Data注解的作用
摘要:@Data注解是lombok.jar包下的注解,该注解通常用在实体bean上,不需要写出set和get方法,但是具备实体bean所具备的方法,简化编程提高变成速度。注意:项目中一定要引入lombok.jar!! @Data相当于@Getter @Setter @RequiredArgsConstru
阅读全文
lombok @Accessors用法详解
摘要:@Accessors(chain=true) 链式访问,该注解设置chain=true,生成setter方法返回this(也就是返回的是对象),代替了默认的返回void。 package com.pollyduan; import lombok.Data; import lombok.experim
阅读全文
@EqualsAndHashCode(callSuper = false)
摘要:这个注解的作用就是自动的给model bean实现equals方法和hashcode方法。 https://www.freesion.com/article/69941080555/
阅读全文
把前端经过Base64算法转换的图片字符串处理为图片文件并保存的关键代码
摘要:public class CropsImageVo { //作物生长全局图片 private String imageBase64; public String getImageBase64() { return imageBase64; } public void setImageBase64(S
阅读全文
ES6-promise基础用法
摘要:https://wenku.baidu.com/view/662a0e4e021ca300a6c30c22590102020740f26f.html
阅读全文
解决:Cause: java.lang.IllegalArgumentException: invalid comparison: java.util.Date and java.lang.String
摘要:这是因为原因是mybatis 中对于时间参数进行比较时的一个bug. 如果拿传入的时间类型参数与空字符串''进行对比判断则会引发异常. 所以在上面的代码中去掉空字符串判断, 只保留非空判断就正常了。改为如下
阅读全文
解决:Consider defining a bean of type
摘要:在应用启动入口增加:@MapperScan(basePackages = {"XXXXXXXXXXXX.repository"})
阅读全文
Centos7配置JAVA环境
摘要:https://blog.csdn.net/gao112212/article/details/122615202
阅读全文
centos7修改时区为北京时间
摘要:首先同步时间 yum install -y ntpdate ntpdate -u cn.pool.ntp.org 然后设置中国时区(北京时间) timedatectl set-timezone Asia/Shanghai 重启OS reboot
阅读全文
从淘宝下载vue依赖
摘要:npm install --registry=https://registry.npm.taobao.org
阅读全文
ideal全局搜索快捷键
摘要:IDEA中全局查找快捷键默认是Ctrl+Shift+F(R) https://www.csdn.net/tags/OtTaMg3sNDU1OS1ibG9n.html
阅读全文
vue中@click.native.prevent说明
摘要:元素中绑定了这个事件 <el-button :loading="loading" type="primary" style="width:100%;margin-bottom:30px;" @click.native.prevent="handleLogin">登录</el-button> 1、在封
阅读全文
TortoiseSVN安装使用
摘要:http://www.uml.org.cn/pzgl/201009214.asp
阅读全文
安装MySQL5.7 msi
摘要:https://blog.csdn.net/weixin_44606517/article/details/121337623
阅读全文
解决:Could not autowire. No beans of 'XXXXXXXXXX' type found.
摘要:针对于不能够正常编译运行的解决方案:正确的导入包,如果是检查错误提示中的类的包是否导入正确,这种错误最常见在mybatis中的mapper下,比如对于mybatis的的注解版或配置文件版的解决办法: ①.配置文件版:在全局配置文件中,配置要自动扫描进容器的包 <!-- mapper scanner
阅读全文
解决:[classpath:db/migration] (please add migrations or check your Flyway configuration)
摘要:在yml文件中(例如:application-dev.yml) spring: #spring启动时禁用flyway功能 flyway: enabled: false 这样在项目启动时就不会进行flyway的迁移了
阅读全文
解决:Failed to configure a DataSource: 'url' attribute is not specified and no embedded datasource could be configured.
摘要:yml或者properties文件没有被扫描到,需要在pom文件中<build></build>添加如下.来保证文件都能正常被扫描到并且加载成功. <!-- 如果不添加此节点mybatis的mapper.xml文件都会被漏掉。 --> <resources> <resource> <director
阅读全文
解决:Data source rejected establishment of connection, message from server: "Too many connections"
摘要:SELECT @@MAX_CONNECTIONS AS 'Max Connections'; set GLOBAL max_connections=1000; http://blog.sina.com.cn/s/blog_1645e034e0102ydo5.html
阅读全文
BPwdEncoderUtils关键代码
摘要:package com.forezp.util; import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder; public class BPwdEncoderUtils { private static final
阅读全文
SwaggerConfig关键代码
摘要:package com.tszr.config; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import sprin
阅读全文
UserUtils关键代码
摘要:package com.tszr.util; import org.springframework.security.core.Authentication; import org.springframework.security.core.authority.SimpleGrantedAuthor
阅读全文
HttpUtils关键代码
摘要:package com.tszr.util; import org.springframework.web.context.request.RequestContextHolder; import org.springframework.web.context.request.ServletRequ
阅读全文
ResourceServerConfiguration关键代码
摘要:资源访问配置 package com.tszr.config; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired
阅读全文
JwtConfiguration关键代码
摘要:配置jwt权限、存取用户访问头信息 package com.tszr.config; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.ann
阅读全文
GlobalMethodSecurityConfiguration关键代码
摘要:开启方法方法的权限注解 package com.tszr.config; import org.springframework.context.annotation.Configuration; import org.springframework.security.config.annotatio
阅读全文
RespDTO类
摘要:package com.tszr.dto; import java.io.Serializable; public class RespDTO<T> implements Serializable{ public int code = 0; public String error = ""; pub
阅读全文
通用错误码类
摘要:package com.tszr.exception; /** * 通用错误码 * */ public enum ErrorCode { OK(0, ""), FAIL(-1, "操作失败"), RPC_ERROR(-2,"远程调度失败"), USER_NOT_FOUND(1000,"用户不存在")
阅读全文