随笔分类 -  Jfinal

摘要:连接数据库需要的步骤: 0.放入需要的jar包 1.DemoConfig的插件配置 public void configPlugin(Plugins me) {//添加插件me.add(new EhCachePlugin());DruidPlugin druidPlugin = new DruidP 阅读全文
posted @ 2020-08-11 21:34 迷糊的小菜鸟 阅读(572) 评论(0) 推荐(0)
摘要:UserController类 /* DAO是工具类查询删除可以 。修改增加 set操作不可以 */ //这是更新操作,因此需要 new UserModel()使用其DAO类 UserModel user = new UserModel();user.set("id", 1);user.set("n 阅读全文
posted @ 2020-08-11 21:31 迷糊的小菜鸟 阅读(846) 评论(0) 推荐(0)
摘要:UserService类 //find类 第一个参数是sql语句,第二个参数是需要查询的关键字public static UserModel findbyMobile(String mobile) {String sql = "select * from user where mobile = ?" 阅读全文
posted @ 2020-08-11 21:30 迷糊的小菜鸟 阅读(977) 评论(0) 推荐(0)
摘要:使用Template模板 #for(user : page.getList())#(user.name)———— ${user.password!} //记得文件需要引入 _paginate.html #include("_paginate.html")#@paginate(page.pageNum 阅读全文
posted @ 2020-08-11 21:28 迷糊的小菜鸟 阅读(380) 评论(0) 推荐(0)
摘要:ehcache.xml放置于WEB-INF 目录下 <?xml version="1.0" encoding="UTF-8"?><defaultCachename ="stocklist"maxElementsInMemory="10000"eternal="false"timeToIdleSeco 阅读全文
posted @ 2020-08-11 21:27 迷糊的小菜鸟 阅读(386) 评论(0) 推荐(0)
摘要:public void action5() {String sql = "select count(*) from user";long count = Db.queryLong(sql);List<UserModel> users = new ArrayList<UserModel>();// f 阅读全文
posted @ 2020-08-11 21:24 迷糊的小菜鸟 阅读(1286) 评论(0) 推荐(0)
摘要:UserController.class public void index() {renderText(">>>>>>>student>>>>>>>");StudentModel student = StudentModel.DAO.findByIds("h1",1);System.out.pri 阅读全文
posted @ 2020-08-11 21:20 迷糊的小菜鸟 阅读(171) 评论(0) 推荐(0)