原创 php 操作日期時間

1.給當前時間加一天?一小時? <?php echo "今天:",date('Y-m-d H:i:s'),"<br>"; echo "明天:",date('Y-m-d H:i:s',strtotime('+1 day')); ?> 上一行

原创 Maven打包jar,連同其依賴的本地jar一起打包

1、項目所依賴的jar是沒有中心倉庫,比如阿里私服也沒有,這樣的jar有2中處理方式: 1)自己搭建nexus私服,並把該jar同步上去 2)在項目pom.xml配置: <dependency> <groupId>com.nz<

原创 html中td自動換行問題

1、<td style="word-wrap:break-word;word-break:break-all;" width="100px";></td> 普通的文字內容換行 2、<table rules="all" style="tab

原创 JS之正則表達式之郵箱和手機的校驗

<input type="text" placeholder="請輸入郵箱" id="email"> <input type="text" placeholder="請輸入手機" id="phone"> <script> emai

原创 HTML控制輸入框input只能輸入數字和小數點

1、只允許輸入數字 <input type="text" οnkeyup="value=value.replace(/[^\d]/g,'')" > 或者  <input type="number" > 2、允許輸入小數(兩位小數) <in

原创 Elasticsearch 爲何要在 7.X版本中去除type 的概念

背景說明 Elasticsearch是一個基於Apache Lucene(TM)的開源搜索引擎。無論在開源還是專有領域,Lucene可以被認爲是迄今爲止最先進、性能最好的、功能最全的搜索引擎庫。 Elasticsearch 是一種NoSQ

原创 Mybatis if test判斷之大坑

1、問題: 當傳入參數validCoupon的值爲“1”時,仍然不能執行if判斷下的sql語句。 2、原因: public class ExpressionEvaluator {     public boolean evalu

原创 httpclient中post提交json和map參數,及Springmvc接收

1、jar:httpclient-4.5.2.jar 2.1、請求的json數據 public static String doPost(String url, String params) throws Exception {

原创 Java服務端推送--SSE

1、java代碼: @GetMapping(value="/message", produces = "text/event-stream;charset=utf-8") public String sendMessa

原创 vue-router跳轉頁面時Cannot read property 'push' of undefined的問題

1、在外部定義一個值指代Vue實例 var self = this; this.$http.get("login", { params: data }) .then(function(response) { self.$

原创 Apache做端口轉發代理

1、打開conf/httpd.conf文件 將#去掉 #Include conf/extra/httpd-vhosts.conf #LoadModule proxy_module modules/mod_proxy.so #LoadMod

原创 Maven把本地jar引導本地庫

mvn install:install-file -Dfile=C:/Users/Teler/Downloads/ojdbc6-11.2.0.3.jar -DgroupId=com.oracle -DartifactId=ojdbc6 -

原创 thymeleaf 調用後臺Service

1、html <div class="radio-box" th:each="dict : ${@dict.getType('sys_normal_disable')}"> <input type="radio" th:id="${d

原创 java根據URL獲取HTML內容

1、引入jar <dependency>     <groupId>org.jsoup</groupId>     <artifactId>jsoup</artifactId>     <version>1.10.2</version>

原创 MySQL 用 limit 爲什麼會影響性能

1、 -- 優化前SQL SELECT 各種字段 FROM `table_name` WHERE 各種條件 LIMIT 0,10; 2、 -- 優化後SQL SELECT 各種字段 FROM `table_name` main_t