title: Spring Boot App with Maven and Wildly (26.1.1) - PAGE NOT FOUND Error
body: <p>I have created a Spring Boot application. I use WildFly as the application server - this is what I want to use to run the application.</p>
  <p>These are the Java and Maven related files I have:</p>
  <pre><code>@RestController
  public class MyController {
  
    @Autowired
    private Student student;
  
    @GetMapping(value=&quot;/index&quot;)
    public String sayHello() {
      return &quot;Hello&quot;;
    }
  }
  </code></pre>
  <p>Of course I have the main method with the Spring Boot related annotations:</p>
  <pre><code>@SpringBootApplication
  public class SpringBootTestApplication {
  
    public static void main(String[] args) { 
      SpringApplication.run(SpringBootTestApplication.class, args);
    }
  }
  </code></pre>
  <p>I have the Maven file like this:</p>
  <pre><code>&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
  &lt;project xmlns=&quot;http://maven.apache.org/POM/4.0.0&quot;                   xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot;   xsi:schemaLocation=&quot;http://maven.apache.org/POM/4.0.0    https://maven.apache.org/xsd/maven-4.0.0.xsd&quot;&gt;
  &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
  &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.7.2&lt;/version&gt;
      &lt;relativePath /&gt; &lt;!-- lookup parent from repository --&gt;
  &lt;/parent&gt;
  &lt;groupId&gt;com.globalsoftwaresupport&lt;/groupId&gt;
  &lt;artifactId&gt;spring-boot-test&lt;/artifactId&gt;
  &lt;version&gt;0.0.1-SNAPSHOT&lt;/version&gt;
  &lt;name&gt;spring-boot-test&lt;/name&gt;
  &lt;description&gt;Demo project for Spring Boot&lt;/description&gt;
  &lt;properties&gt;
      &lt;java.version&gt;17&lt;/java.version&gt;
      &lt;deploy.jboss.host&gt;127.0.0.1&lt;/deploy.jboss.host&gt;
      &lt;deploy.jboss.port&gt;9990&lt;/deploy.jboss.port&gt;
      &lt;deploy.jboss.username&gt;balazs&lt;/deploy.jboss.username&gt;
      &lt;deploy.jboss.password&gt;balazs1990&lt;/deploy.jboss.password&gt;
  &lt;/properties&gt;
  &lt;dependencies&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;dependency&gt;
          &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
          &lt;artifactId&gt;spring-boot-starter-test&lt;/artifactId&gt;
          &lt;scope&gt;test&lt;/scope&gt;
      &lt;/dependency&gt;
  &lt;/dependencies&gt;
  
  &lt;build&gt;
      &lt;plugins&gt;
          &lt;plugin&gt;
              &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
              &lt;artifactId&gt;maven-war-plugin&lt;/artifactId&gt;
              &lt;configuration&gt;
                  &lt;failOnMissingWebXml&gt;false&lt;/failOnMissingWebXml&gt;
              &lt;/configuration&gt;
          &lt;/plugin&gt;
          &lt;plugin&gt;
              &lt;groupId&gt;org.wildfly.plugins&lt;/groupId&gt;
              &lt;artifactId&gt;wildfly-maven-plugin&lt;/artifactId&gt;
              &lt;version&gt;2.0.2.Final&lt;/version&gt;
              &lt;executions&gt;
                  &lt;execution&gt;
                      &lt;phase&gt;install&lt;/phase&gt;
                      &lt;goals&gt;
                          &lt;goal&gt;deploy&lt;/goal&gt;
                      &lt;/goals&gt;
                  &lt;/execution&gt;
              &lt;/executions&gt;
              &lt;configuration&gt;
                  &lt;filename&gt;${project.build.finalName}.war&lt;/filename&gt;
                  &lt;hostname&gt;${deploy.jboss.host}&lt;/hostname&gt;
                  &lt;port&gt;${deploy.jboss.port}&lt;/port&gt;
                  &lt;username&gt;${deploy.jboss.username}&lt;/username&gt;
                  &lt;password&gt;${deploy.jboss.password}&lt;/password&gt;
              &lt;/configuration&gt;
          &lt;/plugin&gt;
      &lt;/plugins&gt;
  &lt;/build&gt;
  &lt;packaging&gt;war&lt;/packaging&gt;
  </code></pre>
  
  <p>When I build the project with <strong>mvn clean install</strong> then Maven compiles and deployed the app to the Wildfly server.</p>
  <p><a href="https://i.stack.imgur.com/qfBhf.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/qfBhf.png" alt="enter image description here" /></a></p>
  <p>So far so good I have the application on the server. First of all:</p>
  <p>1.) is it not a problem that I have the SNAPSHOT present in the context root?</p>
  <p>2.) another problem is that I can not run the application - I start WildFly server in Eclipse and I check the context root.</p>
  <p><a href="https://i.stack.imgur.com/JIcAA.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/JIcAA.png" alt="enter image description here" /></a></p>
  <p>Can you help me why is this happening? Thank you for your help in advance!</p>