java
戒不掉的瘾
这个作者很懒,什么都没留下…
展开
-
数据导出,文件压缩,文件下载
数据导出 HSSFWorkbook hssfWorkbook = new HSSFWorkbook(); /** * 合规提取-下载封装 * @param transOfflineist 数据 * @param wb HSSFWorkbook * @param sheetName sheet名称 * @param filedMap 数据列名 */ public void exportDetailed(List<Map&原创 2021-04-13 14:22:36 · 129 阅读 · 0 评论 -
Maven 使用maven-assembly-plugin 打包
@Maven 使用maven-assembly-plugin 打包Maven 使用maven-assembly-plugin 打包问题Failed to execute goal org.apache.maven.plugins:maven-assembly-plugin:2.2-beta-5:single (default) on project Failed to create assembly: Failed to resolve dependencies for project:解决法升级原创 2021-04-01 16:23:11 · 367 阅读 · 0 评论 -
签名算法与RSA加密方式工具类
加密算法RSA,签名的校验算法使用 SHA1WithRSA 算法,将签名值使用BASE64转码 工具类 签名import java.io.FileInputStream;import java.io.IOException;import java.io.UnsupportedEncodingException;import java.security.KeyFactory;import java.security.KeyStore;import java.security.PrivateKe原创 2020-10-16 15:43:11 · 281 阅读 · 3 评论 -
日志工具类
需要日志处理,并且对请求参数进行翻译,因此采用注解形式处理,@Target(ElementType.METHOD)@Retention(RetentionPolicy.RUNTIME)public @interface Log { String value() default "";}@Target({ElementType.TYPE,ElementType.METHOD})@Retention(RetentionPolicy.RUNTIME)@Documentedpubl原创 2020-09-09 11:16:31 · 389 阅读 · 0 评论 -
spring cloud feigen 返回404解决
spring cloud feign调用返回404,处理记录==> [http-nio-9009-exec-6] ==> ERROR o.a.c.c.C.[.[localhost].[/].[dispatcherServlet] - Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested excep.原创 2020-08-12 16:18:00 · 1307 阅读 · 0 评论 -
spring boot shiro 登录redis共享sesson配置
由于多台集群服务端导致登录用户session切换问题,使用redis哨兵模式共享shiro登录session;用到的pom依赖<dependency> <groupId>com.github.theborakompanioni</groupId> <artifactId>thymeleaf-extras-shiro<...原创 2019-08-28 14:09:55 · 772 阅读 · 0 评论 -
spring batch 数据脚本
batch初始化脚本(本人已验证)正确的初始化脚本信息为: CREATE TABLE BATCH_JOB_INSTANCE ( JOB_INSTANCE_ID BIGINT NOT NULL PRIMARY KEY , VERSION BIGINT , JOB_NAME VARCHAR(100) NOT NULL, JOB_KEY...原创 2019-01-17 17:22:53 · 605 阅读 · 0 评论 -
spring-web-socket
首先写一类继承TextWebSocketHandler如下:import org.slf4j.Logger;import org.slf4j.LoggerFactory;import org.springframework.beans.factory.annotation.Autowired;import org.springframework.stereotype.Component...原创 2018-12-03 17:13:17 · 465 阅读 · 1 评论 -
springmvc json 响应http406解决
You can use the RESTful @ResponseBody approach and HTTP message converters, typically to return data-formats like JSON or XML. Programmatic clients, mobile apps and AJAX enabled browsers are the usu原创 2017-05-19 14:06:58 · 427 阅读 · 0 评论 -
日期处理含有T,Z等特殊的日期处理
public class DateUtil {/** * All Dates are normalized to UTC, it is up the client code to convert to the appropriate TimeZone. */ public static final TimeZone UTC; /**转载 2017-03-09 11:46:12 · 9354 阅读 · 0 评论 -
Ubuntu12 mysql
Ubuntu12 mysql 配置管理 按照网上的说安装(再次不在重复)完成后,发现远程无法访问,各种尝试,网上资料说什么改表发,赋权法等没什么屌用,但注释掉/etc/mysql/my.cnf里面的bind-address=127.0.0.1 重启报错, 究其原因 如下:1,查看mysqld的pid是否存在,ps -ef | grep mysqld原创 2015-10-27 10:17:58 · 235 阅读 · 0 评论 -
Ubuntu12 配置Bugzilla
Ubuntu12 配置Bugzilla发现问题 按照网上的步骤执行完后,启动Bugzilla发现无法连mysql数据库,错误信息如下图(图片第二天放,今天太晚了)折腾了一天最后搞定了,原来是perl确实DBD安装需要安装perl-DBI。用yum install perl-DBI perl-DBD-pg 安装。 或#/usr/bin/perl ins原创 2015-10-22 22:41:33 · 231 阅读 · 0 评论