笔记
yu_xinghui
talk is sheap, show me the code.
展开
-
es的分页,过滤,高亮,排序,看这个足够了
分页+排序 @Test public void contextLoads(){ //queryForPage()需要两个参数,通过Builder创建所需要的对象 FieldSortBuilder sort = SortBuilders.fieldSort("age").order(SortOrder.ASC); NativeSearchQuery search = new NativeSearchQueryBuilder()原创 2020-06-07 13:46:28 · 711 阅读 · 0 评论 -
以.xls格式导出数据库数据折腾
public void exportUserList(HttpServletResponse response){ List<User> users = userService.findAll(null, null); Workbook workbook = ExcelExportUtil.exportExcel(new ExportParams(), User.class, users); try { response.s原创 2020-06-02 20:57:11 · 199 阅读 · 0 评论