忽略 token 说明

This commit is contained in:
COOL
2024-07-24 17:06:49 +08:00
parent 935d9c7786
commit 41606e9980
47 changed files with 227 additions and 152 deletions
+9 -9
View File
@@ -116,15 +116,15 @@ export default defineConfig({
{
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: "文件上传", link: "/src/guide/upload.md" },
{ text: "统一异常", link: "/src/guide/exception.md" },
{ text: "权限校验", link: "/src/guide/security.md" },
{ text: "数据初始化", link: "/src/guide/initData.md" },
{ text: "swagger 文档", link: "/src/guide/swagger.md" },
{ 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" },
+2 -2
View File
@@ -8,14 +8,14 @@
<meta name="generator" content="VitePress v1.3.0">
<link rel="preload stylesheet" href="/assets/style.C_XMi3Tx.css" as="style">
<script type="module" src="/assets/app.BfhmrWyi.js"></script>
<script type="module" src="/assets/app.BCDpIKjt.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\":\"B5-DSy9r\",\"src_guide_initdata.md\":\"CWyYHbHt\",\"src_guide_plugin.md\":\"BgdN93zb\",\"src_guide_quick.md\":\"CV5apjpb\",\"src_guide_security.md\":\"D2ao104D\",\"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\":\"Dwye19I0\",\"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\":\"文件上传\",\"link\":\"/src/guide/upload.md\"},{\"text\":\"统一异常\",\"link\":\"/src/guide/exception.md\"},{\"text\":\"权限校验\",\"link\":\"/src/guide/security.md\"},{\"text\":\"数据初始化\",\"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\":\"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>
</body>
</html>
+4 -4
View File
File diff suppressed because one or more lines are too long
@@ -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.CBnLA_cS.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.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};
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1 +1 @@
import{_ as a,c as e,o as t,a5 as o,ab as i}from"./chunks/framework.C_oE5szm.js";const u=JSON.parse('{"title":"Ai 流程编排","description":"","frontmatter":{},"headers":[],"relativePath":"src/guide/flow.md","filePath":"src/guide/flow.md","lastUpdated":1721207284000}'),r={name:"src/guide/flow.md"},s=o('<h1 id="ai-流程编排" tabindex="-1">Ai 流程编排 <a class="header-anchor" href="#ai-流程编排" aria-label="Permalink to &quot;Ai 流程编排&quot;">​</a></h1><p>coming soon!!!</p><p><a href="https://www.bilibili.com/video/BV1Dw4m1Y7m6/" target="_blank" rel="noreferrer">视频演示</a></p><p>开发 Ai 应用必备!!!</p><p>随着 Ai 的火热,很多应用希望接入 Ai 的能力,但是每次都是用代码手搓,容易把我们累死,而是也非常不灵活。</p><p>于是我们面向开发者和软件开发公司,做了一个 Ai 流程编排功能,结合知识库,通过拖动配置,很容易就能完成一个 Ai 的核心流程。</p><p>因此如果你需要开发 Ai 相关应用,这个可能会给你带来巨大的帮助。</p><p><img src="'+i+'" alt="流程编排" data-zoomable=""></p><div class="warning custom-block"><p class="custom-block-title">注意</p><p>Ai 流程编排+知识库 Java 版本预计 8 月底 届时会上架到插件市场,可以先体验<a href="https://cool-js.com/plugin/105" target="_blank" rel="noreferrer">NodeJs 版本</a></p></div>',9),c=[s];function p(l,_,n,d,m,f){return t(),e("div",null,c)}const A=a(r,[["render",p]]);export{u as __pageData,A as default};
import{_ as a,c as e,o as t,a5 as o,ab as i}from"./chunks/framework.C_oE5szm.js";const u=JSON.parse('{"title":"Ai 流程编排","description":"","frontmatter":{},"headers":[],"relativePath":"src/guide/flow.md","filePath":"src/guide/flow.md","lastUpdated":1721271330000}'),r={name:"src/guide/flow.md"},s=o('<h1 id="ai-流程编排" tabindex="-1">Ai 流程编排 <a class="header-anchor" href="#ai-流程编排" aria-label="Permalink to &quot;Ai 流程编排&quot;">​</a></h1><p>coming soon!!!</p><p><a href="https://www.bilibili.com/video/BV1Dw4m1Y7m6/" target="_blank" rel="noreferrer">视频演示</a></p><p>开发 Ai 应用必备!!!</p><p>随着 Ai 的火热,很多应用希望接入 Ai 的能力,但是每次都是用代码手搓,容易把我们累死,而是也非常不灵活。</p><p>于是我们面向开发者和软件开发公司,做了一个 Ai 流程编排功能,结合知识库,通过拖动配置,很容易就能完成一个 Ai 的核心流程。</p><p>因此如果你需要开发 Ai 相关应用,这个可能会给你带来巨大的帮助。</p><p><img src="'+i+'" alt="流程编排" data-zoomable=""></p><div class="warning custom-block"><p class="custom-block-title">注意</p><p>Ai 流程编排+知识库 Java 版本预计 8 月底 届时会上架到插件市场,可以先体验<a href="https://cool-js.com/plugin/105" target="_blank" rel="noreferrer">NodeJs 版本</a></p></div>',9),c=[s];function p(l,_,n,d,m,f){return t(),e("div",null,c)}const A=a(r,[["render",p]]);export{u as __pageData,A as default};
@@ -1 +1 @@
import{_ as a,c as e,o as t,a5 as o,ab as i}from"./chunks/framework.C_oE5szm.js";const u=JSON.parse('{"title":"Ai 流程编排","description":"","frontmatter":{},"headers":[],"relativePath":"src/guide/flow.md","filePath":"src/guide/flow.md","lastUpdated":1721207284000}'),r={name:"src/guide/flow.md"},s=o("",9),c=[s];function p(l,_,n,d,m,f){return t(),e("div",null,c)}const A=a(r,[["render",p]]);export{u as __pageData,A as default};
import{_ as a,c as e,o as t,a5 as o,ab as i}from"./chunks/framework.C_oE5szm.js";const u=JSON.parse('{"title":"Ai 流程编排","description":"","frontmatter":{},"headers":[],"relativePath":"src/guide/flow.md","filePath":"src/guide/flow.md","lastUpdated":1721271330000}'),r={name:"src/guide/flow.md"},s=o("",9),c=[s];function p(l,_,n,d,m,f){return t(),e("div",null,c)}const A=a(r,[["render",p]]);export{u as __pageData,A as default};
@@ -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 &quot;数据初始化&quot;">​</a></h1><p>有些功能模块上线时,需要初始化一些数据</p><p>可以在 resources 下的 cool/data/db 目录创建 demo.json 文件</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":1721036629000}'),p={name:"src/guide/initData.md"},l=n(`<h1 id="数据初始化" tabindex="-1">数据初始化 <a class="header-anchor" href="#数据初始化" aria-label="Permalink to &quot;数据初始化&quot;">​</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;"> &quot;demo&quot;</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;"> &quot;keyName&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;rich&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
@@ -30,4 +30,4 @@ import{_ as s,c as i,o as a,a5 as n}from"./chunks/framework.C_oE5szm.js";const g
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> log.</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">info</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;数据初始化完成!&quot;</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:#6A737D;--shiki-dark:#6A737D;"> //......</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">}</span></span></code></pre></div><blockquote><p>注意:如果同一张表历史已经有初始化过数据,在某个版本需要新增数据的话,要新增一个.json 文件;<br> 比如 demoV2.json, 如果在原文件直接修改将不生效,加载成功后文件名称将被当作唯一键标识,不会重复初始化。</p></blockquote>`,10),t=[l];function h(k,e,E,r,d,o){return a(),i("div",null,t)}const y=s(p,[["render",h]]);export{g as __pageData,y as default};
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">}</span></span></code></pre></div><blockquote><p>注意:如果同一张表历史已经有初始化过数据,在某个版本需要新增数据的话,要新增一个.json 文件;<br> 比如 demoV2.json, 如果在原文件直接修改将不生效,加载成功后文件名称将被当作唯一键标识,不会重复初始化。</p></blockquote>`,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};
@@ -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,r,d,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":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};
@@ -1,4 +1,4 @@
import{_ as s,c as i,o as a,a5 as n,ac as l}from"./chunks/framework.C_oE5szm.js";const c=JSON.parse('{"title":"扩展插件","description":"","frontmatter":{},"headers":[],"relativePath":"src/guide/plugin.md","filePath":"src/guide/plugin.md","lastUpdated":1721036629000}'),p={name:"src/guide/plugin.md"},t=n('<h1 id="扩展插件" tabindex="-1">扩展插件 <a class="header-anchor" href="#扩展插件" aria-label="Permalink to &quot;扩展插件&quot;">​</a></h1><p>为了丰富系统功能,我们提供了插件系统,可以通过插件的方式来扩展系统功能。</p><p>而不用一味地堆功能,导致系统臃肿。你可以自己开发插件,也可以使用别人开发的插件。</p><p><a href="https://cool-js.com/plugin" target="_blank" rel="noreferrer">点击前往插件市场</a></p><h2 id="使用插件" tabindex="-1">使用插件 <a class="header-anchor" href="#使用插件" aria-label="Permalink to &quot;使用插件&quot;">​</a></h2><h3 id="_1、安装" tabindex="-1">1、安装 <a class="header-anchor" href="#_1、安装" aria-label="Permalink to &quot;1、安装&quot;">​</a></h3><p>首先下载插件包,然后在系统中安装插件包。插件包可以通过官网<a href="https://cool-js.com/plugin" target="_blank" rel="noreferrer">下载插件</a>。</p><p>打开后台管理系统,点击左侧菜单<code>扩展管理</code>/<code>插件管理</code>,点击+按钮,选择插件包进行安装。</p><p><img src="'+l+`" alt=""></p><h3 id="_2、调用" tabindex="-1">2、调用 <a class="header-anchor" href="#_2、调用" aria-label="Permalink to &quot;2、调用&quot;">​</a></h3><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;">package</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> com.cool.core.base.controller;</span></span>
import{_ as s,c as i,o as a,a5 as n,ac as l}from"./chunks/framework.C_oE5szm.js";const c=JSON.parse('{"title":"扩展插件","description":"","frontmatter":{},"headers":[],"relativePath":"src/guide/plugin.md","filePath":"src/guide/plugin.md","lastUpdated":1721271330000}'),p={name:"src/guide/plugin.md"},t=n('<h1 id="扩展插件" tabindex="-1">扩展插件 <a class="header-anchor" href="#扩展插件" aria-label="Permalink to &quot;扩展插件&quot;">​</a></h1><p>为了丰富系统功能,我们提供了插件系统,可以通过插件的方式来扩展系统功能。</p><p>而不用一味地堆功能,导致系统臃肿。你可以自己开发插件,也可以使用别人开发的插件。</p><p><a href="https://cool-js.com/plugin" target="_blank" rel="noreferrer">点击前往插件市场</a></p><h2 id="使用插件" tabindex="-1">使用插件 <a class="header-anchor" href="#使用插件" aria-label="Permalink to &quot;使用插件&quot;">​</a></h2><h3 id="_1、安装" tabindex="-1">1、安装 <a class="header-anchor" href="#_1、安装" aria-label="Permalink to &quot;1、安装&quot;">​</a></h3><p>首先下载插件包,然后在系统中安装插件包。插件包可以通过官网<a href="https://cool-js.com/plugin" target="_blank" rel="noreferrer">下载插件</a>。</p><p>打开后台管理系统,点击左侧菜单<code>扩展管理</code>/<code>插件管理</code>,点击+按钮,选择插件包进行安装。</p><p><img src="'+l+`" alt=""></p><h3 id="_2、调用" tabindex="-1">2、调用 <a class="header-anchor" href="#_2、调用" aria-label="Permalink to &quot;2、调用&quot;">​</a></h3><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;">package</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> com.cool.core.base.controller;</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">import</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> cn.hutool.core.util.ObjUtil;</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">import</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> com.cool.core.util.CoolPluginInvokers;</span></span>
@@ -1 +1 @@
import{_ as s,c as i,o as a,a5 as n,ac as l}from"./chunks/framework.C_oE5szm.js";const c=JSON.parse('{"title":"扩展插件","description":"","frontmatter":{},"headers":[],"relativePath":"src/guide/plugin.md","filePath":"src/guide/plugin.md","lastUpdated":1721036629000}'),p={name:"src/guide/plugin.md"},t=n("",64),h=[t];function k(e,E,r,d,g,o){return a(),i("div",null,h)}const u=s(p,[["render",k]]);export{c as __pageData,u as default};
import{_ as s,c as i,o as a,a5 as n,ac as l}from"./chunks/framework.C_oE5szm.js";const c=JSON.parse('{"title":"扩展插件","description":"","frontmatter":{},"headers":[],"relativePath":"src/guide/plugin.md","filePath":"src/guide/plugin.md","lastUpdated":1721271330000}'),p={name:"src/guide/plugin.md"},t=n("",64),h=[t];function k(e,E,r,d,g,o){return a(),i("div",null,h)}const u=s(p,[["render",k]]);export{c as __pageData,u as default};
@@ -1,4 +1,4 @@
import{_ as a,c as s,o as i,a5 as e,ad as n,ae as l}from"./chunks/framework.C_oE5szm.js";const E=JSON.parse('{"title":"快速开始","description":"","frontmatter":{},"headers":[],"relativePath":"src/guide/quick.md","filePath":"src/guide/quick.md","lastUpdated":1721036629000}'),t={name:"src/guide/quick.md"},p=e(`<h1 id="快速开始" tabindex="-1">快速开始 <a class="header-anchor" href="#快速开始" aria-label="Permalink to &quot;快速开始&quot;">​</a></h1><p>开始使用 Cool-Admin!!!</p><h2 id="环境准备" tabindex="-1">环境准备 <a class="header-anchor" href="#环境准备" aria-label="Permalink to &quot;环境准备&quot;">​</a></h2><ul><li>Java Jdk &gt;= 17 (注意:选择 GraalVM)</li><li>Mysql &gt;= 5.7 (推荐 8.0)</li><li>Maven &gt;= 3.6 (推荐 3.9)</li></ul><h2 id="运行系统" tabindex="-1">运行系统 <a class="header-anchor" href="#运行系统" aria-label="Permalink to &quot;运行系统&quot;">​</a></h2><h3 id="_1、拉取源码" tabindex="-1">1、拉取源码 <a class="header-anchor" href="#_1、拉取源码" aria-label="Permalink to &quot;1、拉取源码&quot;">​</a></h3><p>项目是前后端分离的,需要分别拉取前后端代码到本地,<a href="/src/introduce/src.html">源码仓库</a></p><h3 id="_2、配置数据库" tabindex="-1">2、配置数据库 <a class="header-anchor" href="#_2、配置数据库" aria-label="Permalink to &quot;2、配置数据库&quot;">​</a></h3><p>后端修改数据库配置,配置文件位于<code>src/resources/application-local.yml</code></p><p>以 Mysql 为例,其他数据库适配中...</p><p>Mysql(<code>&gt;=5.7版本</code>),建议 8.0,首次启动会自动初始化并导入数据</p><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:#6A737D;--shiki-dark:#6A737D;"># mysql,驱动已经内置,无需安装</span></span>
import{_ as a,c as s,o as i,a5 as e,ad as n,ae as l}from"./chunks/framework.C_oE5szm.js";const E=JSON.parse('{"title":"快速开始","description":"","frontmatter":{},"headers":[],"relativePath":"src/guide/quick.md","filePath":"src/guide/quick.md","lastUpdated":1721271330000}'),t={name:"src/guide/quick.md"},p=e(`<h1 id="快速开始" tabindex="-1">快速开始 <a class="header-anchor" href="#快速开始" aria-label="Permalink to &quot;快速开始&quot;">​</a></h1><p>开始使用 Cool-Admin!!!</p><h2 id="环境准备" tabindex="-1">环境准备 <a class="header-anchor" href="#环境准备" aria-label="Permalink to &quot;环境准备&quot;">​</a></h2><ul><li>Java Jdk &gt;= 17 (注意:选择 GraalVM)</li><li>Mysql &gt;= 5.7 (推荐 8.0)</li><li>Maven &gt;= 3.6 (推荐 3.9)</li></ul><h2 id="运行系统" tabindex="-1">运行系统 <a class="header-anchor" href="#运行系统" aria-label="Permalink to &quot;运行系统&quot;">​</a></h2><h3 id="_1、拉取源码" tabindex="-1">1、拉取源码 <a class="header-anchor" href="#_1、拉取源码" aria-label="Permalink to &quot;1、拉取源码&quot;">​</a></h3><p>项目是前后端分离的,需要分别拉取前后端代码到本地,<a href="/src/introduce/src.html">源码仓库</a></p><h3 id="_2、配置数据库" tabindex="-1">2、配置数据库 <a class="header-anchor" href="#_2、配置数据库" aria-label="Permalink to &quot;2、配置数据库&quot;">​</a></h3><p>后端修改数据库配置,配置文件位于<code>src/resources/application-local.yml</code></p><p>以 Mysql 为例,其他数据库适配中...</p><p>Mysql(<code>&gt;=5.7版本</code>),建议 8.0,首次启动会自动初始化并导入数据</p><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:#6A737D;--shiki-dark:#6A737D;"># mysql,驱动已经内置,无需安装</span></span>
<span class="line"><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;">spring</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;"> datasource</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;"> url</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">jdbc:mysql://127.0.0.1:3306/cool?useUnicode=true&amp;characterEncoding=UTF-8&amp;serverTimezone=GMT%2b8</span></span>
@@ -1 +1 @@
import{_ as a,c as s,o as i,a5 as e,ad as n,ae as l}from"./chunks/framework.C_oE5szm.js";const E=JSON.parse('{"title":"快速开始","description":"","frontmatter":{},"headers":[],"relativePath":"src/guide/quick.md","filePath":"src/guide/quick.md","lastUpdated":1721036629000}'),t={name:"src/guide/quick.md"},p=e("",24),r=[p];function h(o,c,d,k,g,u){return i(),s("div",null,r)}const _=a(t,[["render",h]]);export{E as __pageData,_ as default};
import{_ as a,c as s,o as i,a5 as e,ad as n,ae as l}from"./chunks/framework.C_oE5szm.js";const E=JSON.parse('{"title":"快速开始","description":"","frontmatter":{},"headers":[],"relativePath":"src/guide/quick.md","filePath":"src/guide/quick.md","lastUpdated":1721271330000}'),t={name:"src/guide/quick.md"},p=e("",24),r=[p];function h(o,c,d,k,g,u){return i(),s("div",null,r)}const _=a(t,[["render",h]]);export{E as __pageData,_ as default};
@@ -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"},k=n(`<h1 id="权限校验" tabindex="-1">权限校验 <a class="header-anchor" href="#权限校验" aria-label="Permalink to &quot;权限校验&quot;">​</a></h1><p>采用 spring-security 与 jwt 作为框架安全与权限校验。</p><h2 id="配置" tabindex="-1">配置 <a class="header-anchor" href="#配置" aria-label="Permalink to &quot;配置&quot;">​</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":1721036629000}'),h={name:"src/guide/security.md"},t=n(`<h1 id="权限校验" tabindex="-1">权限校验 <a class="header-anchor" href="#权限校验" aria-label="Permalink to &quot;权限校验&quot;">​</a></h1><p>采用 spring-security 与 jwt 作为框架安全与权限校验。</p><h2 id="配置" tabindex="-1">配置 <a class="header-anchor" href="#配置" aria-label="Permalink to &quot;配置&quot;">​</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>
@@ -205,10 +205,21 @@ 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;"> public</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> AuthenticationManager </span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">authenticationManager</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(AuthenticationConfiguration </span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">config</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">throws</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> Exception {</span></span>
<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 &quot;当前用户&quot;">​</a></h2><ul><li>获得用户名</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:#24292E;--shiki-dark:#E1E4E8;">}</span></span></code></pre></div><h2 id="当前用户" tabindex="-1">当前用户 <a class="header-anchor" href="#当前用户" aria-label="Permalink to &quot;当前用户&quot;">​</a></h2><p>获取当前用户信息</p><h3 id="后端用户" tabindex="-1">后端用户 <a class="header-anchor" href="#后端用户" aria-label="Permalink to &quot;后端用户&quot;">​</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;">&quot;/person&quot;</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>`,20),l=[k];function t(p,e,E,r,d,g){return a(),i("div",null,l)}const F=s(h,[["render",t]]);export{c as __pageData,F as default};
<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 &quot;应用用户&quot;">​</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;">&quot;/xxx&quot;</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 &quot;忽略 token&quot;">​</a></h2><p>开放接口,忽略 token 校验</p><h3 id="方法上" tabindex="-1">方法上 <a class="header-anchor" href="#方法上" aria-label="Permalink to &quot;方法上&quot;">​</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;">&quot;/eps&quot;</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>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">}</span></span></code></pre></div><h3 id="类上" tabindex="-1">类上 <a class="header-anchor" href="#类上" aria-label="Permalink to &quot;类上&quot;">​</a></h3><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:#6A737D;--shiki-dark:#6A737D;">/**</span></span>
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> * 字典信息</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;">@</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;">&quot;page&quot;</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;">&quot;add&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;delete&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;update&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;page&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;list&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;info&quot;</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};
@@ -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"},k=n("",20),l=[k];function t(p,e,E,r,d,g){return a(),i("div",null,l)}const F=s(h,[["render",t]]);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":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};
@@ -1 +1 @@
import{_ as a,c as e,o,a5 as t}from"./chunks/framework.C_oE5szm.js";const _=JSON.parse('{"title":"源码","description":"","frontmatter":{},"headers":[],"relativePath":"src/introduce/src.md","filePath":"src/introduce/src.md","lastUpdated":1721038889000}'),r={name:"src/introduce/src.md"},c=t('<h1 id="源码" tabindex="-1">源码 <a class="header-anchor" href="#源码" aria-label="Permalink to &quot;源码&quot;">​</a></h1><p>项目是开源免费、可商用、无需授权的,为了使项目能够持续,不要吝啬你们免费的<code>Star</code>哦!!!你的<code>Star</code>是我们最大的动力!!!</p><h2 id="后端-点个-star-哦" tabindex="-1">后端(点个 Star 哦) <a class="header-anchor" href="#后端-点个-star-哦" aria-label="Permalink to &quot;后端(点个 Star 哦)&quot;">​</a></h2><p><a href="https://github.com/cool-team-official/cool-admin-java" target="_blank" rel="noreferrer">https://github.com/cool-team-official/cool-admin-java</a></p><p>或</p><p><a href="https://gitee.com/cool-team-official/cool-admin-java" target="_blank" rel="noreferrer">https://gitee.com/cool-team-official/cool-admin-java</a></p><h2 id="前端-点个-star-哦" tabindex="-1">前端(点个 Star 哦) <a class="header-anchor" href="#前端-点个-star-哦" aria-label="Permalink to &quot;前端(点个 Star 哦)&quot;">​</a></h2><p><a href="https://vue.cool-admin.com" target="_blank" rel="noreferrer">点击前往前端项目详细文档</a></p><p><a href="https://github.com/cool-team-official/cool-admin-vue" target="_blank" rel="noreferrer">https://github.com/cool-team-official/cool-admin-vue</a></p><p>或</p><p><a href="https://gitee.com/cool-team-official/cool-admin-vue" target="_blank" rel="noreferrer">https://gitee.com/cool-team-official/cool-admin-vue</a></p><h2 id="文档-star-哦" tabindex="-1">文档 (Star 哦) <a class="header-anchor" href="#文档-star-哦" aria-label="Permalink to &quot;文档 (Star 哦)&quot;">​</a></h2><p>如果文档有缺失,欢迎提交<code>pr</code>,您的贡献可能会给其他人来带巨大的帮助。</p><p><a href="https://github.com/cool-team-official/cool-admin-java-docs" target="_blank" rel="noreferrer">https://github.com/cool-team-official/cool-admin-java-docs</a></p><p>或</p><p><a href="https://gitee.com/cool-team-official/cool-admin-java-docs" target="_blank" rel="noreferrer">https://gitee.com/cool-team-official/cool-admin-java-docs</a></p>',16),i=[c];function l(n,s,d,h,m,f){return o(),e("div",null,i)}const u=a(r,[["render",l]]);export{_ as __pageData,u as default};
import{_ as a,c as e,o,a5 as t}from"./chunks/framework.C_oE5szm.js";const _=JSON.parse('{"title":"源码","description":"","frontmatter":{},"headers":[],"relativePath":"src/introduce/src.md","filePath":"src/introduce/src.md","lastUpdated":1721271330000}'),r={name:"src/introduce/src.md"},c=t('<h1 id="源码" tabindex="-1">源码 <a class="header-anchor" href="#源码" aria-label="Permalink to &quot;源码&quot;">​</a></h1><p>项目是开源免费、可商用、无需授权的,为了使项目能够持续,不要吝啬你们免费的<code>Star</code>哦!!!你的<code>Star</code>是我们最大的动力!!!</p><h2 id="后端-点个-star-哦" tabindex="-1">后端(点个 Star 哦) <a class="header-anchor" href="#后端-点个-star-哦" aria-label="Permalink to &quot;后端(点个 Star 哦)&quot;">​</a></h2><p><a href="https://github.com/cool-team-official/cool-admin-java" target="_blank" rel="noreferrer">https://github.com/cool-team-official/cool-admin-java</a></p><p>或</p><p><a href="https://gitee.com/cool-team-official/cool-admin-java" target="_blank" rel="noreferrer">https://gitee.com/cool-team-official/cool-admin-java</a></p><h2 id="前端-点个-star-哦" tabindex="-1">前端(点个 Star 哦) <a class="header-anchor" href="#前端-点个-star-哦" aria-label="Permalink to &quot;前端(点个 Star 哦)&quot;">​</a></h2><p><a href="https://vue.cool-admin.com" target="_blank" rel="noreferrer">点击前往前端项目详细文档</a></p><p><a href="https://github.com/cool-team-official/cool-admin-vue" target="_blank" rel="noreferrer">https://github.com/cool-team-official/cool-admin-vue</a></p><p>或</p><p><a href="https://gitee.com/cool-team-official/cool-admin-vue" target="_blank" rel="noreferrer">https://gitee.com/cool-team-official/cool-admin-vue</a></p><h2 id="文档-star-哦" tabindex="-1">文档 (Star 哦) <a class="header-anchor" href="#文档-star-哦" aria-label="Permalink to &quot;文档 (Star 哦)&quot;">​</a></h2><p>如果文档有缺失,欢迎提交<code>pr</code>,您的贡献可能会给其他人来带巨大的帮助。</p><p><a href="https://github.com/cool-team-official/cool-admin-java-docs" target="_blank" rel="noreferrer">https://github.com/cool-team-official/cool-admin-java-docs</a></p><p>或</p><p><a href="https://gitee.com/cool-team-official/cool-admin-java-docs" target="_blank" rel="noreferrer">https://gitee.com/cool-team-official/cool-admin-java-docs</a></p>',16),i=[c];function l(n,s,d,h,m,f){return o(),e("div",null,i)}const u=a(r,[["render",l]]);export{_ as __pageData,u as default};
@@ -1 +1 @@
import{_ as a,c as e,o,a5 as t}from"./chunks/framework.C_oE5szm.js";const _=JSON.parse('{"title":"源码","description":"","frontmatter":{},"headers":[],"relativePath":"src/introduce/src.md","filePath":"src/introduce/src.md","lastUpdated":1721038889000}'),r={name:"src/introduce/src.md"},c=t("",16),i=[c];function l(n,s,d,h,m,f){return o(),e("div",null,i)}const u=a(r,[["render",l]]);export{_ as __pageData,u as default};
import{_ as a,c as e,o,a5 as t}from"./chunks/framework.C_oE5szm.js";const _=JSON.parse('{"title":"源码","description":"","frontmatter":{},"headers":[],"relativePath":"src/introduce/src.md","filePath":"src/introduce/src.md","lastUpdated":1721271330000}'),r={name:"src/introduce/src.md"},c=t("",16),i=[c];function l(n,s,d,h,m,f){return o(),e("div",null,i)}const u=a(r,[["render",l]]);export{_ as __pageData,u as default};
+1 -1
View File
@@ -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":"B5-DSy9r","src_guide_initdata.md":"CWyYHbHt","src_guide_plugin.md":"BgdN93zb","src_guide_quick.md":"CV5apjpb","src_guide_security.md":"D2ao104D","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":"Dwye19I0","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":"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"}
+3 -3
View File
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+4 -4
View File
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+4 -4
View File
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+5 -5
View File
File diff suppressed because one or more lines are too long
+4 -4
View File
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+4 -4
View File
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -2,7 +2,7 @@
有些功能模块上线时,需要初始化一些数据
可以在 resources 下的 cool/data/db 目录创建 demo.json 文件
可以在 resources 下的 `cool/data/db` 目录创建 `demo.json` 文件
json 格式如下,demo 为表的名称,里面是个数组,数组里可以包含多个对象,每个对象中的 key 为表的字段,value 为对应的值
+54 -1
View File
@@ -243,7 +243,18 @@ public class JwtSecurityConfig {
## 当前用户
- 获得用户名
获取当前用户信息
### 后端用户
- Controller 中获得
```java
@GetMapping("/person")
public R person(@RequestAttribute() Long adminUserId)
```
- Security 方式
```java
@Resource
@@ -270,3 +281,45 @@ userInfo
| username | String | 用户名 |
| userId | Long | 用户 ID |
| passwordVersion | Integer | 密码版本号 |
### 应用用户
- Controller 中获得
```java
@GetMapping("/xxx")
public R xxx(@RequestAttribute() Long appUserId)
```
## 忽略 token
开放接口,忽略 token 校验
### 方法上
通过在方法上加`TokenIgnore`注解可以的接口不会进行 token 校验
```java
@TokenIgnore
@GetMapping("/eps")
public R eps() {
return R.ok(coolEps.getApp());
}
```
### 类上
也可以注解在类上
```java
/**
* 字典信息
*/
@TokenIgnore(value = {"page"})
@CoolRestController(api = {"add", "delete", "update", "page", "list", "info"})
public class AdminDictInfoController{ }
```
::: warning 注意
无论是注解在方法还是类上,都必须配合`CoolRestController`使用,其它的无效
:::