diff --git a/samples/springboot3/alt-pet-store/build.gradle b/samples/springboot3/alt-pet-store/build.gradle
index 0ddec053b..69d30f0fb 100644
--- a/samples/springboot3/alt-pet-store/build.gradle
+++ b/samples/springboot3/alt-pet-store/build.gradle
@@ -5,6 +5,7 @@ repositories {
mavenCentral()
maven {url "https://repo.spring.io/milestone"}
maven {url "https://repo.spring.io/snapshot"}
+ maven {url "https://repo.spring.io/libs-snapshot-local"}
}
dependencies {
@@ -12,8 +13,10 @@ dependencies {
implementation('org.springframework.boot:spring-boot-starter-web:3.2.5') {
exclude group: 'org.springframework.boot', module: 'spring-boot-starter-tomcat'
},
- 'com.amazonaws.serverless:aws-serverless-java-container-springboot3:[2.0-SNAPSHOT,)',
+ 'com.amazonaws.serverless:aws-serverless-java-container-springboot3:2.1.0-SNAPSHOT',
)
+
+ implementation("org.springframework.boot:spring-boot-starter-freemarker:3.2.5")
}
task buildZip(type: Zip) {
diff --git a/samples/springboot3/alt-pet-store/src/main/java/com/amazonaws/serverless/sample/springboot3/controller/IndexController.java b/samples/springboot3/alt-pet-store/src/main/java/com/amazonaws/serverless/sample/springboot3/controller/IndexController.java
new file mode 100644
index 000000000..f833ebd51
--- /dev/null
+++ b/samples/springboot3/alt-pet-store/src/main/java/com/amazonaws/serverless/sample/springboot3/controller/IndexController.java
@@ -0,0 +1,16 @@
+package com.amazonaws.serverless.sample.springboot3.controller;
+
+import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.annotation.GetMapping;
+
+@Controller
+public class IndexController {
+
+ public IndexController() {
+ }
+
+ @GetMapping("/index")
+ public String something2() {
+ return "index";
+ }
+}
diff --git a/samples/springboot3/alt-pet-store/src/main/resources/application.yaml b/samples/springboot3/alt-pet-store/src/main/resources/application.yaml
new file mode 100644
index 000000000..4b4d02dc5
--- /dev/null
+++ b/samples/springboot3/alt-pet-store/src/main/resources/application.yaml
@@ -0,0 +1,3 @@
+logging:
+ level:
+ root: debug
\ No newline at end of file
diff --git a/samples/springboot3/alt-pet-store/src/main/resources/templates/index.ftlh b/samples/springboot3/alt-pet-store/src/main/resources/templates/index.ftlh
new file mode 100644
index 000000000..795094095
--- /dev/null
+++ b/samples/springboot3/alt-pet-store/src/main/resources/templates/index.ftlh
@@ -0,0 +1,5 @@
+
hello from freemarker
+
+<#list 1..10 as x>
+ ${x}
+#list>
diff --git a/samples/springboot3/alt-pet-store/template.yml b/samples/springboot3/alt-pet-store/template.yml
index c883f0850..ea06277ed 100644
--- a/samples/springboot3/alt-pet-store/template.yml
+++ b/samples/springboot3/alt-pet-store/template.yml
@@ -34,7 +34,7 @@ Resources:
Outputs:
SpringPetStoreApi:
Description: URL for application
- Value: !Sub 'https://${ServerlessHttpApi}.execute-api.${AWS::Region}.amazonaws.com/pets'
+ Value: !Sub 'https://${ServerlessHttpApi}.execute-api.${AWS::Region}.amazonaws.com/index'
Export:
Name: SpringPetStoreApi
diff --git a/samples/springboot3/pet-store/build.gradle b/samples/springboot3/pet-store/build.gradle
index 0ddec053b..de80385f2 100644
--- a/samples/springboot3/pet-store/build.gradle
+++ b/samples/springboot3/pet-store/build.gradle
@@ -14,6 +14,8 @@ dependencies {
},
'com.amazonaws.serverless:aws-serverless-java-container-springboot3:[2.0-SNAPSHOT,)',
)
+
+ implementation("org.springframework.boot:spring-boot-starter-freemarker:3.2.5")
}
task buildZip(type: Zip) {
diff --git a/samples/springboot3/pet-store/src/main/java/com/amazonaws/serverless/sample/springboot3/controller/IndexController.java b/samples/springboot3/pet-store/src/main/java/com/amazonaws/serverless/sample/springboot3/controller/IndexController.java
new file mode 100644
index 000000000..f833ebd51
--- /dev/null
+++ b/samples/springboot3/pet-store/src/main/java/com/amazonaws/serverless/sample/springboot3/controller/IndexController.java
@@ -0,0 +1,16 @@
+package com.amazonaws.serverless.sample.springboot3.controller;
+
+import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.annotation.GetMapping;
+
+@Controller
+public class IndexController {
+
+ public IndexController() {
+ }
+
+ @GetMapping("/index")
+ public String something2() {
+ return "index";
+ }
+}
diff --git a/samples/springboot3/pet-store/src/main/resources/application.yaml b/samples/springboot3/pet-store/src/main/resources/application.yaml
new file mode 100644
index 000000000..4b4d02dc5
--- /dev/null
+++ b/samples/springboot3/pet-store/src/main/resources/application.yaml
@@ -0,0 +1,3 @@
+logging:
+ level:
+ root: debug
\ No newline at end of file
diff --git a/samples/springboot3/pet-store/src/main/resources/templates/index.ftlh b/samples/springboot3/pet-store/src/main/resources/templates/index.ftlh
new file mode 100644
index 000000000..795094095
--- /dev/null
+++ b/samples/springboot3/pet-store/src/main/resources/templates/index.ftlh
@@ -0,0 +1,5 @@
+ hello from freemarker
+
+<#list 1..10 as x>
+ ${x}
+#list>
diff --git a/samples/springboot3/pet-store/template.yml b/samples/springboot3/pet-store/template.yml
index a8474349b..aa59c9bd5 100644
--- a/samples/springboot3/pet-store/template.yml
+++ b/samples/springboot3/pet-store/template.yml
@@ -27,6 +27,6 @@ Resources:
Outputs:
SpringBootPetStoreApi:
Description: URL for application
- Value: !Sub 'https://${ServerlessHttpApi}.execute-api.${AWS::Region}.amazonaws.com/pets'
+ Value: !Sub 'https://${ServerlessHttpApi}.execute-api.${AWS::Region}.amazonaws.com/index'
Export:
Name: SpringBootPetStoreApi