【发布时间】:2017-03-06 07:48:25
【问题描述】:
我有一个应用程序,其中一个按钮必须调用一个弹簧控制器。我如何将它们连接在一起? 我还没有找到任何明确的信息。
【问题讨论】:
-
是JHipster生成的API?
-
你能贴出角按钮的代码吗?我认为这不仅仅是一个简单的锚标记。
标签: angularjs spring spring-boot jhipster
我有一个应用程序,其中一个按钮必须调用一个弹簧控制器。我如何将它们连接在一起? 我还没有找到任何明确的信息。
【问题讨论】:
标签: angularjs spring spring-boot jhipster
在<a>标签中直接调用你的APIhref
API:http://192.168.1.17:8080/product/download/excel
<a href="/product/download/excel" > Start Download </a>
控制器:
@RequestMapping(value="/product/download/excel", method=RequestMethod.GET)
public Object downloadExcel(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse){
return productService.downloadExcel(httpServletRequest,httpServletResponse);
}
【讨论】: