Smart Plugin —— 从一个简单的 Cache 开始
本文是《 轻量级 Java Web 框架架构设计 》的系列博文。 目前在 Smart 中实现一个 Service,也许您会这样写: @Bean public class CustomerServiceImpl extends BaseService implements CustomerService { @Override public List<Customer> getCustomerList() { return DataSet.selectList(Customer.class, null, null); } @Override public boolean deleteCustomer(long id) { return DataSet.delete(Customer.class, "id = ?", id); } @Override public Customer getCustomer(long id) { return DataSet.select(Customer.class, "id = ?", id); } @Override public boolean updateCustomer(long id, Map<String, Object> fieldMap) { return DataSet.update(Customer.class, fieldMap