自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

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

原创 SpringBoot2.6.13form-data参数丢失的问题

springboot form-data参数丢失

2024-05-30 10:53:08 386

原创 spring event多种使用方式

springevent是spring提供的观察者模式实现机制

2022-07-19 15:11:47 843 1

原创 mybatis plus旧版生辰器代码

mybatis plus旧版生成器代码示例 public static void main(String[] args) { String modelName = "mysql"; // 1、创建代码生成器 AutoGenerator mpg = new AutoGenerator(); // 2、全局配置 GlobalConfig gc = new GlobalConfig(); String projec

2022-04-29 14:39:00 161

原创 ES RestHighLevelClient index通配符查询

es6.8 RestHighLevelClent index通配符查询

2022-04-29 14:34:56 656

原创 HttpClient获取重定向后的url并对跳转中的url特殊字符做空格处理

http示例代码httpclient = HttpClients.custom().setConnectionManager(connectionManager).setDefaultRequestConfig(requestConfig).setRedirectStrategy(new **UrlHandlerRedirectStrategy**())重新实现重定向策略集成DefaultRedirectStrategy或者实现RedirectStrategypublic URI getLocat

2021-03-23 17:52:21 724

原创 spring-boot-starter-validation

文章目录前言一、pandas是什么?二、使用步骤1.引入库2.读入数据总结前言jdk javax.validation包下的接口hibernate validation实现类spring-boot validation实现类提示:以下是本篇文章正文内容,下面案例可供参考一、pandas是什么?示例:pandas 是基于NumPy 的一种工具,该工具是为了解决数据分析任务而创建的。二、使用步骤1.引入库代码如下(示例):import numpy as npimport pa

2020-12-08 18:48:50 9284 2

原创 getOutputStream() has already been called for this response

一次请求调用如下方法 response.getWriter().print("writer print test"); response.getOutputStream().print("outputStream print test");观察Response.java,发现如下代码: /** * Using output stream flag. */ protected boolean usingOutputStream = false; /**

2020-12-01 17:50:53 176

原创 JAVA获取重定向url

代码:/** * 处理跳转链接,获取重定向地址 * @param url 源地址 * @return 目标网页的绝对地址 */ public String getAbsUrl(String url){ CloseableHttpClient httpclient = HttpClients.createDefault(); HttpClientContext context = HttpClientContex.

2020-11-04 17:12:36 2249

原创 springboot@Postconstruct执行多次

现象:项目启动@Postconstruct注解的方法执行多次观察此类下是否有多个子类, 每个子类初始化为bean时都会调用父类@Postconstruct注解的方法解决方法:@Postconstruct是否可以用@Bean代替

2020-09-23 17:31:45 1384 1

原创 jackson jsonUtil

json common jackson private static final ObjectMapper OBJECT_MAPPER = new ObjectMapper(); private static final String STANDARD_FORMAT = "yyyy-MM-dd HH:mm:ss"; static { //对象的所有字段全部列入 OBJECT_MAPPER.setSerializationInclusion(Js.

2020-07-23 11:31:11 351

原创 Spring Boot 启动或者启动测试 could not open ServletContext resource [/*.properties]

@PropertySource注解的问题项目中写成这这样@PropertySource(“配置文件.properties”)修改方法:删除这个注解修改为@PropertySource(“classpath:配置文件.properties”)

2020-06-05 10:30:00 750 1

原创 jdk8 before the new agreement last version

JavaSE8始终可以免费下载安装的,之后的JDK也可以在Oracle官网免费下载安装。Java 8u201/202是Oracle修改用户协议前的最后一个版本。如果你只是学习、个人使用Java或开发程序并个人使用,则所有的版本均可以免费使用。如果要商业使用,或是在某些情况下开发并公开发布,或要取得Oracle的支持,则需要通过订阅使用之后的版本。(注意:之前回的版本商业使用也要取得授权)Oracle在官网对此是有说明的:许可在这里可以找到修改用户协议前的所有JDK8的下载(需登答录):下载..

2020-05-29 11:34:31 223

原创 mybatis批量修改

connection url添加参数&allowMultiQueries=true&rewriteBatchedStatements=trueexample xml:<update id="batchUpdate" parameterType="java.util.List"> <foreach collection="list" item="item" index="index" separator=";"> UPDA

2020-05-27 17:27:50 203

原创 java mail 25 connection time out

java发送邮件25端口超时本地测试通过,服务器发送邮件超时, 原因是阿里云服务器封禁了25端口导致的请使用以下配置:spring: mail: host: smtp.163.com username: 18295885967@163.com password: TSBRGPDNLPSEFYGM default-encoding: UTF-8 properties: mail: smtp: auth: true

2020-05-25 23:45:20 979

原创 javaMailSender

使用javaMailSender发送附件,邮件中没有正文信息原有写法: // 设置附件 if (!CollectionUtils.isEmpty(attachPathList)) { Multipart multipart = new MimeMultipart(); for (String attachPath : attachPathList) {

2020-05-19 15:47:04 2580

原创 新的开始

新的开始原有csdn账号全部注销, 这是一个新的开始

2020-05-19 15:39:42 820

空空如也

空空如也

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

TA关注的人

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