I can see my bootstrap template using thymeleaf with spring boot.
When I request http://localhost:8080/student
bootstrap resources work good, but when I request including some path variable like http://localhost:8080/student/3
bootstrap can't be uploaded. I'm getting this error from the browser Request Method:GET
Status Code:400. It tries to request bootstrap file like that http://localhost:8080/student/bootstrap.css
.
I don't think I have any problems with declaring bootstrap files' path because other pages work fine. And my paths are from guide as resources/static/bootstrap.css I'm not using WebMvcConfig and I'm using default spring security.
@RequestMapping( value = "/student/{id}", method = RequestMethod.GET)
public String izinEkle(Model model, @PathVariable int id) {
studentService.getStudentlById(id);
Izin izin = new Izin();
model.addAttribute("izin",izin);
return "izinGiris";
}
--
<head lang="en">
<title>HolyDayTracker</title>
<link href="../static/bootstrap.css" th:href="@{bootstrap.css}" rel="stylesheet" media="screen">
<link href="../static/style.css" th:href="@{style.css}" rel="stylesheet">
<script src="http://cdn.jsdelivr.net/webjars/jquery/2.1.4/jquery.min.js th:src="@{../webjars/jquery/2.1.4/jquery.min.js}"></script>