TSK-799: Refactor REST documentation.
Remove unnecessary files and fix favicon.ico Remove TaskHistoryRestConfiguration in test documentation remove history module
This commit is contained in:
parent
8d63d775f9
commit
5d1ae3a732
|
@ -18,5 +18,6 @@
|
|||
<module>taskana-rest-spring-base</module>
|
||||
<module>taskana-rest-spring-example</module>
|
||||
<module>taskana-rest-spring-wildfly-example</module>
|
||||
<module>taskana-rest-spring-test</module>
|
||||
</modules>
|
||||
</project>
|
||||
|
|
|
@ -1,9 +1,7 @@
|
|||
<!DOCTYPE html>
|
||||
<html xmlns:th="http://www.thymeleaf.org">
|
||||
<head>
|
||||
<link rel="icon"
|
||||
type="image/x-icon"
|
||||
th:href="@{/img/favicon.png}">
|
||||
<link rel="icon" type="image/x-icon" th:href="@{/img/logo.png}">
|
||||
<title>Taskana login</title>
|
||||
<link rel="stylesheet" type="text/css" th:href="@{/css/bootstrap/4.1.3/bootstrap.min.css}"/>
|
||||
<link rel="stylesheet" type="text/css" th:href="@{/css/main.css}"/>
|
||||
|
|
|
@ -78,13 +78,11 @@
|
|||
<artifactId>spring-ldap-core</artifactId>
|
||||
<version>${spring.ldap.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.h2database</groupId>
|
||||
<artifactId>h2</artifactId>
|
||||
<version>1.4.197</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.ibm.db2.jcc</groupId>
|
||||
<artifactId>db2jcc4</artifactId>
|
||||
|
@ -104,19 +102,27 @@
|
|||
<artifactId>taskana-core</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-thymeleaf</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>pro.taskana</groupId>
|
||||
<artifactId>taskana-rest-spring-base</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- Tests -->
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-test</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.springframework.security</groupId>
|
||||
<artifactId>spring-security-test</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.springframework.ldap</groupId>
|
||||
<artifactId>spring-ldap-test</artifactId>
|
||||
|
@ -129,176 +135,7 @@
|
|||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.springframework.restdocs</groupId>
|
||||
<artifactId>spring-restdocs-mockmvc</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-thymeleaf</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>pro.taskana</groupId>
|
||||
<artifactId>taskana-rest-spring-base</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||
</plugin>
|
||||
|
||||
<!-- Required for generation of REST documentation -->
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-surefire-plugin</artifactId>
|
||||
<configuration>
|
||||
<!-- Required for skip plugin tests by default -->
|
||||
<excludes>
|
||||
<exclude>**/*Plugin*Test.java</exclude>
|
||||
</excludes>
|
||||
<includes>
|
||||
<include>**/*Test.java</include>
|
||||
<include>**/*Documentation.java</include>
|
||||
</includes>
|
||||
<!-- Travis build workaround to prevent error that VM is closed due to an error. -->
|
||||
<argLine>-Xms1024m -Xmx2048m</argLine>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.asciidoctor</groupId>
|
||||
<artifactId>asciidoctor-maven-plugin</artifactId>
|
||||
<version>1.5.3</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>generate-docs</id>
|
||||
<phase>prepare-package</phase>
|
||||
<goals>
|
||||
<goal>process-asciidoc</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<backend>html</backend>
|
||||
<doctype>book</doctype>
|
||||
<attributes>
|
||||
<snippets>target/generated-snippets</snippets>
|
||||
<docinfo>shared</docinfo>
|
||||
</attributes>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<artifactId>maven-resources-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>copy-rest-docs</id>
|
||||
<phase>prepare-package</phase>
|
||||
<goals>
|
||||
<goal>copy-resources</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<outputDirectory>
|
||||
${project.build.outputDirectory}/static/docs/rest
|
||||
</outputDirectory>
|
||||
<resources>
|
||||
<resource>
|
||||
<directory>
|
||||
${project.build.directory}/generated-docs
|
||||
</directory>
|
||||
</resource>
|
||||
<resource>
|
||||
<directory>${project.basedir}/src/js</directory>
|
||||
</resource>
|
||||
</resources>
|
||||
</configuration>
|
||||
</execution>
|
||||
<execution>
|
||||
<id>copy-taskana-core-docs</id>
|
||||
<phase>prepare-package</phase>
|
||||
<goals>
|
||||
<goal>copy-resources</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<outputDirectory>
|
||||
${project.build.outputDirectory}/static/docs/java/taskana-core
|
||||
</outputDirectory>
|
||||
<resources>
|
||||
<resource>
|
||||
<directory>
|
||||
../../lib/taskana-core/target/apidocs
|
||||
</directory>
|
||||
</resource>
|
||||
</resources>
|
||||
</configuration>
|
||||
</execution>
|
||||
<execution>
|
||||
<id>copy-taskana-cdi-docs</id>
|
||||
<phase>prepare-package</phase>
|
||||
<goals>
|
||||
<goal>copy-resources</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<outputDirectory>
|
||||
${project.build.outputDirectory}/static/docs/java/taskana-cdi
|
||||
</outputDirectory>
|
||||
<resources>
|
||||
<resource>
|
||||
<directory>
|
||||
../../lib/taskana-cdi/target/apidocs
|
||||
</directory>
|
||||
</resource>
|
||||
</resources>
|
||||
</configuration>
|
||||
</execution>
|
||||
<execution>
|
||||
<id>copy-taskana-spring-docs</id>
|
||||
<phase>prepare-package</phase>
|
||||
<goals>
|
||||
<goal>copy-resources</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<outputDirectory>
|
||||
${project.build.outputDirectory}/static/docs/java/taskana-spring
|
||||
</outputDirectory>
|
||||
<resources>
|
||||
<resource>
|
||||
<directory>
|
||||
../../lib/taskana-spring/target/apidocs
|
||||
</directory>
|
||||
</resource>
|
||||
</resources>
|
||||
</configuration>
|
||||
</execution>
|
||||
<execution>
|
||||
<id>copy-history-rest-spring-docs</id>
|
||||
<phase>prepare-package</phase>
|
||||
<goals>
|
||||
<goal>copy-resources</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<outputDirectory>
|
||||
${project.build.outputDirectory}/static/docs/rest
|
||||
</outputDirectory>
|
||||
<resources>
|
||||
<resource>
|
||||
<directory>
|
||||
${project.build.directory}/generated-docs
|
||||
</directory>
|
||||
</resource>
|
||||
<resource>
|
||||
<directory>../taskana-history-rest-spring/target/apidocs</directory>
|
||||
</resource>
|
||||
</resources>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
<!--
|
||||
this repository is needed to fetch com.ibm.db2.jcc
|
||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 755 B |
|
@ -1,4 +1,4 @@
|
|||
package pro.taskana.historyPlugin;
|
||||
package pro.taskana;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
|
|
@ -0,0 +1,251 @@
|
|||
<?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 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<parent>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-parent</artifactId>
|
||||
<version>2.0.2.RELEASE</version>
|
||||
<relativePath/> <!-- lookup parent from repository -->
|
||||
</parent>
|
||||
|
||||
<groupId>pro.taskana</groupId>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<packaging>jar</packaging>
|
||||
<artifactId>taskana-rest-spring-test</artifactId>
|
||||
<version>1.0.8-SNAPSHOT</version>
|
||||
|
||||
<properties>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
|
||||
<java.version>1.8</java.version>
|
||||
<spring.ldap.version>2.3.2.RELEASE</spring.ldap.version>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-web</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-jdbc</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.plugin</groupId>
|
||||
<artifactId>spring-plugin-core</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>pro.taskana</groupId>
|
||||
<artifactId>taskana-rest-spring</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-security</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.h2database</groupId>
|
||||
<artifactId>h2</artifactId>
|
||||
<version>1.4.197</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>pro.taskana</groupId>
|
||||
<artifactId>taskana-rest-spring-base</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>pro.taskana.simplehistory</groupId>
|
||||
<artifactId>taskana-simplehistory-provider</artifactId>
|
||||
<version>0.0.6</version>
|
||||
</dependency>
|
||||
|
||||
<!-- Tests -->
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-test</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.security</groupId>
|
||||
<artifactId>spring-security-test</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.restdocs</groupId>
|
||||
<artifactId>spring-restdocs-mockmvc</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||
</plugin>
|
||||
<!-- Required for generation of REST documentation -->
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-surefire-plugin</artifactId>
|
||||
<configuration>
|
||||
<!-- Required for skip plugin tests by default -->
|
||||
<excludes>
|
||||
<exclude>**/*Plugin*Test.java</exclude>
|
||||
</excludes>
|
||||
<includes>
|
||||
<include>**/*Test.java</include>
|
||||
<include>**/*Documentation.java</include>
|
||||
</includes>
|
||||
<!-- Travis build workaround to prevent error that VM is closed due to an error. -->
|
||||
<argLine>-Xms1024m -Xmx2048m</argLine>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.asciidoctor</groupId>
|
||||
<artifactId>asciidoctor-maven-plugin</artifactId>
|
||||
<version>1.5.3</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>generate-docs</id>
|
||||
<phase>prepare-package</phase>
|
||||
<goals>
|
||||
<goal>process-asciidoc</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<backend>html</backend>
|
||||
<doctype>book</doctype>
|
||||
<attributes>
|
||||
<snippets>target/generated-snippets</snippets>
|
||||
<docinfo>shared</docinfo>
|
||||
</attributes>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<artifactId>maven-resources-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>copy-rest-docs</id>
|
||||
<phase>prepare-package</phase>
|
||||
<goals>
|
||||
<goal>copy-resources</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<outputDirectory>
|
||||
${project.build.outputDirectory}/static/docs/rest
|
||||
</outputDirectory>
|
||||
<resources>
|
||||
<resource>
|
||||
<directory>
|
||||
${project.build.directory}/generated-docs
|
||||
</directory>
|
||||
</resource>
|
||||
<resource>
|
||||
<directory>${project.basedir}/src/js</directory>
|
||||
</resource>
|
||||
</resources>
|
||||
</configuration>
|
||||
</execution>
|
||||
<execution>
|
||||
<id>copy-taskana-core-docs</id>
|
||||
<phase>prepare-package</phase>
|
||||
<goals>
|
||||
<goal>copy-resources</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<outputDirectory>
|
||||
${project.build.outputDirectory}/static/docs/java/taskana-core
|
||||
</outputDirectory>
|
||||
<resources>
|
||||
<resource>
|
||||
<directory>
|
||||
../../lib/taskana-core/target/apidocs
|
||||
</directory>
|
||||
</resource>
|
||||
</resources>
|
||||
</configuration>
|
||||
</execution>
|
||||
<execution>
|
||||
<id>copy-taskana-cdi-docs</id>
|
||||
<phase>prepare-package</phase>
|
||||
<goals>
|
||||
<goal>copy-resources</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<outputDirectory>
|
||||
${project.build.outputDirectory}/static/docs/java/taskana-cdi
|
||||
</outputDirectory>
|
||||
<resources>
|
||||
<resource>
|
||||
<directory>
|
||||
../../lib/taskana-cdi/target/apidocs
|
||||
</directory>
|
||||
</resource>
|
||||
</resources>
|
||||
</configuration>
|
||||
</execution>
|
||||
<execution>
|
||||
<id>copy-taskana-spring-docs</id>
|
||||
<phase>prepare-package</phase>
|
||||
<goals>
|
||||
<goal>copy-resources</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<outputDirectory>
|
||||
${project.build.outputDirectory}/static/docs/java/taskana-spring
|
||||
</outputDirectory>
|
||||
<resources>
|
||||
<resource>
|
||||
<directory>
|
||||
../../lib/taskana-spring/target/apidocs
|
||||
</directory>
|
||||
</resource>
|
||||
</resources>
|
||||
</configuration>
|
||||
</execution>
|
||||
<execution>
|
||||
<id>copy-documentation-to-taskana-rest-spring-example</id>
|
||||
<phase>prepare-package</phase>
|
||||
<goals>
|
||||
<goal>copy-resources</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<outputDirectory>
|
||||
../taskana-rest-spring-example/target/generated-docs
|
||||
</outputDirectory>
|
||||
<resources>
|
||||
<resource>
|
||||
<directory>
|
||||
${project.build.directory}/generated-docs
|
||||
</directory>
|
||||
</resource>
|
||||
</resources>
|
||||
</configuration>
|
||||
</execution>
|
||||
<execution>
|
||||
<id>copy-documentation-to-taskana-rest-spring-wildfly-example</id>
|
||||
<phase>prepare-package</phase>
|
||||
<goals>
|
||||
<goal>copy-resources</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<outputDirectory>
|
||||
../taskana-rest-spring-wildfly-example/target/generated-docs
|
||||
</outputDirectory>
|
||||
<resources>
|
||||
<resource>
|
||||
<directory>
|
||||
${project.build.directory}/generated-docs
|
||||
</directory>
|
||||
</resource>
|
||||
</resources>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
</project>
|
|
@ -384,10 +384,6 @@ This minimal example shows only the required fields to import a single new class
|
|||
|
||||
include::../../../{snippets}/ImportClassificationDefinitions/http-request.adoc[]
|
||||
|
||||
==== Request Structure
|
||||
|
||||
include::../../../{snippets}/ImportClassificationDefinitions/request-fields.adoc[]
|
||||
|
||||
==== Example Response
|
||||
|
||||
include::../../../{snippets}/ImportClassificationDefinitions/http-response.adoc[]
|
||||
|
@ -569,10 +565,6 @@ This minimal example shows only the required fields to import a single new workb
|
|||
|
||||
include::../../../{snippets}/ImportWorkbasketDefinitions/http-request.adoc[]
|
||||
|
||||
==== Request Structure
|
||||
|
||||
include::../../../{snippets}/ImportWorkbasketDefinitions/request-fields.adoc[]
|
||||
|
||||
==== Response Structure
|
||||
|
||||
include::../../../{snippets}/ImportWorkbasketDefinitions/http-response.adoc[]
|
||||
|
@ -797,25 +789,3 @@ include::../../../{snippets}/CommonSummaryResourceFields/http-request.adoc[]
|
|||
=== Example response
|
||||
|
||||
include::../../../{snippets}/CommonSummaryResourceFields/response-body.adoc[]
|
||||
|
||||
== History event
|
||||
|
||||
=== Get all task history event
|
||||
|
||||
==== Example request
|
||||
|
||||
include::../../../../taskana-history-rest-spring/{snippets}/GetAllTaskHistoryEventDocTest/http-request.adoc[]
|
||||
|
||||
==== Example response
|
||||
|
||||
include::../../../../taskana-history-rest-spring/{snippets}/GetAllTaskHistoryEventDocTest/response-body.adoc[]
|
||||
|
||||
=== Get a specific task history event
|
||||
|
||||
==== Example request
|
||||
|
||||
include::../../../../taskana-history-rest-spring/{snippets}/GetSpecificTaskHistoryEventDocTest/http-request.adoc[]
|
||||
|
||||
==== Example response
|
||||
|
||||
include::../../../../taskana-history-rest-spring/{snippets}/GetSpecificTaskHistoryEventDocTest/response-body.adoc[]
|
|
@ -0,0 +1,90 @@
|
|||
package pro.taskana.rest;
|
||||
|
||||
import java.sql.SQLException;
|
||||
|
||||
import javax.annotation.PostConstruct;
|
||||
import javax.sql.DataSource;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
import org.springframework.boot.autoconfigure.jdbc.DataSourceProperties;
|
||||
import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.ComponentScan;
|
||||
import org.springframework.context.annotation.DependsOn;
|
||||
import org.springframework.context.annotation.Import;
|
||||
import org.springframework.context.annotation.Primary;
|
||||
import org.springframework.jdbc.datasource.DataSourceTransactionManager;
|
||||
import org.springframework.scheduling.annotation.EnableScheduling;
|
||||
import org.springframework.transaction.PlatformTransactionManager;
|
||||
|
||||
import pro.taskana.jobs.TransactionalJobsConfiguration;
|
||||
import pro.taskana.ldap.LdapCacheTestImpl;
|
||||
import pro.taskana.ldap.LdapClient;
|
||||
import pro.taskana.sampledata.SampleDataGenerator;
|
||||
|
||||
/**
|
||||
* Example Application to create the documentation.
|
||||
*/
|
||||
@SpringBootApplication
|
||||
@EnableScheduling
|
||||
@ComponentScan(basePackages = "pro.taskana")
|
||||
@Import({TransactionalJobsConfiguration.class, RestConfiguration.class, WebMvcConfig.class})
|
||||
public class ExampleDocumentationApp {
|
||||
|
||||
@Value("${taskana.schemaName:TASKANA}")
|
||||
private String schemaName;
|
||||
|
||||
@Value("${generateSampleData:true}")
|
||||
private boolean generateSampleData;
|
||||
|
||||
@Autowired
|
||||
private SampleDataGenerator sampleDataGenerator;
|
||||
|
||||
@Autowired
|
||||
private LdapClient ldapClient;
|
||||
|
||||
@Autowired private LdapCacheTestImpl ldapCacheTest;
|
||||
|
||||
public static void main(String[] args) {
|
||||
SpringApplication.run(ExampleDocumentationApp.class, args);
|
||||
}
|
||||
|
||||
@Bean
|
||||
@Primary
|
||||
@ConfigurationProperties(prefix = "datasource")
|
||||
public DataSourceProperties dataSourceProperties() {
|
||||
DataSourceProperties props = new DataSourceProperties();
|
||||
props.setUrl("jdbc:h2:mem:taskana;IGNORECASE=TRUE;LOCK_MODE=0;INIT=CREATE SCHEMA IF NOT EXISTS " + schemaName);
|
||||
return props;
|
||||
}
|
||||
|
||||
@Bean
|
||||
public DataSource dataSource(DataSourceProperties properties) {
|
||||
return properties.initializeDataSourceBuilder().build();
|
||||
}
|
||||
|
||||
@Bean
|
||||
public PlatformTransactionManager txManager(DataSource dataSource) {
|
||||
return new DataSourceTransactionManager(dataSource);
|
||||
}
|
||||
|
||||
@Bean
|
||||
@DependsOn("getTaskanaEngine") // generate sample data after schema was inserted
|
||||
public SampleDataGenerator generateSampleData(DataSource dataSource) throws SQLException {
|
||||
sampleDataGenerator = new SampleDataGenerator(dataSource);
|
||||
return sampleDataGenerator;
|
||||
}
|
||||
|
||||
@PostConstruct
|
||||
private void init() {
|
||||
if (!ldapClient.useLdap()) {
|
||||
AccessIdController.setLdapCache(ldapCacheTest);
|
||||
}
|
||||
if (generateSampleData) {
|
||||
sampleDataGenerator.generateSampleData(schemaName);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,14 @@
|
|||
taskana.roles.user = group1 | group2|teamlead_1 |teamlead_2 |user_1_1| user_1_1| user_1_2| user_2_1| user_2_2| max|elena|simone
|
||||
taskana.roles.Admin=name=konrad,Organisation=novatec|admin
|
||||
taskana.roles.businessadmin=max|Moritz|businessadmin
|
||||
taskana.roles.monitor=john|teamlead_2 | monitor
|
||||
taskana.domains=DOMAIN_A,DOMAIN_B,DOMAIN_C
|
||||
taskana.classification.types=TASK,DOCUMENT
|
||||
taskana.classification.categories.task= EXTERNAL, manual, autoMAtic, Process
|
||||
taskana.classification.categories.document= EXTERNAL
|
||||
|
||||
taskana.jobs.maxRetries=3
|
||||
taskana.jobs.batchSize=50
|
||||
taskana.jobs.cleanup.runEvery=P1D
|
||||
taskana.jobs.cleanup.firstRunAt=2018-07-25T08:00:00Z
|
||||
taskana.jobs.cleanup.minimumAge=P14D
|
|
@ -34,7 +34,6 @@ import pro.taskana.rest.RestConfiguration;
|
|||
|
||||
/**
|
||||
* Test ClassificationDefinitionControlller.
|
||||
*
|
||||
*/
|
||||
@RunWith(SpringRunner.class)
|
||||
@SpringBootTest(classes = RestConfiguration.class, webEnvironment = WebEnvironment.RANDOM_PORT)
|
|
@ -0,0 +1,41 @@
|
|||
logging.level.pro.taskana=INFO
|
||||
### logging.level.org.springframework=DEBUG
|
||||
######## Taskana DB #######
|
||||
datasource.url=jdbc:h2:mem:taskana;IGNORECASE=TRUE;LOCK_MODE=0
|
||||
datasource.driverClassName=org.h2.Driver
|
||||
datasource.username=sa
|
||||
datasource.password=sa
|
||||
taskana.schemaName=TASKANA
|
||||
####### property that control rest api security deploy use true for no security.
|
||||
devMode=false
|
||||
|
||||
####### Property that informs about the Taskana's version. This version is shown the application web
|
||||
version=@project.version@
|
||||
|
||||
####### control LDAP usage
|
||||
taskana.ldap.useLdap=false
|
||||
####### properties to connect to LDAP
|
||||
taskana.ldap.serverUrl=ldap://localhost:10389
|
||||
taskana.ldap.bindDn=uid=admin,ou=system
|
||||
taskana.ldap.bindPassword=secret
|
||||
taskana.ldap.baseDn=o=TaskanaTest
|
||||
####### properties that control search for users and groups
|
||||
taskana.ldap.userSearchBase=ou=people
|
||||
taskana.ldap.userSearchFilterName=objectclass
|
||||
taskana.ldap.userSearchFilterValue=person
|
||||
taskana.ldap.userFirstnameAttribute=givenName
|
||||
taskana.ldap.userLastnameAttribute=sn
|
||||
taskana.ldap.userIdAttribute=uid
|
||||
taskana.ldap.groupSearchBase=ou=groups
|
||||
taskana.ldap.groupSearchFilterName=objectclass
|
||||
taskana.ldap.groupSearchFilterValue=groupOfUniqueNames
|
||||
taskana.ldap.groupNameAttribute=cn
|
||||
taskana.ldap.minSearchForLength=3
|
||||
taskana.ldap.maxNumberOfReturnedAccessIds=50
|
||||
####### JobScheduler cron expression that specifies when the JobSchedler runs
|
||||
taskana.jobscheduler.async.cron=0/5 * * * * *
|
||||
####### cache static resources properties
|
||||
spring.resources.cache.cachecontrol.cache-private=true
|
||||
####### tomcat is not detecting the x-forward headers from bluemix as a trustworthy proxy
|
||||
server.tomcat.internal-proxies=.*
|
||||
server.use-forward-headers=true
|
|
@ -12,4 +12,3 @@ taskana.jobs.batchSize=50
|
|||
taskana.jobs.cleanup.runEvery=P1D
|
||||
taskana.jobs.cleanup.firstRunAt=2018-07-25T08:00:00Z
|
||||
taskana.jobs.cleanup.minimumAge=P14D
|
||||
|
||||
|
|
Loading…
Reference in New Issue