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

  • Standardized content access no matter where it is stored

  • Content/metadata association

  • Content search

  • Content transformation

  • REST or CMIS endpoints

Videos

Modules

  • Spring Content Commons - Core Spring concepts underpinning every Spring Content project.

  • Spring Content S3 - Store support for Amazon S3 objects. Also supports DellEMC ECS

  • Spring Content Filesystem - Store support for the Filesystem files

  • Spring Content Mongo - Store support for Mongo's GridFS

  • Spring Content JPA - Store support for JPA BLOBs

  • Spring Content Renditions - Extensible rendition service for content transformations

  • Spring Content Solr - Content indexing and search with Apache Solr

  • Spring Content Elasticsearch - Content indexing and search with Elasticsearch

  • Spring Versions Commons - Locking and versioning semantics for Entities and associated content

  • Spring Versions JPA - JPA-based implementation of locking and versioning

  • Spring Data REST - Exports Spring Content stores as hypermedia-driven RESTful resources

  • Spring Content CMIS - Exports Spring Content stores through the CMIS browser bindings

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>1.1.0.M2</version>
</dependency>

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


@Entity
@Getter
@Setter
@NoArgsConstructor
public class File {

	@Id
	@GeneratedValue(strategy = GenerationType.AUTO)
	private Long id;
	private String name;
	private Date created = new Date();
	private String summary;

	@ContentId private String contentId;
	@ContentLength private long contentLength;
	private String mimeType = "text/plain";
}

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

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

Content is handled separately with a ContentStore interface:-


public interface FileContentStore extends ContentStore<File, String> {
}

This interface extends Spring Content’s ContentStore and is typed to the entity class File and the id class 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 SpringContentApplication {

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

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

  • setContent(S property, InputStream content)

  • InputStream getContent(S property)

  • unsetContent(S property)

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

Releases

Reference Documentation

Spring Boot 2.1.x Spring Boot 2.2.x Spring Boot 2.3.x
GA SNAPSHOT GA SNAPSHOT GA
Storage
Spring Content S3 0.12.0 1.0.0.M11 1.0.0.M10 1.1.0.M3-SNAPSHOT 1.1.0.M2
Spring Content Filesystem 0.12.0 1.0.0.M11 1.0.0.M10 1.1.0.M3-SNAPSHOT 1.1.0.M2
Spring Content Mongo 0.12.0 1.0.0.M11 1.0.0.M10 1.1.0.M3-SNAPSHOT 1.1.0.M2
Spring Content JPA 0.12.0 1.0.0.M11 1.0.0.M10 1.1.0.M3-SNAPSHOT 1.1.0.M2
Renditions
Spring Content Renditions - - - 1.1.0.M3-SNAPSHOT 1.1.0.M2
Versioning
Spring Versions JPA 0.12.0 1.0.0.M11 1.0.0.M10 1.1.0.M3-SNAPSHOT 1.1.0.M2
Fulltext Indexing
Spring Content Solr 0.12.0 1.0.0.M11 1.0.0.M10 1.1.0.M3-SNAPSHOT 1.1.0.M2
Spring Content Elasticsearch 0.12.0 1.0.0.M11 1.0.0.M10 1.1.0.M3-SNAPSHOT 1.1.0.M2
APIs
Spring Content REST 0.12.0 1.0.0.M11 1.0.0.M10 1.1.0.M3-SNAPSHOT 1.1.0.M2
Spring Content CMIS 0.12.0 1.0.0.M11 1.0.0.M10 1.1.0.M3-SNAPSHOT 1.1.0.M2