# Spring Boot Starter Parent

This is a spring boot starter parent for kotlin projects, it configures various dependencies which should be used in every project

## Getting Started

### Installation

Use this in the pom.xml:

```xml
<parent>
	<groupId>dp.kotul</groupId>
	<artifactId>spring-boot-starter-parent</artifactId>
	<version>1.0-SNAPSHOT</version>
</parent>
<depedencies>
    ...
    <dependency>
        <groupId>dp.kotul</groupId>
        <artifactId>spring-boot-starter</artifactId>
        <version>${project.parent.version}</version>
    </dependency>
    ...
</depedencies>
```

### Configuration

* You can also enable debug output in intellij if needed
* This starter autoconfigures these dependencies:  
    1) Correlation & Session id filter for logging  
    2) Logback
    3) JwtParser  
    4) Jackson  
    5) Logger  
    6) Swagger  
        * Endpoints visible in swagger docs must be annotated with `@Api` annotation
* These `application.properties` should be defined in all kotlin spring applications:

```properties
    spring.profiles.include=parent

    server.port=<server port>
    swagger.apiTitle=<application title>
    swagger.apiDescription=<application description>
    swagger.apiVersion=<application version>
    logback.path=<path to the logging directory> (must end with '/')
        
    spring.application.name=<application name>
    management.server.port=<port for health endpoints> (must different than server.port)

    auth.enabled=true (default is false, it turns on authorization interceptor)
    auth.urlPatterns= (default is /**, it can have more values separated by ',')
    auth.excludeUrlPatterns= (url patterns excluded from running authorization interceptor)

    feign.level= (default is FULL, it sets level of logging)
    feign.timeOut= (default is 1000 * 10, it sets read and connect timeout for feign calls)
```
