1、实验一Spring IoC 中Bean的装配 1.实验目的和要求 掌握在Spring IoC容器中基于XML和基于注解装配Bean的方法。 2.实验内容 现有product产品类,根据业务需求要对产品进行保存操作,为了遵守三层框架体系结构,设计了如下的类的结构。 Product实体类: 1. package com.po; 2. public class Product { 3. private Integer id; //商品的ID 4. private String name; //商品名称 5. private String subTitle;//商品描述信息 6. private float price;//商品价格 7. public Integer getId() { 8. return id; 9. } 10. /***settter and getter / 11. @Override 12. public String toString() { //当打印对象

时间:2023-12-30 09:43:15

相似题目