简体   繁体   中英

Unable to access localhost:8080 from eclipse springboot application

I am running a simple springboot demoapplication在此处输入图片说明

But while accessing the localhost:8080 from browser, I see "Site can't be reached error". What could be the issue here. Even the port is not occupied(checked via 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

在此处输入图片说明

pom XML

在此处输入图片说明

在此处输入图片说明

Adding the following dependency to pom.xml worked:-

spring-boot-starter-web

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM