如何为Spring Boot应用显示指向WebApplicationContext URL的链接?

发布于 2025-02-13 00:21:09 字数 109 浏览 0 评论 0原文

我正在使用Spring Boot创建Web应用程序,并且我不确定如何在启动时显示指向URL的链接:类似 localhost:8080/mywebapp 作为日志中的链接。

I am using Spring Boot to create a web app, and I am not sure how to display a link to the URL while starting : something like localhost:8080/myWebApp as a link in the logs.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

╄→承喏 2025-02-20 00:21:09

当您启动项目时,您应该在日志中找到类似的东西,

2022-07-05 10:20:04.045  INFO 3236 --- [  restartedMain] o.s.b.w.embedded.tomcat.TomcatWebServer  : Tomcat started on port(s): 8080 (http) with context path '/myWebApp'

基本上是您的baseurl => Localhost:8080/mywebapp

我没有做任何pressionualr配置来获取这

一点

As you start the project you should find something like this in the logs

2022-07-05 10:20:04.045  INFO 3236 --- [  restartedMain] o.s.b.w.embedded.tomcat.TomcatWebServer  : Tomcat started on port(s): 8080 (http) with context path '/myWebApp'

Wich is basically your baseUrl => localhost:8080/myWebApp

I haven't done any particualr configuration to get this

i don t know if this ansewers you question tho

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文