原创 【未解決】獲取註解上的註解的值

網上沒找到相關資料,自己嘗試做了下。 註解1 @Target({ElementType.METHOD,ElementType.ANNOTATION_TYPE}) @Retention(RetentionPolicy.RUNTIME

原创 【jpa坑爹記錄】不報錯也不生成數據表

網上的解決辦法都是加update、改包名位置、加註解… 都沒用的話 解決辦法: 不要使用hibernate的@Table import org.hibernate.annotations.Table; 我兩個Table都用了,因爲

原创 使用IDEA完成項目的一鍵部署運行(遠程服務器(linux或者windows))

使用阿里雲的Cloud Toolkit工具 Cloud Toolkit配置 1.安裝Cloud Toolkit插件 第 1 步:打開 Intellij 的 Settings ( Windows下 ) 或 Preferences

原创 七大原則+23種設計模式

目錄設計模式的意義1. 七大原則1.1 單一職責原則1.2 接口隔離原則1.3 依賴倒轉(倒置)原則1.4 里氏替換原則1.5 開閉原則1.6 迪米特法則1.7 合成複用原則小結2. UML類圖3. 設計模式3.1單例模式3.2抽

原创 57 Find the Distance Value Between Two Arrays

題目 Given two integer arrays arr1 and arr2, and the integer d, return the distance value between the two arrays. The

原创 49 Encode and Decode TinyURL

題目 Note: This is a companion problem to the System Design problem: Design TinyURL. TinyURL is a URL shortening ser

原创 【學習】微信小程序開發

小程序開發1. 下載編輯器2. 項目目錄3. 組件4. 指令5. 前後端交互 1. 下載編輯器 百度搜索微信小程序,在開發者工具裏面下載即可。 安裝完畢之後創建一個小程序項目,選擇測試ID。 2. 項目目錄 app.json

原创 實用型實戰開發筆記

開發筆記1. 分頁查詢2. 條件查詢3. 文件上傳4. 緩存理論5. 靜態渲染概念6. 數據表通用字段動態映射方法(如兩個必備時間)7. 定時任務調度8. 支付9. elasticSearch 1. 分頁查詢 依賴:PageHel

原创 超級巨坑記錄:springboot+thymeleaf更換背景圖(靜態資源圖片)無法獲取(404錯誤)

在login.html中應用了一張background.jpg圖片,然後我把該圖片換成另一張圖片,也改名外background.jpg,然後就無法獲取該圖片,404錯誤。 當我把原圖換回來的時候,又可以看見了。 這好像是第二張圖片

原创 42 Deepest Leaves Sum

題目 Given a binary tree, return the sum of values of its deepest leaves. Constraints: The number of nodes in the tr

原创 34 N-ary Tree Preorder Traversal

題目 跟上一篇N叉樹後序遍歷基本一致,區別就在於本題要求使用前序遍歷。 分析 還是老辦法,只需要利用遍歷“最小元”的思想進行遞歸即可。 後序遍歷: n叉樹後序遍歷的最小元:先遍歷其他節點-->再遍歷根節點 從題意可知,根節點是r

原创 @Valid 無效,BindingResult中的error爲0,解決方案

加上以下依賴即可 <dependency> <groupId>org.hibernate</groupId> <artifactId>hibernate-valida

原创 36 Sort Integers by The Number of 1 Bits

題目 Given an integer array arr. You have to sort the integers in the array in ascending order by the number of 1’s i

原创 52 Generate a String With Characters That Have Odd Counts

題目 Given an integer n, return a string with n characters such that each character in such string occurs an odd numb

原创 35 Delete Columns to Make Sorted

題目 We are given an array A of N lowercase letter strings, all of the same length. Now, we may choose any set of del