Config
doc-apis config
doc-apis:
enable: true # Whether to enable automatic API generation, default is enabled
projectName: easy-es # Project name, fill in your project name, used for display in the generated API documentation interface
projectPath: E:\\easy-es\\sample # Project path, fill in your project path, directory scanned during generation, defaults to the current project path; for projects with controllers spread across multiple sub-modules, use a comma to separate them
docVersion: 1.0.0 # Version number of the generated API documentation
docPath: E:\\tmp # Path of the generated documentation, for example, if I want to place the generated documentation under the tmp folder on drive E, if not configured, it will default to generating under the current project directory
autoGenerate: true # Whether to automatically generate, default is true; if set to false, the @DocApi annotation is required for the finest-grained control over generated APIs
generateMarkDown: true # Whether to generate markdown documentation, default is true; if false, only HTML API documentation will be generated
watermark: doc-apis # Watermark, default value is doc-apis
classificationLevel: Ⅱ # Confidentiality level, default is Ⅱ; Ⅰ: Top Secret, Ⅱ: Confidential, Ⅲ: Secret, Ⅳ: General; this field supports strings and can also be written in Chinese directly
locale: Locale.CHINESE # Language of the generated documentation, default is the system's default language; currently supports Chinese and English API documentation, has implemented i18n, theoretically should support various mainstream languages in the future
corsConfig:
allowCors: true # Whether to allow CORS, default value is true, because local Html directly accessing backend services cannot perform cross-origin requests by default, so CORS is enabled by default; to disable CORS, simply configure allowCors to false
maxAge: 3600 # Allowed CORS time, default value is 3600s
pathPattern: /** # Allowed CORS request domain, default value is /**
allowedOriginPatterns: * # Allowed origin patterns for CORS, default value is *
allowedMethods: * # Allowed methods for CORS requests, default value is *
allowedHeaders: * # Allowed headers for CORS, default value is *
allowCredentials: true # Whether to allow credentials, default value is true
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
提示
Note All the above configurations apply only to Springboot projects and have default values. In theory, configuration is not necessary unless there are specific scenarios that require customization. Simply configure as needed. For non-Springboot projects involving the above configurations, directly configure the DocsConfig object in the generation utility class, you may refer to the previous section for details.
Help us improve this document (opens new window)
lastUpdated: 2024/07/16