简体   繁体   English

无法从 eclipse springboot 应用程序访问 localhost:8080

[英]Unable to access localhost:8080 from eclipse springboot application

I am running a simple springboot demoapplication我正在运行一个简单的 springboot 演示应用程序在此处输入图片说明

But while accessing the localhost:8080 from browser, I see "Site can't be reached error".但是在从浏览器访问 localhost:8080 时,我看到“无法访问站点错误”。 What could be the issue here.这里可能是什么问题。 Even the port is not occupied(checked via netstat).即使端口没有被占用(通过netstat检查)。 Below are the logs, displayed:-以下是日志,显示:-

  .   ____          _            __ _ _
 /\\ / ___'_ __ _ _(_)_ __  __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
 \\/  ___)| |_)| | | | | || (_| |  ) ) ) )
  '  |____| .__|_| |_|_| |_\__, | / / / /
 =========|_|==============|___/=/_/_/_/
 :: Spring Boot ::        (v2.3.4.RELEASE)

2020-10-12 19:45:54.694  INFO 19756 --- [           main] com.example.demo.DemoApplication         : Starting DemoApplication on 8-UJLOP with PID 19756 (C:\Users\abc\Downloads\demo\demo\target\classes started by rsoni in C:\Users\abc\Downloads\demo\demo)
2020-10-12 19:45:54.695  INFO 19756 --- [           main] com.example.demo.DemoApplication         : The following profiles are active: @spring.profiles.active@
2020-10-12 19:45:54.791  INFO 19756 --- [           main] com.example.demo.DemoApplication         : Started DemoApplication in 0.312 seconds (JVM running for 0.869)

Application.properties-- it only has the below mentioned property Application.properties——它只有下面提到的属性

在此处输入图片说明

pom XML pom XML

在此处输入图片说明

在此处输入图片说明

Adding the following dependency to pom.xml worked:-将以下依赖项添加到 pom.xml 工作:-

spring-boot-starter-web spring-boot-starter-web

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 我可以从WAN访问在localhost:8080上运行的应用程序吗? - Can I access my application running on localhost:8080 from WAN..? 在apache localhost:8080中运行应用程序 - Run application in apache localhost:8080 尝试访问 localhost:8080 时的“禁止”响应 - Spring、Maven、Eclipse、Hibernate、WildFly - "Forbidden" Response when trying to access localhost:8080 - Spring, Maven, Eclipse, Hibernate, WildFly 如何访问http:// localhost:8080 / pdf / abc123.pdf tomcat eclipse - How to access http://localhost:8080/pdf/abc123.pdf tomcat eclipse CORS 策略已阻止从 localhost:4200 在 localhost:8080 访问 XMLHttpRequest - Access to XMLHttpRequest at localhost:8080 from localhost:4200 has been blocked by CORS policy Springboot:Localhost:8080导致Whitepage-Error而不是显示内容 - Springboot: Localhost:8080 results in Whitepage-Error instead of showing content 无法从 springboot 应用程序验证 mongodb - Unable to authenticate mongodb from springboot application JBoss 7.1.1 localhost:8080无法连接 - JBoss 7.1.1 localhost:8080 unable to connect 如何在网络上访问localhost:8080? - How to give access to localhost:8080 on network? 如果springboot应用程序打包为jar,则Thymeleaf无法访问模型属性 - Thymeleaf is unable to access model attribute if springboot application is packaged as a jar
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM