Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master

README

This is an example application of my following blog entries:

- Spring Data Solr Tutorial: Configuration - http://www.petrikainulainen.net/programming/solr/spring-data-solr-tutorial-configuration/
- Spring Data Solr Tutorial: CRUD (Almost) - http://www.petrikainulainen.net/programming/solr/spring-data-solr-tutorial-crud-almost/
- Spring Data Solr Tutorial: Query Methods - http://www.petrikainulainen.net/programming/solr/spring-data-solr-tutorial-query-methods/
- Spring Data Solr Tutorial: Adding Custom Methods to a Single Repository - http://www.petrikainulainen.net/programming/solr/spring-data-solr-tutorial-adding-custom-methods-to-a-single-repository/
- Spring Data Solr Tutorial: Sorting (Not published yet)

NOTE: The sorting does not work if you are using named query or the @Query annotation. This is a known bug of Spring
Data Solr 1.0.RC1. If you need to use sorting before the RC2 is released, you have to use the build snapshot dependency.

RUNNING THE APPLICATION:

- Download and install Maven 3 (http://maven.apache.org/download.html#Installation). If you have already installed Maven 3, you can skip this step.
- If you don't already have a local Solr installation, you have create one. You might want to read this
  blog entry: http://www.petrikainulainen.net/programming/maven/running-solr-with-maven/
- Go the root directory of project (The one which contains the pom.xml file)
- If you want to use the embedded Solr server, run command mvn clean jetty:run (Remember to set the value of
  solr.solr.home property found from the profiles/dev/config.properties file).
- If you want to use the HTTP Solr server, run command mvn clean jetty:run -P prod (Remember to set the value of
  solr.server.url property found from the profiles/prod/config.properties file).
- Start your browser and go to the location: http://localhost:8080
- Use credentials (user/password) to log in.

RUNNING TESTS:

- You can run unit tests by using this command: mvn test -P dev
- You can run integration tests by using a command: mvn verify -P integration-test

Something went wrong with that request. Please try again.