12 2020 档案

摘要:Docker 环境部署参照:https://www.cnblogs.com/oneMr/p/14200760.html 简单 Springboot 项目 新建一个 Springboot 项目,写一个简单的Controller @RestController public class HelloCon 阅读全文
posted @ 2020-12-31 18:29 宁任翃 阅读(161) 评论(0) 推荐(0)
摘要:Center OS Docker 安装 使用官方安装脚本自动安装: curl -fsSL https://get.docker.com | bash -s docker --mirror Aliyun 使用国内 daocloud 一键安装命令: curl -sSL https://get.daocl 阅读全文
posted @ 2020-12-29 11:25 宁任翃 阅读(216) 评论(0) 推荐(1)
摘要:mysql 部署 参考 https://www.jianshu.com/p/7744856185b3https://blog.csdn.net/weixin_38003389/article/details/90696337设置开机部署https://blog.csdn.net/longloveqi 阅读全文
posted @ 2020-12-28 09:52 宁任翃 阅读(118) 评论(0) 推荐(0)
摘要:使用Mybatis批量处理数据,避免通过循环调用方法建立数据库连接,减少任务耗时 xml文件 1 <insert id="insertUser"> 2 insert into mr_user 3 (user_id,dept_id,username,nick_name,email,phone,gend 阅读全文
posted @ 2020-12-23 12:01 宁任翃 阅读(183) 评论(0) 推荐(0)
摘要:需求:在规定时间段内收费(7:00 - 22:00),其余时间不收费 代码实现(BigDecimal 处理精度问题): 1 package Others; 2 3 import java.math.BigDecimal; 4 import java.time.Duration; 5 import j 阅读全文
posted @ 2020-12-22 15:00 宁任翃 阅读(141) 评论(0) 推荐(0)
摘要:在一个目录及其子所有子目录下搜索所有文件,打印包含指定关键字的行 代码实现: 1 public class BlockingQueueTest { 2 3 private static final int FILE_QUEUE_SIZE = 10; 4 private static final in 阅读全文
posted @ 2020-12-18 15:32 宁任翃 阅读(274) 评论(0) 推荐(0)
摘要:本月日历输出,本日加上 *代码实现: public class CalendarTest { /** * 本月日历输出,本日加上 * * * @return void */ public void outTest() { //获取当前日期 LocalDate date = LocalDate.now 阅读全文
posted @ 2020-12-14 16:05 宁任翃 阅读(211) 评论(0) 推荐(0)
摘要:Java使用位集(BitSet)计算从2~200万中素数的数量 思想:从2开始,清除其倍数(4,6,8 . . .) 1 package Chapter9; 2 3 import java.util.BitSet; 4 5 /** 6 * @author MrNiurh 7 * @date Crea 阅读全文
posted @ 2020-12-13 17:25 宁任翃 阅读(223) 评论(0) 推荐(0)