Weekly Note

  1. executeUpdate return the rows found or match instead of affected rows, if u wanna to get the suppose answer, u could use the UseAffectedRows args to make it.

  2. Ensure this arg’s value should be false if u do not want use it. Something may got wrong on the c tag rendering as a result of it.

  3. spring boot controller response

    @Controller
    public class ResponseController{
    
        @GetMapping("page")
        public String Page(){
            //will react to index.html directly 
            return "index";
        }
    
        @GetMapping("/json1")
        public Entity json1Response(){
            Entity entity = new Entity();
            return entity;
        }
    
        @GetMapping("/json2")
        public Map json2Response(){
            Map map = new HashMap<>();
            map.put("entity1", new Entity());
            return map;
        }
    
        @GetMapping("/json3")
        @ResponseBody()
        public Entity json3Response(){
            Entity entity = new Entity();
            return entity;
        }
    
        @GetMapping("/ouput")
        @ResponseBody()
        public String ouputResponse(){
            String ouput = "output";
            return output;
        }
    
        @GetMapping("/controllerRouter")
        public ModelAndView routerDirect(){
            String url = "/controller/router";
            return new ModelAndView("redirect:" + url);
        }   
    }
  4. https://github.com/Germey/AwesomeWebSpider/blob/master/WebSpider.pdf

你可能感兴趣的:(Web)