Copying resources not working with SringBoot4?
Maciej Jaros <[email protected]> Thu, 11 Jun 2026 12:06:22 +0200
| Newsgroups | gmane.comp.java.ide.netbeans.user |
|---|---|
| Organization | MOL sp. z o.o. |
| Message-ID | <[email protected]> |
--------------0891UAm8JoGDIkym7cmfJVMP
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: quoted-printable
Hi. I have this simple Spring Boot app:
https://github.com/Eccenux/HelloSpringBoot
Most of this is generated by the SB creator. The things I added are=20
mostly a HomeController [hc] and some templates e.g. [home].
Now the problem is that even though I enabled *Compile on Save* and=20
*Copy Static Resources on Save*, I cannot seem to get it working. Is=20
this a known problem with Spring Boot 4 or something? Was this fixed=20
recently in NB? I=E2=80=99m currently on NB 28. Is there something, some =
option,=20
I need to change in NetBeans? Something to adjust in Spring configs?
I checked it like this:
1. Change my css in NetBeans:=20
`HelloSpringBoot\src\main\resources\static\css\main.css`
2. Compare it with target:
=C2=A0 in zip:=20
`HelloSpringBoot\target\hellospring-0.0.1.war\WEB-INF\classes\static\css\=
main.css`
=C2=A0 and direct: `HelloSpringBoot\target\classes\static\css\main.css`
=E2=86=92 The files are different.
I do develop a few much more complex applications, with a more complex=20
backend and frontend, based on previous Spring versions, and reloading=20
resources seems to work just fine for them. That=E2=80=99s why I=E2=80=99=
m wondering if=20
there is some problem with the integration with the new Spring or Spring=20
Boot.
Cheers,
Maciej Nux
[hc] =3D=20
https://github.com/Eccenux/HelloSpringBoot/blob/main/src/main/java/pl/mol=
/hellospring/web/HomeController.java
[home] =3D=20
https://github.com/Eccenux/HelloSpringBoot/blob/main/src/main/resources/t=
emplates/home.html
--------------0891UAm8JoGDIkym7cmfJVMP
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE html>
<html>
<head>
<meta http-equiv=3D"content-type" content=3D"text/html; charset=3DUTF=
-8">
</head>
<body>
<font face=3D"Helvetica, Arial, sans-serif">Hi. I have this simple
Spring Boot app:<br>
<a class=3D"moz-txt-link-freetext" href=3D"https://github.com/Eccen=
ux/HelloSpringBoot">https://github.com/Eccenux/HelloSpringBoot</a><br>
<br>
Most of this is generated by the SB creator. The things I added
are mostly a HomeController [hc] and some templates e.g. [home].<br=
>
<br>
Now the problem is that even though I enabled *Compile on Save*
and *Copy Static Resources on Save*, I cannot seem to get it
working. Is this a known problem with Spring Boot 4 or something?
Was this fixed recently in NB? I=E2=80=99m currently on NB 28. Is t=
here
something, some option, I need to change in NetBeans? Something to
adjust in Spring configs?<br>
<br>
I checked it like this:<br>
1. Change my css in NetBeans:
`HelloSpringBoot\src\main\resources\static\css\main.css`<br>
2. Compare it with target:<br>
=C2=A0 in zip:
`HelloSpringBoot\target\hellospring-0.0.1.war\WEB-INF\classes\static\css\=
main.css`<br>
=C2=A0 and direct: `HelloSpringBoot\target\classes\static\css\main.=
css`<br>
=E2=86=92 The files are different.<br>
<br>
I do develop a few much more complex applications, with a more
complex backend and frontend, based on previous Spring versions,
and reloading resources seems to work just fine for them. That=E2=80=
=99s
why I=E2=80=99m wondering if there is some problem with the integra=
tion
with the new Spring or Spring Boot.</font><font
face=3D"Helvetica, Arial, sans-serif"><br>
</font><font face=3D"Helvetica, Arial, sans-serif"><br>
Cheers,<br>
Maciej Nux<br>
<br>
</font><font face=3D"Helvetica, Arial, sans-serif">[hc] =3D
<a class=3D"moz-txt-link-freetext" href=3D"https://github.com/Eccenux/Hel=
loSpringBoot/blob/main/src/main/java/pl/mol/hellospring/web/HomeControlle=
r.java">https://github.com/Eccenux/HelloSpringBoot/blob/main/src/main/jav=
a/pl/mol/hellospring/web/HomeController.java</a><br>
</font><font face=3D"Helvetica, Arial, sans-serif">[home] =3D
<a class=3D"moz-txt-link-freetext" href=3D"https://github.com/Eccenux/Hel=
loSpringBoot/blob/main/src/main/resources/templates/home.html">https://gi=
thub.com/Eccenux/HelloSpringBoot/blob/main/src/main/resources/templates/h=
ome.html</a><br>
<br>
</font><br>
</body>
</html>
--------------0891UAm8JoGDIkym7cmfJVMP--