Reputation:
I have a problem with mapping resources. I have multi-module project where first module if angular 2 which is server by Spring boot in second module. Everything is configured but the problem is connected with path to resources.
On the left is compiled Spring module with added build Angular 2 app. In Angular module i have other localization for assets
but when angular build project, flatten the whole project and compiled strucutre is following
Upvotes: 1
Views: 1039
Reputation: 103
Simply use <img src="../assets/yourimage.png" width="30" height="30" alt="">
as relative path.
And be aware of that image names must not be "yourimage_256.png". Spring does not like such kind of names and won't deliver it.
If you use spring boot security you also need to add
.antMatchers("/assets/**").permitAll()
in your WebSecurityConfig
Upvotes: 1