Webgoat – 更改默认路径导致应用程序无法正常启动

huangapple go评论61阅读模式
英文:

Webgoat - changing default path causing app not started properly

问题

I changed in the application properties file server.servlet.context-path=/ and rebuild the application.
然而,在此之后,我注意到执行在运行SpringApplicationBuilder时停在StartWebGoat.java阶段https://github.com/WebGoat/WebGoat/blob/main/src/main/java/org/owasp/webgoat/server/StartWebGoat.java。

it didn't proceed with the next step running the StartUpMessage.Java https://github.com/WebGoat/WebGoat/blob/main/src/main/java/org/owasp/webgoat/server/StartupMessage.java

I couldn't find any clue that points to why the event isn't triggered after changing the context-path in the application.properties file https://github.com/WebGoat/WebGoat/blob/main/src/main/resources/application-webgoat.properties。 Can anyone shed some light on this?

英文:

I am using https://github.com/WebGoat/WebGoat, trying to change the default path from /WebGoat to just /. I changed in the application properties file server.servlet.context-path=/ and rebuild the application.

However after that, I noticed the execution stops at StartWebGoat.java stage https://github.com/WebGoat/WebGoat/blob/main/src/main/java/org/owasp/webgoat/server/StartWebGoat.java when it runs SpringApplicationBuilder .

    64ca, org.springframework.security.web.access.intercept.FilterSecurityInterceptor@2e3b7b0b]
2023-04-13 17:02:30.790  INFO 69552 --- [           main] io.undertow                              : starting server: Undertow - 2.2.18.Final
2023-04-13 17:02:30.794  INFO 69552 --- [           main] o.s.b.w.e.undertow.UndertowWebServer     : Undertow started on port(s) 9090 (http)

it didn't proceed with the next step running the StartUpMessage.Java https://github.com/WebGoat/WebGoat/blob/main/src/main/java/org/owasp/webgoat/server/StartupMessage.java

I couldn't find any clue that points to why the event isn't triggered after changing the context-path in the application.properties file https://github.com/WebGoat/WebGoat/blob/main/src/main/resources/application-webgoat.properties. Can anyone shed some light on this?

答案1

得分: 1

Change the default path in the src/main/resources/application-webgoat.properties file, for the line server.servlet.context-path=/ (from /WebGoat):

src/main/resources/application-webgoat.properties文件中的默认路径更改为server.servlet.context-path=/(从/WebGoat)。

英文:

Somehow I get to make it work, so from the https://github.com/WebGoat/WebGoat downloaded,

change the default path in the src/main/resources/application-webgoat.properties file, for the line server.servlet.context-path=/ (from /WebGoat)

huangapple
  • 本文由 发表于 2023年4月13日 17:59:30
  • 转载请务必保留本文链接:https://go.coder-hub.com/76004110.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定