![](https://img-blog.csdnimg.cn/20201014180756724.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
技术
qq_1141552952
你只管努力,剩下的交给时间。
展开
-
java使用POI导入生成Excel时添加批注
代码示例: // 创建excel工作簿 SXSSFWorkbook wb = new SXSSFWorkbook(200); // 创建第一个sheet(页),并命名 SXSSFSheet sheet = wb.createSheet("sheetName"); // 创建绘图对象 Drawing<?> drawing = sheet.createDrawingPatriarch();原创 2021-11-25 17:45:04 · 2641 阅读 · 1 评论 -
java使用POI导入Excel读取批注
获取批注方式有两种,一种是获取所有,一种是获取每一行的批注,具体看情况而定。 //构建文件流。。。 InputStream inputstream = file.getInputStream(); ByteArrayOutputStream baos = new ByteArrayOutputStream(); byte[] buffer = new byte[1024]; int len; while ((原创 2021-11-25 17:23:05 · 1770 阅读 · 0 评论 -
POI读取excel中读取小数位数过多,数值精度损失问题解决
POI读取excel中读取小数位数过多,数值精度损失问题解决参考来源项目中需要用到读取excel功能,当excel中有计算公式时,读取到的数值就可能会出现多个小数点的问题例如: 2.2 --> 2.1999999997在这里记录一下后端java的处理办法处理代码public class CommonUtil { private static NumberFormat numberFormat = NumberFormat.getNumberInstance(); sta原创 2021-11-12 09:28:33 · 3536 阅读 · 0 评论 -
java邮箱发送 网易邮箱发送 使用SSL加密
JavaMail使用ssl加密 解决阿里云出方向 25端口 不开放的问题最近使用JavaMail发送邮件,用的是网易邮箱的邮件发送服务。在本地测试是没有问题,但是上传到阿里云的ecs服务器上就报错:Couldn't connect to host, port: smtp.majing.io, 25; timeout -1;查资料发现原来是阿里云处于安全考虑,TCP 25 端口出方向默认被封禁。解决办法有2种:1.向阿里云申请解封25端口2.使用使用ssl加密我使用的是第二种原创 2021-04-21 13:43:12 · 322 阅读 · 0 评论 -
Vue 脚手架搭建
Vue 脚手架搭建首先确保已安装node环境管理nodejs版本全局安装vue-cli3.0脚手架安装淘宝镜像cnpm(非必装,网络慢的情况可安装)首先确保已安装node环境node -v、npm -v 查看本地node版本信息管理nodejs版本执行命令安装:npm install -g nn latest(升级node.js到最新版)n stable(升级node.js到最新稳定版)n后面也可以跟随版本号,例如:nv0.10.26或者n v0.10.26或者nv0.10.26或者n 0.1原创 2021-04-19 21:42:52 · 92 阅读 · 0 评论 -
Linux 安装 SQL server 提示This program requires a machine with at least 2000 megabytes of memory
这个是说要求你的机器要有2G以上的可用空间,可以对sqlservr更改可执行程序做一点小小的修改来绕过限制。cd /opt/mssql/bin/ # 进入目录 mv sqlservr sqlservr.bak # 保存备份文件 python # 使用python修改内存限制代码>>> if __name__ == '__main__': print(u"修改sqlservr文件至少2G内存的限制为512MB\n") oldfile = open("sqlservr.原创 2021-03-24 16:39:28 · 2187 阅读 · 0 评论 -
基于EasyPOI实现下载excel以及图片,并打包成zip下载至本地,excel中可点击超链接至下载的图片
首先上maven依赖 <dependency> <groupId>cn.afterturn</groupId> <artifactId>easypoi-base</artifactId> <version>3.2.0</version> </dependency> <dependency> <groupId>cn.afterturn</g原创 2020-09-10 13:12:33 · 846 阅读 · 0 评论 -
excel 获取图片 包含 2003 和2007两个版本
excel 获取图片 包含 2003 和2007两个版本import org.apache.poi.POIXMLDocumentPart;import org.apache.poi.hssf.usermodel.*;import org.apache.poi.poifs.filesystem.POIFSFileSystem;import org.apache.poi.ss.usermodel.*;import org.apache.poi.xssf.usermodel.*;import org.原创 2020-08-13 16:31:41 · 224 阅读 · 0 评论 -
java后端实现分页逻辑
java后端实现分页逻辑创建一个工具类用来计算和存储页码、页数等参数public class PageSupport { //当前页码-来自于用户输入 private int currentPageNo = 1; //总数量(表) private int totalCount = 0; //页面容量 private int pageSize = 0; //总页数-totalCount/pageSize(+1) private int totalPageCount = 1;原创 2020-07-07 09:57:09 · 1823 阅读 · 1 评论 -
springboot目前所需要的jar依赖
<dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-web</artifactId> </dependency> ...原创 2019-08-29 10:10:51 · 1110 阅读 · 0 评论 -
maven项目使用阿里云仓库
若是springBoot项目的话:在pom.xml文件中添加以下配置<!--使用阿里云maven中央仓库--><repositories> <repository> <id>aliyun-repos</id> <url>http://maven.aliyun.com/nexus/co...原创 2019-08-20 20:55:19 · 826 阅读 · 0 评论 -
微博实现第三方登录
环境:springboot+themeleaf首先创建两个页面,以供显示:weixin.html页面<!DOCTYPE html><html xmlns:th="http://www.thymeleaf.org"><head> <meta charset="UTF-8"></head><body><...原创 2019-08-23 16:05:40 · 313 阅读 · 0 评论 -
Spring配置相关信息
编写配置Bean时的头文件信息:需要使用aop时的头文件信息:原创 2019-07-18 20:00:26 · 95 阅读 · 0 评论 -
Spring项目所需要的jar包依赖
ch.qos.logback logback-classic 1.2.3 org.springframework spring-core $...原创 2019-07-18 20:02:31 · 433 阅读 · 0 评论 -
SpringMCV中前台页面用EL表达式取不到modl里的值的问题
这个是web.xml中头文件版本的原因,2.3版本以前都不行。换成高版本就ok了。 <?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/ja...原创 2019-08-02 17:40:05 · 239 阅读 · 0 评论 -
QQ第三方登录遇到的问题。error=100000&error_description=param+response_type+is+wrong+or+lost+
在第一次登录成功之后,返回之后再次登录地址栏就会出现error=100000&error_description=param+response_type+is+wrong+or+lost+z这个提示,百度了一下,说是response_type的问题。但是没有找到合适的解决办法。我的解决办法是在官方给的IndexServlet这个servlet中处理,它有一个 response.sendR...原创 2019-07-22 10:46:28 · 1071 阅读 · 0 评论 -
java.lang.AbstractMethodError: Method org/apache/commons/dbcp/DelegatingResultSet.isClosed()Z is abs
jar包冲突导致的,dbcp的版本和mybatis版本冲突,将1.3换成1.4就解决了。原创 2019-07-22 16:54:58 · 3623 阅读 · 1 评论 -
一个简单的SpringBoot Demo
1.创建一个maven工程;2.导入依赖 springBoot相关的依赖<parent><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter-parent</artifactId><version>1.5.9.RELEASE</version></parent><dependencies><dependency><groupId>org.springframework.boot</group原创 2019-07-31 15:58:08 · 136 阅读 · 0 评论 -
Spring MVC中时间数据无法实现自动转换绑定的问题
第一种:使用注解:@DateTimeFormat(pattern="yyyy-MM-dd")第二种:原创 2019-08-08 14:04:34 · 215 阅读 · 0 评论 -
idea从mysql导入实体类
转载自:https://www.liangzl.com/get-article-detail-21681.html转载 2019-07-18 10:53:41 · 383 阅读 · 0 评论