What's the best way to do a simple if-else in Thymeleaf?
I want to achieve in Thymeleaf the same effect as
<c:choose>
<c:when test="${potentially_complex_expression}">
<h2>Hello!</h2>
&…
I have the following code in one of my controllers:
@Controller
@RequestMapping("/preference")
public class PreferenceController {
@RequestMapping(method = RequestMethod.GET, produces = "text/html")
public String preference() {
return "preference";
}
}
I am simply trying to test it using Spring MVC test as …
This question has been asked before but I did not solve my problem and I getting some weird functionality.
If I put my index.html file in the static directory like so:
I get the following error in my browser:
…