自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(17)
  • 收藏
  • 关注

原创 EasyExcel

依赖<dependencies> <!-- https://mvnrepository.com/artifact/com.alibaba/easyexcel --> <dependency> <groupId>com.alibaba</groupId> <artifactId>easyexcel</artifactId>

2020-07-01 16:44:26 142

原创 阿里云对象存储OSS

一、上传文件到阿里云OSS操作1.获取ID秘钥2.使用SDK参考文档https://help.aliyun.com/document_detail/32009.html?spm=a2c4g.11186623.6.779.204ec06dp2VO4A引入依赖<dependency> <groupId>com.aliyun.oss</groupId> <artifactId>aliyun-sdk-oss</artifactId

2020-07-01 15:53:58 238

原创 配置Logback日志

spring boot内部使用Logback作为日志实现的框架。1、配置logback日志删除application.properties中的日志配置安装idea彩色日志插件:grep-consoleresources 中创建 logback-spring.xml改一下信息文件存储路径<?xml version="1.0" encoding="UTF-8"?><configuration scan="true" scanPeriod="10 seconds">

2020-06-30 14:46:05 175

原创 自定义异常处理

1.创建自定义异常类@Data@AllArgsConstructor@NoArgsConstructorpublic class MyException extends RuntimeException { private Integer code;//状态码 private String msg;//异常信息}2.业务中需要的位置抛出MyException@PostMapping("addAtest01") public R addAtest01(@Request

2020-06-30 14:03:20 156 1

原创 时间自动填充

1.自动填充封装创建包handler,创建自动填充类 MyMetaObjectHandler@Componentpublic class MyMetaObjectHandler implements MetaObjectHandler { @Override public void insertFill(MetaObject metaObject) { this.setFieldValByName("createDate", new Date(), metaObject

2020-06-30 12:10:37 219 1

原创 分页查询

依赖<!--mybatis-plus--> <dependency> <groupId>com.baomidou</groupId> <artifactId>mybatis-plus-boot-starter</artifactId> </dependency>1.配置分页插件/** * 分页插件 */ @Bean p

2020-06-30 11:24:39 233

原创 统一返回数据模式

依赖 <!--mybatis-plus--> <dependency> <groupId>com.baomidou</groupId> <artifactId>mybatis-plus-boot-starter</artifactId> <scope>provided </scope> </depend

2020-06-30 09:22:14 118

原创 逻辑删除

1.配置逻辑删除插件@Configuration@MapperScan("com.kundi.basicModuleCrud.mapper")public class CrudConfig { /** * 逻辑删除插件 */ @Bean public ISqlInjector sqlInjector() { return new LogicSqlInjector(); }}2.在实体类中表示是否删除字段对应的属性上添加注解@T

2020-06-29 16:50:36 403

原创 swagger使用

1.引入依赖,创建配置类<!--swagger--> <dependency> <groupId>io.springfox</groupId> <artifactId>springfox-swagger2</artifactId> <scope>provided </scope> </dependenc

2020-06-29 15:52:38 90

原创 mybatisplus实现代码自动生成

一、在test/java目录下创建包com.zhang,创建代码生成器:CodeGenerator.javaimport com.baomidou.mybatisplus.annotation.DbType;import com.baomidou.mybatisplus.annotation.IdType;import com.baomidou.mybatisplus.generator.AutoGenerator;import com.baomidou.mybatisplus.generator.

2020-06-29 12:26:38 266

原创 多个容器内数据库的同步

mysql02的ip地址查询sudo docker inspect mysql02结果如下mysql -u root -p123456 -h192.168.167.130 -p3307端口号:3307密码:123456虚拟机地址:192.168.167.130mysql中运行以下代码grant replication slave,file,replication clien...

2019-12-16 15:12:20 391

原创 navicat连接虚拟机中的docker容器中的mysql数据库出错:1130-host is not allowed to connect

navicat连接虚拟机中的docker容器中的mysql数据库出错:1130-host is not allowed to connect可能是不允许远程访问,需进入mysql中修改用户对应的host,从“localhost”修改成“%”。过程如下:进入docker容器修改host退出后重启mysql容器即可。...

2019-12-12 10:04:07 1355

原创 在执行Dockerfile时出现Get https://registry-1.docker.io/v2/错误的解决方案

1.在IDEA中建立好了SpringBoot项目,并配置好了docker容器,然后在执行Dockerfile时出现以下问题Get https://registry-1.docker.io/v2/: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting head...

2019-07-23 16:39:40 40144 12

转载 出错: Unable to find image 'hello-world:latest' locally docker: Error response from daemon

用ubuntu配置好docker且下载好后,运行hello-world后出错运行: sudo docker run hello-world出错:Unable to find image ‘hello-world:latest’ locallydocker: Error response from daemon: Get https://registry-1.docker.io/v2/: n...

2019-07-18 20:48:22 12171

原创 idea加maven加载Springboot出错

idea加maven加载Springboot出错ClassNotFoundException: org.springframework.boot.SpringApplication检查E:\apache-maven-3.6.0\apache-maven-3.6.0\repository\org\springframework\boot\spring-boot路径,路径是否唯一,jar包是否冲突或...

2019-07-13 19:33:03 906 1

转载 关于class path resource [applicationContext.xml] cannot be opened because it does not exist

检查相关文件确定无误后还是出现这种问题:class path resource [applicationContext.xml] cannot be opened because it does not exist可尝试在web.xml中的classpath:com/damo001/applicationContext.xml中的classpath后加*classpath*:com/damo0...

2019-05-08 20:57:59 576

原创 jsp页面跳转无反应

在javaweb编程进行jsp页面跳转时,点击提交按钮无反应,来回检查许多遍相关文件配置,最终发现是将form写成了from,所以有时候细节真的害死人

2019-05-08 13:41:51 2117 5

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除