title: Spring Boot Rest API - Deployed in Wildfly SErver
body: <p>I was trying to deploy a simple Spring boot app into wildfly server, it was working locally when I test. But after deploying into the Wildfly server, when I try to hit the API getting a 403 error.</p>
  <pre><code>    @SpringBootApplication
      public class StaticWebApplication {
      
          public static void main(String[] args) throws Exception {
              SpringApplication.run(StaticWebApplication.class, args);
          }
      
      }
  
  Controller 
  
      @RestController
      public class SampleResource {
      
          @RequestMapping(&quot;/&quot;)
          public String hello() {
              return &quot;Hello World!&quot;;
          }
      
      }
      
      Pom.xml
      
      
          &lt;parent&gt;
              &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
              &lt;artifactId&gt;spring-boot-starter-parent&lt;/artifactId&gt;
              &lt;version&gt;2.5.2&lt;/version&gt;
          &lt;/parent&gt;
      
          &lt;dependencies&gt;
              &lt;dependency&gt;
                  &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
                  &lt;artifactId&gt;spring-boot-starter&lt;/artifactId&gt;
              &lt;/dependency&gt;
               &lt;dependency&gt;
                   &lt;groupId&gt;javax.servlet&lt;/groupId&gt;
                   &lt;artifactId&gt;javax.servlet-api&lt;/artifactId&gt;
                   &lt;scope&gt;provided&lt;/scope&gt;
               &lt;/dependency&gt;
              &lt;dependency&gt;
                  &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
                  &lt;artifactId&gt;spring-boot-starter-web&lt;/artifactId&gt;
                  &lt;exclusions&gt;
                      &lt;exclusion&gt;
                          &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
                          &lt;artifactId&gt;spring-boot-starter-tomcat&lt;/artifactId&gt;
                      &lt;/exclusion&gt;
                  &lt;/exclusions&gt;
              &lt;/dependency&gt;
          &lt;/dependencies&gt;
      
          &lt;properties&gt;
              &lt;java.version&gt;1.8&lt;/java.version&gt;
          &lt;/properties&gt;
      
      
          &lt;build&gt;
              &lt;plugins&gt;
                  &lt;plugin&gt;
                      &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
                      &lt;artifactId&gt;spring-boot-maven-plugin&lt;/artifactId&gt;
                  &lt;/plugin&gt;
              &lt;/plugins&gt;
          &lt;/build&gt;
  
  JBoss-web.xml
  
      &lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
      &lt;jboss-web&gt;
          &lt;context-root&gt;/&lt;/context-root&gt;
      &lt;/jboss-web&gt;
  </code></pre>
  <p>I was facing this issue in Wildfly server while deploying as war file, does anyone faced this issue ?</p>