Git Product home page Git Product logo

为啥在本机项目启动了,访问不了Whitelabel Error Page This application has no explicit mapping for /error, so you are seeing this as a fallback. Fri Jun 12 10:04:53 CST 2020 There was an unexpected error (type=Not Found, status=404). No message available about app-template HOT 4 CLOSED

lightningLoveTech avatar lightningLoveTech commented on September 26, 2024
为啥在本机项目启动了,访问不了Whitelabel Error Page This application has no explicit mapping for /error, so you are seeing this as a fallback. Fri Jun 12 10:04:53 CST 2020 There was an unexpected error (type=Not Found, status=404). No message available

from app-template.

Comments (4)

Howard-Wang avatar Howard-Wang commented on September 26, 2024

完整的 url 是什么?怎么启动的

from app-template.

lightningLoveTech avatar lightningLoveTech commented on September 26, 2024

您好:
我是在windows 下打war包,步骤如下:
1.cd web/app 目录下, 执行 npm run build 编译客户端
2.cd web/admin 目录下, 执行 npm run build:prod 编译客户端
3.在项目主目录下创建 build/www/admin/ 三层目录
4.将 web/app/dist/ 目录中的所有文件拷贝到 build/www 目录下
5.将 web/admin/dist/ 目录中的所有文件拷贝到 build/www/admin 目录下
6.在项目主目录下执行 gradle build -Pprod, 然后项目的 war 包会出现在 build/libs 目录下
通过Java -jar启动的。启动无报错
启动最后日志如下:
2020-06-24 10:22:11,892[INFO]org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor.initialize:181Initializing ExecutorService 'applicationTaskExecutor'
2020-06-24 10:22:12,987[INFO]springfox.documentation.spring.web.plugins.DocumentationPluginsBootstrapper.start:160Context refreshed
2020-06-24 10:22:13,049[INFO]springfox.documentation.spring.web.plugins.DocumentationPluginsBootstrapper.start:163Found 1 custom documentation plugin(s)
2020-06-24 10:22:13,136[INFO]springfox.documentation.spring.web.scanners.ApiListingReferenceScanner.scan:41Scanning for api listing references
2020-06-24 10:22:13,901[INFO]springfox.documentation.spring.web.readers.operation.CachingOperationNameGenerator.startingWith:40Generating unique operation named: uploadUsingPOST_1
2020-06-24 10:22:13,988[INFO]springfox.documentation.spring.web.readers.operation.CachingOperationNameGenerator.startingWith:40Generating unique operation named: downloadLogUsingGET_1
2020-06-24 10:22:14,197[INFO]springfox.documentation.spring.web.readers.operation.CachingOperationNameGenerator.startingWith:40Generating unique operation named: uploadUsingPOST_2
2020-06-24 10:22:14,276[INFO]springfox.documentation.spring.web.readers.operation.CachingOperationNameGenerator.startingWith:40Generating unique operation named: deleteUserUsingDELETE_1
2020-06-24 10:22:14,482[INFO]org.apache.coyote.http11.Http11NioProtocol.log:173Starting ProtocolHandler ["http-nio-8090"]
2020-06-24 10:22:14,583[INFO]org.springframework.boot.web.embedded.tomcat.TomcatWebServer.start:204Tomcat started on port(s): 8090 (http) with context path '/app-template'
2020-06-24 10:22:14,592[INFO]com.company.app.AppApplication.logStarted:61Started AppApplication in 21.88 seconds (JVM running for 22.789)
2020-06-24 10:24:19,392[INFO]org.apache.catalina.core.ContainerBase.[Tomcat].[localhost].[/app-template].log:173Initializing Spring DispatcherServlet 'dispatcherServlet'
2020-06-24 10:24:19,393[INFO]org.springframework.web.servlet.DispatcherServlet.initServletBean:525Initializing Servlet 'dispatcherServlet'
2020-06-24 10:24:19,415[INFO]org.springframework.web.servlet.DispatcherServlet.initServletBean:547Completed initialization in 21 ms

访问地址1:http://localhost:8090/app-template/index.html
报错:
Whitelabel Error Page
This application has no explicit mapping for /error, so you are seeing this as a fallback.
Wed Jun 24 10:31:17 CST 2020
There was an unexpected error (type=Not Found, status=404).
No message available

访问地址2:
http://localhost:8090/app-template/admin/index.html
报错:
该网页无法正常运作 如果问题仍然存在,请与网站所有者联系。
HTTP ERROR 40

from app-template.

Howard-Wang avatar Howard-Wang commented on September 26, 2024

我这里目前是使用 ubuntu 来测试的,暂时没有遇到这个问题,prod,dev 模式都可以运行,看看会不会是 8090 端口被别的进程占用了,之后我有空找一个 windows 机器来试试

from app-template.

Howard-Wang avatar Howard-Wang commented on September 26, 2024

使用 Windows 机器测试了下,dev,prod 模式编译之后都测试了下,都是可以,遇到 issue 描述的问题。所以怀疑可能和网络环境有关系

from app-template.

Related Issues (1)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.