-
Notifications
You must be signed in to change notification settings - Fork 9
Home
Daniel Gradecak edited this page Jun 12, 2024
·
21 revisions
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.
<dependency>
<groupId>com.gradecak.alfresco</groupId>
<artifactId>alfresco-mvc-XXX</artifactId>
<version>9.0.0</version>
</dependency>
- support for jakarta servlet
- older ACS versions (prior to 23.x) are not compatible
- Tested on Alfresco Community 23.1.0, 23.2.1
- 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
- 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
- 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, ...)
- dispatchewebscript responses can be used with Alfresco REST API response processing with @AlfrescoRestResponse
@GetMapping(value = "noderefAlfrescoResponse") @AlfrescoRestResponse public ResponseEntity<?> noderefAlfrescoResponse() { ... }
- 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.
- 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