1
I want to build an application using Spring MVC with front end as HTML, CSS and Jquery.
이것이 가능한지 알고 싶습니다. Spring MVC는 UI에서 액세스하여 서버 측 데이터에 액세스 할 수있는 Model 객체를 가지고있다.스프링 MVC에서 프론트 엔드로 HTML을 사용할 수 있습니까?
나는
@Override
protected ModelAndView handleRequestInternal(HttpServletRequest request,
HttpServletResponse response) throws Exception {
ModelAndView model = new ModelAndView("HelloWorldPage");
model.addObject("msg", "hello world");
return model;
}
내 HTML 코드는 예 당신이 할 수있는
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:c="http://java.sun.com/jstl/core">
<body>
<c:out value="${msg}"/>
</body>
</html>
그래서 그것을 표시하시기 바랍니다 :) -
개인적으로 나는 Thymeleaf http://www.thymeleaf.org/ 봄 3 MVC + Thymeleaf 자습서를 사용 – Aeseir