spring-data

    1热度

    1回答

    我正在使用spring roo开发一个项目,它需要管理多个数据库。所以我建立了多个数据源和实体管理器工厂。当我运行该项目,我总是得到以下错误: 2011-12-14 18:35:39,692 [main] ERROR org.springframework.web.context.ContextLoader - Context initialization failed org.springfr

    13热度

    4回答

    我想在一个小的独立应用程序中一起使用弹簧数据和弹簧配置。 ... public static void main(String[] args) { ApplicationContext ctx = new AnnotationConfigApplicationContext(AppConfig.class); ... } 我的问题是如何发现

    2热度

    1回答

    我很新使用spring-data-jpa,但看起来很有希望。我用它来作这样在我的应用程序的所有库: public interface CustomerRepository extends JpaRepository<Customer, Integer>, JpaSpecificationExecutor<Customer> 我看到有一个梅索德呼叫findAll(Specification<T>)进

    2热度

    2回答

    我有这段代码来获取2日期之间的所有交易。我想得到一个desc排序列表。有什么可能性? @Override public List<Transaction> searchBySubmitDate(final Date startDate, final Date endDate) { return transactionRepository.findAll(n

    1热度

    1回答

    如果我删除第一个persist(),则以下测试失败。为什么我需要坚持NodeEntity才能使Set实例化?有没有更好的方法来做到这一点?我不希望更多地写入数据库比琐事。 @Test public void testCompetenceCreation() { Competence competence = new Competence(); competence.setNa

    9热度

    1回答

    基于Spring Data Document documentation,我提供了一个存储库方法的自定义实现。自定义方法的名称是指不在域对象存在的属性: @Document public class User { String username; } public interface UserRepositoryCustom { public User findByNo

    0热度

    1回答

    是否有可能与弹簧数据的Neo4j使用WrappingNeoServerBootstrapper? 使用不带spring-data-neo4j的嵌入式数据库时,可以使用WrappingNeoServerBootstrapper来启用REST接口和Webadmin。我用弹簧数据Neo4j的和嵌入的分贝(<neo4j:config storeDirectory="target/graph.db"/>在弹

    2热度

    1回答

    我正在使用Mongo和Spring Data。 我有两个(第一类)实体(@Documents)Entity1和Entity2,其中Entity1在其中包含Entity2的引用(@DBRef)。一切工作正常,但执行派生查询,如: public List<Entity1> findByEntity2Property1(String property1) 上述查询返回没有结果,虽然有文档与给定的查询

    28热度

    2回答

    我有一个标准的POJO,它有一组属性。 POJO已被注释为@Document,以便作为文档在MongoDB中持久存在。 如何(注释??)我可以忽略/避免POJO中的某个属性被持久化?

    4热度

    4回答

    我为我的web应用程序(靠近社交网站)使用Spring Data(Mongo)。现在,我希望提供搜索功能,覆盖应用程序中写入的内容(如帖子,标签,朋友等)。我相信Lucene/Solr是这种情况下更好的库之一,但我不确定如何使用(集成?)它与Spring Data(或者在Spring中有一些固有的支持)。 希望对此有所帮助(文档,链接,博客文章等)!