Closed vraptorche closed 1 year ago
Can you elaborate what exact problem this solves and how this is useful?
I am going to close this PR in a week or so if there is no further information on it.
This is potentially of interest to me (and anyone who uses other template renderers than Thymeleaf). Actually, there is very little in this library outside the (small) thymeleaf package that is Thymeleaf specific. This would be a step in the right direction IMO. Having said that I don't think the implementation makes sense because typically there is only one important ViewResolver
in an ApplicationContext
(and it is a composite already so some of the logic in this PR is duplicated). I think you can locate it with a well-known bean name "viewResolver".
If you could provide a better implementation, I am willing to add it to the library. Would be good to have some example as well of how this could be used or in what case one needs this.
I put an implementation based on the bean name in #51. There are no samples in this project so it's hard to add an example usage. A simple use case would be to use Freemarker (for instance) or any other renderer that has a ViewResolver
. I can show you what that looks like if you want, but hard to do here without some changes to the layout of the project (separate sample, separate MVC and thymeleaf libraries, for instance).
Ok, no problem I understand better now. Thanks for the other PR. Closing this one in favor of #51
Sometimes in larger applications there is a need for multiple view resolvers. Proposed change implements support for multiple resolvers