alfresco

Spring Boot Actuators for Alfresco Content Services

Being part of the Alfresco community for more than a decade, I have been involved in many community and enterprise projects too. I can tell that the repository side did not evolve a lot since the beginnings and for sure it did not have to, as 15 years ago it was created by some great minds. But today, when Spring Boot is in the game and offering so many production ready features, Alfresco community is not following that trend, even though enterprise offers more “production ready” administration features. However, enterprise is in my opinion also lacking of some advanced integrations, although the new “microservice architecture” is a good move.

Hopefully the community and the Order of the bee is there to provide a great missing piece of the puzzle with the Support tools, but it is too Share oriented in my opinion and Share is somehow “deprecated” by Alfresco (as announced a couple of years ago).

Although, in many other projects I am using Spring Boot and different tools provided by the Spring Cloud ecosystem and all the new microservices developed by Alfresco are mostly based on the same Spring Boot platform, my life started to be complicated as I could not provide the same or similar features for Alfresco itself.

Spring Boot Actuator endpoints

Anyhow, my first aim was to create some extensions for Alfresco to integrate with Spring Boot Admin and at the end I finished adding Spring Boot libraries to Alfresco with gaining incredible new features, from @ConditionalOn… annotations to the full stack of production ready features provided by Actuators. It was not an easy job to integrate this with Alfresco webscripts but reusing Alfresco @Mvc for “@Controllers” helped a lot (as you all know, Alfresco does not support out of the box Spring MVC controllers). Now all this is bundled in a simple project I called Alfresco Mvc Actuators.

If you run Spring Cloud Security & JWT microservice for Alfresco SSO, it comes with the SpringBootAdmin (SBA) server enabled and running the actuators in Alfresco would give you some nice screens on SBA

The actuators implemented for now offer many features like viewing memory state, GC information, logfile, changing loggers level, viewing all beans, scheduled tasks in Alfresco and JMX access over Jolokia. As I said, production ready features offered by Spring Boot are bundle inside of Alfresco. The howto can be checked on the project’s github page.

So let’s start bootify Alfresco!

Unfortunately, (or hopefully?) Alfresco uses Spring 5.1.8 and that is why Spring Boot 2.1.6 is used.

At the end, Alfresco enterprise comes with a couple of jars that this project relies on and thus read carefully the howto so that you do not override existing libraries in an enterprise installation.

Author : Daniel Gradecak

I am an Alfresco ECM consultant & Java developer from Belgium, currently living in Zagreb, Croatia. For the past 17 years, I've been developing Java and web applications. The last 15 years I have been primarily working with the Alfresco platform, along-side companies and organizations (all over Europe) to architect, develop and complete new applications. As an effective communicator I can normally create a solution that hurdles many obstacles to achieve a mutually accepted notion of success in terms of project delivery. I have specialized in tailor made application development using Javascript and Java/Alfresco. Each solution is highly accepted by the end users and that gives me a great confidence in my work.

Leave a Reply

Your email address will not be published. Required fields are marked *