![](/img/trans.png)
[英]Can I access my application running on localhost:8080 from WAN..?
[英]Unable to access localhost:8080 from eclipse springboot application
但是在從瀏覽器訪問 localhost:8080 時,我看到“無法訪問站點錯誤”。 這里可能是什么問題。 即使端口沒有被占用(通過netstat檢查)。 以下是日志,顯示:-
. ____ _ __ _ _
/\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
\\/ ___)| |_)| | | | | || (_| | ) ) ) )
' |____| .__|_| |_|_| |_\__, | / / / /
=========|_|==============|___/=/_/_/_/
:: 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——它只有下面提到的屬性
pom XML
將以下依賴項添加到 pom.xml 工作:-
spring-boot-starter-web
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.