前端加弹窗
前端加一段js即可
<script th:inline="javascript">
/*<![CDATA[*/
var msg = /*[[${msg}]]*/null;
if(msg!=null){
alert(msg);
}
/*]]>*/
</script>
后端request方法
@RequestMapping("/pollution")
public String pollutionWeb(HttpServletRequest request) {
request.setAttribute(Constants.MSG, "暂无数据");
return "pollution";
}