原创 Failed to pull image xxx unauthorized: authentication required
在執行完kubectl create deployment後執行kubectl describe pod發現出錯了,錯誤描述: Failed to pull image "xxx": unauthorized: authenticati
原创 使用jave進行視頻轉碼
最近在做項目的時候發現,使用jwplayer播放視頻會出現只有聲音沒有畫面的情況,經過調查發現是視頻的編碼格式問題造成的,簡單的解決方式是下載一個格式工廠,將視頻格式設置爲h264就可以正常播放了。如何想實現在上傳的時候進行轉碼,請往下看
原创 spring boot 整合Swagger2啓動報錯
環境 springboot 2.3.1 swegger 2.2.0 在項目啓動時報一下錯誤 *************************** APPLICATION FAILED TO START **************
原创 springboot 使用aop記錄訪問日誌
pom文件增加aop的依賴 <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spr
原创 spring 使用 @Around 獲取返回值類型
第一種方式 MethodSignature methodSignature = (MethodSignature)point.getSignature(); Class<?> returnType = methodSignature.
原创 代碼重構的技巧——合理使用@Deprecated
轉https://www.cnblogs.com/hzhuxin/p/4645070.html 我們在做項目時,前期寫的類中的一些代碼可能由於需求變化的原因需要重寫,有時重寫時方法的傳參和返回值也會發生變化,這樣往往導致調用的代碼也跟
原创 Spring boot 使用@RestControllerAdvice、@ExceptionHandler處理全局請求異常
@RestControllerAdvice public class ExceptionHandlerController { @ExceptionHandler public JsonContent handler(E
原创 Java8 List與String進行互轉
原文鏈接:https://blog.csdn.net/Three_Two/article/details/87699211 Java8-ListChangeString public clas
原创 Space is not allowed after parameter prefix ':'
hibernate在執行sql語句查詢的時候轉義出錯,網上很多解決方式是在:前面增加轉義 \\,結果發現還是不可以,最終的解決方法是這樣: 之前的sql: @pids := "001" 修改後的: @pids/*'*/:=/*'*/
原创 mysql group_concat的使用
語法:group_concat( [distinct] 要連接的字段 [order by 排序字段 asc/desc ] [separator '分隔符'] ) 說明:通過使用distinct可以排除重複值;如果希望對結果中的值進行排序,
原创 Logging initialized using ‘class org.apache.ibatis.logging.log4j.Log4jImpl’ adapter.
你是否遇到過下面的情況,控制檯無限的輸出下面的日誌: Logging initialized using ‘class org.apache.ibatis.logging.log4j.Log4jImpl’ adapter. Loggi
原创 idea 通過 mybatis-generator 生成實體類、mapper.xml、mapper接口
首先需要新建一個generatorConfig.xml <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE generatorConfiguration PUBLIC "-/
原创 SpringMvc參數傳遞中亂碼問題
問題描述: 當傳遞中文參數到controller類時,無亂是get方式還是post方式都出現亂碼 解決: 1、保證所有的頁面編碼都是utf-8,包括jsp頁面,瀏覽器編碼設置和eclipse的編碼設置。 2、spingmvc給我們提供了一
原创 eclipse 選中多行進行編輯
shift + alt + a 進入選中模式,點擊鼠標向上或向下活動,進行編輯,再次 shift + alt + a 退出多行編輯模式
原创 javax.mail.AuthenticationFailedException Sending the email to the following server failed
email.setAuthentication("用戶名", "開通服務時的授權碼");