我创建了一个 jhipster 应用程序,现在有客户端。初始配置选项如下所示,
? Which *type* of application would you like to create? Monolithic application (recommended for simple projects)
? What is the base name of your application? nouisample
? Do you want to make it reactive with Spring WebFlux? No
? What is your default Java package name? com.mycompany.myapp
? Which *type* of authentication would you like to use? JWT authentication (stateless, with a token)
? Which *type* of database would you like to use? SQL (H2, PostgreSQL, MySQL, MariaDB, Oracle, MSSQL)
? Which *production* database would you like to use? MySQL
? Which *development* database would you like to use? MySQL
? Which cache do you want to use? (Spring cache abstraction) No cache - Warning, when using an SQL database, this will
disable the Hibernate 2nd level cache!
? Would you like to use Maven or Gradle for building the backend? Maven
? Do you want to use the JHipster Registry to configure, monitor and scale your application? No
? Which other technologies would you like to use? API first development using OpenAPI-generator
? Which *Framework* would you like to use for the client? No client
? Would you like to enable internationalization support? No
? Please choose the native language of the application English
? Besides JUnit and Jest, which testing frameworks would you like to use?
? Would you like to install other generators from the JHipster Marketplace? No
我在以下配置文件中启动应用程序,
2023-06-18T15:15:58.305+05:30 INFO 23300 --- [ restartedMain] com.mycompany.myapp.NouisampleApp : The following 2 profiles are active: "dev", "api-docs"
“http://localhost:8080/”中的应用程序启动器。
但我无法连接 swagger ui。我尝试了以下网址,
我收到的只是一个带有以下文本的错误页面。
Your request cannot be processed
Sorry, an error has occurred.
Status: Not Found (Not Found)
Message: Not Found
有人可以帮忙吗?我如何访问 swagger ui?
正如 @Matt Raible 所说,你看不到 Swagger UI,因为你没有任何客户端,作为一种可能的解决方案,你可以访问 http://localhost:8080/v3/api-docs 或 http:// localhost:8080/v3/api-docs.yaml 您可以在其中下载 yaml 以在 postman 或类似工具中导入。这至少适用于 jhipster 7.9.4,但我认为它至少适用于 7.5.x。
希望这有帮助。