一 service包
在service包下创建ItemsService接口与实现类的包serviceimpl
1 定义ItemsService接口
public interface ItemsService {
//商品查询列表
List<ItemsCustom> findItemsList(ItemsQueryVo itemsQueryVo) throws Exception;
}
public class ItemsServiceImpl implements ItemsService {
@Autowired
private ItemsMapperCustom itemsMapperCustom;
public List<ItemsCustom> findItemsList(ItemsQueryVo itemsQueryVo) throws Exception {
return itemsMapperCustom.findItemsList(itemsQueryVo);
}
二 applicationContext-service.xml
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:mvc="http://www.springframework.