We are implementing a DXA website where one of it's features is a search page for specific component types. We are implementing this using a spring controller with a service which in its turn talks to a SOLR instance (which gets its data from SI4T).

We are now trying to solve following problem:

These components have an image that we need to show within the results on that search page. However SI4T puts the ItemId of that image within our SOLR index. So for this setup to work we need a way that we can resolve an item id to a url (we do have the publication that we are in so constructing the full tcm uri is not a problem).

Is there a LinkResolver that we can access from a plain spring rest controller?



1 Answer 1


Yes, there is. You can use the DXA LinkResolver abstraction for that purpose.

You can get access to this Link Resolver in your own Controller using Spring's Dependency Injection. See, for example: https://github.com/sdl/dxa-web-application-java/blob/master/dxa-framework/dxa-common-api/src/main/java/com/sdl/webapp/common/controller/PageController.java


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.