摘要:
1.安裝7z打包工具并添加到環境變量 將項目下載到目錄 2.執行下面腳本 @echo off SETLOCAL EnableDelayedExpansion :: 檢查 edata-dataops-ui 目錄是否存在 if not exist edata-dataops-ui ( echo Dire
閱讀全文
posted @ 2024-11-05 09:11
張釋文
閱讀(16)
推薦(0)
摘要:
java8使用時間計算 public static void main(String[] args) { LocalDate localDate = LocalDate.now(); //1.獲取周日 LocalDate with = localDate.with(DayOfWeek.SUNDAY)
閱讀全文
posted @ 2024-02-01 14:27
張釋文
閱讀(45)
推薦(0)
摘要:
session可以用于請求后端數據共享 private static void flushSession(HttpServletRequest request, UserInfoDO userInfoDO) { String shortName = userInfo.getShortName();
閱讀全文
posted @ 2023-07-05 17:26
張釋文
閱讀(195)
推薦(0)
摘要:
1. 概述Spring Data MongoDB模塊提高了在 Spring 項目中與 MongoDB 數據庫交互時的可讀性和可用性。 在本教程中,我們將重點介紹在讀取和寫入 MongoDB 數據庫時如何處理Java的ZonedDateTime對象。 2. 設置要使用 Spring Data Mong
閱讀全文
posted @ 2023-06-29 10:43
張釋文
閱讀(151)
推薦(0)
摘要:
redis shake 開源的工具,地址:tair-opensource/RedisShake: redis-shake is a tool for Redis data migration and data filtering. redis-shake 是一個用于 Redis 數據遷移與過濾的工具
閱讀全文
posted @ 2023-06-28 14:41
張釋文
閱讀(45)
推薦(0)
摘要:
命令 #列出所有命令 tasklist #刪除進程命令 taskkill /pid 8468 -t -f #查找文字命令 findstr netstat -an|findstr 1521 #顯示文件 filename.txt 的最后幾行,其中 + q 參數將文件內容輸出到屏幕上,并立即退出 type
閱讀全文
posted @ 2023-06-20 14:22
張釋文
閱讀(17)
推薦(0)
摘要:
循環插入 DO $$ DECLARE tmp RECORD; BEGIN FOR tmp IN select distinct id from test LOOP INSERT INTO test1 (id,role_code,privilege_code,space_id) VALUES (FLO
閱讀全文
posted @ 2023-06-14 22:24
張釋文
閱讀(341)
推薦(0)
摘要:
分組使用 HashMap<Boolean, Set<String>> collect = currentUserRoles.stream().collect(Collectors.groupingBy(this::isSupperAdminRoleCode, HashMap::new, Collec
閱讀全文
posted @ 2023-06-13 22:21
張釋文
閱讀(37)
推薦(0)
摘要:
分頁工具類 import cn.hutool.core.lang.Assert; import com.github.pagehelper.PageInfo; import com.google.common.collect.Lists; import org.springframework.uti
閱讀全文
posted @ 2023-06-12 20:52
張釋文
閱讀(329)
推薦(0)
摘要:
代碼示例: 注意Service中的返回值必須要和mapper中的返回值類型的 @Override public PageInfo<UserDO> test(ReqQueryDTO req) { PageHelper.startPage(req.getPageNumber(), req.getPage
閱讀全文
posted @ 2023-06-12 20:30
張釋文
閱讀(16)
推薦(0)
摘要:
postgresql中根據條件創建一個虛擬字段。 條件是:如果id = 786168753672753152 就將marked字段設置為true否則設置為false,最后按照marked進行排序。 select name, id, case when id = 786168753672753152
閱讀全文
posted @ 2023-06-12 17:30
張釋文
閱讀(105)
推薦(0)
摘要:
代碼示例如下: @InterceptorIgnore(tenantLine = "1")public interface UserMapper extends BaseMapper<User> { @Select("SELECT * FROM user ${ew.customSqlSegment}"
閱讀全文
posted @ 2023-06-12 15:05
張釋文
閱讀(292)
推薦(0)
摘要:
說明原因:使用的java8的parallelparrStream是并行的,但是.collect(Collectors.toList()) 使用了非線程安全的集合。 修改辦法: 修改辦法1:把parallelparrStream改為普通的stream ; 修改辦法2: Collectors.toLis
閱讀全文
posted @ 2023-05-31 14:31
張釋文
閱讀(588)
推薦(0)
摘要:
1. 查看本地所有分支git branch -a使用 git branch -a 命令可以查看所有本地分支和遠程分支,發現遠程的remote分支已經刪除了,但本地還顯示。 2. 查看遠程分支git remote show origin使用命令 git remote show origin,可以查看r
閱讀全文
posted @ 2023-05-25 16:07
張釋文
閱讀(534)
推薦(0)
摘要:
用“[ ]” 把key包裝起來。示例: test: "[test1:test2:test3]"
閱讀全文
posted @ 2023-05-11 21:26
張釋文
閱讀(690)
推薦(0)
摘要:
package test.config; import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxm
閱讀全文
posted @ 2023-05-11 19:42
張釋文
閱讀(563)
推薦(0)
摘要:
核心代碼 spring: cache: type: REDIS redis: time-to-live: 28800000 custom-ttl: { "xxx" : "1000000", "yyy": "6000000"} @Data @Component @Configuration @Conf
閱讀全文
posted @ 2023-05-11 19:37
張釋文
閱讀(498)
推薦(0)
摘要:
@Value("${spring.cache.redis.time-to-live:43200000}") private Long redisKeyTtl;
閱讀全文
posted @ 2023-05-10 18:33
張釋文
閱讀(158)
推薦(0)
摘要:
Redis現如今使用的場景越來越多?如何批量刪除key呢? 參考 有人說用KEYS命令,剛開始學Redis的時候就是用這個命令列出庫中鍵。 KEYS命令要謹慎使用。 為何?客觀別急,我們先一步步來看。 KEYS 命令 Warning: consider KEYS as a command that
閱讀全文
posted @ 2023-05-09 10:35
張釋文
閱讀(3432)
推薦(0)
摘要:
1.現在錯誤的用法: RLock lock = redisson.getLock(String.format(LOCK_KEY, 2));try { if (lock.tryLock()) { //處理 logger.info("aaaaaaaaaaaaaaaaaa");} catch(Except
閱讀全文
posted @ 2023-04-20 18:39
張釋文
閱讀(205)
推薦(0)
摘要:
const { defineConfig } = require('@vue/cli-service') const CompressionPlugin = require('compression-webpack-plugin') const path = require('path') cons
閱讀全文
posted @ 2023-04-17 11:43
張釋文
閱讀(2434)
推薦(0)
摘要:
header設置透傳 @Configuration public class FeignRequestInterceptor implements RequestInterceptor { private static final String CONTENT_LENGTH_KEY = "conte
閱讀全文
posted @ 2023-04-03 16:58
張釋文
閱讀(225)
推薦(0)
摘要:
編譯指定命令 npm run build:tst 有時會便宜報錯,因為缺少依賴使用 npm i 來安裝依賴后然后再執行編譯命令: npm i
閱讀全文
posted @ 2023-03-31 12:33
張釋文
閱讀(163)
推薦(0)
摘要:
生產證書步驟 參考地址1:http://www.rzrgm.cn/luxiaoyao/p/10034009.html#:~:text=windows%E4%B8%8B%E7%94%A8nginx%E9%85%8D%E7%BD%AEhttps%E6%9C%8D%E5%8A%A1%E5%99%A
閱讀全文
posted @ 2023-03-30 18:35
張釋文
閱讀(293)
推薦(0)
摘要:
特別注意: maven會根據pom文件聲明的順序加載,如果先聲明了B,后聲明了C那么B的優先級高于C的優先級 MAVEN依賴的優先原則 maven依賴的優先原則1.依賴最短路徑優先原則一個項目Demo依賴了兩個jar包,其中A-B-C-X(1.0) , A-D-X(2.0)。由于X(2.0)路徑最短
閱讀全文
posted @ 2023-03-23 15:24
張釋文
閱讀(191)
推薦(0)
摘要:
使用ThreadLocal中的變量 @Cacheable(value = "hiteam:search", key = "(T(com.tst.TenantContextHandler).getCurrentTenantId()) + ':requirement:' + #req.getField(
閱讀全文
posted @ 2023-03-23 14:16
張釋文
閱讀(23)
推薦(0)
摘要:
//上代碼public static void main(String[] args) { int count = 10000000; test1(count); test2(count); } private static void test1(int count) { long l = Syst
閱讀全文
posted @ 2023-03-09 11:17
張釋文
閱讀(1431)
推薦(0)
摘要:
Mybatis-plus的多租戶接口insert插入值失敗,報錯。 org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.exceptions.PersistenceException: ##
閱讀全文
posted @ 2023-03-06 19:48
張釋文
閱讀(1645)
推薦(0)
摘要:
【項目實踐】一文帶你搞定頁面權限、按鈕權限以及數據權限 - RudeCrab - 博客園 (cnblogs.com) 手把手教你搞定菜單權限設計,精確到按鈕級別 - 知乎 (zhihu.com)
閱讀全文
posted @ 2023-02-23 14:21
張釋文
閱讀(37)
推薦(0)
摘要:
package com.company.app.controller; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RestCont
閱讀全文
posted @ 2023-01-28 14:44
張釋文
閱讀(48)
推薦(0)