首页| JavaScript| HTML/CSS| Matlab| PHP| Python| Java| C/C++/VC++| C#| ASP| 其他|
购买积分 购买会员 激活码充值

您现在的位置是:虫虫源码 > 其他 > 谷歌Guice库模式支持

谷歌Guice库模式支持

  • 资源大小:49.83 kB
  • 上传时间:2021-06-30
  • 下载次数:0次
  • 浏览次数:0次
  • 资源积分:1积分
  • 标      签: guice 谷歌 支持 模式

资 源 简 介

Overview Guice-repository is a Guice-adapted version of Spring Data-JPA project with some additional features. Example: ``` public class AccountService { @Inject private AccountRepository accountRepository; public void registerUser(String login, String password) throws RegistrationException{ // ... some checks & etc accountRepository.save(new Account(login, password)); // ... something else } public Account findAccount(String login) throws FinderException{ return accountRepository.findAccountByLogin(login); } } ``` Repository pattern motivation "by Edward Hieatt and Rob Mee Mediates between the domain and data mapping layers using a collection-like interface for accessing domain objects." ![](http://guice-repository.g
VIP VIP
0.184893s