03-30-2014 01:47 AM
<servlet>
<servlet-name>springMVC</servlet-name>
<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>springMVC</servlet-name>
<url-pattern>/springMVC/*</url-pattern>
</servlet-mapping>
<context:annotation-config />
<context:component-scan base-package="org.xxx.alfresco.web"/>
<mvc:annotation-driven />
03-30-2014 11:56 AM
03-30-2014 01:01 PM
03-31-2014 02:54 AM
03-31-2014 05:52 AM
09-21-2016 04:11 AM
Hi,
I am aware the thread is old, but wanted to let you know about GitHub - dgradecak/alfresco-mvc that is a project I developed and actually is the glue code between alfresco and spring MVC. I am also using it on the share side and expose spring-data-rest for instance. On the repository side I wrote another module that uses alfresco @mvc to expose something that I call spring-data-alfresco and is actually exposing spring data repositories to be used within alfresco with actually an implementation that access alfresco as a spring data repository resource.
But I highly recommend to check the original production ready and used in many projects (not by me only) Alfresco @MVC project.
The wrong approach with what you have in the original post is that you do not use the webscript framwork, so no authentication etc are taken in consideration by alfresco., The module I am talking about is actually a webscript that uses a DispatcherServlet under the hood and therfore all the alfresco advices etc are being applied to every request to a spring controllers. And the lasts thing it has a pretty useful annotation to annotate services @AlfrescoTransaction (and some more).
So you are not alone in this quest
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.