I’m reviewing the possibilities of GroupDocs.Viewer for one of our customers.
We are integrating it with Spring MVC. In the examples as can be found here ‘http://groupdocs.com/docs/display/viewerjava/GroupDocs.Viewer+for+Java±+Integrating+with+Spring’, the @Property annotation from the spring-property-annotations library from urbanmania is used.
This seems a bit strange to me because Spring itself has the possibility to use the @Value annotation to provide the same solution. And you can even do it without using any XML configuration anymore in the following way:
@PropertySource(value = “groupdocs.properties”)
@Configuration
public class GroupDocsConfig implements IServiceConfiguration {
@Value(“${groupdocs.viewer.applicationPath}”)
protected String applicationPath;
@Value(“${groupdocs.viewer.filePath}”)
protected String basePath;
…
}
In my opinion it’s better to not introduce that many other frameworks in
this kind of examples, but stick to the basics as much as possible.