commons-fileupload
commons-fileupload
diff --git a/src/main/java/com/dvl/adobesign/config/AdobeSignConfig.java b/src/main/java/com/dvl/adobesign/config/AdobeSignConfig.java
new file mode 100644
index 0000000..610df5b
--- /dev/null
+++ b/src/main/java/com/dvl/adobesign/config/AdobeSignConfig.java
@@ -0,0 +1,16 @@
+package com.dvl.adobesign.config;
+
+import lombok.Getter;
+import lombok.Setter;
+import org.springframework.boot.context.properties.ConfigurationProperties;
+import org.springframework.context.annotation.Configuration;
+
+@Configuration
+@ConfigurationProperties(prefix = "bean")
+@Getter
+@Setter
+public class AdobeSignConfig {
+
+ private String message = "Default message from backend is: %s
Services : %s";
+
+}
diff --git a/src/main/java/com/dvl/adobesign/controller/ContactController.java b/src/main/java/com/dvl/adobesign/controller/ContactController.java
index 267e972..594334d 100644
--- a/src/main/java/com/dvl/adobesign/controller/ContactController.java
+++ b/src/main/java/com/dvl/adobesign/controller/ContactController.java
@@ -1,5 +1,6 @@
package com.dvl.adobesign.controller;
+import com.dvl.adobesign.config.AdobeSignConfig;
import com.dvl.adobesign.model.Contract;
import com.dvl.adobesign.service.ContractService;
import org.springframework.core.io.InputStreamResource;
@@ -22,13 +23,17 @@ public class ContactController {
private final ContractService contractService;
- public ContactController(ContractService contractService) {
+ private final AdobeSignConfig adobeSignConfig;
+
+ public ContactController(ContractService contractService, AdobeSignConfig adobeSignConfig) {
this.contractService = contractService;
+ this.adobeSignConfig = adobeSignConfig;
}
@GetMapping(value = "/")
public String index(Model model) {
model.addAttribute("contracts", contractService.getContracts());
+ model.addAttribute("message", adobeSignConfig.getMessage());
return "index";
}
diff --git a/src/main/resources/templates/index.ftlh b/src/main/resources/templates/index.ftlh
index c127ca6..b9fe098 100644
--- a/src/main/resources/templates/index.ftlh
+++ b/src/main/resources/templates/index.ftlh
@@ -28,5 +28,6 @@
#foreach>
+ Message from the config: ${message}