原创 Failed to instantiate [java.util.List]: Specified class is an interface

錯誤信息提示: Failed to instantiate [java.util.List]: Specified class is an interface; 錯誤信息意思:參數錯誤,參數封裝出了問題。 原因: 前端給後臺傳遞了一個li

原创 (一)泛型學習筆記——基礎知識

一、泛型 (官方定義):泛型的出現是JDK 1.5以後,它的本質是參數化類型的應用,可以用在類、接口和方法的創建中,分別稱爲泛型類、泛型接口和泛型方法。 我自己的理解是:泛型類似於方法中參數。只是泛型把數據的類型作爲參數傳遞,就是將當前我

原创 MySQL版本問題引起的異常解決

從git上把代碼拉到本地,代碼執行添加操作報錯Generated keys not requested. You need to specify Statement.RETURN_GENERATED 原代碼: public Prepar

原创 No valid Maven installation found. Either set the home directory in the configuration dialog or set

IDEA 導入maven項目,報錯No valid Maven installation found. Either set the home directory in the configuration dialog or set th

原创 ElasticSearch 搜索使用

ElasticSearch爲Java用戶提供了兩種內置客戶端: 1.節點客戶端:以無數據節點身份加入集羣,(無數據節點的含義就是不存儲任何數據)但他知道數據在集羣中的具體位置,並能直接轉發請求到對應節點上。 2.傳輸客戶端:不加入集羣,只

原创 Windows搭建ElasticSearch

1、安裝ElasticSearch 從官網中心下載ElasticSearch Download下載ElasticSearch安裝包。 解壓,我的目錄:D:\soft\ElasticSearch\elasticsearch-6.4.0 在該

原创 springboot 項目打war包

平常springboot項目默認打包成jar包,但是由於有時候我們需要將項目放在同一個tomcat下面運行,那麼我們就需要將SpringBoot打包成war包。具體操作:1.修改pom.xml文件<groupId>sf-carbon-em

原创 spring boot參數校驗實踐簡單總結

1.傳遞的參數是json類型或者以實體對象傳遞的A. 在實體類的屬性上添加校驗註解public class User { @NotNull(message = "{the userName is not null}") p

原创 Spring實戰之Bean的自動裝配和檢測

Bean的自動裝配:讓spring自動識別如何裝配Bean的依賴關係 自動裝配的四種策略:   類型 策略 舉例 byName 把與Bean屬性具有相同名字的其他Bean自動裝配到Bean的對應屬性中,沒有匹配的不裝

原创 spring實戰學習之裝配bean

依賴注入:讓各個模塊保持鬆散耦合 AOP面向切面編程:各個組件負責特定核心功能,不需要考慮事務,日誌,安全等系統服務功能,AOP將這些每個模塊都需要考慮的服務模塊化,並以聲明的方式將它們應用到它們需要影響的組件模塊中去,使得各個業務模塊更

原创 log4j.xml配置實例

1.log4j簡單介紹 log4j的三大組件:loggers、appenders、layout loggers爲日誌記錄器,負責處理日誌記錄的大部分操作。 appenders 爲日誌信息的輸出目的地,log4j中所有繼承自Appender

原创 後臺接收前端多個字段(包括文件)postman傳參以及後臺如何接收

項目中遇到一個問題,就是前端只調用一次接口,傳遞很多字段到後臺,包括文件。後臺用一個類接收,文件作爲類的一個屬性:controller中接收,不能加@RequestBody註解,因爲該註解的解析方式是按照json體解析的,但是我們的fil

原创 springboot 啓動報錯Field XXX required a bean of type XXX that could not be found.

今天自己搭建springboot項目,連接數據庫,啓動的時候發現報錯,如下:Error starting ApplicationContext. To display the conditions report re-run your a

原创 Multiple annotations found at this line:解決

Multiple annotations found at this line:        - schema_reference.4: Failedto read schema document'http://www.springfr

原创 mergely文本對比工具使用總結

1.官網上設置可寫或者可讀是在mergely初始化的時候,設置readOnly字段的值,這樣設置使得左右兩邊對比區域都不可編輯或者都可以編輯,那當我們只想讓一邊可讀另一邊可寫的配置設置左邊不可編輯 $("#mergely的div的id")