简体   繁体   English

在 wildfly 26.0.1 上访问 spring 启动应用时遇到 403 forbidden

[英]Facing 403 forbidden while accessing spring boot app on wildfly 26.0.1

I have a spring boot application with out any security enabled and react as front-end both coupled into a single war.我有一个 spring 启动应用程序,没有启用任何安全性,并且作为前端做出反应,两者都耦合到一场战争中。 the application is deploying successfully but cant able to access the application using localhost:8080 as it is giving 403 forbidden error and while accessing rest end point im facing 404 not found error on wildfly 26.0.1 but the same application is working fine with out any error on wildfly 15.0.1.该应用程序部署成功但无法使用 localhost:8080 访问该应用程序,因为它给出了 403 禁止错误,并且在访问 rest 端点时我在 wildfly 26.0.1 上面临 404 未找到错误但同一个应用程序在没有任何wildfly 15.0.1 错误。

i cant able to understand why it is working on older version of wildfly but not in newer version of wildfly.我无法理解为什么它可以在旧版本的 Wildfly 上运行,但不能在新版本的 Wildfly 上运行。

You need to also indicate the context root of your application in the URL.您还需要在 URL 中指明应用程序的上下文根。

To know what is the context root of the app you just deployed, go to: http://127.0.0.1:9990/console/index.html#deployments要知道您刚刚部署的应用程序的上下文根是什么,go 至: http://127.0.0.1:9990/console/index.html#deployments

Then the URL of your project must look like this: localhost:8080/your-context-root/那么你项目的 URL 必须是这样的:localhost:8080/your-context-root/

For better understanding in how to deploy spring boot in wildfly i recommend you this article: https://medium.com/swlh/how-to-deploy-spring-boot-application-in-wildfly-application-server-b3670c031ad4为了更好地了解如何在 wildfly 中部署 spring 启动,我向您推荐这篇文章: https://medium.com/swlh/how-to-deploy-spring-boot-application-in-wildfly-application-server-b3670c031ad4

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

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