原创 HBase Java API 使用

1. 導入Maven依賴 <!--HBase依賴--> <dependency> <groupId>org.apache.hbase</groupId> <artifactId>hbase-client</artifactId

原创 Java 由當前年月得到前一個年月

SimpleDateFormat sd = new SimpleDateFormat("yyyy-MM"); String payoffYearMonth = "2018-01"; Date currdate = null; try {

原创 SpringBoot @RestController與@Controller區別

@RestController Spring4之後新加入的註解,原來返回JSON需要@ResponseBody和@Controller配合。 即@RestController是@ResponseBody和@Controller的組合註解

原创 Kettle 國內鏡像庫下載

kettle國內鏡像下載 7.1版本 http://mirror.bit.edu.cn/pentaho/Data%20Integration/ 8.2版本 http://mirror.bit.edu.cn/pentaho/Pentaho

原创 vue.js elemetui el-table 表頭列不對齊

添加一個css樣式(親測有效) /* 解決element-ui的table表格控件表頭與內容列不對齊問題 */ .el-table th.gutter{ display: table-cell!important; }

原创 vuejs中created、mounted方法整理

created:html加載完成之前,執行。執行順序:父組件-子組件 mounted:html加載完成後執行。執行順序:子組件-父組件 methods:事件方法執行 watch:watch是去監聽一個值的變化,然後執行相對應的函數。 co

原创 Vue.js + SpringBoot 後臺導出Excel表格

1、前端Vue.js var data = this.$store.getters.excel.data; let url = window.URL.createObjectURL(new Blob([data])) let link

原创 SQL 定義變量以及變量賦值

1.定義變量:declare @name varchar(20) 用declare定義一個名字爲name的字符串類型的變量,變量前面需要加@ 2.爲變量賦值:set @name = '%Good%' ,用set來進行賦值操作(也可以

原创 Js 取數組中的最大值或者最小值

var arr = []; Math.min.apply(Math, arr); Math.max.apply(Math, arr);  

原创 linux系統下,ll,ls命令突然不能用了

輸入一下兩條命令即可解決: # 編輯文件 vim /etc/profile #加上這條語句 export PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bi

原创 SpringBoot PageHelper分頁查詢

1、導出相關jar <dependency> <groupId>com.github.pagehelper</groupId> <artifactId>pagehelper-spring-boot-starter

原创 ajax跨域,最全的解決方案

轉載阿里大佬的解決跨域解決方案,非常值得借鑑和深入學習。 地址:https://segmentfault.com/a/1190000012469713

原创 正則表達式匹配SQL語句別名

寫的有點Low,歡迎留言改進!  需書寫規範,from 與別名同在一行 as\s+([\w\u4e00-\u9fa5]|\(|\)|\(|\))+(\s*,|,|\s+from)   點贊 收藏 分享

原创 @Component註解的作用

@Component (把普通pojo實例化到spring容器中,相當於配置文件中的<bean id="" class="">) SpringBoot 在注入文件失敗時,可能實例化類缺少@Component Description:

原创 什麼是線程池

       線程池就是提前創建若干個線程,如果有任務需要處理,線程池裏的線程就會處理任務,處理完之後線程並不會被銷燬,而是等待下一個任務。由於創建和銷燬線程都是消耗系統資源的,所以當你想要頻繁的創建和銷燬線程的時候就可以考慮使用線程池來