Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/adrianmilne/jpa-lucene-spring-demo
Demo project using JPA, Lucene, Spring, DBUnit and JMockit - to persist and search for simple Book data.
https://github.com/adrianmilne/jpa-lucene-spring-demo
dbunit demo java jmockit jpa lucene spring
Last synced: 14 days ago
JSON representation
Demo project using JPA, Lucene, Spring, DBUnit and JMockit - to persist and search for simple Book data.
- Host: GitHub
- URL: https://github.com/adrianmilne/jpa-lucene-spring-demo
- Owner: adrianmilne
- License: gpl-3.0
- Created: 2013-07-31T15:14:41.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2015-10-08T05:18:26.000Z (about 9 years ago)
- Last Synced: 2024-05-20T22:50:21.744Z (6 months ago)
- Topics: dbunit, demo, java, jmockit, jpa, lucene, spring
- Language: Java
- Size: 159 KB
- Stars: 17
- Watchers: 2
- Forks: 13
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
jpa-lucene-spring-demo
======================Full write up at Javalobby: http://architects.dzone.com/articles/jpa-searching-using-lucene
Also on Blog: http://www.adrianmilne.com/jpa-searching-using-lucene-working/
Demo project using JPA, Lucene, Spring, DBUnit and JMockit - to persist and search for simple Book data.
This is a Maven project. To build it and run the tests, you first need to install maven (http://maven.apache.org/).
Once you have Maven installed and working, and the project cloned locally, navigate to the project root directory, and type:
'mvn clean install'
This will compile the project and run the tests. There are 2 test classes - a simple Unit test that uses JUnit and JMockit, and another test that uses DBUnit.
The DBUnit test is a good example to get a feel for how this works - it will populate the in memory HSQL database, and then use Lucene to query the data in there. The example is a simple one, but illustrates the basic concepts of how to wire up the infrastructure to integrate Lucene and JPA.