Loading page...Загружаем страницу...正在加载页面...
AtlasRepo

From TypeScript to Spring Boot: a small developer convenience I missed

说明与用途

Spring Boot 启动器在启动后自动打印 Swagger UI URL,简化本地开发时的文档访问。

问题

Spring Boot developers lack a convenient way to see the Swagger UI URL after startup, unlike Node/Express projects that print it automatically.

结果

The starter provides a single, reusable component that prints the correct Swagger UI URL after startup, improving developer experience and reducing duplicated startup logic across multiple services.

工作流

  • Add dependency io.github.dydent:swagger-ui-link-spring-boot-starter:0.1.0 to pom.xml or build.gradle.
  • Enable the starter in application-local.yml: swagger-ui-link.enabled: true.
  • Run the application with the local profile active (e.g., spring.profiles.active=local).
  • The console prints the resolved Swagger UI URL (e.g., http://localhost:8083/api/importer/swagger-ui).

证据

The starter prints the configured Swagger UI URL immediately after application startup, including the custom port and context path.

来源

The dependency does not install Swagger UI. It reports the address of the UI your application already serves.

来源

  • 记录日期: 2026-09-06T23:52:16.257Z