diff --git a/.idea/.gitignore b/.idea/.gitignore
new file mode 100644
index 0000000..30cf57e
--- /dev/null
+++ b/.idea/.gitignore
@@ -0,0 +1,10 @@
+# Default ignored files
+/shelf/
+/workspace.xml
+# Editor-based HTTP Client requests
+/httpRequests/
+# Ignored default folder with query files
+/queries/
+# Datasource local storage ignored files
+/dataSources/
+/dataSources.local.xml
diff --git a/.idea/lab-java-springboot-rest-api.iml b/.idea/lab-java-springboot-rest-api.iml
new file mode 100644
index 0000000..d6ebd48
--- /dev/null
+++ b/.idea/lab-java-springboot-rest-api.iml
@@ -0,0 +1,9 @@
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/misc.xml b/.idea/misc.xml
new file mode 100644
index 0000000..3653b1f
--- /dev/null
+++ b/.idea/misc.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/modules.xml b/.idea/modules.xml
new file mode 100644
index 0000000..43ec782
--- /dev/null
+++ b/.idea/modules.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/vcs.xml b/.idea/vcs.xml
new file mode 100644
index 0000000..35eb1dd
--- /dev/null
+++ b/.idea/vcs.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/main/java/com/example/hellolab5/Customer.java b/src/main/java/com/example/hellolab5/Customer.java
new file mode 100644
index 0000000..2725dce
--- /dev/null
+++ b/src/main/java/com/example/hellolab5/Customer.java
@@ -0,0 +1,41 @@
+package com.example.hellolab5;
+
+import jakarta.validation.constraints.*;
+
+public class Customer {
+ @NotBlank //not blank = non vuoto
+ private String name;
+
+ @Email @NotBlank
+ private String email;//(valid email format)
+
+ @Min(18)
+ private int age;
+
+ @NotBlank
+ private String address;
+
+ // Costruttore senza argomenti
+ public Customer() {}
+
+ // Costruttore completo
+ public Customer(String name, String email, int age, String address) {
+ this.name = name;
+ this.email = email;
+ this.age = age;
+ this.address = address;
+ }
+
+ // Getter e Setter
+ public String getName() { return name; }
+ public void setName(String name) { this.name = name; }
+
+ public String getEmail() { return email; }
+ public void setEmail(String email) { this.email = email; }
+
+ public int getAge() { return age; }
+ public void setAge(int age) { this.age = age; }
+
+ public String getAddress() { return address; }
+ public void setAddress(String address) { this.address = address; }
+}
\ No newline at end of file
diff --git a/src/main/java/com/example/hellolab5/GlobalExceptionHandler.java b/src/main/java/com/example/hellolab5/GlobalExceptionHandler.java
new file mode 100644
index 0000000..199e1e5
--- /dev/null
+++ b/src/main/java/com/example/hellolab5/GlobalExceptionHandler.java
@@ -0,0 +1,35 @@
+package com.example.hellolab5;
+
+import org.springframework.http.HttpStatus;
+import org.springframework.http.ResponseEntity;
+import org.springframework.web.bind.MethodArgumentNotValidException;
+import org.springframework.web.bind.MissingRequestHeaderException;
+import org.springframework.web.bind.annotation.*;
+import java.util.*;
+
+@RestControllerAdvice
+public class GlobalExceptionHandler {
+
+ @ExceptionHandler(MethodArgumentNotValidException.class)
+ public ResponseEntity