Issue
I am running into a strange issue in my Spring Boot Maven project.
Into the /public/assets/
folder, all resources can be found in the browser except some css or js files generating a 404 HTTP error
Everything is set in my config file, specially WebSecurityConfigurerAdapter
is extended.
Because I am using Spring Security
dependency, here is a portion of code that handles assets files
@Override
public void configure(WebSecurity web) throws Exception {
web
.ignoring()
.antMatchers("/assets/**", "/files/**");
}
Therefore, in the image below, highlighted files are not loaded.
Note that this strange behavior only happened today, everything was working as expected the last time I ran the project.
Any idea what I mess or did ?
Solution
Found out that some logical errors may impact page generation without any stacktrace.
In my case, I added a JPA Repository
extending CrudRepository
. I had no errors in the application execution but for some reason my frontend was impacted. As soon as I removed the repository in question everything went back to normal.
WEIRD !
Answered By - dm_tr