MVC框架 M - model : 模型 -- 与数据库交互,操作数据库 V - view : 视图 -- 展示页面 HTML C - controller : 控制器 -- 调度作用,负责业务逻辑 MTV框架 M - model : 模型 -- 与数据库交互,操作数据库 ( ORM ) T - t ...
分类:
其他好文 时间:
2019-08-29 23:29:55
阅读次数:
124
java 枚举的功能挺多,但是坑更多,使用的时候要注意。如下面这个枚举。 咋一看,没什么问题,但是具体使用过程中,总是会出问题。原因就是这个枚举没有按照从0开始索引,除此之外即使从0开始,中间有断的索引也会有问题。主要出现在以下方面: 1. 在controller的方法中,比如以这个枚举为参数,如下 ...
分类:
编程语言 时间:
2019-08-29 15:58:26
阅读次数:
205
参考链接: "菜鸟教程 MVC模式" "CSDN:浅谈MVC架构—你到底有什么本事" 目录: <! GFM TOC "" "" "" "" "" "" <! GFM TOC 一、什么是MVC 1、概念 MVC全名是Model View Controller,是模型(model)-视图(view)-控 ...
分类:
Web程序 时间:
2019-08-29 13:53:37
阅读次数:
97
1、添加相关jar包: 2、添加配置文件: 3、添加实体类: 4、实现Repository类: 5、controller实现: 6、多表联合查询: 7、参考资料: http://www.ityouknow.com/springboot/2016/02/03/spring-boot-web.html ...
分类:
其他好文 时间:
2019-08-29 00:09:37
阅读次数:
90
HCLK is used for AHB bus, which is used by the ARM920T, the memory controller, the interrupt controller, the LCD controller, the DMA and USB host bloc ...
分类:
其他好文 时间:
2019-08-28 17:07:56
阅读次数:
74
1、创建behavior//frontend/behaviors/MobileBehavior.phpclassMobileBehaviorextends\yii\base\Behavior{publicfunctionevents(){return[\yii\web\Controller::EVENT_BEFORE_ACTION=>‘beforeAction‘];}publicfuncti
分类:
其他好文 时间:
2019-08-28 01:34:59
阅读次数:
203
springboot中如果想访问html页面,不每访问一个页面就写一个Controller,可以统一写一个公共的controller方法 代码: (1)引入hutool工具依赖 (2)公共Controller (3)访问页面路径 如页面路径在demo下,配置文件中servlet.context-pa ...
分类:
编程语言 时间:
2019-08-27 19:44:17
阅读次数:
120
@Controller 标识一个该类是Spring MVC controller处理器,用来创建处理http请求的对象. @Controller public class TestController { @RequestMapping("/test") public String test(Map ...
分类:
编程语言 时间:
2019-08-27 00:50:00
阅读次数:
88
Controller:/** * 校验 * @param request * @param response * @throws Exception */ @RequestMapping(value = "wx_check",method = {RequestMethod.GET}) public ...
分类:
微信 时间:
2019-08-26 19:26:19
阅读次数:
97
Spring部分 声明bean的注解 @Component 组件,没有明确的角色 @Service 在业务逻辑层使用(service层) @Repository 在数据访问层使用(dao层) @Controller 在展现层使用,控制器的声明(C) 注入bean的注解 @Autowired:由Spr ...
分类:
编程语言 时间:
2019-08-26 15:01:01
阅读次数:
84