原创 mabatis Mapper.xml報錯

org.springframework.jdbc.BadSqlGrammarException:  ### Error querying database.  Cause: com.mysql.jdbc.exceptions.jdbc4.

原创 [ERROR][idea報錯]Unmapped Spring configuration files found.

idea啓動Event Log提示: Spring Configuration Check Unmapped Spring configuration files found. Please configure Spring facet

原创 spring security自定義權限配置

    最近在項目中遇到了關於spring security的問題,所以學習一下。 需要引入依賴: <dependency> <groupId>org.springframework.securit

原创 [ERROR]ubuntu18.04自帶中文輸入法在輸入中文選擇內容的時候出現數字而不是中文

ubuntu18.04自帶中文輸入法在輸入中文選擇內容的時候出現數字而不是中文 今天早上遇到了這個問題, sudo rm -rf ~/.cache/ibus/libpinyin 重啓電腦。 解決。

原创 [報錯解決]freemarker java.io.FileNotFoundException/TemplateNotFoundException: Template xxx not found.

java.io.FileNotFoundException: Template common/user_menu.ftl not found.  最開始一直報fileNotFound,後來又報templateNotFound,看了很多文

原创 resin服務本地調試

在項目he-project下建兩個文件夾,分別爲resin和webapp 安裝的resin放在resin文件夾中,resin文件夾如下 conf/resin.xml配置如下: <!-- - Resin 4.0 configur

原创 redis (error) CLUSTERDOWN The cluster is down

在測試的時候發現redis提示(error) CLUSTERDOWN The cluster is down check一下先: 報錯了, [ERR] Not all 16384 slots are covered by nodes.

原创 [leetcode]14.Longest Common Prefix

Write a function to find the longest common prefix string amongst an array of strings. If there is no common prefix, re

原创 項目啓動報錯:Caused by: java.lang.IncompatibleClassChangeError: Implementing class at java.lang.ClassLoad

項目啓動報錯: Caused by: java.lang.IncompatibleClassChangeError: Implementing class at java.lang.ClassLoader.defineClass1(N

原创 springboot pom.xml 配置不替換問題

今天遇到了一個問題,在Pom中配置的變量在編譯時沒有自動替換.properties文件和.xml文件中的${key},後來發現原因是因爲我在pom裏面寫了: 進入starter-parent的pom以後發現:默認的替換符如下所示,是@符

原创 springboot 攔截器返回json字符串給前端頁面

在intercept中加入以下代碼: private void returnJson(HttpServletResponse response, String json){ PrintWriter writer

原创 spring 事務不生效問題 bmw-jade-route事務配置

在spring中配置了事務,但是沒有生效 @Transactional(rollbackFor = {Exception.class}) public Long insertTicket(Ticket ticket, List<

原创 不同Java版本切換

export JAVA_HOME=/user/local/jdk-11.0.5 export PATH=$JAVA_HOME/bin:$PATH export CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JA

原创 springboot註解攔截器不生效問題

今天用springboot寫了一個註解攔截器,一直不生效,網上各種方式我都嘗試過了,都不起作用,找了好久總算知道是什麼原因了 我的annotation: @Inherited @Target({ ElementType.

原创 MySql集羣搭建

    分佈式、集羣都是用來處理大批量數據操作的,工作原理不太一樣。分佈式是縮短每個任務的執行時間來提升工作效率,集羣是提高單位時間內執行的任務數來提高效率。分佈式是將步驟分到不同機器上,集羣指的是幾個任務同時處理。     管理節點,數