首页>代码>spring boot+spring+spring mvc+mybatis+maven加载树型后台权限管理菜单>/springBootWeb/src/main/java/com/goldencis/springBoot/controller/HelloController.java
package com.goldencis.springBoot.controller; import java.util.List; import java.util.Map; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; import com.goldencis.springBoot.model.AuthUser; import com.goldencis.springBoot.model.TreeObject; import com.goldencis.springBoot.service.HelloService; import com.goldencis.springBoot.util.TreeUtil; @Controller public class HelloController { @Autowired private HelloService helloservice; @RequestMapping("/helloJsp") public String helloJsp(Map<String, Object> map) { System.err.println("HelloController.helloJsp().hello"); List<AuthUser> authuser = helloservice.queryAll(); map.put("authuser", authuser); List<TreeObject> objects = helloservice.findRes(); // List<TreeObject> list = new ArrayList<TreeObject>(); // for (ResFormMap map : mps) { // TreeObject ts = new TreeObject(); // Common.flushObject(ts, map); // list.add(ts); // } TreeUtil treeUtil = new TreeUtil(); List<TreeObject> ns = treeUtil.getChildTreeObjects(objects, 0); map.put("list", ns); return "index"; } @RequestMapping("/tree") public String tree(Map<String, Object> map) { System.err.println("HelloController.helloJsp().hello"); List<AuthUser> authuser = helloservice.queryAll(); map.put("authuser", authuser); List<TreeObject> objects = helloservice.findRes(); TreeUtil treeUtil = new TreeUtil(); List<TreeObject> ns = treeUtil.getChildTreeObjects(objects, 0); map.put("list", ns); return "tree"; } }

Oxygeni LV7
2021年12月1日
ssh123 LV10
2021年7月5日
34992311 LV6
2021年4月25日
缓缓归来 LV11
2021年4月19日
panguan3292 LV1
2020年6月18日
jason0943 LV11
2020年5月12日
gao123qq LV21
2020年5月1日
jxchb123 LV6
2020年4月22日
dengjunjun LV15
2020年4月17日
onepiecebabylon LV13
2020年4月11日