自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

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

原创 mysql一列一行转一列多行

效果实现SELECT DISTINCT SUBSTRING_INDEX( SUBSTRING_INDEX( a.path, ',', b.help_topic_id + 1 ), ',',- 1 ) AS path FROM ( SELECT '1,2,3,4,5,6,7,8' AS path FROM DUAL ) a JOIN mysql.help_topic b ON b.help_topic_id < ( LENGTH( a.path ) - LENGTH( REPLACE (

2022-01-18 17:15:22 559

原创 Length Required:HTTP Error 411. The request must be chunked or have a content length.

最近在使用curl调用POST接口时,报http 411错误原请求方式:curl http://localhost:8080/test -X POST报错信息:HTTP Error 411. The request must be chunked or have a content length.修改后的请求方式:curl http://localhost:8080/test -X POST –header "Content-Length: 0"在加上 –header “Conten

2021-11-05 16:41:13 4467

原创 RSA分段加解密

package demo;import org.apache.commons.codec.binary.Base64;import javax.crypto.Cipher;import java.security.*;import java.security.interfaces.RSAPrivateKey;import java.security.interfaces.RSAPub...

2020-04-08 14:39:03 353

原创 Windows下pgsql口令认证失败psql: FATAL: password authentication failed for user "Administrator"

当我们使用psql命令时,如果不加-U参数,默认使用的用户名是我们本地电脑登录的管理员用户名而在postgresql库中并没有存这个用户,所以报错因此我们应该使用psql -U postgres再根据提示输入密码就可以了...

2020-03-13 09:31:08 2019

原创 @Scheduled注解不执行

1.在定时方法的类上加@EnableScheduling注解2.在spring的配置文件里加上<task:annotation-driven />配置文件头部的必须要有:xmlns:task="http://www.springframework.org/schema/task"xsi:schemaLocation=" http://www.springframework...

2020-03-11 19:08:02 2289

原创 window安装postgresql 报" Failed to load sql modules into the database cluster"

1.出现这个错误的原因可能是因为使用的是Administrator用户安装的,我们可以试着创建一个postgres用户,可参照 https://www.ithome.com/html/win10/237491.htm2.然后创建一个文件夹D://postgres用来存放postgresql-10.12-1-windows.exe安装包,再在D://postgres文件夹下创建名为10的文件夹(我...

2020-03-09 18:11:37 1314 2

原创 Spring集成Redis

1.redis所需jar包依赖<dependency> <groupId>redis.clients</groupId> <artifactId>jedis</artifactId> <version>2.9.0</version></dependency><dependency&gt...

2020-03-09 16:45:29 123

原创 使用AbstractRoutingDataSource和aop动态切换数据源

1.先写一个DataSourceContextHolder类public class DataSourceContextHolder { private static final ThreadLocal<String> contextHolder = new ThreadLocal<String>(); //设置数据源 public stati...

2020-02-28 14:30:07 223

原创 JavaWeb常用基本配置文件

1.web.xml<?xml version="1.0" encoding="UTF-8"?><web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xsi:schemaLocation=...

2020-02-28 11:16:57 282

原创 JavaWeb中乱码问题

1.请求乱码在web.xml中配置过滤器 <filter> <filter-name>CharacterEncodingFilter</filter-name> <filter-class>org.springframework.web.filter.CharacterEncodingFilter</filt...

2020-02-27 19:11:01 80

空空如也

空空如也

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

TA关注的人

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