Navigation Menu

Skip to content
Daniel Gradecak edited this page Nov 5, 2022 · 18 revisions

The missing glue between Alfresco and Spring MVC

Personally I do not like webscripts because of the boilerplate code that comes with them (XML, FTL, Java/Javascript). Also I am not a big fan of javascript on the server side esither, as in a medium sized application this becomes unmaintainable. That is why I wrote Alfresco @MVC.

Alfresco @MVC consists of two libraries: REST and AOP.

Distributed on Maven Central

<dependency>
  <groupId>com.gradecak.alfresco</groupId>
  <artifactId>alfresco-mvc-XXX</artifactId>
  <version>8.0.0</version>
</dependency>

Supported Alfresco versions

v8.0.0

  • dispatcherServlet bean added in the ServletContext (allows easier usage of other integrations like Spring Boot, OpenAPI,...)
  • Default Servlet context updated to support updated to Jackson2
  • removing ResponseMapBuilder class, use a Map builder instead
  • Removing @EnableAlfrescoMvcDispatcherServlet and @EnableWebAlfrescoMvc , use @EnableWebMvc and if you are using @AlfrescoDispatcherWebscript(servletContext = CustomServletContext.class) check if you want to @Import(DefaultAlfrescoMvcServletContextConfiguration.class) or provide your own servlet context full configuration
  • Removing querytemplate
  • tests improved
  • maven wrapper added
  • droping -RELEASE in the release version name
  • Tested on Alfresco Community 6.2.0-ga, 7.1.x, 7.2.x
  • Despite not being tested on Alfresco Enterprise it has to be compatible with the respectively tested Alfresco Community distribution

v7.5.1-RELEASE

  • Possibility to disable parent context servlet behavior @AlfrescoDispatcherWebscript(... servletConfigOptions = {ServletConfigOptions.DISABLED_PARENT_HANDLER_MAPPINGS, ...})
  • DispatcherWebscript servlet context can inherit all parent context properties (alfresco global included), or by annotation @AlfrescoDispatcherWebscript(inheritGlobalProperties = true, ...)
  • Tested on Alfresco Community 6.2.0-GA, 7.0.0
  • Tested on Alfresco Enterprise 6.2

since Alfresco MVC 7.5.0

  • Possibility to disable parent context servlet behavior @AlfrescoDispatcherWebscript(... servletConfigOptions = {ServletConfigOptions.DISABLED_PARENT_HANDLER_MAPPINGS, ...})
  • DispatcherWebscript servlet context can inherit all parent context properties (alfresco global included), or by annotation @AlfrescoDispatcherWebscript(inheritGlobalProperties = true, ...)

since Alfresco MVC 7.0.0

  • dispatchewebscript responses can be used with Alfresco REST API response processing with @AlfrescoRestResponse @GetMapping(value = "noderefAlfrescoResponse") @AlfrescoRestResponse public ResponseEntity<?> noderefAlfrescoResponse() { ... }

since Alfresco MVC 6.0.0

  • Alfresco 6 is supported alongside with Spring 5.x MVC features
  • Spring Data dependencies for pagination are removed in favor of Alfresco Params pagination
  • New annotation @Enabled configuration for Alfresco @MVC Rest
  • QueryTemplate was droped in order to reuse the new public apis and their services
  • Alfresco @MVC dist (amp distribution) is dropped, since we only provide libraries instead of concrete Alfresco modules. However our samples could still be provided as AMPs too.

since Alfresco MVC 5.0.0

  • a new project structure is created
  • no alfresco modules are registered when the jar/amp files are deployed
  • include samples
  • include a deployable alfresco project (alfresco-mvc-samples-bom/alfresco-5.2.e). You need to configure the database and alf_data
  • an AMP artifact can be build from the source code (mvn clean package). You will find it under alfresco-mvc-dist/target. However, it is better to include the dependencies in your build