Skip to content

Commit 1e39c49

Browse files
author
Pratik Das
committed
Merge branch 'spring-cloudwatch' of https://github.com/pratikdas/code-examples into spring-cloudwatch
2 parents c8bd066 + 2874dae commit 1e39c49

File tree

150 files changed

+7819
-7
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

150 files changed

+7819
-7
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
matrix:
1818
# The MODULE environment variable is evaluated in build-all.sh to run a subset
1919
# of the builds. This way, multiple modules can be built in parallel.
20-
module: [ "module1", "module2", "module3", "module4", "module5" ]
20+
module: [ "module1", "module2", "module3", "module4", "module5", "module6" ]
2121

2222
steps:
2323

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
FROM --platform=linux/amd64 adoptopenjdk/openjdk11:jre-11.0.10_9-alpine
2+
ARG JAR_FILE=build/libs/*.jar
3+
COPY ${JAR_FILE} service.jar
4+
EXPOSE 8080
5+
ENTRYPOINT [ "sh", "-c", "java -jar -XX:+UseContainerSupport -XX:MaxRAMPercentage=75.0 service.jar" ]
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Caching In Spring Boot Application with ElastiCache for Redis
2+
3+
* This example showcases how you can configure spring cache and connect it with
4+
AWS ElastiCache
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
plugins {
2+
id 'org.springframework.boot' version '2.4.5'
3+
id 'io.spring.dependency-management' version '1.0.11.RELEASE'
4+
id 'java'
5+
}
6+
7+
group = 'io.reflectoring'
8+
version = '0.0.1-SNAPSHOT'
9+
sourceCompatibility = '11'
10+
11+
configurations {
12+
compileOnly {
13+
extendsFrom annotationProcessor
14+
}
15+
}
16+
17+
repositories {
18+
mavenCentral()
19+
}
20+
21+
dependencies {
22+
implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
23+
implementation 'org.springframework.boot:spring-boot-starter-validation'
24+
implementation 'org.springframework.boot:spring-boot-starter-web'
25+
implementation 'org.springframework.boot:spring-boot-starter-cache'
26+
implementation 'org.springframework.boot:spring-boot-starter-data-redis'
27+
implementation 'io.awspring.cloud:spring-cloud-starter-aws'
28+
// implementation 'com.amazonaws:aws-java-sdk-cloudformation'
29+
implementation 'com.amazonaws:aws-java-sdk-elasticache'
30+
compileOnly 'org.projectlombok:lombok'
31+
runtimeOnly 'com.h2database:h2'
32+
annotationProcessor 'org.projectlombok:lombok'
33+
testImplementation 'org.springframework.boot:spring-boot-starter-test'
34+
}
35+
36+
dependencyManagement {
37+
imports {
38+
mavenBom 'io.awspring.cloud:spring-cloud-aws-dependencies:2.3.1'
39+
}
40+
}
41+
42+
test {
43+
useJUnitPlatform()
44+
}
57.8 KB
Binary file not shown.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
distributionBase=GRADLE_USER_HOME
2+
distributionPath=wrapper/dists
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-6.8.3-bin.zip
4+
zipStoreBase=GRADLE_USER_HOME
5+
zipStorePath=wrapper/dists

aws/spring-cloud-caching-redis/gradlew

Lines changed: 185 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

aws/spring-cloud-caching-redis/gradlew.bat

Lines changed: 89 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
rootProject.name = 'spring-cloud-redis'
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
package io.reflectoring.springcloudredis;
2+
3+
import org.springframework.boot.SpringApplication;
4+
import org.springframework.boot.autoconfigure.SpringBootApplication;
5+
6+
@SpringBootApplication
7+
public class SpringCloudRedisApplication {
8+
9+
public static void main(String[] args) {
10+
SpringApplication.run(SpringCloudRedisApplication.class, args);
11+
}
12+
}

0 commit comments

Comments
 (0)