mirror of
https://github.com/cool-team-official/cool-admin-java-docs.git
synced 2026-10-07 11:33:24 +08:00
更新说明
This commit is contained in:
Vendored
+22
-22
@@ -1,58 +1,58 @@
|
||||
{
|
||||
"hash": "d712c44c",
|
||||
"configHash": "04b05d57",
|
||||
"lockfileHash": "10c85a81",
|
||||
"browserHash": "e5d017df",
|
||||
"hash": "d9b86bd3",
|
||||
"configHash": "e63c5cfc",
|
||||
"lockfileHash": "c55b7bf4",
|
||||
"browserHash": "045a2561",
|
||||
"optimized": {
|
||||
"vue": {
|
||||
"src": "../../../node_modules/.pnpm/vue@3.4.31/node_modules/vue/dist/vue.runtime.esm-bundler.js",
|
||||
"src": "../../../node_modules/vue/dist/vue.runtime.esm-bundler.js",
|
||||
"file": "vue.js",
|
||||
"fileHash": "50c147de",
|
||||
"fileHash": "0e7a6237",
|
||||
"needsInterop": false
|
||||
},
|
||||
"vitepress > @vue/devtools-api": {
|
||||
"src": "../../../node_modules/.pnpm/@vue+devtools-api@7.3.5/node_modules/@vue/devtools-api/dist/index.js",
|
||||
"src": "../../../node_modules/@vue/devtools-api/dist/index.js",
|
||||
"file": "vitepress___@vue_devtools-api.js",
|
||||
"fileHash": "a1f0d505",
|
||||
"fileHash": "ac0f4af7",
|
||||
"needsInterop": false
|
||||
},
|
||||
"vitepress > @vueuse/core": {
|
||||
"src": "../../../node_modules/.pnpm/@vueuse+core@10.11.0_vue@3.4.31/node_modules/@vueuse/core/index.mjs",
|
||||
"src": "../../../node_modules/@vueuse/core/index.mjs",
|
||||
"file": "vitepress___@vueuse_core.js",
|
||||
"fileHash": "d1438051",
|
||||
"fileHash": "060242b5",
|
||||
"needsInterop": false
|
||||
},
|
||||
"vitepress > @vueuse/integrations/useFocusTrap": {
|
||||
"src": "../../../node_modules/.pnpm/@vueuse+integrations@10.11.0_focus-trap@7.5.4_vue@3.4.31/node_modules/@vueuse/integrations/useFocusTrap.mjs",
|
||||
"src": "../../../node_modules/@vueuse/integrations/useFocusTrap.mjs",
|
||||
"file": "vitepress___@vueuse_integrations_useFocusTrap.js",
|
||||
"fileHash": "3f374098",
|
||||
"fileHash": "7261defd",
|
||||
"needsInterop": false
|
||||
},
|
||||
"vitepress > mark.js/src/vanilla.js": {
|
||||
"src": "../../../node_modules/.pnpm/mark.js@8.11.1/node_modules/mark.js/src/vanilla.js",
|
||||
"src": "../../../node_modules/mark.js/src/vanilla.js",
|
||||
"file": "vitepress___mark__js_src_vanilla__js.js",
|
||||
"fileHash": "943e4b2c",
|
||||
"fileHash": "4d49e387",
|
||||
"needsInterop": false
|
||||
},
|
||||
"vitepress > minisearch": {
|
||||
"src": "../../../node_modules/.pnpm/minisearch@6.3.0/node_modules/minisearch/dist/es/index.js",
|
||||
"src": "../../../node_modules/minisearch/dist/es/index.js",
|
||||
"file": "vitepress___minisearch.js",
|
||||
"fileHash": "415e26a7",
|
||||
"fileHash": "9eb5370b",
|
||||
"needsInterop": false
|
||||
},
|
||||
"medium-zoom": {
|
||||
"src": "../../../node_modules/.pnpm/medium-zoom@1.1.0/node_modules/medium-zoom/dist/medium-zoom.esm.js",
|
||||
"src": "../../../node_modules/medium-zoom/dist/medium-zoom.esm.js",
|
||||
"file": "medium-zoom.js",
|
||||
"fileHash": "10651d0b",
|
||||
"fileHash": "82de3862",
|
||||
"needsInterop": false
|
||||
}
|
||||
},
|
||||
"chunks": {
|
||||
"chunk-7WWQ3R2W": {
|
||||
"file": "chunk-7WWQ3R2W.js"
|
||||
"chunk-GK7ZRSPS": {
|
||||
"file": "chunk-GK7ZRSPS.js"
|
||||
},
|
||||
"chunk-CGFDJW4T": {
|
||||
"file": "chunk-CGFDJW4T.js"
|
||||
"chunk-XPVHNUZ4": {
|
||||
"file": "chunk-XPVHNUZ4.js"
|
||||
}
|
||||
}
|
||||
}
|
||||
+5
-5
@@ -33,9 +33,9 @@ import {
|
||||
version,
|
||||
watch,
|
||||
watchEffect
|
||||
} from "./chunk-CGFDJW4T.js";
|
||||
} from "./chunk-XPVHNUZ4.js";
|
||||
|
||||
// node_modules/.pnpm/vitepress@1.3.0_@algolia+client-search@4.24.0_postcss@8.4.39_search-insights@2.15.0/node_modules/vitepress/lib/vue-demi.mjs
|
||||
// node_modules/vitepress/lib/vue-demi.mjs
|
||||
var isVue2 = false;
|
||||
var isVue3 = true;
|
||||
function set(target, key, val) {
|
||||
@@ -55,7 +55,7 @@ function del(target, key) {
|
||||
delete target[key];
|
||||
}
|
||||
|
||||
// node_modules/.pnpm/@vueuse+shared@10.11.0_vue@3.4.31/node_modules/@vueuse/shared/index.mjs
|
||||
// node_modules/@vueuse/shared/index.mjs
|
||||
function computedEager(fn, options) {
|
||||
var _a;
|
||||
const result = shallowRef();
|
||||
@@ -1552,7 +1552,7 @@ function whenever(source, cb, options) {
|
||||
return stop;
|
||||
}
|
||||
|
||||
// node_modules/.pnpm/@vueuse+core@10.11.0_vue@3.4.31/node_modules/@vueuse/core/index.mjs
|
||||
// node_modules/@vueuse/core/index.mjs
|
||||
function computedAsync(evaluationCallback, initialState, optionsOrRef) {
|
||||
let options;
|
||||
if (isRef(optionsOrRef)) {
|
||||
@@ -9169,4 +9169,4 @@ vitepress/lib/vue-demi.mjs:
|
||||
* @license MIT
|
||||
*)
|
||||
*/
|
||||
//# sourceMappingURL=chunk-7WWQ3R2W.js.map
|
||||
//# sourceMappingURL=chunk-GK7ZRSPS.js.map
|
||||
+1
-1
File diff suppressed because one or more lines are too long
+6
-6
@@ -1,4 +1,4 @@
|
||||
// node_modules/.pnpm/@vue+shared@3.4.31/node_modules/@vue/shared/dist/shared.esm-bundler.js
|
||||
// node_modules/@vue/shared/dist/shared.esm-bundler.js
|
||||
function makeMap(str, expectsLowerCase) {
|
||||
const set2 = new Set(str.split(","));
|
||||
return expectsLowerCase ? (val) => set2.has(val.toLowerCase()) : (val) => set2.has(val);
|
||||
@@ -288,7 +288,7 @@ var stringifySymbol = (v, i = "") => {
|
||||
);
|
||||
};
|
||||
|
||||
// node_modules/.pnpm/@vue+reactivity@3.4.31/node_modules/@vue/reactivity/dist/reactivity.esm-bundler.js
|
||||
// node_modules/@vue/reactivity/dist/reactivity.esm-bundler.js
|
||||
function warn(msg, ...args) {
|
||||
console.warn(`[Vue warn] ${msg}`, ...args);
|
||||
}
|
||||
@@ -1476,7 +1476,7 @@ var TriggerOpTypes = {
|
||||
"CLEAR": "clear"
|
||||
};
|
||||
|
||||
// node_modules/.pnpm/@vue+runtime-core@3.4.31/node_modules/@vue/runtime-core/dist/runtime-core.esm-bundler.js
|
||||
// node_modules/@vue/runtime-core/dist/runtime-core.esm-bundler.js
|
||||
var stack = [];
|
||||
function pushWarningContext(vnode) {
|
||||
stack.push(vnode);
|
||||
@@ -9626,7 +9626,7 @@ var resolveFilter = null;
|
||||
var compatUtils = null;
|
||||
var DeprecationTypes = null;
|
||||
|
||||
// node_modules/.pnpm/@vue+runtime-dom@3.4.31/node_modules/@vue/runtime-dom/dist/runtime-dom.esm-bundler.js
|
||||
// node_modules/@vue/runtime-dom/dist/runtime-dom.esm-bundler.js
|
||||
var svgNS = "http://www.w3.org/2000/svg";
|
||||
var mathmlNS = "http://www.w3.org/1998/Math/MathML";
|
||||
var doc = typeof document !== "undefined" ? document : null;
|
||||
@@ -11219,7 +11219,7 @@ var initDirectivesForSSR = () => {
|
||||
}
|
||||
};
|
||||
|
||||
// node_modules/.pnpm/vue@3.4.31/node_modules/vue/dist/vue.runtime.esm-bundler.js
|
||||
// node_modules/vue/dist/vue.runtime.esm-bundler.js
|
||||
function initDev() {
|
||||
{
|
||||
initCustomFormatter();
|
||||
@@ -11437,4 +11437,4 @@ vue/dist/vue.runtime.esm-bundler.js:
|
||||
* @license MIT
|
||||
**)
|
||||
*/
|
||||
//# sourceMappingURL=chunk-CGFDJW4T.js.map
|
||||
//# sourceMappingURL=chunk-XPVHNUZ4.js.map
|
||||
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+1
-1
@@ -1,4 +1,4 @@
|
||||
// node_modules/.pnpm/medium-zoom@1.1.0/node_modules/medium-zoom/dist/medium-zoom.esm.js
|
||||
// node_modules/medium-zoom/dist/medium-zoom.esm.js
|
||||
var _extends = Object.assign || function(target) {
|
||||
for (var i = 1; i < arguments.length; i++) {
|
||||
var source = arguments[i];
|
||||
|
||||
+1
-1
File diff suppressed because one or more lines are too long
+5
-5
@@ -1,4 +1,4 @@
|
||||
// node_modules/.pnpm/@vue+devtools-shared@7.3.5/node_modules/@vue/devtools-shared/dist/index.js
|
||||
// node_modules/@vue/devtools-shared/dist/index.js
|
||||
var __create = Object.create;
|
||||
var __defProp = Object.defineProperty;
|
||||
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
||||
@@ -254,7 +254,7 @@ function isUrlString(str) {
|
||||
var deepClone = (0, import_rfdc.default)({ circles: true });
|
||||
init_esm_shims();
|
||||
|
||||
// node_modules/.pnpm/hookable@5.5.3/node_modules/hookable/dist/index.mjs
|
||||
// node_modules/hookable/dist/index.mjs
|
||||
function flatHooks(configHooks, hooks2 = {}, parentName) {
|
||||
for (const key in configHooks) {
|
||||
const subHook = configHooks[key];
|
||||
@@ -459,7 +459,7 @@ function createHooks() {
|
||||
return new Hookable();
|
||||
}
|
||||
|
||||
// node_modules/.pnpm/perfect-debounce@1.0.0/node_modules/perfect-debounce/dist/index.mjs
|
||||
// node_modules/perfect-debounce/dist/index.mjs
|
||||
var DEBOUNCE_DEFAULTS = {
|
||||
trailing: true
|
||||
};
|
||||
@@ -516,11 +516,11 @@ async function _applyPromised(fn, _this, args) {
|
||||
return await fn.apply(_this, args);
|
||||
}
|
||||
|
||||
// node_modules/.pnpm/birpc@0.2.17/node_modules/birpc/dist/index.mjs
|
||||
// node_modules/birpc/dist/index.mjs
|
||||
var { clearTimeout: clearTimeout2, setTimeout: setTimeout2 } = globalThis;
|
||||
var random = Math.random.bind(Math);
|
||||
|
||||
// node_modules/.pnpm/@vue+devtools-kit@7.3.5/node_modules/@vue/devtools-kit/dist/index.js
|
||||
// node_modules/@vue/devtools-kit/dist/index.js
|
||||
var __create2 = Object.create;
|
||||
var __defProp2 = Object.defineProperty;
|
||||
var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
|
||||
|
||||
File diff suppressed because one or more lines are too long
+2
-2
@@ -273,8 +273,8 @@ import {
|
||||
watchTriggerable,
|
||||
watchWithFilter,
|
||||
whenever
|
||||
} from "./chunk-7WWQ3R2W.js";
|
||||
import "./chunk-CGFDJW4T.js";
|
||||
} from "./chunk-GK7ZRSPS.js";
|
||||
import "./chunk-XPVHNUZ4.js";
|
||||
export {
|
||||
DefaultMagicKeysAliasMap,
|
||||
StorageSerializers,
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
import {
|
||||
tryOnScopeDispose,
|
||||
unrefElement
|
||||
} from "./chunk-7WWQ3R2W.js";
|
||||
} from "./chunk-GK7ZRSPS.js";
|
||||
import {
|
||||
ref,
|
||||
watch
|
||||
} from "./chunk-CGFDJW4T.js";
|
||||
} from "./chunk-XPVHNUZ4.js";
|
||||
|
||||
// node_modules/.pnpm/tabbable@6.2.0/node_modules/tabbable/dist/index.esm.js
|
||||
// node_modules/tabbable/dist/index.esm.js
|
||||
var candidateSelectors = ["input:not([inert])", "select:not([inert])", "textarea:not([inert])", "a[href]:not([inert])", "button:not([inert])", "[tabindex]:not(slot):not([inert])", "audio[controls]:not([inert])", "video[controls]:not([inert])", '[contenteditable]:not([contenteditable="false"]):not([inert])', "details>summary:first-of-type:not([inert])", "details:not([inert])"];
|
||||
var candidateSelector = candidateSelectors.join(",");
|
||||
var NoElement = typeof Element === "undefined";
|
||||
@@ -338,7 +338,7 @@ var isFocusable = function isFocusable2(node, options) {
|
||||
return isNodeMatchingSelectorFocusable(options, node);
|
||||
};
|
||||
|
||||
// node_modules/.pnpm/focus-trap@7.5.4/node_modules/focus-trap/dist/focus-trap.esm.js
|
||||
// node_modules/focus-trap/dist/focus-trap.esm.js
|
||||
function ownKeys(e, r) {
|
||||
var t = Object.keys(e);
|
||||
if (Object.getOwnPropertySymbols) {
|
||||
@@ -1018,7 +1018,7 @@ var createFocusTrap = function createFocusTrap2(elements, userOptions) {
|
||||
return trap;
|
||||
};
|
||||
|
||||
// node_modules/.pnpm/@vueuse+integrations@10.11.0_focus-trap@7.5.4_vue@3.4.31/node_modules/@vueuse/integrations/useFocusTrap.mjs
|
||||
// node_modules/@vueuse/integrations/useFocusTrap.mjs
|
||||
function useFocusTrap(target, options = {}) {
|
||||
let trap;
|
||||
const { immediate, ...focusTrapOptions } = options;
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -1,4 +1,4 @@
|
||||
// node_modules/.pnpm/mark.js@8.11.1/node_modules/mark.js/src/lib/domiterator.js
|
||||
// node_modules/mark.js/src/lib/domiterator.js
|
||||
var DOMIterator = class _DOMIterator {
|
||||
/**
|
||||
* @param {HTMLElement|HTMLElement[]|NodeList|string} ctx - The context DOM
|
||||
@@ -494,7 +494,7 @@ var DOMIterator = class _DOMIterator {
|
||||
*/
|
||||
};
|
||||
|
||||
// node_modules/.pnpm/mark.js@8.11.1/node_modules/mark.js/src/lib/mark.js
|
||||
// node_modules/mark.js/src/lib/mark.js
|
||||
var Mark = class {
|
||||
// eslint-disable-line no-unused-vars
|
||||
/**
|
||||
@@ -1638,7 +1638,7 @@ var Mark = class {
|
||||
}
|
||||
};
|
||||
|
||||
// node_modules/.pnpm/mark.js@8.11.1/node_modules/mark.js/src/vanilla.js
|
||||
// node_modules/mark.js/src/vanilla.js
|
||||
function Mark2(ctx) {
|
||||
const instance = new Mark(ctx);
|
||||
this.mark = (sv, opt) => {
|
||||
|
||||
File diff suppressed because one or more lines are too long
+1
-1
@@ -1,4 +1,4 @@
|
||||
// node_modules/.pnpm/minisearch@6.3.0/node_modules/minisearch/dist/es/index.js
|
||||
// node_modules/minisearch/dist/es/index.js
|
||||
var __assign = function() {
|
||||
__assign = Object.assign || function __assign2(t) {
|
||||
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
||||
|
||||
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+1
-1
@@ -158,7 +158,7 @@ import {
|
||||
withMemo,
|
||||
withModifiers,
|
||||
withScopeId
|
||||
} from "./chunk-CGFDJW4T.js";
|
||||
} from "./chunk-XPVHNUZ4.js";
|
||||
export {
|
||||
BaseTransition,
|
||||
BaseTransitionPropsValidators,
|
||||
|
||||
@@ -124,6 +124,7 @@ export default defineConfig({
|
||||
{ text: "统一异常(exception)", link: "/src/guide/exception.md" },
|
||||
{ text: "权限校验(security)", link: "/src/guide/security.md" },
|
||||
{ text: "数据初始化(init)", link: "/src/guide/initData.md" },
|
||||
{ text: "请求日志(log)", link: "/src/guide/recordLog.md" },
|
||||
{ text: "接口文档(swagger)", link: "/src/guide/swagger.md" },
|
||||
],
|
||||
},
|
||||
|
||||
Vendored
+3
-3
@@ -6,16 +6,16 @@
|
||||
<title>404 | Cool Admin</title>
|
||||
<meta name="description" content="Not Found">
|
||||
<meta name="generator" content="VitePress v1.3.0">
|
||||
<link rel="preload stylesheet" href="/assets/style.C_XMi3Tx.css" as="style">
|
||||
<link rel="preload stylesheet" href="/assets/style.Di6p2yre.css" as="style">
|
||||
|
||||
<script type="module" src="/assets/app.BCDpIKjt.js"></script>
|
||||
<script type="module" src="/assets/app.oC169Azk.js"></script>
|
||||
<link rel="preload" href="/assets/inter-roman-latin.Di8DUHzh.woff2" as="font" type="font/woff2" crossorigin="">
|
||||
<script id="check-dark-mode">(()=>{const e=localStorage.getItem("vitepress-theme-appearance")||"auto",a=window.matchMedia("(prefers-color-scheme: dark)").matches;(!e||e==="auto"?a:e==="dark")&&document.documentElement.classList.add("dark")})();</script>
|
||||
<script id="check-mac-os">document.documentElement.classList.toggle("mac",/Mac|iPhone|iPod|iPad/i.test(navigator.platform));</script>
|
||||
</head>
|
||||
<body>
|
||||
<div id="app"></div>
|
||||
<script>window.__VP_HASH_MAP__=JSON.parse("{\"index.md\":\"IDM-wWfu\",\"readme.md\":\"21sdoxr8\",\"src_about_index.md\":\"u0DlwXFy\",\"src_guide_ai.md\":\"BONNk2Tk\",\"src_guide_cache.md\":\"TbXSwkcj\",\"src_guide_controller.md\":\"DCo4_59t\",\"src_guide_db.md\":\"Duwyo5Xx\",\"src_guide_deploy.md\":\"D3Yfqu-Q\",\"src_guide_dev.md\":\"Dkd1jFPN\",\"src_guide_dir.md\":\"RpZMF5oN\",\"src_guide_exception.md\":\"B8TYnOY4\",\"src_guide_flow.md\":\"BqMTTDYN\",\"src_guide_initdata.md\":\"BiLqu-w-\",\"src_guide_plugin.md\":\"CkiuwUnt\",\"src_guide_quick.md\":\"Bto1F7au\",\"src_guide_security.md\":\"COj_02Ul\",\"src_guide_service.md\":\"DFVHuVBZ\",\"src_guide_swagger.md\":\"Cb0cwFc8\",\"src_guide_upload.md\":\"CxcWqhw1\",\"src_introduce_index.md\":\"DA1PheMx\",\"src_introduce_show.md\":\"D0p_OwAi\",\"src_introduce_src.md\":\"BlckdU_b\",\"src_question_common.md\":\"DOoSuwHd\",\"src_todo_plan.md\":\"OECDxoZt\",\"src_todo_update.md\":\"y1o13J5g\"}");window.__VP_SITE_DATA__=JSON.parse("{\"lang\":\"en-US\",\"dir\":\"ltr\",\"title\":\"Cool Admin\",\"description\":\"一个很酷的后台管理系统开发框架\",\"base\":\"/\",\"head\":[],\"router\":{\"prefetchLinks\":true},\"appearance\":true,\"themeConfig\":{\"logo\":\"/logo.png\",\"search\":{\"provider\":\"local\"},\"footer\":{\"message\":\"COOL为开发者而生\",\"copyright\":\"<a href=\\\"https://beian.miit.gov.cn\\\">Copyright © COOL | 闽ICP备2024042701号</a>\"},\"docFooter\":{\"prev\":\"上一页\",\"next\":\"下一页\"},\"outline\":{\"label\":\"页面导航\",\"level\":[2,3]},\"lastUpdated\":{\"text\":\"最后更新于\",\"formatOptions\":{\"dateStyle\":\"short\",\"timeStyle\":\"medium\"}},\"langMenuLabel\":\"多语言\",\"returnToTopLabel\":\"回到顶部\",\"sidebarMenuLabel\":\"菜单\",\"darkModeSwitchLabel\":\"主题\",\"lightModeSwitchTitle\":\"切换到浅色模式\",\"darkModeSwitchTitle\":\"切换到深色模式\",\"editLink\":{\"text\":\"在GitHub上编辑\",\"pattern\":\"https://github.com/cool-team-official/cool-admin-java-docs/blob/main/:path\"},\"nav\":[{\"text\":\"介绍\",\"link\":\"/src/introduce/index.md\",\"noIcon\":false},{\"text\":\"教程\",\"link\":\"/src/guide/quick.md\"},{\"text\":\"🔥插件市场\",\"link\":\"https://cool-js.com/plugin\"},{\"text\":\"交流合作\",\"link\":\"/src/about/index.md\"},{\"text\":\"v7.1.0\",\"items\":[{\"text\":\"更新日志\",\"link\":\"/src/todo/update.md\"},{\"text\":\"版本计划\",\"link\":\"/src/todo/plan.md\"}]},{\"text\":\"更多\",\"items\":[{\"text\":\"Cool 官网\",\"link\":\"https://cool-js.com\"},{\"text\":\"Cool Admin(Nodejs版)\",\"link\":\"https://node.cool-admin.com\"},{\"text\":\"Cool Admin Vue(前端)\",\"link\":\"https://node.cool-js.com\"},{\"text\":\"Uni(基于uni-app跨端移动端开发)\",\"link\":\"https://uni-docs.cool-js.com\"}]}],\"sidebar\":[{\"text\":\"介绍\",\"items\":[{\"text\":\"简介\",\"link\":\"/src/introduce/index.md\"},{\"text\":\"演示\",\"link\":\"/src/introduce/show.md\"},{\"text\":\"源码\",\"link\":\"/src/introduce/src.md\"}]},{\"text\":\"教程\",\"items\":[{\"text\":\"快速开始\",\"link\":\"/src/guide/quick.md\"},{\"text\":\"目录结构\",\"link\":\"/src/guide/dir.md\"},{\"text\":\"Ai编码\",\"link\":\"/src/guide/ai.md\"},{\"text\":\"Ai流程编排\",\"link\":\"/src/guide/flow.md\"},{\"text\":\"扩展插件\",\"link\":\"/src/guide/plugin.md\"},{\"text\":\"开发方式\",\"link\":\"/src/guide/dev.md\"},{\"text\":\"核心\",\"items\":[{\"text\":\"控制器(controller)\",\"link\":\"/src/guide/controller.md\"},{\"text\":\"服务(service)\",\"link\":\"/src/guide/service.md\"},{\"text\":\"数据库(db)\",\"link\":\"/src/guide/db.md\"},{\"text\":\"缓存(cache)\",\"link\":\"/src/guide/cache.md\"},{\"text\":\"文件上传(file)\",\"link\":\"/src/guide/upload.md\"},{\"text\":\"统一异常(exception)\",\"link\":\"/src/guide/exception.md\"},{\"text\":\"权限校验(security)\",\"link\":\"/src/guide/security.md\"},{\"text\":\"数据初始化(init)\",\"link\":\"/src/guide/initData.md\"},{\"text\":\"接口文档(swagger)\",\"link\":\"/src/guide/swagger.md\"}]},{\"text\":\"部署项目\",\"link\":\"/src/guide/deploy.md\"}]},{\"text\":\"计划&更新\",\"items\":[{\"text\":\"更新\",\"link\":\"/src/todo/update.md\"},{\"text\":\"计划\",\"link\":\"/src/todo/plan.md\"}]},{\"text\":\"常见问题\",\"link\":\"/src/question/common.md\"},{\"text\":\"交流合作\",\"link\":\"/src/about/index.md\"}],\"socialLinks\":[{\"icon\":\"github\",\"link\":\"https://github.com/cool-team-official/cool-admin-java\"}]},\"locales\":{},\"scrollOffset\":134,\"cleanUrls\":false}");</script>
|
||||
<script>window.__VP_HASH_MAP__=JSON.parse("{\"index.md\":\"IDM-wWfu\",\"readme.md\":\"21sdoxr8\",\"src_about_index.md\":\"u0DlwXFy\",\"src_guide_ai.md\":\"BONNk2Tk\",\"src_guide_cache.md\":\"TbXSwkcj\",\"src_guide_controller.md\":\"DCo4_59t\",\"src_guide_db.md\":\"Duwyo5Xx\",\"src_guide_deploy.md\":\"D3Yfqu-Q\",\"src_guide_dev.md\":\"Dkd1jFPN\",\"src_guide_dir.md\":\"RpZMF5oN\",\"src_guide_exception.md\":\"B8TYnOY4\",\"src_guide_flow.md\":\"BqMTTDYN\",\"src_guide_initdata.md\":\"BVn22GWI\",\"src_guide_plugin.md\":\"CkiuwUnt\",\"src_guide_quick.md\":\"Bto1F7au\",\"src_guide_recordlog.md\":\"E1sPA0ct\",\"src_guide_security.md\":\"BLgp4enK\",\"src_guide_service.md\":\"DFVHuVBZ\",\"src_guide_swagger.md\":\"Cb0cwFc8\",\"src_guide_upload.md\":\"CxcWqhw1\",\"src_introduce_index.md\":\"DA1PheMx\",\"src_introduce_show.md\":\"D0p_OwAi\",\"src_introduce_src.md\":\"BlckdU_b\",\"src_question_common.md\":\"DOoSuwHd\",\"src_todo_plan.md\":\"OECDxoZt\",\"src_todo_update.md\":\"wCKLrtSb\"}");window.__VP_SITE_DATA__=JSON.parse("{\"lang\":\"en-US\",\"dir\":\"ltr\",\"title\":\"Cool Admin\",\"description\":\"一个很酷的后台管理系统开发框架\",\"base\":\"/\",\"head\":[],\"router\":{\"prefetchLinks\":true},\"appearance\":true,\"themeConfig\":{\"logo\":\"/logo.png\",\"search\":{\"provider\":\"local\"},\"footer\":{\"message\":\"COOL为开发者而生\",\"copyright\":\"<a href=\\\"https://beian.miit.gov.cn\\\">Copyright © COOL | 闽ICP备2024042701号</a>\"},\"docFooter\":{\"prev\":\"上一页\",\"next\":\"下一页\"},\"outline\":{\"label\":\"页面导航\",\"level\":[2,3]},\"lastUpdated\":{\"text\":\"最后更新于\",\"formatOptions\":{\"dateStyle\":\"short\",\"timeStyle\":\"medium\"}},\"langMenuLabel\":\"多语言\",\"returnToTopLabel\":\"回到顶部\",\"sidebarMenuLabel\":\"菜单\",\"darkModeSwitchLabel\":\"主题\",\"lightModeSwitchTitle\":\"切换到浅色模式\",\"darkModeSwitchTitle\":\"切换到深色模式\",\"editLink\":{\"text\":\"在GitHub上编辑\",\"pattern\":\"https://github.com/cool-team-official/cool-admin-java-docs/blob/main/:path\"},\"nav\":[{\"text\":\"介绍\",\"link\":\"/src/introduce/index.md\",\"noIcon\":false},{\"text\":\"教程\",\"link\":\"/src/guide/quick.md\"},{\"text\":\"🔥插件市场\",\"link\":\"https://cool-js.com/plugin\"},{\"text\":\"交流合作\",\"link\":\"/src/about/index.md\"},{\"text\":\"v7.1.0\",\"items\":[{\"text\":\"更新日志\",\"link\":\"/src/todo/update.md\"},{\"text\":\"版本计划\",\"link\":\"/src/todo/plan.md\"}]},{\"text\":\"更多\",\"items\":[{\"text\":\"Cool 官网\",\"link\":\"https://cool-js.com\"},{\"text\":\"Cool Admin(Nodejs版)\",\"link\":\"https://node.cool-admin.com\"},{\"text\":\"Cool Admin Vue(前端)\",\"link\":\"https://node.cool-js.com\"},{\"text\":\"Uni(基于uni-app跨端移动端开发)\",\"link\":\"https://uni-docs.cool-js.com\"}]}],\"sidebar\":[{\"text\":\"介绍\",\"items\":[{\"text\":\"简介\",\"link\":\"/src/introduce/index.md\"},{\"text\":\"演示\",\"link\":\"/src/introduce/show.md\"},{\"text\":\"源码\",\"link\":\"/src/introduce/src.md\"}]},{\"text\":\"教程\",\"items\":[{\"text\":\"快速开始\",\"link\":\"/src/guide/quick.md\"},{\"text\":\"目录结构\",\"link\":\"/src/guide/dir.md\"},{\"text\":\"Ai编码\",\"link\":\"/src/guide/ai.md\"},{\"text\":\"Ai流程编排\",\"link\":\"/src/guide/flow.md\"},{\"text\":\"扩展插件\",\"link\":\"/src/guide/plugin.md\"},{\"text\":\"开发方式\",\"link\":\"/src/guide/dev.md\"},{\"text\":\"核心\",\"items\":[{\"text\":\"控制器(controller)\",\"link\":\"/src/guide/controller.md\"},{\"text\":\"服务(service)\",\"link\":\"/src/guide/service.md\"},{\"text\":\"数据库(db)\",\"link\":\"/src/guide/db.md\"},{\"text\":\"缓存(cache)\",\"link\":\"/src/guide/cache.md\"},{\"text\":\"文件上传(file)\",\"link\":\"/src/guide/upload.md\"},{\"text\":\"统一异常(exception)\",\"link\":\"/src/guide/exception.md\"},{\"text\":\"权限校验(security)\",\"link\":\"/src/guide/security.md\"},{\"text\":\"数据初始化(init)\",\"link\":\"/src/guide/initData.md\"},{\"text\":\"请求日志(log)\",\"link\":\"/src/guide/recordLog.md\"},{\"text\":\"接口文档(swagger)\",\"link\":\"/src/guide/swagger.md\"}]},{\"text\":\"部署项目\",\"link\":\"/src/guide/deploy.md\"}]},{\"text\":\"计划&更新\",\"items\":[{\"text\":\"更新\",\"link\":\"/src/todo/update.md\"},{\"text\":\"计划\",\"link\":\"/src/todo/plan.md\"}]},{\"text\":\"常见问题\",\"link\":\"/src/question/common.md\"},{\"text\":\"交流合作\",\"link\":\"/src/about/index.md\"}],\"socialLinks\":[{\"icon\":\"github\",\"link\":\"https://github.com/cool-team-official/cool-admin-java\"}]},\"locales\":{},\"scrollOffset\":134,\"cleanUrls\":false}");</script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
Vendored
+5
-5
File diff suppressed because one or more lines are too long
+1
-1
@@ -1 +1 @@
|
||||
import{U as o,af as p,ag as u,ah as l,ai as c,aj as f,ak as d,al as m,am as h,an as g,ao as A,d as P,u as v,y,x as w,ap as C,aq as R,ar as b,as as E}from"./chunks/framework.C_oE5szm.js";import{R as S}from"./chunks/theme.D_qbO6a2.js";function i(e){if(e.extends){const a=i(e.extends);return{...a,...e,async enhanceApp(t){a.enhanceApp&&await a.enhanceApp(t),e.enhanceApp&&await e.enhanceApp(t)}}}return e}const s=i(S),T=P({name:"VitePressApp",setup(){const{site:e,lang:a,dir:t}=v();return y(()=>{w(()=>{document.documentElement.lang=a.value,document.documentElement.dir=t.value})}),e.value.router.prefetchLinks&&C(),R(),b(),s.setup&&s.setup(),()=>E(s.Layout)}});async function _(){globalThis.__VITEPRESS__=!0;const e=x(),a=j();a.provide(u,e);const t=l(e.route);return a.provide(c,t),a.component("Content",f),a.component("ClientOnly",d),Object.defineProperties(a.config.globalProperties,{$frontmatter:{get(){return t.frontmatter.value}},$params:{get(){return t.page.value.params}}}),s.enhanceApp&&await s.enhanceApp({app:a,router:e,siteData:m}),{app:a,router:e,data:t}}function j(){return h(T)}function x(){let e=o,a;return g(t=>{let n=A(t),r=null;return n&&(e&&(a=n),(e||a===n)&&(n=n.replace(/\.js$/,".lean.js")),r=import(n)),o&&(e=!1),r},s.NotFound)}o&&_().then(({app:e,router:a,data:t})=>{a.go().then(()=>{p(a.route,t.site),e.mount("#app")})});export{_ as createApp};
|
||||
import{U as o,af as p,ag as u,ah as l,ai as c,aj as f,ak as d,al as m,am as h,an as g,ao as A,d as P,u as v,y,x as w,ap as C,aq as R,ar as b,as as E}from"./chunks/framework.C_oE5szm.js";import{R as S}from"./chunks/theme.ylM0mxsQ.js";function i(e){if(e.extends){const a=i(e.extends);return{...a,...e,async enhanceApp(t){a.enhanceApp&&await a.enhanceApp(t),e.enhanceApp&&await e.enhanceApp(t)}}}return e}const s=i(S),T=P({name:"VitePressApp",setup(){const{site:e,lang:a,dir:t}=v();return y(()=>{w(()=>{document.documentElement.lang=a.value,document.documentElement.dir=t.value})}),e.value.router.prefetchLinks&&C(),R(),b(),s.setup&&s.setup(),()=>E(s.Layout)}});async function _(){globalThis.__VITEPRESS__=!0;const e=x(),a=j();a.provide(u,e);const t=l(e.route);return a.provide(c,t),a.component("Content",f),a.component("ClientOnly",d),Object.defineProperties(a.config.globalProperties,{$frontmatter:{get(){return t.frontmatter.value}},$params:{get(){return t.page.value.params}}}),s.enhanceApp&&await s.enhanceApp({app:a,router:e,siteData:m}),{app:a,router:e,data:t}}function j(){return h(T)}function x(){let e=o,a;return g(t=>{let n=A(t),r=null;return n&&(e&&(a=n),(e||a===n)&&(n=n.replace(/\.js$/,".lean.js")),r=import(n)),o&&(e=!1),r},s.NotFound)}o&&_().then(({app:e,router:a,data:t})=>{a.go().then(()=>{p(a.route,t.site),e.mount("#app")})});export{_ as createApp};
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+2
-2
File diff suppressed because one or more lines are too long
Vendored
+2
-2
File diff suppressed because one or more lines are too long
+1
-1
@@ -1,4 +1,4 @@
|
||||
import{_ as s,c as i,o as a,a5 as n}from"./chunks/framework.C_oE5szm.js";const g=JSON.parse('{"title":"数据初始化","description":"","frontmatter":{},"headers":[],"relativePath":"src/guide/initData.md","filePath":"src/guide/initData.md","lastUpdated":1721036629000}'),p={name:"src/guide/initData.md"},l=n(`<h1 id="数据初始化" tabindex="-1">数据初始化 <a class="header-anchor" href="#数据初始化" aria-label="Permalink to "数据初始化""></a></h1><p>有些功能模块上线时,需要初始化一些数据</p><p>可以在 resources 下的 <code>cool/data/db</code> 目录创建 <code>demo.json</code> 文件</p><p>json 格式如下,demo 为表的名称,里面是个数组,数组里可以包含多个对象,每个对象中的 key 为表的字段,value 为对应的值</p><blockquote><p>规范:实体需以 Entity 结尾</p></blockquote><div class="language-json vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">json</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">{</span></span>
|
||||
import{_ as s,c as i,o as a,a5 as n}from"./chunks/framework.C_oE5szm.js";const g=JSON.parse('{"title":"数据初始化","description":"","frontmatter":{},"headers":[],"relativePath":"src/guide/initData.md","filePath":"src/guide/initData.md","lastUpdated":1721812009000}'),p={name:"src/guide/initData.md"},l=n(`<h1 id="数据初始化" tabindex="-1">数据初始化 <a class="header-anchor" href="#数据初始化" aria-label="Permalink to "数据初始化""></a></h1><p>有些功能模块上线时,需要初始化一些数据</p><p>可以在 resources 下的 <code>cool/data/db</code> 目录创建 <code>demo.json</code> 文件</p><p>json 格式如下,demo 为表的名称,里面是个数组,数组里可以包含多个对象,每个对象中的 key 为表的字段,value 为对应的值</p><blockquote><p>规范:实体需以 Entity 结尾</p></blockquote><div class="language-json vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">json</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">{</span></span>
|
||||
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> "demo"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: [</span></span>
|
||||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> {</span></span>
|
||||
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> "keyName"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">"rich"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
|
||||
+1
-1
@@ -1 +1 @@
|
||||
import{_ as s,c as i,o as a,a5 as n}from"./chunks/framework.C_oE5szm.js";const g=JSON.parse('{"title":"数据初始化","description":"","frontmatter":{},"headers":[],"relativePath":"src/guide/initData.md","filePath":"src/guide/initData.md","lastUpdated":1721036629000}'),p={name:"src/guide/initData.md"},l=n("",10),t=[l];function h(k,e,E,d,r,o){return a(),i("div",null,t)}const y=s(p,[["render",h]]);export{g as __pageData,y as default};
|
||||
import{_ as s,c as i,o as a,a5 as n}from"./chunks/framework.C_oE5szm.js";const g=JSON.parse('{"title":"数据初始化","description":"","frontmatter":{},"headers":[],"relativePath":"src/guide/initData.md","filePath":"src/guide/initData.md","lastUpdated":1721812009000}'),p={name:"src/guide/initData.md"},l=n("",10),t=[l];function h(k,e,E,d,r,o){return a(),i("div",null,t)}const y=s(p,[["render",h]]);export{g as __pageData,y as default};
|
||||
@@ -0,0 +1,22 @@
|
||||
import{_ as s,c as i,o as a,a5 as n}from"./chunks/framework.C_oE5szm.js";const g=JSON.parse('{"title":"请求日志记录","description":"","frontmatter":{},"headers":[],"relativePath":"src/guide/recordLog.md","filePath":"src/guide/recordLog.md","lastUpdated":null}'),e={name:"src/guide/recordLog.md"},p=n(`<h1 id="请求日志记录" tabindex="-1">请求日志记录 <a class="header-anchor" href="#请求日志记录" aria-label="Permalink to "请求日志记录""></a></h1><p>记录接口请求日志入库</p><div class="language-java vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">java</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">public</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> class</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> BaseLogFilter</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> implements</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> Filter</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> {</span></span>
|
||||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> @</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">Resource</span></span>
|
||||
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> private</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> BaseSysLogService baseSysLogService;</span></span>
|
||||
<span class="line"></span>
|
||||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> @</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">Override</span></span>
|
||||
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> public</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> void</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> doFilter</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(ServletRequest </span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">servletRequest</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, ServletResponse </span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">servletResponse</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, FilterChain </span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">filterChain</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span></span>
|
||||
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> throws</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> IOException, ServletException {</span></span>
|
||||
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> // 记录日志</span></span>
|
||||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> HttpServletRequest request </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> (HttpServletRequest) servletRequest;</span></span>
|
||||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> baseSysLogService.</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">record</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(request, (JSONObject) request.</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">getAttribute</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">"requestParams"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">));</span></span>
|
||||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> filterChain.</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">doFilter</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(servletRequest, servletResponse);</span></span>
|
||||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> }</span></span>
|
||||
<span class="line"></span>
|
||||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">}</span></span></code></pre></div><p>同时如果个别接口需要忽略记录请求日志</p><p>可以在yml文件中配置, 默认忽略APP端接口</p><div class="language- vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang"></span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span># 忽略url</span></span>
|
||||
<span class="line"><span>ignored:</span></span>
|
||||
<span class="line"><span> # 忽略记录请求日志url</span></span>
|
||||
<span class="line"><span> logUrls:</span></span>
|
||||
<span class="line"><span> - /</span></span>
|
||||
<span class="line"><span> - /app/**</span></span>
|
||||
<span class="line"><span> - /css/*</span></span>
|
||||
<span class="line"><span> - /js/*</span></span>
|
||||
<span class="line"><span> - /favicon.ico</span></span></code></pre></div>`,6),t=[p];function l(h,k,r,d,E,c){return a(),i("div",null,t)}const y=s(e,[["render",l]]);export{g as __pageData,y as default};
|
||||
@@ -0,0 +1 @@
|
||||
import{_ as s,c as i,o as a,a5 as n}from"./chunks/framework.C_oE5szm.js";const g=JSON.parse('{"title":"请求日志记录","description":"","frontmatter":{},"headers":[],"relativePath":"src/guide/recordLog.md","filePath":"src/guide/recordLog.md","lastUpdated":null}'),e={name:"src/guide/recordLog.md"},p=n("",6),t=[p];function l(h,k,r,d,E,c){return a(),i("div",null,t)}const y=s(e,[["render",l]]);export{g as __pageData,y as default};
|
||||
+4
-10
@@ -1,4 +1,4 @@
|
||||
import{_ as s,c as i,o as a,a5 as n}from"./chunks/framework.C_oE5szm.js";const c=JSON.parse('{"title":"权限校验","description":"","frontmatter":{},"headers":[],"relativePath":"src/guide/security.md","filePath":"src/guide/security.md","lastUpdated":1721036629000}'),h={name:"src/guide/security.md"},t=n(`<h1 id="权限校验" tabindex="-1">权限校验 <a class="header-anchor" href="#权限校验" aria-label="Permalink to "权限校验""></a></h1><p>采用 spring-security 与 jwt 作为框架安全与权限校验。</p><h2 id="配置" tabindex="-1">配置 <a class="header-anchor" href="#配置" aria-label="Permalink to "配置""></a></h2><div class="language-yaml vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">yaml</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;">cool</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
|
||||
import{_ as s,c as i,o as a,a5 as n}from"./chunks/framework.C_oE5szm.js";const c=JSON.parse('{"title":"权限校验","description":"","frontmatter":{},"headers":[],"relativePath":"src/guide/security.md","filePath":"src/guide/security.md","lastUpdated":1721812009000}'),h={name:"src/guide/security.md"},t=n(`<h1 id="权限校验" tabindex="-1">权限校验 <a class="header-anchor" href="#权限校验" aria-label="Permalink to "权限校验""></a></h1><p>采用 spring-security 与 jwt 作为框架安全与权限校验。</p><h2 id="配置" tabindex="-1">配置 <a class="header-anchor" href="#配置" aria-label="Permalink to "配置""></a></h2><div class="language-yaml vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">yaml</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;">cool</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
|
||||
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> # token 相关配置</span></span>
|
||||
<span class="line"><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;"> token</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
|
||||
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> # 过期时间 单位:秒 半小时</span></span>
|
||||
@@ -206,14 +206,8 @@ import{_ as s,c as i,o as a,a5 as n}from"./chunks/framework.C_oE5szm.js";const c
|
||||
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> return</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> config.</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">getAuthenticationManager</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">();</span></span>
|
||||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> }</span></span>
|
||||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">}</span></span></code></pre></div><h2 id="当前用户" tabindex="-1">当前用户 <a class="header-anchor" href="#当前用户" aria-label="Permalink to "当前用户""></a></h2><p>获取当前用户信息</p><h3 id="后端用户" tabindex="-1">后端用户 <a class="header-anchor" href="#后端用户" aria-label="Permalink to "后端用户""></a></h3><ul><li>Controller 中获得</li></ul><div class="language-java vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">java</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">@</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">GetMapping</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">"/person"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span></span>
|
||||
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">public</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> R </span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">person</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(@</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">RequestAttribute</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">() Long adminUserId)</span></span></code></pre></div><ul><li>Security 方式</li></ul><div class="language-java vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">java</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> @</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">Resource</span></span>
|
||||
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> private</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> CoolSecurityUtil coolSecurityUtil;</span></span>
|
||||
<span class="line"></span>
|
||||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> String username </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> coolSecurityUtil.</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">username</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">();</span></span></code></pre></div><ul><li>获得用户信息 请求过程中会解析 token,并将用户信息存在整个请求过程中的 requestParams</li></ul><div class="language-java vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">java</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> @</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">Resource</span></span>
|
||||
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> private</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> CoolSecurityUtil coolSecurityUtil;</span></span>
|
||||
<span class="line"></span>
|
||||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> JSONObject userInfo </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> coolSecurityUtil.</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">userInfo</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(requestParams);</span></span></code></pre></div><p>userInfo</p><table tabindex="0"><thead><tr><th>字段</th><th>类型</th><th>说明</th></tr></thead><tbody><tr><td>roleIds</td><td>Long[]</td><td>角色数组</td></tr><tr><td>username</td><td>String</td><td>用户名</td></tr><tr><td>userId</td><td>Long</td><td>用户 ID</td></tr><tr><td>passwordVersion</td><td>Integer</td><td>密码版本号</td></tr></tbody></table><h3 id="应用用户" tabindex="-1">应用用户 <a class="header-anchor" href="#应用用户" aria-label="Permalink to "应用用户""></a></h3><ul><li>Controller 中获得</li></ul><div class="language-java vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">java</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">@</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">GetMapping</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">"/xxx"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span></span>
|
||||
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">public</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> R </span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">xxx</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(@</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">RequestAttribute</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">() Long appUserId)</span></span></code></pre></div><h2 id="忽略-token" tabindex="-1">忽略 token <a class="header-anchor" href="#忽略-token" aria-label="Permalink to "忽略 token""></a></h2><p>开放接口,忽略 token 校验</p><h3 id="方法上" tabindex="-1">方法上 <a class="header-anchor" href="#方法上" aria-label="Permalink to "方法上""></a></h3><p>通过在方法上加<code>TokenIgnore</code>注解可以的接口不会进行 token 校验</p><div class="language-java vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">java</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">@</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">TokenIgnore</span></span>
|
||||
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">public</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> R </span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">person</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(@</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">RequestAttribute</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">() Long adminUserId);</span></span></code></pre></div><ul><li>Security 方式</li></ul><div class="language-java vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">java</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> Long userId </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> CoolSecurityUtil.</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">getCurrentUserId</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">();</span></span>
|
||||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> String username </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> CoolSecurityUtil.</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">getAdminUsername</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">();</span></span></code></pre></div><ul><li>获得用户信息 请求过程中会解析 token,并将用户信息存在整个请求过程中的 requestParams</li></ul><div class="language-java vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">java</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> JSONObject userInfo </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> CoolSecurityUtil.</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">getAdminUserInfo</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(requestParams);</span></span></code></pre></div><p>userInfo</p><table tabindex="0"><thead><tr><th>字段</th><th>类型</th><th>说明</th></tr></thead><tbody><tr><td>roleIds</td><td>Long[]</td><td>角色数组</td></tr><tr><td>username</td><td>String</td><td>用户名</td></tr><tr><td>userId</td><td>Long</td><td>用户 ID</td></tr><tr><td>passwordVersion</td><td>Integer</td><td>密码版本号</td></tr></tbody></table><h3 id="应用用户" tabindex="-1">应用用户 <a class="header-anchor" href="#应用用户" aria-label="Permalink to "应用用户""></a></h3><div class="language-java vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">java</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">Long userId </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> CoolSecurityUtil.</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">getCurrentUserId</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">();</span></span></code></pre></div><h2 id="忽略-token" tabindex="-1">忽略 token <a class="header-anchor" href="#忽略-token" aria-label="Permalink to "忽略 token""></a></h2><p>开放接口,忽略 token 校验</p><h3 id="方法上" tabindex="-1">方法上 <a class="header-anchor" href="#方法上" aria-label="Permalink to "方法上""></a></h3><p>通过在方法上加<code>TokenIgnore</code>注解可以的接口不会进行 token 校验</p><div class="language-java vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">java</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">@</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">TokenIgnore</span></span>
|
||||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">@</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">GetMapping</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">"/eps"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span></span>
|
||||
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">public</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> R </span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">eps</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">() {</span></span>
|
||||
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> return</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> R.</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">ok</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(coolEps.</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">getApp</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">());</span></span>
|
||||
@@ -222,4 +216,4 @@ import{_ as s,c as i,o as a,a5 as n}from"./chunks/framework.C_oE5szm.js";const c
|
||||
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> */</span></span>
|
||||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">@</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">TokenIgnore</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">value</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> =</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> {</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">"page"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">})</span></span>
|
||||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">@</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">CoolRestController</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">api</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> =</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> {</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">"add"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">"delete"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">"update"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">"page"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">"list"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">"info"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">})</span></span>
|
||||
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">public</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> class</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> AdminDictInfoController</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">{ }</span></span></code></pre></div><div class="warning custom-block"><p class="custom-block-title">注意</p><p>无论是注解在方法还是类上,都必须配合<code>CoolRestController</code>使用,其它的无效</p></div>`,36),l=[t];function k(p,e,E,r,d,g){return a(),i("div",null,l)}const F=s(h,[["render",k]]);export{c as __pageData,F as default};
|
||||
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">public</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> class</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> AdminDictInfoController</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">{ }</span></span></code></pre></div><div class="warning custom-block"><p class="custom-block-title">注意</p><p>无论是注解在方法还是类上,都必须配合<code>CoolRestController</code>使用,其它的无效</p></div>`,35),k=[t];function l(p,e,E,r,d,g){return a(),i("div",null,k)}const F=s(h,[["render",l]]);export{c as __pageData,F as default};
|
||||
+1
-1
@@ -1 +1 @@
|
||||
import{_ as s,c as i,o as a,a5 as n}from"./chunks/framework.C_oE5szm.js";const c=JSON.parse('{"title":"权限校验","description":"","frontmatter":{},"headers":[],"relativePath":"src/guide/security.md","filePath":"src/guide/security.md","lastUpdated":1721036629000}'),h={name:"src/guide/security.md"},t=n("",36),l=[t];function k(p,e,E,r,d,g){return a(),i("div",null,l)}const F=s(h,[["render",k]]);export{c as __pageData,F as default};
|
||||
import{_ as s,c as i,o as a,a5 as n}from"./chunks/framework.C_oE5szm.js";const c=JSON.parse('{"title":"权限校验","description":"","frontmatter":{},"headers":[],"relativePath":"src/guide/security.md","filePath":"src/guide/security.md","lastUpdated":1721812009000}'),h={name:"src/guide/security.md"},t=n("",35),k=[t];function l(p,e,E,r,d,g){return a(),i("div",null,k)}const F=s(h,[["render",l]]);export{c as __pageData,F as default};
|
||||
@@ -0,0 +1 @@
|
||||
import{_ as a,c as e,o as t,a5 as l}from"./chunks/framework.C_oE5szm.js";const f=JSON.parse('{"title":"更新","description":"","frontmatter":{},"headers":[],"relativePath":"src/todo/update.md","filePath":"src/todo/update.md","lastUpdated":1721037096000}'),i={name:"src/todo/update.md"},o=l('<h1 id="更新" tabindex="-1">更新 <a class="header-anchor" href="#更新" aria-label="Permalink to "更新""></a></h1><p>因为有你们的支持,cool-admin 会持续不断地更新,如果方便请点下 Star,这将会给我们带来更多的动力!!!</p><h2 id="v7-1-2-2024-08-04" tabindex="-1">## v7.1.2(2024-08-04) <a class="header-anchor" href="#v7-1-2-2024-08-04" aria-label="Permalink to "## v7.1.2(2024-08-04)""></a></h2><ul><li>新增:支持postgresql</li><li>新增:忽略记录请求日志url配置</li><li>新增:app端手机密码登录和手机验证码登录</li><li>调整:鉴权调整兼容app端</li><li>调整:优化插件过大加载慢问题,移除插件jar文件落库</li><li>修复:refreshToken可以当token使用问题</li></ul><h2 id="v7-1-1-2024-07-15" tabindex="-1">## v7.1.1(2024-07-15) <a class="header-anchor" href="#v7-1-1-2024-07-15" aria-label="Permalink to "## v7.1.1(2024-07-15)""></a></h2><ul><li>新增 Ai 自动编码功能,简单功能零代码实现;</li><li>新增后台扩展插件,如文件上传、支付、短信等功能可以通过安装插件的方式添加;</li></ul><h2 id="v7-1-0-2024-06-27" tabindex="-1">v7.1.0(2024-06-27) <a class="header-anchor" href="#v7-1-0-2024-06-27" aria-label="Permalink to "v7.1.0(2024-06-27)""></a></h2><ul><li>升级到 Springboot3.x;</li><li>升级所有相关依赖到最新;</li><li>跟进<a href="https://cool-js.com" target="_blank" rel="noreferrer">Nodejs 版</a>相关功能;</li><li>优化若干问题;</li></ul>',8),r=[o];function s(d,n,c,h,_,p){return t(),e("div",null,r)}const m=a(i,[["render",s]]);export{f as __pageData,m as default};
|
||||
@@ -0,0 +1 @@
|
||||
import{_ as a,c as e,o as t,a5 as l}from"./chunks/framework.C_oE5szm.js";const f=JSON.parse('{"title":"更新","description":"","frontmatter":{},"headers":[],"relativePath":"src/todo/update.md","filePath":"src/todo/update.md","lastUpdated":1721037096000}'),i={name:"src/todo/update.md"},o=l("",8),r=[o];function s(d,n,c,h,_,p){return t(),e("div",null,r)}const m=a(i,[["render",s]]);export{f as __pageData,m as default};
|
||||
@@ -1 +0,0 @@
|
||||
import{_ as a,c as e,o as t,a5 as o}from"./chunks/framework.C_oE5szm.js";const m=JSON.parse('{"title":"更新","description":"","frontmatter":{},"headers":[],"relativePath":"src/todo/update.md","filePath":"src/todo/update.md","lastUpdated":1721037096000}'),r={name:"src/todo/update.md"},l=o('<h1 id="更新" tabindex="-1">更新 <a class="header-anchor" href="#更新" aria-label="Permalink to "更新""></a></h1><p>因为有你们的支持,cool-admin 会持续不断地更新,如果方便请点下 Star,这将会给我们带来更多的动力!!!</p><h2 id="v7-1-1-2024-07-15" tabindex="-1">## v7.1.1(2024-07-15) <a class="header-anchor" href="#v7-1-1-2024-07-15" aria-label="Permalink to "## v7.1.1(2024-07-15)""></a></h2><ul><li>新增 Ai 自动编码功能,简单功能零代码实现;</li><li>新增后台扩展插件,如文件上传、支付、短信等功能可以通过安装插件的方式添加;</li></ul><h2 id="v7-1-0-2024-06-27" tabindex="-1">v7.1.0(2024-06-27) <a class="header-anchor" href="#v7-1-0-2024-06-27" aria-label="Permalink to "v7.1.0(2024-06-27)""></a></h2><ul><li>升级到 Springboot3.x;</li><li>升级所有相关依赖到最新;</li><li>跟进<a href="https://cool-js.com" target="_blank" rel="noreferrer">Nodejs 版</a>相关功能;</li><li>优化若干问题;</li></ul>',6),i=[l];function s(d,c,n,_,h,p){return t(),e("div",null,i)}const f=a(r,[["render",s]]);export{m as __pageData,f as default};
|
||||
@@ -1 +0,0 @@
|
||||
import{_ as a,c as e,o as t,a5 as o}from"./chunks/framework.C_oE5szm.js";const m=JSON.parse('{"title":"更新","description":"","frontmatter":{},"headers":[],"relativePath":"src/todo/update.md","filePath":"src/todo/update.md","lastUpdated":1721037096000}'),r={name:"src/todo/update.md"},l=o("",6),i=[l];function s(d,c,n,_,h,p){return t(),e("div",null,i)}const f=a(r,[["render",s]]);export{m as __pageData,f as default};
|
||||
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+1
-1
@@ -1 +1 @@
|
||||
{"index.md":"IDM-wWfu","readme.md":"21sdoxr8","src_about_index.md":"u0DlwXFy","src_guide_ai.md":"BONNk2Tk","src_guide_cache.md":"TbXSwkcj","src_guide_controller.md":"DCo4_59t","src_guide_db.md":"Duwyo5Xx","src_guide_deploy.md":"D3Yfqu-Q","src_guide_dev.md":"Dkd1jFPN","src_guide_dir.md":"RpZMF5oN","src_guide_exception.md":"B8TYnOY4","src_guide_flow.md":"BqMTTDYN","src_guide_initdata.md":"BiLqu-w-","src_guide_plugin.md":"CkiuwUnt","src_guide_quick.md":"Bto1F7au","src_guide_security.md":"COj_02Ul","src_guide_service.md":"DFVHuVBZ","src_guide_swagger.md":"Cb0cwFc8","src_guide_upload.md":"CxcWqhw1","src_introduce_index.md":"DA1PheMx","src_introduce_show.md":"D0p_OwAi","src_introduce_src.md":"BlckdU_b","src_question_common.md":"DOoSuwHd","src_todo_plan.md":"OECDxoZt","src_todo_update.md":"y1o13J5g"}
|
||||
{"index.md":"IDM-wWfu","readme.md":"21sdoxr8","src_about_index.md":"u0DlwXFy","src_guide_ai.md":"BONNk2Tk","src_guide_cache.md":"TbXSwkcj","src_guide_controller.md":"DCo4_59t","src_guide_db.md":"Duwyo5Xx","src_guide_deploy.md":"D3Yfqu-Q","src_guide_dev.md":"Dkd1jFPN","src_guide_dir.md":"RpZMF5oN","src_guide_exception.md":"B8TYnOY4","src_guide_flow.md":"BqMTTDYN","src_guide_initdata.md":"BVn22GWI","src_guide_plugin.md":"CkiuwUnt","src_guide_quick.md":"Bto1F7au","src_guide_recordlog.md":"E1sPA0ct","src_guide_security.md":"BLgp4enK","src_guide_service.md":"DFVHuVBZ","src_guide_swagger.md":"Cb0cwFc8","src_guide_upload.md":"CxcWqhw1","src_introduce_index.md":"DA1PheMx","src_introduce_show.md":"D0p_OwAi","src_introduce_src.md":"BlckdU_b","src_question_common.md":"DOoSuwHd","src_todo_plan.md":"OECDxoZt","src_todo_update.md":"wCKLrtSb"}
|
||||
|
||||
Vendored
+5
-5
File diff suppressed because one or more lines are too long
Vendored
+5
-5
File diff suppressed because one or more lines are too long
Vendored
+5
-5
File diff suppressed because one or more lines are too long
Vendored
+6
-6
File diff suppressed because one or more lines are too long
+6
-6
File diff suppressed because one or more lines are too long
Vendored
+5
-5
File diff suppressed because one or more lines are too long
+6
-6
File diff suppressed because one or more lines are too long
Vendored
+6
-6
File diff suppressed because one or more lines are too long
Vendored
+6
-6
File diff suppressed because one or more lines are too long
+6
-6
File diff suppressed because one or more lines are too long
Vendored
+5
-5
File diff suppressed because one or more lines are too long
+7
-7
File diff suppressed because one or more lines are too long
+6
-6
File diff suppressed because one or more lines are too long
Vendored
+6
-6
File diff suppressed because one or more lines are too long
+45
File diff suppressed because one or more lines are too long
+9
-15
File diff suppressed because one or more lines are too long
+6
-6
File diff suppressed because one or more lines are too long
+6
-6
File diff suppressed because one or more lines are too long
+6
-6
File diff suppressed because one or more lines are too long
+5
-5
File diff suppressed because one or more lines are too long
+5
-5
File diff suppressed because one or more lines are too long
+5
-5
File diff suppressed because one or more lines are too long
+5
-5
File diff suppressed because one or more lines are too long
Vendored
+5
-5
File diff suppressed because one or more lines are too long
Vendored
+6
-6
File diff suppressed because one or more lines are too long
@@ -0,0 +1,34 @@
|
||||
# 请求日志记录
|
||||
|
||||
记录接口请求日志入库
|
||||
|
||||
```java
|
||||
public class BaseLogFilter implements Filter {
|
||||
@Resource
|
||||
private BaseSysLogService baseSysLogService;
|
||||
|
||||
@Override
|
||||
public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain)
|
||||
throws IOException, ServletException {
|
||||
// 记录日志
|
||||
HttpServletRequest request = (HttpServletRequest) servletRequest;
|
||||
baseSysLogService.record(request, (JSONObject) request.getAttribute("requestParams"));
|
||||
filterChain.doFilter(servletRequest, servletResponse);
|
||||
}
|
||||
|
||||
}
|
||||
```
|
||||
同时如果个别接口需要忽略记录请求日志
|
||||
|
||||
可以在yml文件中配置, 默认忽略APP端接口
|
||||
```
|
||||
# 忽略url
|
||||
ignored:
|
||||
# 忽略记录请求日志url
|
||||
logUrls:
|
||||
- /
|
||||
- /app/**
|
||||
- /css/*
|
||||
- /js/*
|
||||
- /favicon.ico
|
||||
```
|
||||
+5
-13
@@ -251,26 +251,21 @@ public class JwtSecurityConfig {
|
||||
|
||||
```java
|
||||
@GetMapping("/person")
|
||||
public R person(@RequestAttribute() Long adminUserId)
|
||||
public R person(@RequestAttribute() Long adminUserId);
|
||||
```
|
||||
|
||||
- Security 方式
|
||||
|
||||
```java
|
||||
@Resource
|
||||
private CoolSecurityUtil coolSecurityUtil;
|
||||
|
||||
String username = coolSecurityUtil.username();
|
||||
Long userId = CoolSecurityUtil.getCurrentUserId();
|
||||
String username = CoolSecurityUtil.getAdminUsername();
|
||||
```
|
||||
|
||||
- 获得用户信息
|
||||
请求过程中会解析 token,并将用户信息存在整个请求过程中的 requestParams
|
||||
|
||||
```java
|
||||
@Resource
|
||||
private CoolSecurityUtil coolSecurityUtil;
|
||||
|
||||
JSONObject userInfo = coolSecurityUtil.userInfo(requestParams);
|
||||
JSONObject userInfo = CoolSecurityUtil.getAdminUserInfo(requestParams);
|
||||
```
|
||||
|
||||
userInfo
|
||||
@@ -284,11 +279,8 @@ userInfo
|
||||
|
||||
### 应用用户
|
||||
|
||||
- Controller 中获得
|
||||
|
||||
```java
|
||||
@GetMapping("/xxx")
|
||||
public R xxx(@RequestAttribute() Long appUserId)
|
||||
Long userId = CoolSecurityUtil.getCurrentUserId();
|
||||
```
|
||||
|
||||
## 忽略 token
|
||||
|
||||
@@ -1,6 +1,13 @@
|
||||
# 更新
|
||||
|
||||
因为有你们的支持,cool-admin 会持续不断地更新,如果方便请点下 Star,这将会给我们带来更多的动力!!!
|
||||
## ## v7.1.2(2024-08-04)
|
||||
- 新增:支持postgresql
|
||||
- 新增:忽略记录请求日志url配置
|
||||
- 新增:app端手机密码登录和手机验证码登录
|
||||
- 调整:鉴权调整兼容app端
|
||||
- 调整:优化插件过大加载慢问题,移除插件jar文件落库
|
||||
- 修复:refreshToken可以当token使用问题
|
||||
|
||||
## ## v7.1.1(2024-07-15)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user