#Getting 404 error when trying to load a simple controller

1 messages · Page 1 of 1 (latest)

ashen lynx
#

Dependencies of pom.xml file

<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>

    <dependency>
        <groupId>com.mysql</groupId>
        <artifactId>mysql-connector-j</artifactId>
        <scope>runtime</scope>
    </dependency>
    <dependency>
        <groupId>org.projectlombok</groupId>
        <artifactId>lombok</artifactId>
        <optional>true</optional>
    </dependency>
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-test</artifactId>
        <scope>test</scope>
    </dependency>
    <dependency>
        <groupId>org.apache.tomcat.embed</groupId>
        <artifactId>tomcat-embed-jasper</artifactId>
    </dependency>
    <dependency>
        <groupId>javax.servlet</groupId>
        <artifactId>javax.servlet-api</artifactId>
        <version>3.1.0</version>
    </dependency>

</dependencies>

Can someone help me with this?

latent cliffBOT
#

<@&1004656351647117403> please have a look, thanks.

plain sapphire
#

why are you using JSP ? it's old

#

also, the index file must be under /resources/public

#

which Spring/Boot version are u using pls ?

ashen lynx
#

My version is 3.2.3

ashen lynx
plain sapphire
#

index.html

ashen lynx
#

Okay sure, let me try. Thanks for the reply

#

It worked. Thanks for helping me🥹