YML and POM file - Neethahiremath/Wiki GitHub Wiki

management:
    endpoints:
        web:
            base-path: /actuator
            exposure:
                include: ["configprops", "env", "metrics", "prometheus", "health", "info", "threaddump"]
    info:
        git:
            mode: full
    metrics:
        enabled: true
        export:
            prometheus:
                enabled: true
        web:
            server:
                auto-time-requests: false
        distribution:
            percentiles:
                all: 0.9, 0.95, 0.99
    prometheus:
        enabled: true
    server:
        port: ${server.port}


spring:
    application:
        name: service
    thymeleaf:
        mode: HTML
    devtools:
        restart:
            enabled: true
        livereload:
            enabled: false
    sleuth:
        opentracing:
            enabled: true
        trace-id128: true
        sampler:
            probability: 0.1 #Default. Change to 1.0(meaning 100%) for local setup
server:
    servlet:
        context-path: /service
        session:
            cookie:
                http-only: true
    port: 8081

health-check:
    path: /healthcheck


feign:
    client:
        config:
            default:
                connectTimeout: 60000
                readTimeout: 10000

POM:


<?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">
    <modelVersion>4.0.0</modelVersion>

    <groupId>com.example</groupId>
    <artifactId>service</artifactId>
    <version>0.0.1</version>
    <packaging>jar</packaging>

    <name>service</name>
    <description></description>

      <repositories>
      <repository>
         <id>${repositoryid}</id>
         <name>nexus</name>
         <url>${repositoryurl}</url>
      </repository>
         <repository>
            <id>confluent</id>
            <url>http://packages.confluent.io/maven/</url>
        </repository>
    </repositories>

  
	<properties>
		<datastax.version>2.2.0</datastax.version>
		<monitoring-interceptors.version>5.5.1</monitoring-interceptors.version>
        <netty.version>4.1.65.Final</netty.version>
        <netty-tcnative.version>2.0.39.Final</netty-tcnative.version>
        <jacoco.version>0.8.1</jacoco.version>
        <jacoco.coverage.exclude>**/model/**/*.class,
            **/exception/**/*.class, **/Application.class,
            **/data/**/*.class, **/test/**/*.class
        </jacoco.coverage.exclude>
      <sonar.coverage.exclusions>
                        **/model/*,
                        **/exception/*,
                        **/configuration/*,
                        ${jacoco.coverage.exclude},
                        **/swagger/*
      </sonar.coverage.exclusions>
      <log4j2.version>2.17.1</log4j2.version>
	</properties>

    <dependencies>
       
        <dependency>
            <groupId>org.springframework.cloud</groupId>
            <artifactId>spring-cloud-starter-openfeign</artifactId>
            <version>2.1.1.RELEASE</version>
        </dependency>
        <!-- kafka dependencies -->
        <dependency>
            <groupId>org.apache.kafka</groupId>
            <artifactId>kafka-clients</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.kafka</groupId>
            <artifactId>spring-kafka</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.kafka</groupId>
            <artifactId>spring-kafka-test</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>io.confluent</groupId>
            <artifactId>monitoring-interceptors</artifactId>
            <version>${monitoring-interceptors.version}</version>
        </dependency>
        <dependency>
            <groupId>org.springframework.cloud</groupId>
            <artifactId>spring-cloud-starter-kubernetes-config</artifactId>
        </dependency>
        <!-- kafka dependencies -->
        <dependency>
            <groupId>net.sf.dozer</groupId>
            <artifactId>dozer</artifactId>
            <version>5.5.1</version>
        </dependency>
        <!-- spring retry dependencies -->
        <dependency>
            <groupId>org.springframework.retry</groupId>
            <artifactId>spring-retry</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-aspects</artifactId>
        </dependency>
        <!-- Hazelcast Boring SSL dependencies -->
        <dependency>
            <groupId>io.netty</groupId>
            <artifactId>netty-tcnative-boringssl-static</artifactId>
            <version>${netty-tcnative.version}</version>
        </dependency>
        <dependency>
            <groupId>io.netty</groupId>
            <artifactId>netty-handler</artifactId>
            <version>${netty.version}</version>
        </dependency>
        <!-- spring retry dependencies -->
 
    </dependencies>

      <profiles>
      <profile>
         <id>releases</id>
         <properties>
          
         </properties>
      </profile>
      <profile>
         <id>snapshots</id>
        <activation>
            <activeByDefault>true</activeByDefault>
        </activation>
         <properties>
          
         </properties>
      </profile>
    </profiles>

    <build>
        <plugins>
            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>org.jacoco</groupId>
                <artifactId>jacoco-maven-plugin</artifactId>
                <version>${jacoco.version}</version>
                <executions>
                    <execution>
                        <id>prepare-agent</id>
                        <goals>
                            <goal>prepare-agent</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>report</id>
                        <phase>prepare-package</phase>
                        <goals>
                            <goal>report</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>post-unit-test</id>
                        <phase>test</phase>
                        <goals>
                            <goal>report</goal>
                        </goals>
                        <configuration>
                            <!-- Sets the path to the file which contains the execution data. -->
                            <dataFile>target/jacoco.exec</dataFile>
                            <!-- Sets the output directory for the code coverage report. -->
                            <outputDirectory>target/jacoco-ut</outputDirectory>
                        </configuration>
                    </execution>
                </executions>
                <configuration>
                    <systemPropertyVariables>
                        <jacoco-agent.destfile>target/jacoco.exec</jacoco-agent.destfile>
                    </systemPropertyVariables>
                    <excludes>
                        <exclude>**/model/**</exclude>
                        <exclude>**/exception/**</exclude>
                        <exclude>**/configuration/**</exclude>
                        <exclude>${jacoco.coverage.exclude}</exclude>
                        <exclude>**/swagger/*</exclude>
                    </excludes>
                </configuration>
            </plugin>
        </plugins>
    </build>

</project>

⚠️ **GitHub.com Fallback** ⚠️