自定义博客皮肤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)
  • 收藏
  • 关注

原创 springboot添加自定义配置文件

springboot项目使用Properties properties=new Properties() 的方式加载自定义配置文件,在编译后,自定义文件就不见了,因此需要使用另一种方式进行配置。1、在resources目录下创建config文件夹,并创建custom.properties文件 custom.properties文件内容如下:custom.name=ShakeSpear...

2018-08-21 15:59:46 7386

原创 ElasticSearch学习(一)Centos7中安装ElasticSearch

说明:本文elasticsearch安装在linux系统中,需要懂一些linux操作命令1、官网下载elasticsearch的tar格式其他版本选择past releases,本文使用的是elasticsearch-5.5.2版本2、将下载好的elasticsearch-5.5.2.tar.gz文件通过CRT上传到linux3、解压elasticsearch-5....

2018-08-21 15:02:56 241

原创 luke各个版本下载地址

https://github.com/DmitryKey/luke/releases

2018-08-21 09:25:02 2855

原创 springboot配置跨域过滤器

1、springboot配置过滤器首先创建过滤器类,实现javax.servlet.Filter,并添加注解@Component,即可package com.center.manager.filter;import java.io.IOException;import javax.servlet.Filter;import javax.servlet.FilterChain;im...

2018-08-20 11:10:17 3075

原创 springboot使用定时任务@Scheduled

在springboot项目中如何使用定时任务,其实很简单,只需要两步1、在springboot启动类添加注解@EnableScheduling开启对定时任务的支持package com.che.pri;import org.mybatis.spring.annotation.MapperScan;import org.springframework.boot.SpringApplic...

2018-08-20 10:55:14 392

原创 mybatis 批量删除数据

mybatis批量删除数据,将需要删除的数据id存放到list中,将list作为参数传递,具体代码如下:1、在mapper层中创建deleteAudioAudioFiles(@Param(“ids”)List ids) 方法,返回删除的数据条数package com.center.manager.mapper;import java.util.List;import org.apac...

2018-08-17 16:42:56 13239

原创 mybatis 批量将list数据插入到数据库

随着业务需要,有时我们需要将数据批量添加到数据库,mybatis提供了将list集合循环添加到数据库的方法。具体实现代码如下:1、mapper层中创建 insertForeach(List < Fund > list) 方法,返回值是批量添加的数据条数package com.center.manager.mapper; import java.util.List; im...

2018-08-17 16:26:00 164427 29

原创 vue遍历二维数组

代码如下:<!DOCTYPE html><html><head> <meta charset="UTF-8"> <title></title> &lt

2018-08-16 16:44:58 16241

原创 maven添加阿里云仓库

在 settings.xml文件的 <mirrors> 标签中添加如下内容: <mirrors> <mirror> <id>alimaven</id> &

2018-08-14 16:12:29 3560

原创 sessionStorage 键值是否为空进行判断

当 sessionStorage 中未存储任何键值时,若要对某个键的值是否为空进行判断,可进行如下判断if (sessionStorage.getItem("key") != null) { //自定义代码}注意:上述代码,可以直接进行 getItem("key") 判断,即使 sessionStorage 中没有该键,也不会报错。..

2018-08-11 15:28:13 13662 5

原创 springboot 整合 mybatis

springboot 整合 mybatis 有很多种方式,本文之介绍其中一种。一、eclipse添加sts插件1、打开eclipse,help,选择 Eclipse Marketplace,在搜索框中搜 sts,安装sts插件。二、创建springboot项目1、使用 sts 插件创建项目2、填写项目名,group,包名3、选择jar包,点击...

2018-08-10 15:00:19 480

原创 springboot 添加 jsp 支持

1、在pom文件中添加依赖 <dependency> <groupId>javax.servlet</groupId> &

2018-08-09 14:37:05 2337

原创 maven打包报错: 程序包net.bytebuddy.asm.Advice不存在

解决办法: 在pom文件中添加 jar包 <dependency> <groupId>net.bytebuddy</groupId> <artifactId>byte-buddy-agent</artifactId> &amp

2018-08-07 20:18:47 6119

原创 springboot 项目启动报错 url' attribute is not specified and no embedded datasource could be configured

报错信息:Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled. 2018-08-06 10:04:25.845 ERROR 11256 -...

2018-08-06 10:11:37 19641 8

原创 java连接mysql失败Path does not chain with any of the trust anchors

报错信息如下:com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failureThe last packet successfully received from the server was 1,158 milliseconds ago. The last packet sent s...

2018-08-05 21:48:48 1979 1

原创 报错 You need either to explicitly disable SSL by setting useSSL=false, or set useSSL=true and provide

mysql5.7版本报错:Sun Aug 05 21:18:18 CST 2018 WARN: Establishing SSL connection without server's identity verification is not recommended. According to MySQL 5.5.45+, 5.6.26+ and 5.7.6+ requirements SSL...

2018-08-05 21:28:45 23479 7

原创 @Resource annotation is not supported on static fields Spring注入问题

实现线程接口 Runnable 或 注入变量为常量 注解注入失败,报错 @Resource annotation is not supported on static fields解决办法: 在类上添加 @Component 注解 变量前缀加static,生成set方法并加上@Resource,记住把set方法 static 去掉,否则会抛出 @Resource annotat...

2018-08-04 15:29:07 9320

空空如也

空空如也

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

TA关注的人

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