023-《宝淘》项目拆解,细化到每一个步骤
其他
2019-07-05 00:01:07
阅读次数: 0
- 数据库配置
- public static Connection getConnection(){}
- xml文件
- Spring头文件
- Component-scan
- Dao层
- 实现IAdd接口,AddImpl
- 实现IDelete接口,DeleteImpl
- 实现IUpdate接口,UpdateImpl
- 实现IResult接口,ResultImpl
- Service层
- new 一个 Dao,然后写四个方法,分别是增删改除
- 让刚new出的实例对象去调用这些方法
- Classes
- Commodity
- Milk
- Meat
- Fruit
- Vegetable
- Interfaces
- IAdd
- void add()
- IDelete
- void delete()
- IUpdate
- void update()
- IResult
- void result()
- Test
- new一个ClassPathXmlComplation
- 获得bean,前提是bean已经通过注解的方式注入,然后强制类型转换为Service的类型
- 可以操作
转载自blog.csdn.net/qq_31698195/article/details/89840719