rdf4j icon indicating copy to clipboard operation
rdf4j copied to clipboard

RDF4J-Server: move spring config from XML to config classes

Open fkleedorfer opened this issue 2 years ago • 2 comments

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

fkleedorfer avatar Jan 02 '22 12:01 fkleedorfer

@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 avatar Jan 02 '22 12:01 fkleedorfer

@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:

  1. run mvn install from tools/rdf4j-server to install a new war file in your local maven repo
  2. run mvn clean package from compliance/repository/http to rebuild just the compliance test module, using the war from your local repo.

abrokenjester avatar Jan 02 '22 22:01 abrokenjester