Before you start, make sure you’re familiar with Spring Boot and the Maven project structure.
-
Go to https://start.spring.io/ and fill in your project info:
- Click GENERATE to generate and download your default Spring Boot project.
-
Make the following changes in your project:
- Change the parent of the Maven project (i.e. in pom.xml) so it uses the Alfresco Java SDK.
-
Delete the Spring Boot test dependency in the POM file, and also the
test source (i.e.
org/alfresco/tutorial/sdk5demo/Sdk5DemoApplicationTests.java).
Your project file should look like this now:
<?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <!-- Alfresco Java SDK 6 Parent --> <parent> <groupId>org.alfresco</groupId> <artifactId>alfresco-java-sdk</artifactId> <version>6.2.0</version> </parent> <groupId>org.alfresco.tutorial</groupId> <artifactId>sdk6-demo</artifactId> <version>0.0.1-SNAPSHOT</version> <name>sdk6-demo</name> <description>Demo showing use of Alfresco SDK 6 libraries</description> <properties> <java.version>17</java.version> </properties> <dependencies> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter</artifactId> </dependency> </dependencies> <build> <plugins> <plugin> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-maven-plugin</artifactId> </plugin> </plugins> </build> </project>