Skip to content

Commit 1a6d70e

Browse files
add example project for using core module
Co-authored-by: Jonas Keegan <[email protected]> Co-authored-by: Matthias Geißendörfer <[email protected]>
1 parent b42e25c commit 1a6d70e

File tree

6 files changed

+58
-2
lines changed

6 files changed

+58
-2
lines changed

aws-auth/src/main/kotlin/de/babbage/aws/auth/AwsCredentialsConfiguration.kt

+2-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@ import software.amazon.awssdk.auth.credentials.ProfileCredentialsProvider
1414
class AwsCredentialsConfiguration {
1515

1616
@Bean
17-
fun defaultAwsCredentialsProvider(@Value("\${babbage.aws.auth.profile:default}") profile: String): AwsCredentialsProvider {
17+
fun defaultAwsCredentialsProvider(@Value("\${babbage.aws.auth.profile:default}") profile: String)
18+
: AwsCredentialsProvider {
1819
return AwsCredentialsProviderChain
1920
.builder()
2021
.credentialsProviders(

example/build.gradle.kts

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
plugins {
2+
id("babbage.conventions")
3+
}
4+
5+
repositories {
6+
mavenCentral()
7+
}
8+
9+
dependencies {
10+
implementation(project(":core"))
11+
}
12+
13+
base.archivesName.set("example")
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
package de.otto.babbage.example
2+
3+
import org.springframework.boot.autoconfigure.SpringBootApplication
4+
import org.springframework.boot.runApplication
5+
import org.springframework.context.annotation.ComponentScan
6+
7+
@SpringBootApplication
8+
@ComponentScan("de.otto.babbage")
9+
class ExampleApplication
10+
11+
fun main(args: Array<String>) {
12+
@Suppress("SpreadOperator")
13+
runApplication<ExampleApplication>(*args)
14+
}
+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
info:
2+
app:
3+
name: babbage-example
4+
5+
management:
6+
endpoints:
7+
web:
8+
base-path: /actuator
9+
exposure:
10+
include: loggers, info, health
11+
loggers:
12+
enabled: true
13+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
package de.otto.babbage.example
2+
3+
import org.junit.jupiter.api.Test
4+
import org.springframework.boot.test.context.SpringBootTest
5+
import org.springframework.test.context.ContextConfiguration
6+
7+
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
8+
class ExampleApplicationTests {
9+
10+
@Test
11+
@Suppress("EmptyFunctionBlock")
12+
fun contextLoads() {
13+
}
14+
15+
}

settings.gradle.kts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
rootProject.name = "babbage-microservice"
2-
include("core", "aws-auth", "aws-paramstore")
2+
include("core", "aws-auth", "aws-paramstore", "example")

0 commit comments

Comments
 (0)