0

In our SpringMVC based website, we want to use the LiteDeviceDelegatingViewResolver.

We already have a couple of other ViewResolvers configured and we want the LiteDeviceDelegatingViewResolver to take precedence over those.

However the LiteDeviceDelegatingViewResolver does not implement the Ordered interface, hence I cannot set an order value on it. It seems Spring uses these values to chain ViewResolvers. Is there another way to make LiteDeviceDelegatingViewResolver take precedence over the other ViewResolvers we have configured?

Thanks.

0cd
  • 1,729
  • 3
  • 15
  • 24
  • 1
    You could simply subclass the resolver and add the Ordered interface to the subclass. – Dirk Lachowski Apr 07 '14 at 06:50
  • Couldn't you just define the view resolver beans in order? – Bart Apr 07 '14 at 08:03
  • I could, but I wondered why LiteDeviceDelegatingViewResolver wouldn't support such a basic thing about View Resolution in Spring. Thought I would ask around and see if there's another way Spring could prioritize View Resolvers, but so far yeah extending seems to be the way to go. Thanks. – 0cd Apr 07 '14 at 17:20

0 Answers0