【建新科技部分项目swagger访问配置及地址】

复制代码
如果配置修改
springfox:
  documentation:
    enabled: true
    swagger-ui:
      base-url: /
访问是如下
http://localhost:8910/swagger-ui/index.html#
复制代码
如果  base-url: /swagger/
复制代码
http://localhost:8910/swagger/swagger-ui/index.html#

http://localhost:8910/swagger/api-doc

application-dev.yml
java 复制代码
spring:
  # 安全配置
  mvc:
    pathmatch:
      matching-strategy: ant_path_matcher

springfox:
  documentation:
    enabled: true
    swagger-ui:
      base-url: /swagger/

swagger:
  enabled: true
  pathMapping: /
  title: API 文档
  description: API 文档
  version: 1.0
  contact:
    name: developer
    email: developer@example.com
  base-package: com.jxtech.hkcms

# 日志配置
logging:
  level:
    root: INFO
    org.springframework: INFO
    com.jxtech: DEBUG
    springfox: INFO
  pattern:
    console: "%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n"
    file: "%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n"
  file:
    path: log
    name: hkcms.log

pom.xml

java 复制代码
<dependency>
		<groupId>io.springfox</groupId>
		<artifactId>springfox-core</artifactId>
		<version>3.0.0</version>
		<scope>compile</scope>
	</dependency>
	<!--swagger--> 
	<dependency>
		<groupId>io.springfox</groupId>
		<artifactId>springfox-boot-starter</artifactId>
		<version>3.0.0</version>
	</dependency>
	<dependency>
		<groupId>com.github.xiaoymin</groupId>
		<artifactId>knife4j-spring-ui</artifactId>
		<version>3.0.3</version>
	</dependency>

实体类上

java 复制代码
@MapperXml(compId = "base", xmlFile = "/config/base/bean/AimAttribute.xml")
public class AimAttribute extends AbstractBean {
}

iac-hkcms

相关推荐
letian880820 小时前
如何获取科技乐小天的资源?
科技
蓝速科技21 小时前
蓝速科技圆柱形 3D 全息舱全天候值守实战指南
科技·3d
极新21 小时前
有怡科技携全球首款可变形本质人形机器人亮相2026世界机器人大会
大数据·科技·机器人
蓝速科技1 天前
蓝速科技信创触控终端多芯片兼容选型实战指南
科技
随风而飘1861 天前
KEITHLEY吉时利 2400 数字源表
人工智能·功能测试·科技·测试工具
蓝速科技1 天前
蓝速科技信创落地:平衡安全合规与项目成本的实战方案
android·运维·人工智能·科技·安全·电脑·鸿蒙
蓝速科技2 天前
蓝速科技会议预约屏全尺寸分级适配与智慧工程落地指南
科技
国产HT1621B2 天前
外挂 YL1621 SSOP48 芯片 vs MCU 内置 LCD 控制器深度对比
科技·单片机·嵌入式硬件·mcu·lcd驱动
liulilittle2 天前
《走进修仙》第四卷《九天烽火》
科技·科幻·修仙·玄幻
AcaDesign2 天前
国家/省部市级科技奖答辩PPT_科技进步奖_自然科学奖_技术发明奖|WordinPPT
大数据·人工智能·科技·powerpoint