摘要: @Insert("<script> insert into USER(xxx,xxx,xxx) values "<foreach collection='users' item='user' index = 'index' separator=','>" + "(#{user.xxx},#{user 阅读全文
posted @ 2021-04-10 17:40 二先森 阅读(1133) 评论(0) 推荐(0) 编辑
摘要: 先说背景, 2020/12/26买了一个国外的linux云服务器, centos 7 64位,想用yum命令安装jdk环境,结果发现没有yum这个命令,这下操蛋了. 于是乎,百度,发现很多都是没有用的.说的不好听点,都是浪费时间的垃圾教程. 装个yum,搞了几个小时,原来自己是这么的菜, 但是,自己 阅读全文
posted @ 2020-12-26 17:00 二先森 阅读(53054) 评论(5) 推荐(1) 编辑
摘要: <dependecy> <groupId>Org.springframework.cloud</groupId> <artifactId>spring-cloud-starter-zookeeper-discovery</artifactId> <exclusions> <!--排除自带的zooke 阅读全文
posted @ 2020-10-12 23:18 二先森 阅读(214) 评论(0) 推荐(0) 编辑
摘要: String url = ""; CloseableHttpClient httpClient = HttpClientBuilder.create().build(); HttpPost httpPost = new HttpPost(url); StringEntity stringEntity 阅读全文
posted @ 2020-09-17 17:46 二先森 阅读(240) 评论(0) 推荐(0) 编辑
摘要: // 1. pom文件build中添加resources <resources> <resource> <directory>src/main/java</directory> <includes> <include>com/security/mapper/xml/*.xml</include> / 阅读全文
posted @ 2020-09-04 14:29 二先森 阅读(5400) 评论(0) 推荐(0) 编辑
摘要: public String formatDtime(String time) { String[] ts = time.split("T"); String sub = ts[1].substring(0, 8); return ts[0] + " " + sub; } 阅读全文
posted @ 2020-08-31 19:35 二先森 阅读(1013) 评论(0) 推荐(0) 编辑
摘要: outKey ,innerKey; BoundHashOperations<String, Object, Object> hashOps = this.redisTemplate.boundHashOps(outKey ); String value = (String) hashOps.get( 阅读全文
posted @ 2020-08-31 09:04 二先森 阅读(473) 评论(0) 推荐(0) 编辑
摘要: double result = new BigDecimal((float)1234 / 3456).setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue(); 阅读全文
posted @ 2020-08-26 23:44 二先森 阅读(205) 评论(0) 推荐(0) 编辑
摘要: public static List<String> calTimeFormat() { int i =0; Calendar ca = Calendar.getInstance();//得到一个Calendar的实例 List<String> timeList = new ArrayList<>( 阅读全文
posted @ 2020-08-26 23:43 二先森 阅读(121) 评论(0) 推荐(0) 编辑
摘要: public static BigDecimal getRandomFloat() { float Max = 100, Min = 95; BigDecimal bd = new BigDecimal(Math.random() * (Max - Min) + Min); return bd.se 阅读全文
posted @ 2020-08-26 23:41 二先森 阅读(171) 评论(0) 推荐(0) 编辑