Spring Content

Cloud-Native Content Services for Spring.

For creating services that manage content such as documents, images and movies.

Build your own cloud-native, scale-out headless content services using the exact same components as the Enterprise Content Management (ECM) vendors such as Documentum and OpenText, without the hassle.

Features

Videos

Modules

Overview

spring-content-arch
Figure 1. understanding how Spring Content fits into the Spring eco-system

Quick Start

<dependency>
    <groupId>com.github.paulcwarren</groupId>
    <artifactId>spring-content-fs-boot-starter</artifactId>
    <version>0.10.0</version>
</dependency>

For a quick taste, look at the following domain object:

@Entity
public class SopDocument {

    private @Id @GeneratedValue Long id;
    private String title;
    private String[] authors, keywords;

    // Spring Content managed attribute
    private @ContentId String contentId;

    private SopDocument() {}
    public SopDocument(String title, String[] authors, String[] keywords)   {
        this.title = title;
        this.authors = authors;
        this.keywords = keywords;
    }
}

This defines a simple JPA entity with a few structured data fields; title, authors and keywords and one Spring Content-managed data field; @ContentId.

The structured data fields are handled in the usual way through a CrudRepository<SopDocument,String> interface.

Content is handled separately with a ContentStore interface:-

public interface SopDocumentContent extends ContentStore<SopDocument, String> {
}

This interface extends Spring Content’s ContentStore, defines the type (SopDocument) and the id type (String). Put this code inside a Spring Boot application with spring-boot-starter-data-jpa and spring-content-fs-boot-starter like this:

@SpringBootApplication
public class MyApp {

    public static void main(String[] args) {
        SpringApplication.run(MyApp.class, args);
    }
}

Launch your app and Spring Content (having been autoconfigured by Boot) will automatically craft a concrete set of operations for handling content associated with this Entity:

For more, check out our initial Getting Started Guide, or watch one of our SpringOne talks 2016, 2017 @11mins and 2018.

Reference Documentation

Spring Boot 2.1.x Spring Boot 2.2.x
Storage
Spring Content S3 0.11.0-SNAPSHOT 0.10.0 1.0.0.M2-SNAPSHOT 1.0.0.M1
Spring Content Filesystem 0.11.0-SNAPSHOT 0.10.0 1.0.0.M2-SNAPSHOT 1.0.0.M1
Spring Content Mongo 0.11.0-SNAPSHOT 0.10.0 1.0.0.M2-SNAPSHOT 1.0.0.M1
Spring Content JPA 0.11.0-SNAPSHOT 0.10.0 1.0.0.M2-SNAPSHOT 1.0.0.M1
Versioning
Spring Versions JPA 0.11.0-SNAPSHOT 0.10.0 1.0.0.M2-SNAPSHOT 1.0.0.M1
Fulltext Indexing
Spring Content Solr 0.11.0-SNAPSHOT 0.10.0 1.0.0.M2-SNAPSHOT 1.0.0.M1
Spring Content Elasticsearch 0.11.0-SNAPSHOT 0.10.0 1.0.0.M2-SNAPSHOT 1.0.0.M1
APIs
Spring Content REST 0.11.0-SNAPSHOT 0.10.0 1.0.0.M2-SNAPSHOT 1.0.0.M1
Spring Content CMIS 0.11.0-SNAPSHOT 0.10.0 1.0.0.M2-SNAPSHOT 1.0.0.M1