- 博客(17)
- 收藏
- 关注
原创 记录下dynamicclientfactory.createlient 空指针遇到的坑
问题原因:JaxWsDynamicClientFactory dcf = JaxWsDynamicClientFactory.newInstance();Client client = dcf.createClient(webserviceurl);系统在这段代码运行时dcf为空,所以报空指针错误;但是在开发环境上以及部署到本地tomcat都没有问题,部署到linux服务器上时就会报空指针错误;解决过程:1、刚开始以为是jre下没有tools.jar,然后复制jdk目下的tools,结果还是不行;2
2020-09-28 09:02:34
2610
原创 使用callable多线程处理任务
private class insertDataTask implements Callable<Integer>{ private String[] stringArr; private int start; private int end; List<AndroidData> datas=new CopyOnWriteArrayList<>(); List<LiveData> liveDatas=new CopyOnWriteAr
2020-09-07 14:47:17
371
原创 记录ubuntu安装mysql
1、才用的简单安装方法:(1)sudo apt-get install mysql-server;(2) apt-get install mysql-client;(3)sudo apt-get install libmysqlclient-dev;三步安装完成,查阅资料有说在安装过程中需要输入密码什么的,我的没有,登录直接用的空密码登录;安装完成后可以使用如下命令来检查是否安装成功:sudo netstat -tap|grep mysql;2、安装完成后,需要设置远程访问,使用如下命令:(
2020-08-05 15:02:57
193
原创 java根据word模板生成word文件
本文使用的feemarker实现的功能1、首先新建一个word模板,2、另存为xml格式,3、将xml文件的扩展名直接改成ftl,4、导入freemaker.jar2、使用软件打开ftl文件,找到w:binData快速定位图片位置,写上${imgStr}(名字随意,和java代码中的对应上即可),然后保存。3、因涉及到list的问题,找到需要设计list的行,找到w:tr,<#list></#list>将w:tr包裹。3、新建java类@Componentpu
2020-07-30 10:30:45
1840
2
原创 springboot注解和切面实战使用
1、新建注解@Retention(RetentionPolicy.RUNTIME)@Target({ElementType.METHOD})//用于方法之上public @interface DepartmentIDAnno {//设置部门id所在的参数位置,从0开始int departmentIDSeat();}2、在方法上使用注解@DepartmentIDAnno(departmentIDSeat=1)3、新建切面@Component@Aspectpublic class Dep
2020-07-30 10:14:29
610
原创 springboot和druid
1、导入jar包com.alibabadruid-spring-boot-starter1.1.10和log4jlog4jlog4j1.2.172、配置文件druid:driver-class-name: com.mysql.cj.jdbc.Driverurl: jdbc:mysql://ip:3306/Weld?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true&failOverRead
2020-07-28 13:49:57
141
原创 springboot打包时注意配置文件
在build内部加入形式如下的resource标签src/main/java/*.xmlfalsesrc/main/resources/*.ymlfalse
2020-07-28 08:47:29
235
原创 项目中遇到的pagehelper失效问题
开始时分页是好的,后面新增了一个aspect后,突然发现mybatis的pageheler失效的,进行了各种包、分页代码的排查都没解决,只能将后面新增aspect新增的东西一个个排查,发现注释了@CompanentScan之后,分页生效了,原因不知。...
2020-05-15 08:59:31
594
原创 字符串拼接和批处理效率比拼
public void test1() { Connection conn=null; PreparedStatement pstm=null; Statement stmt=null; ResultSet rt=null; try { Class.forName("com.mysql.jdbc.Driver"); conn=DriverManager.getCon...
2020-04-26 16:24:11
239
原创 pageHelper遇上collection时total统计问题
mybatis的pageHelper分页遇上collection时,total统计会是根据sql查询出来的数量进行统计的,而我们页面上的总数应该显示我们resultMap的数量。resultMap不要使用直接嵌套结果的方式,可是使用嵌套查询:...
2020-03-09 10:29:46
1308
1
原创 eclipse提交到git报there are no staged files
问题描述:eclipse提交新增页面到git弹出there are no staged files问题以及修改页面提交时没有可选择提交功能。解决:windows-preferences-team-git-conmitting;去掉use staging view to commit instead of commit dialog前的勾...
2020-03-02 09:13:13
319
原创 vscode上传git
1、github新建仓库后出现:(1)git init(2)git status 查看文件状态,如果有红色的文件则运行git add 文件名1 文件名2(3)git add README.md(4)git commit -m “第一次提交”(5)git remote add origin 对应的仓库地址。(6)git push -u origin master2、因为我的项目之前管理...
2020-02-27 09:22:15
424
原创 cnpm : 无法加载文件 C:\software\nodejs\node_global\cnpm.ps1,因为在此系统上禁止运行脚本
以管理员身份运行windows powershell,运行命令set-ExecutionPolicy RemoteSigned即可。
2020-02-26 16:48:15
3387
原创 vue项目之安装
1、安装nodejs,自己进官网下载对应操作系统的nodejs。直接安装;2、下载完成后,cmd运行node -v查看是否成功,成功出现版本号;3、4、新建两个文件夹5、修改配置6、配置环境变量7、安装cnpm npm的淘宝镜像npm install -g cnpm --registry=http://registry.npm.taobao.org...
2020-02-26 11:07:28
212
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人