rdf4j
rdf4j copied to clipboard
RDF4J-Server: move spring config from XML to config classes
Problem description
@jeenbroekstra wants to get rid of oldschool xml spring config of rdf4j-spring-server.
Preferred solution
Replicate configuration exactly through spring config classes
Are you interested in contributing a solution yourself?
No response
Alternatives you've considered
Completely rewriting the server. Currently not an option due to limited spare time.
If this was attempted, one might want to switch to a spring-boot server and get rid of the requirement to install a tomcat server.
Anything else?
No response
@jeenbroekstra Are there integration tests for the server? I am looking for a way to make sure the server is still doing what it is supposed to while I am refactoring it.
@fkleedorfer indirectly, there are: the compliance tests for the HTTPRepository and SPARQLRepository all use an RDF4J Server war, running in an embedded Jetty server, to execute operations on. While the focus in those tests is on complicance from the client's point of view, they can double as tests of proper functionality of the server as well. See https://github.com/eclipse/rdf4j/tree/main/compliance/repository/src/test/java/org/eclipse/rdf4j/repository/http (in particular HTTPStoreConnectionTest) and https://github.com/eclipse/rdf4j/tree/main/compliance/repository/src/test/java/org/eclipse/rdf4j/repository/sparql .
NB these tests rely on a war file being produced by maven during the package
phase, so if you're testing tweaks in the server, you will need to run mvn package
from the project root every time before running tests.
Alternatively:
- run
mvn install
fromtools/rdf4j-server
to install a new war file in your local maven repo - run
mvn clean package
fromcompliance/repository/http
to rebuild just the compliance test module, using the war from your local repo.