springboot+thymeleaf后端设置全局变量前端js接收
公司旧的项目用play,新的项目改用springboot,前端同学问我,新的项目怎么拿baseUrl?其实springboot+thymeleaf是可以做到的,我就贴个代码记录一下吧后端代码如下:@Resource private void configureThymeleafStaticVars(ThymeleafViewResolver viewResolver) { ...
原创
2018-05-11 11:09:50 ·
8828 阅读 ·
4 评论