Move your template folder right under resources:
src/main/resources/static/css (for CSS files); src/main/resources/templates (for HTML templates). src/main/resources/static/css (for CSS files); src/main/resources/templates (for HTML templates). Then correct the link tag as follows (relative or absolute):
<link href="../css/firstcss.css" rel="stylesheet"> <link href="/css/secondcss.css" rel="stylesheet"> <link href="../css/firstcss.css" rel="stylesheet"> <link href="/css/secondcss.css" rel="stylesheet"> The old solution with static in front doesn't work for me.