This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
src | |
├── main | |
│ ├── java | |
│ ├── resources | |
│ └── webapp | |
│ ├── WEB-INF | |
│ │ └── views | |
│ │ └── home.jsp | |
│ └── resources | |
│ ├── built(Webpack输出文件夹) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script type="text/javascript"> | |
window.json = <%=request.getAttribute("json")%>; | |
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
///////////////IndexController.java///////////////// | |
@RequestMapping("/index") | |
public String index(Map<String, Object> map){ | |
String json = "{\"year\": 2016}"; | |
map.put("json", json); | |
return "index"; | |
} | |
/////////////////////index.jsp///////////////////////// | |
<script type="text/javascript"> |