public PersistenceGuiceContext useJPA(String... packages){
Assert.isFalse(this.useJPA, "已经打开了JPA支持");
Assert.isFalse(this.useHibernate, "已经打开了Hibernate支持,不能再使用JPA");
this.useJPA = true;
JpaGuiceModuleProvider jpaGuiceModuleProvider = new JpaGuiceModuleProvider();
if(packages != null)
jpaGuiceModuleProvider.addScanPackages(packages);
this.addModuleProvider(jpaGuiceModuleProvider,new TransactionGuiceModuleProvider(new JpaLocalTransactionInterceptor()));
return this;
}