摘要:
Product实体类 public class Product { private int id; private String name; private float price; private Category category; public Category getCategory() { 阅读全文
posted @ 2020-08-11 22:09
迷糊的小菜鸟
阅读(176)
评论(0)
推荐(0)
摘要:
连接数据库需要的步骤: 0.放入需要的jar包 1.DemoConfig的插件配置 public void configPlugin(Plugins me) {//添加插件me.add(new EhCachePlugin());DruidPlugin druidPlugin = new DruidP 阅读全文
posted @ 2020-08-11 21:34
迷糊的小菜鸟
阅读(571)
评论(0)
推荐(0)
摘要:
先准备要必要的Jar包以及项目 Mybaits入门 增加 Category.xml <insert id="addCategory" parameterType="Category" > insert into category_ ( name ) values (#{name}) </insert 阅读全文
posted @ 2020-08-11 21:32
迷糊的小菜鸟
阅读(160)
评论(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)
摘要:
显示在page文件夹下的jsp 页面 在springmvc-servlet.xml文件里 设置<bean id="viewResolver" class="org.springframework.web.servlet.view.InternalResourceViewResolver"><prop 阅读全文
posted @ 2020-08-11 21:18
迷糊的小菜鸟
阅读(155)
评论(0)
推荐(0)

浙公网安备 33010602011771号