u
This commit is contained in:
1 parent
330c4d09fa
commit
5753f8c90f
14 files changed
+1289
-130
No files matched your search
@@ -24,10 +24,9 @@
|
||||
<plugin>
|
||||
<groupId>com.ly.smart-doc</groupId>
|
||||
<artifactId>smart-doc-maven-plugin</artifactId>
|
||||
<!-- ✅ 不需要写 <version> -->
|
||||
<configuration>
|
||||
<configFile>src/main/resources/smart-doc.json</configFile>
|
||||
<projectName>crane-web 接口文档</projectName>
|
||||
<!--指定生成文档的使用的配置文件-->
|
||||
<configFile>${basedir}/src/main/resources/smart-doc.json</configFile>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
|
||||
@@ -1,18 +0,0 @@
|
||||
springdoc:
|
||||
swagger-ui:
|
||||
path: /swagger-ui.html
|
||||
tags-sorter: alpha
|
||||
operations-sorter: alpha
|
||||
api-docs:
|
||||
path: /v3/api-docs
|
||||
# knife4j的增强配置,不需要增强可以不配
|
||||
knife4j:
|
||||
enable: true
|
||||
setting:
|
||||
language: zh_cn
|
||||
swagger-model-name: 实体类列表
|
||||
footer-custom-content: Apache License 2.0
|
||||
basic:
|
||||
enable: true
|
||||
username: root
|
||||
password: root
|
||||
File renamed without changes.
File renamed without changes.
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1 @@
|
||||
<!DOCTYPE html><html lang="en"><head><meta charset="UTF-8"><meta content="width=device-width, initial-scale=1.0"name="viewport"><meta content="smart-doc"name="generator"><title>crane-common</title><link href="font.css"rel="stylesheet"><link href="AllInOne.css?v=1750821868121"rel="stylesheet"/><style>.literalblock pre,.listingblock pre:not(.highlight),.listingblock pre[class="highlight"],.listingblock pre[class^="highlight "],.listingblock pre.CodeRay,.listingblock pre.prettyprint{background:#f7f7f8}.hljs{padding:0}</style><script src="highlight.min.js"></script><script src="jquery.min.js"></script></head><body class="book toc2 toc-left"><div id="header"><h1>crane-common</h1><div class="toc2"id="toc"><div id="book-search-input"><input id="search"placeholder="Type to search"type="text"></div><div id="toctitle"><span>API Reference</span></div><ul class="sectlevel1"id="accordion"></ul></div></div><div id="content"><div id="preamble"><div class="sectionbody"><table class="tableblock frame-all grid-all spread"><colgroup><col style="width: 20%;"><col style="width: 20%;"><col style="width: 20%;"><col style="width: 20%;"><col style="width: 20%;"></colgroup><thead><tr><th class="tableblock halign-left valign-top">Version</th><th class="tableblock halign-left valign-top">Update Time</th><th class="tableblock halign-left valign-top">Status</th><th class="tableblock halign-left valign-top">Author</th><th class="tableblock halign-left valign-top">Description</th></tr></thead><tbody><tr><td class="tableblock halign-left valign-top"><p class="tableblock">v2025-06-25 11:24:28</p></td><td class="tableblock halign-left valign-top"><p class="tableblock">2025-06-25 11:24:28</p></td><td class="tableblock halign-left valign-top"><p class="tableblock">auto</p></td><td class="tableblock halign-left valign-top"><p class="tableblock">@Administrator</p></td><td class="tableblock halign-left valign-top"><p class="tableblock">Created by smart-doc</p></td></tr></tbody></table></div></div><footer class="page-footer"><span class="copyright">Generated by smart-doc at 2025-06-25 11:24:28</span><span class="footer-modification">Suggestions,contact,support and error reporting on<a href="https://gitee.com/smart-doc-team/smart-doc"target="_blank"> Gitee </a>or<a href="https://github.com/smart-doc-group/smart-doc.git"target="_blank"> Github</a></span></footer><div href="javascript:void(0)"id="toTop"><img id="upArrow"src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAABlUlEQVRIS+2UvUvDQBiH398Rly4udnARwUXs4qAIOigI4iL30dTZ2T9AcNPVvUsXF7uYttdScNDFRRAnB11cFFwKxcXBJTQnJ6lEbRI/CIiY9e6e5/e+9+ZAGX/ImE9/QKCU2jfGbGTQqq4xZgtSyisiKmQgIAAVCCFWAGxnIOhqrdd/xyUrpRZsP40xSwA6AI57vd5eq9W6T6s8tQIppSKi+gDQNREprfVNkiRRwDlfY4xZ+FAIuSOi8Qjw0nEc5XnebZwkViClXA2T5+xhY8xus9ncEUJMAziITN5FEARuXLsGCoQQywBs8uEovJ+Scz7FGDuMSM4cx3E9z+u8r+SDQEq5SEQ1IhoZBE+QnBKRq7V+iEreCDjn84wxCx9NgidITnK5nFutVh/7e14FSqnZIAhqAMY+A4+TADjyfb/Ubref7J4XQXhxNvnEV+AJlbTy+XypUqn4KBaLBZuciCa/A0+opN5oNFz7FpUBbP4EHicxxsyAcz7HGDvvz3nar5+2Ho5wOQwsU5+KNGDa+r8grUP0DBLjtRtNKEliAAAAAElFTkSuQmCC"><span id="upText">Top</span></div></div><script src="search.js?v=1750821868121"></script><script>$(function(){const Accordion=function(el,multiple){this.el=el||{};this.multiple=multiple||false;const links=this.el.find(".dd");links.on("click",{el:this.el,multiple:this.multiple},this.dropdown)};Accordion.prototype.dropdown=function(e){const $el=e.data.el;const $this=$(this),$next=$this.next();$next.slideToggle();$this.parent().toggleClass("open");if(!e.data.multiple){$el.find(".submenu").not($next).slideUp("20").parent().removeClass("open")}};new Accordion($("#accordion"),false);hljs.highlightAll();$(window).scroll(function(){if($(window).scrollTop()>100){let $toTop=$("#toTop");$toTop.fadeIn(1500);$toTop.hover(function(){$("#upArrow").hide();$("#upText").show()},function(){$("#upArrow").show();$("#upText").hide()})}else{$("#toTop").fadeOut(1500)}});$("#toTop").click(function(){$("body, html").animate({scrollTop:0},1000);return false})});</script></body></html>
|
||||
@@ -1 +0,0 @@
|
||||
<!DOCTYPE html><html lang="en"><head><meta charset="UTF-8"><meta content="width=device-width, initial-scale=1.0" name="viewport"><meta content="smart-doc" name="generator"><title>crane-web 接口文档</title><link href="font.css?v=1750757297755" rel="stylesheet"><link href="AllInOne.css?v=1750757297755" rel="stylesheet"/><script src="jquery.min.js"></script></head><body class="book toc2 toc-left"><div id="header"><h1>crane-web 接口文档</h1><div class="toc2" id="toc"><div id="book-search-input"><input id="search" placeholder="Type to search" type="text"></div><div id="toctitle"><span>API Reference</span></div><ul class="sectlevel1" id="accordion"><li><a href="#_add_dependency">1. Add dependency</a></li></ul></div></div><div id="content"><div id="preamble"><div class="sectionbody"><table class="tableblock frame-all grid-all spread"><colgroup><col style="width: 20%;"><col style="width: 20%;"><col style="width: 20%;"><col style="width: 20%;"><col style="width: 20%;"></colgroup><thead><tr><th class="tableblock halign-left valign-top">Version</th><th class="tableblock halign-left valign-top">Update Time</th><th class="tableblock halign-left valign-top">Status</th><th class="tableblock halign-left valign-top">Author</th><th class="tableblock halign-left valign-top">Description</th></tr></thead><tbody><tr><td class="tableblock halign-left valign-top"><p class="tableblock">v2025-06-24 17:28:17</p></td><td class="tableblock halign-left valign-top"><p class="tableblock">2025-06-24 17:28:17</p></td><td class="tableblock halign-left valign-top"><p class="tableblock">auto</p></td><td class="tableblock halign-left valign-top"><p class="tableblock">@Administrator</p></td><td class="tableblock halign-left valign-top"><p class="tableblock">Created by smart-doc</p></td></tr></tbody></table></div></div><footer class="page-footer"><span class="copyright">Generated by smart-doc at 2025-06-24 17:28:17</span><span class="footer-modification">Suggestions,contact,support and error reporting on<a href="https://gitee.com/smart-doc-team/smart-doc" target="_blank"> Gitee</a> or<a href="https://github.com/smart-doc-group/smart-doc.git" target="_blank"> Github</a></span></footer><div href="javascript:void(0)" id="toTop"><img id="upArrow" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAABlUlEQVRIS+2UvUvDQBiH398Rly4udnARwUXs4qAIOigI4iL30dTZ2T9AcNPVvUsXF7uYttdScNDFRRAnB11cFFwKxcXBJTQnJ6lEbRI/CIiY9e6e5/e+9+ZAGX/ImE9/QKCU2jfGbGTQqq4xZgtSyisiKmQgIAAVCCFWAGxnIOhqrdd/xyUrpRZsP40xSwA6AI57vd5eq9W6T6s8tQIppSKi+gDQNREprfVNkiRRwDlfY4xZ+FAIuSOi8Qjw0nEc5XnebZwkViClXA2T5+xhY8xus9ncEUJMAziITN5FEARuXLsGCoQQywBs8uEovJ+Scz7FGDuMSM4cx3E9z+u8r+SDQEq5SEQ1IhoZBE+QnBKRq7V+iEreCDjn84wxCx9NgidITnK5nFutVh/7e14FSqnZIAhqAMY+A4+TADjyfb/Ubref7J4XQXhxNvnEV+AJlbTy+XypUqn4KBaLBZuciCa/A0+opN5oNFz7FpUBbP4EHicxxsyAcz7HGDvvz3nar5+2Ho5wOQwsU5+KNGDa+r8grUP0DBLjtRtNKEliAAAAAElFTkSuQmCC"><span id="upText">Top</span></div></div><script src="search.js?v=1750757297755"></script><script>$(function () {const Accordion = function (el, multiple) { this.el = el || {}; this.multiple = multiple || false; const links = this.el.find(".dd"); links.on("click", {el: this.el, multiple: this.multiple}, this.dropdown) }; Accordion.prototype.dropdown = function (e) { const $el = e.data.el; $this = $(this), $next = $this.next(); $next.slideToggle(); $this.parent().toggleClass("open"); if (!e.data.multiple) {$el.find(".submenu").not($next).slideUp("20").parent().removeClass("open") }};new Accordion($("#accordion"), false);$(window).scroll(function () { if ($(window).scrollTop() > 100) {$("#toTop").fadeIn(1500);$("#toTop").hover(function () { $("#upArrow").hide(); $("#upText").show()}, function () { $("#upArrow").show(); $("#upText").hide()}) } else {$("#toTop").fadeOut(1500)}});$("#toTop").click(function () { $("body, html").animate({scrollTop: 0}, 1000); return false})});</script></body></html>
|
||||
@@ -1,97 +0,0 @@
|
||||
let api = [];
|
||||
api.push({
|
||||
alias: 'Add dependency',
|
||||
order: '1',
|
||||
link: 'add_dependency',
|
||||
desc: 'Add dependency',
|
||||
list: []
|
||||
})
|
||||
document.onkeydown = keyDownSearch;
|
||||
function keyDownSearch(e) {
|
||||
const theEvent = e;
|
||||
const code = theEvent.keyCode || theEvent.which || theEvent.charCode;
|
||||
if (code == 13) {
|
||||
const search = document.getElementById('search');
|
||||
const searchValue = search.value;
|
||||
let searchArr = [];
|
||||
for (let i = 0; i < api.length; i++) {
|
||||
let apiData = api[i];
|
||||
const desc = apiData.desc;
|
||||
if (desc.indexOf(searchValue) > -1) {
|
||||
searchArr.push({
|
||||
order: apiData.order,
|
||||
desc: apiData.desc,
|
||||
link: apiData.link,
|
||||
list: apiData.list
|
||||
});
|
||||
} else {
|
||||
let methodList = apiData.list || [];
|
||||
let methodListTemp = [];
|
||||
for (let j = 0; j < methodList.length; j++) {
|
||||
const methodData = methodList[j];
|
||||
const methodDesc = methodData.desc;
|
||||
if (methodDesc.indexOf(searchValue) > -1) {
|
||||
methodListTemp.push(methodData);
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (methodListTemp.length > 0) {
|
||||
const data = {
|
||||
order: apiData.order,
|
||||
desc: apiData.desc,
|
||||
link: apiData.link,
|
||||
list: methodListTemp
|
||||
};
|
||||
searchArr.push(data);
|
||||
}
|
||||
}
|
||||
}
|
||||
let html;
|
||||
if (searchValue == '') {
|
||||
const liClass = "";
|
||||
const display = "display: none";
|
||||
html = buildAccordion(api,liClass,display);
|
||||
document.getElementById('accordion').innerHTML = html;
|
||||
} else {
|
||||
const liClass = "open";
|
||||
const display = "display: block";
|
||||
html = buildAccordion(searchArr,liClass,display);
|
||||
document.getElementById('accordion').innerHTML = html;
|
||||
}
|
||||
const Accordion = function (el, multiple) {
|
||||
this.el = el || {};
|
||||
this.multiple = multiple || false;
|
||||
const links = this.el.find('.dd');
|
||||
links.on('click', {el: this.el, multiple: this.multiple}, this.dropdown);
|
||||
};
|
||||
Accordion.prototype.dropdown = function (e) {
|
||||
const $el = e.data.el;
|
||||
$this = $(this), $next = $this.next();
|
||||
$next.slideToggle();
|
||||
$this.parent().toggleClass('open');
|
||||
if (!e.data.multiple) {
|
||||
$el.find('.submenu').not($next).slideUp("20").parent().removeClass('open');
|
||||
}
|
||||
};
|
||||
new Accordion($('#accordion'), false);
|
||||
}
|
||||
}
|
||||
|
||||
function buildAccordion(apiData, liClass, display) {
|
||||
let html = "";
|
||||
let doc;
|
||||
if (apiData.length > 0) {
|
||||
for (let j = 0; j < apiData.length; j++) {
|
||||
html += '<li class="'+liClass+'">';
|
||||
html += '<a class="dd" href="#_' + apiData[j].link + '">' + apiData[j].order + '. ' + apiData[j].desc + '</a>';
|
||||
html += '<ul class="sectlevel2" style="'+display+'">';
|
||||
doc = apiData[j].list;
|
||||
for (let m = 0; m < doc.length; m++) {
|
||||
html += '<li><a href="#_' + apiData[j].order + '_' + doc[m].order + '_' + doc[m].desc + '">' + apiData[j].order + '.' + doc[m].order + '. ' + doc[m].desc + '</a> </li>';
|
||||
}
|
||||
html += '</ul>';
|
||||
html += '</li>';
|
||||
}
|
||||
}
|
||||
return html;
|
||||
}
|
||||
File renamed without changes.
@@ -0,0 +1,154 @@
|
||||
let api = [];
|
||||
const apiDocListSize = 0
|
||||
document.onkeydown = keyDownSearch;
|
||||
function keyDownSearch(e) {
|
||||
const theEvent = e;
|
||||
const code = theEvent.keyCode || theEvent.which || theEvent.charCode;
|
||||
if (code === 13) {
|
||||
const search = document.getElementById('search');
|
||||
const searchValue = search.value.toLocaleLowerCase();
|
||||
|
||||
let searchGroup = [];
|
||||
for (let i = 0; i < api.length; i++) {
|
||||
|
||||
let apiGroup = api[i];
|
||||
|
||||
let searchArr = [];
|
||||
for (let i = 0; i < apiGroup.list.length; i++) {
|
||||
let apiData = apiGroup.list[i];
|
||||
const desc = apiData.desc;
|
||||
if (desc.toLocaleLowerCase().indexOf(searchValue) > -1) {
|
||||
searchArr.push({
|
||||
order: apiData.order,
|
||||
desc: apiData.desc,
|
||||
link: apiData.link,
|
||||
alias: apiData.alias,
|
||||
list: apiData.list
|
||||
});
|
||||
} else {
|
||||
let methodList = apiData.list || [];
|
||||
let methodListTemp = [];
|
||||
for (let j = 0; j < methodList.length; j++) {
|
||||
const methodData = methodList[j];
|
||||
const methodDesc = methodData.desc;
|
||||
if (methodDesc.toLocaleLowerCase().indexOf(searchValue) > -1) {
|
||||
methodListTemp.push(methodData);
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (methodListTemp.length > 0) {
|
||||
const data = {
|
||||
order: apiData.order,
|
||||
desc: apiData.desc,
|
||||
link: apiData.link,
|
||||
alias: apiData.alias,
|
||||
list: methodListTemp
|
||||
};
|
||||
searchArr.push(data);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (apiGroup.name.toLocaleLowerCase().indexOf(searchValue) > -1) {
|
||||
searchGroup.push({
|
||||
name: apiGroup.name,
|
||||
order: apiGroup.order,
|
||||
list: searchArr
|
||||
});
|
||||
continue;
|
||||
}
|
||||
if (searchArr.length === 0) {
|
||||
continue;
|
||||
}
|
||||
searchGroup.push({
|
||||
name: apiGroup.name,
|
||||
order: apiGroup.order,
|
||||
list: searchArr
|
||||
});
|
||||
}
|
||||
let html;
|
||||
if (searchValue === '') {
|
||||
const liClass = "";
|
||||
const display = "display: none";
|
||||
html = buildAccordion(api,liClass,display);
|
||||
document.getElementById('accordion').innerHTML = html;
|
||||
} else {
|
||||
const liClass = "open";
|
||||
const display = "display: block";
|
||||
html = buildAccordion(searchGroup,liClass,display);
|
||||
document.getElementById('accordion').innerHTML = html;
|
||||
}
|
||||
const Accordion = function (el, multiple) {
|
||||
this.el = el || {};
|
||||
this.multiple = multiple || false;
|
||||
const links = this.el.find('.dd');
|
||||
links.on('click', {el: this.el, multiple: this.multiple}, this.dropdown);
|
||||
};
|
||||
Accordion.prototype.dropdown = function (e) {
|
||||
const $el = e.data.el;
|
||||
let $this = $(this), $next = $this.next();
|
||||
$next.slideToggle();
|
||||
$this.parent().toggleClass('open');
|
||||
if (!e.data.multiple) {
|
||||
$el.find('.submenu').not($next).slideUp("20").parent().removeClass('open');
|
||||
}
|
||||
};
|
||||
new Accordion($('#accordion'), false);
|
||||
}
|
||||
}
|
||||
|
||||
function buildAccordion(apiGroups, liClass, display) {
|
||||
let html = "";
|
||||
if (apiGroups.length > 0) {
|
||||
if (apiDocListSize === 1) {
|
||||
let apiData = apiGroups[0].list;
|
||||
let order = apiGroups[0].order;
|
||||
for (let j = 0; j < apiData.length; j++) {
|
||||
html += '<li class="'+liClass+'">';
|
||||
html += '<a class="dd" href="#' + apiData[j].alias + '">' + apiData[j].order + '. ' + apiData[j].desc + '</a>';
|
||||
html += '<ul class="sectlevel2" style="'+display+'">';
|
||||
let doc = apiData[j].list;
|
||||
for (let m = 0; m < doc.length; m++) {
|
||||
let spanString;
|
||||
if (doc[m].deprecated === 'true') {
|
||||
spanString='<span class="line-through">';
|
||||
} else {
|
||||
spanString='<span>';
|
||||
}
|
||||
html += '<li><a href="#' + doc[m].methodId + '">' + apiData[j].order + '.' + doc[m].order + '. ' + spanString + doc[m].desc + '<span></a> </li>';
|
||||
}
|
||||
html += '</ul>';
|
||||
html += '</li>';
|
||||
}
|
||||
} else {
|
||||
for (let i = 0; i < apiGroups.length; i++) {
|
||||
let apiGroup = apiGroups[i];
|
||||
html += '<li class="'+liClass+'">';
|
||||
html += '<a class="dd" href="#_'+apiGroup.order+'_' + apiGroup.name + '">' + apiGroup.order + '. ' + apiGroup.name + '</a>';
|
||||
html += '<ul class="sectlevel1">';
|
||||
|
||||
let apiData = apiGroup.list;
|
||||
for (let j = 0; j < apiData.length; j++) {
|
||||
html += '<li class="'+liClass+'">';
|
||||
html += '<a class="dd" href="#' + apiData[j].alias + '">' +apiGroup.order+'.'+ apiData[j].order + '. ' + apiData[j].desc + '</a>';
|
||||
html += '<ul class="sectlevel2" style="'+display+'">';
|
||||
let doc = apiData[j].list;
|
||||
for (let m = 0; m < doc.length; m++) {
|
||||
let spanString;
|
||||
if (doc[m].deprecated === 'true') {
|
||||
spanString='<span class="line-through">';
|
||||
} else {
|
||||
spanString='<span>';
|
||||
}
|
||||
html += '<li><a href="#' + doc[m].methodId + '">'+apiGroup.order+'.' + apiData[j].order + '.' + doc[m].order + '. ' + spanString + doc[m].desc + '<span></a> </li>';
|
||||
}
|
||||
html += '</ul>';
|
||||
html += '</li>';
|
||||
}
|
||||
|
||||
html += '</ul>';
|
||||
html += '</li>';
|
||||
}
|
||||
}
|
||||
}
|
||||
return html;
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
.hljs{display:block;overflow-x:auto;color:#eaeaea;background:#000;padding:.5em}.hljs-subst{color:#eaeaea}.hljs-emphasis{font-style:italic}.hljs-strong{font-weight:700}.hljs-builtin-name,.hljs-type{color:#eaeaea}.hljs-params{color:#da0000}.hljs-literal,.hljs-name,.hljs-number{color:red;font-weight:bolder}.hljs-comment{color:#969896}.hljs-quote,.hljs-selector-id{color:#0ff}.hljs-template-variable,.hljs-title,.hljs-variable{color:#0ff;font-weight:700}.hljs-keyword,.hljs-selector-class,.hljs-symbol{color:#fff000}.hljs-bullet,.hljs-string{color:#0f0}.hljs-section,.hljs-tag{color:#000fff}.hljs-selector-tag{color:#000fff;font-weight:700}.hljs-attribute,.hljs-built_in,.hljs-link,.hljs-regexp{color:#f0f}.hljs-meta{color:#fff;font-weight:bolder}
|
||||
@@ -2,14 +2,5 @@
|
||||
"serverUrl": "http://localhost:8080",
|
||||
"allInOne": true,
|
||||
"outPath": "src/main/resources/doc",
|
||||
"packageFilters": "com.crane.web.controller",
|
||||
"projectName": "Crane-Web API 文档",
|
||||
"requestHeaders": [
|
||||
{
|
||||
"name": "Authorization",
|
||||
"type": "string",
|
||||
"desc": "认证 token",
|
||||
"required": true
|
||||
}
|
||||
]
|
||||
"packageFilters": "com.crane.web.controller"
|
||||
}
|
||||
@@ -26,6 +26,8 @@
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<spring.boot.version>3.2.6</spring.boot.version>
|
||||
<spring.framework.version>6.1.8</spring.framework.version>
|
||||
|
||||
<smart.doc.version>3.0.5</smart.doc.version>
|
||||
</properties>
|
||||
|
||||
<!-- 依赖管理 -->
|
||||
@@ -90,7 +92,11 @@
|
||||
<plugin>
|
||||
<groupId>com.ly.smart-doc</groupId>
|
||||
<artifactId>smart-doc-maven-plugin</artifactId>
|
||||
<version>3.0.5</version>
|
||||
<version>${smart.doc.version}</version>
|
||||
<configuration>
|
||||
<!--指定生成文档的使用的配置文件-->
|
||||
<configFile>${basedir}/smart-doc.json</configFile>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</pluginManagement>
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"projectName": "测试"
|
||||
}
|
||||
Reference in new issue
Block a user