I have three web application microservices and one gateway that include the UI. So, what i want to do is to change the app's that every microservice has his own UI and the gateway should make server side includes. Im using Thymeleaf as template engine and do the includes like this:
<div th:replace="http://localhost:8080/#/organizations"></div>
My Problem is that the CSS and JS files are not Included from the original localhost:8080 server rather from the server with includes the content localhost:9090.
This is how i include the JS and CSS files at *:8080:
<script th:src="@{webjars/jquery/$jquery.version$/jquery.min.js}"</script>
Hope you understand my problem and someone can help...
This ${#httpServletRequest.requestURL} did the trick...
<link th:href="@{__${#httpServletRequest.requestURL}__webjars/bootstrap/?{bootstrap.version}/css/bootstrap.min.css}" rel="stylesheet" />
now all works fine.