Exception evaluating SpringEL expression: "businessId" (login:50)
У меня такая же проблема и решайте с помощью конкатенации строк, как показано ниже.
LoginController.java
@RequestMapping(value = "/login/{businessId}", method = RequestMethod.GET)
public ModelAndView get(HttpServletRequest request, @PathVariable String businessId) {
ModelAndView modelAndView = new ModelAndView("login");
modelAndView.addObject("businessId", businessId);
return modelAndView;
}
login .html
<form role="form" th:action="@{/login} + '/'+ ${businessId}" th:method="post">
<fieldset>
<div class="form-group">
<input class="form-control" placeholder="E-mail" name="userName"
type="email"></input>
</div>
<div class="form-group">
<input class="form-control" placeholder="Password"
name="password" type="password" value=""></input>
</div>
<div class="checkbox">
<label> <input name="remember" type="checkbox"
value="Remember Me"></input>Remember Me
</label>
</div>
<!-- Change this to a button or input when using this as a form -->
<button id="login" class="btn btn-lg btn-success btn-block" type="submit">Login</button>
</fieldset>
</form>