【Thymeleaf】thymeleaf中给input的value属性设置值

@GetMapping("/to_update_car{id}")
    public String UpdateCar(@PathVariable("id")String id, HttpSession session){
        Car now=cardao.FindById(id);
        System.out.println(now);
        System.out.println(id);
        session.setAttribute("update_car_pojo",id);
        return "redirect:/car_update";
    }
<input name="car_id" type="text" 
class="form-control" id="exampleInputName2" 
th:value="${session.update_car_pojo}"  >

你可能感兴趣的:(#,Thymeleaf,java,intellij-idea,开发语言)