Quantcast
Channel: Active questions tagged html - Stack Overflow
Viewing all articles
Browse latest Browse all 67527

class path resource [public] cannot be resolved to URL because it does not exist (SPARK)

$
0
0

I'm obtaining the following error when I run my server in Spark:

enter image description here

My main looks like that:

enter image description here

And this is my project structure

enter image description here

And I added this to build in pom.xml file:

<resources>
            <resource>
                <filtering>false</filtering>
                <directory>src/main/resources</directory>
            </resource>
        </resources>

Before I added this lines, I couldn't render index.html because it couldn't find it in resources folder, but after I added this to pom.xml, it found it and it's rendered correctly.

Server is running fine, but I can't set the location of static files to folder '/public', that is inside resources, so when I try to load 'favicon.png', from index.html, it try to find it inside '/index/favicon.png'but I would want to go it to 'resources/public/favicon.png'


Viewing all articles
Browse latest Browse all 67527

Trending Articles