- 博客(10)
- 收藏
- 关注
转载 java List 按指定长度分割
使用guave实现import com.google.common.collect.Lists; private List<List<String>> splitList(List<String> list , int groupSize){ return Lists.partition(list, groupSize); // ...
2019-03-05 11:42:51
9408
原创 tomcat启动时检测到循环继承而栈溢出的问题
Caused by: java.lang.IllegalStateException: Unable to complete the scan for annotations for web application [/test] due to a StackOverflowError. Possible root causes include a too low setting for -Xss...
2018-12-06 10:51:37
381
原创 oracle数据库查看某张表已经存在的索引以及给某个字段创建索引
查看某张表已经存在的索引以及类型SELECT b.uniqueness, a.index_name, a.table_name, a.column_name FROM all_ind_columns a, all_indexes bWHERE a.index_name=b.index_name AND a.table_name = upper('表名')ORDER BY a...
2018-09-28 10:01:14
9144
1
转载 java中JSONArray、JSONObject、List、String之间的转换
一、JASSONArray转为JSONObject JSONArray result_type = new JSONArray(); StringBuffer cdsIdxType = new StringBuffer(); cdsIdxType.append(" select id from table_type "); result_type =...
2018-02-27 10:27:32
15523
转载 ApplicationContextAware 接口的作用 获取所有bean
https://www.cnblogs.com/deng-cc/p/6373670.html
2018-01-25 18:21:56
440
原创 Sql查询数据库时间戳与时间的相互转换
用到DATEADD和DATEDIFF两个函数时间戳代表的是当前时间和1970-01-01 00:00:00相差的毫秒数,注:GMT是中央时区,北京在东8区,相差8个小时,所以北京时间 = GMT时间 + 8小时时间戳转时间:SELECT DATEADD(S,时间戳所在列名 + 8 * 3600,'1970-01-01 00:00:00') FROM 表名时间转时
2017-11-09 16:23:16
25141
原创 Java里面Calendar获取上个月最后一天
有两种方法第一:获取当前月的第一天,然后date-1Calendar calendar=Calendar.getInstance();calendar.set(Calendar.DAY_OF_MONTH, 1);calendar.add(Calendar.DATE, -1);第二:先设置成上一个月,再获取上个月的最后一天Calendar calendar=Cal
2017-11-09 15:41:55
5874
原创 如何将免安装版的TOMCAT注册成系统服务
将TOMCAT注册成系统服务的好处是在服务器重启的时候,系统会自动启动系统服务,而不必手动操作。注册方法:1. 在DOS命令行模式下,cd到tomcat的bin目录下。比如你的tomcat放在D盘的java文件夹下(1)C:\Users\work>D: (2)D:\>cd D:\java\tomcat\bin2.在当前目录执行命令service.bat
2017-11-03 11:33:02
803
转载 MyBatis mapper文件中的变量引用方式#{}与${}的差别
默认情况下,使用#{}语法,MyBatis会产生PreparedStatement语句中,并且安全的设置PreparedStatement参数,这个过程中MyBatis会进行必要的安全检查和转义。示例1:执行SQL:Select * from emp where name = #{employeeName}参数:employeeName=>Smith解析后执行的SQL:Select
2017-11-03 11:29:55
181
原创 时间戳与时间格式的相互转换
就是一个互相转换,例如把1503643570转换成2017-08-25 14:46:10这样的格式,找了网上的方法,发现多少有些小错误,所以发一下 /* * 将时间戳转换为时间 */ public String stampToDate(String s){ SimpleDateFormat simpleDateFormat = new
2017-08-25 16:05:28
431
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人