Skip to content

Commit 5eb947c

Browse files
author
Piotr Kubicki
committed
Merge remote-tracking branch 'origin/feature/1-create-new-application' into feature/2-dataaccess
# Conflicts: # pom.xml # src/main/resources/application.properties
2 parents d9a72dd + d63c450 commit 5eb947c

File tree

8 files changed

+49
-60
lines changed

8 files changed

+49
-60
lines changed

.github/dependabot.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,10 @@ updates:
99
directory: "/" # Root directory where pom.xml is located
1010
schedule:
1111
interval: "weekly" # Dependabot will check for updates every week
12-
open-pull-requests-limit: 5 # Optional: Limit the number of open PRs from Dependabot
12+
target-branch: "main"
13+
14+
- package-ecosystem: "maven"
15+
directory: "/"
16+
schedule:
17+
interval: "weekly"
18+
target-branch: "feature/5-security" # 👈 second branch config

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,4 +37,4 @@ jobs:
3737
with:
3838
name: surefire-failsafe-html-report
3939
path: target/reports/surefire.html
40-
retention-days: 90
40+
retention-days: 20

HELP.md

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,3 @@
1-
# Read Me First
2-
The following was discovered as part of building this project:
3-
4-
* The original package name 'com.capgemini.training.appointment-booking-app' is invalid and this project uses 'com.capgemini.training.appointment_booking_app' instead.
5-
61
# Getting Started
72

83
### Reference Documentation

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ The repository grows in complexity and functionality across branches:
1616

1717
| Branch | Description |
1818
|--------|------------------------------------------------------------------------|
19-
| `main` | Base Spring Boot setup with basic health and H2 endpoints |
19+
| `main` | Base Spring Boot setup with basic health endpoints |
2020
| `feature/1-create-new-application` | Same as main |
2121
| `feature/2-dataaccess` | Persistence layer with Spring Data JPA and H2, part 1 |
2222
| `feature/2-dataaccess-repositories` | Persistence layer with Spring Data JPA and H2, part 2 |
@@ -31,7 +31,7 @@ After starting the application, you can access the following in your browser:
3131
| URL | Available from | Description |
3232
|-----|----------------|-------------|
3333
| [http://localhost:8080/actuator/health](http://localhost:8080/actuator/health) | `main` | Basic application health check |
34-
| [http://localhost:8080/h2-console](http://localhost:8080/h2-console) | `main` | In-memory H2 database console |
34+
| [http://localhost:8080/h2-console](http://localhost:8080/h2-console) | `feature/2-dataaccess` | In-memory H2 database console |
3535
| [http://localhost:8080/swagger-ui/index.html](http://localhost:8080/swagger-ui/index.html) | `feature/4-services` | OpenAPI UI for testing and exploring REST API |
3636

3737
## 🛠 Tech Stack

pom.xml

Lines changed: 30 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -5,79 +5,66 @@
55
<parent>
66
<groupId>org.springframework.boot</groupId>
77
<artifactId>spring-boot-starter-parent</artifactId>
8-
<version>3.4.4</version>
8+
<version>3.5.6</version>
99
<relativePath/> <!-- lookup parent from repository -->
1010
</parent>
1111
<groupId>com.capgemini.training</groupId>
12-
<artifactId>appointment-booking-app</artifactId>
12+
<artifactId>appointment-booking</artifactId>
1313
<version>0.0.1-SNAPSHOT</version>
14-
<name>appointment-booking-app</name>
14+
<name>appointment-booking</name>
1515
<description>Demo project for Spring Boot</description>
16-
<url/>
17-
<licenses>
18-
<license/>
19-
</licenses>
20-
<developers>
21-
<developer/>
22-
</developers>
23-
<scm>
24-
<connection/>
25-
<developerConnection/>
26-
<tag/>
27-
<url/>
28-
</scm>
16+
2917
<properties>
3018
<java.version>21</java.version>
3119
</properties>
3220
<dependencies>
21+
<!-- 1) Dependencies to run the application on web-server + features to help monitor and manage a Spring Boot application: -->
22+
<dependency>
23+
<groupId>org.springframework.boot</groupId>
24+
<artifactId>spring-boot-starter-test</artifactId>
25+
<scope>test</scope>
26+
</dependency>
3327
<dependency>
3428
<groupId>org.springframework.boot</groupId>
3529
<artifactId>spring-boot-starter-actuator</artifactId>
3630
</dependency>
37-
<dependency>
38-
<groupId>org.springframework.boot</groupId>
39-
<artifactId>spring-boot-starter-data-jpa</artifactId>
40-
</dependency>
4131
<dependency>
4232
<groupId>org.springframework.boot</groupId>
4333
<artifactId>spring-boot-starter-web</artifactId>
4434
</dependency>
35+
36+
<!-- 2) Dependencies to provide data access layer and H2 in-memory database: -->
37+
<dependency>
38+
<groupId>org.springframework.boot</groupId>
39+
<artifactId>spring-boot-starter-data-jpa</artifactId>
40+
</dependency>
41+
<dependency>
42+
<groupId>com.h2database</groupId>
43+
<artifactId>h2</artifactId>
44+
<scope>runtime</scope>
45+
</dependency>
4546
<dependency>
4647
<groupId>org.flywaydb</groupId>
4748
<artifactId>flyway-core</artifactId>
4849
</dependency>
49-
<dependency>
50-
<groupId>com.h2database</groupId>
51-
<artifactId>h2</artifactId>
52-
<version>2.2.224</version>
53-
<scope>runtime</scope>
54-
</dependency>
5550
<dependency>
5651
<groupId>org.projectlombok</groupId>
5752
<artifactId>lombok</artifactId>
5853
<optional>true</optional>
5954
</dependency>
60-
<dependency>
61-
<groupId>org.springframework.boot</groupId>
62-
<artifactId>spring-boot-starter-test</artifactId>
63-
<scope>test</scope>
64-
</dependency>
6555
</dependencies>
6656

6757
<build>
6858
<plugins>
69-
<plugin>
70-
<groupId>org.apache.maven.plugins</groupId>
71-
<artifactId>maven-compiler-plugin</artifactId>
72-
<configuration>
73-
<annotationProcessorPaths>
74-
<path>
75-
<groupId>org.projectlombok</groupId>
76-
<artifactId>lombok</artifactId>
77-
</path>
78-
</annotationProcessorPaths>
79-
</configuration>
80-
</plugin>
59+
<!--
60+
Not strictly mandatory, but in most Maven-based Spring Boot projects, it's highly recommended,
61+
because it simplifies packaging and deployment.
62+
The spring-boot-maven-plugin enables packaging the application as an executable JAR,
63+
which includes all dependencies and a manifest pointing to the main class.
64+
It simplifies running the app via `java -jar` and integrates with Maven's lifecycle.
65+
This plugin is essential for deploying Spring Boot applications and supports features
66+
like layered JARs for Docker and custom packaging.
67+
-->
8168
<plugin>
8269
<groupId>org.springframework.boot</groupId>
8370
<artifactId>spring-boot-maven-plugin</artifactId>

src/main/java/com/capgemini/training/appointmentbooking/AppointmentBookingAppApplication.java renamed to src/main/java/com/capgemini/training/appointmentbooking/AppointmentBookingApplication.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@
44
import org.springframework.boot.autoconfigure.SpringBootApplication;
55

66
@SpringBootApplication
7-
public class AppointmentBookingAppApplication {
7+
public class AppointmentBookingApplication {
88

99
public static void main(String[] args) {
10-
SpringApplication.run(AppointmentBookingAppApplication.class, args);
10+
SpringApplication.run(AppointmentBookingApplication.class, args);
1111
}
1212

1313
}

src/main/resources/application.properties

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
application.title=Appointment Booking Application
22

3-
spring.application.name=appointment-booking-app
3+
spring.application.name=appointment-booking
4+
5+
management.endpoint.health.show-components=always
6+
management.endpoint.health.show-details=always
7+
management.endpoints.web.exposure.include=*
48

59
spring.h2.console.enabled=true
610

711
spring.datasource.url=jdbc:h2:mem:appointmentbooking
812
spring.datasource.username=sa
913
spring.datasource.password=password
1014

11-
management.endpoint.health.show-components=always
12-
management.endpoint.health.show-details=always
13-
management.endpoints.web.exposure.include=*
14-
1515
spring.flyway.locations=classpath:db/migration
1616
spring.flyway.enabled=true
1717
spring.flyway.clean-on-validation-error=true

src/test/java/com/capgemini/training/appointmentbooking/AppointmentBookingAppApplicationIT.java renamed to src/test/java/com/capgemini/training/appointmentbooking/AppointmentBookingApplicationIT.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,11 @@
44
import org.springframework.boot.test.context.SpringBootTest;
55

66
@SpringBootTest
7-
class AppointmentBookingAppApplicationIT {
7+
class AppointmentBookingApplicationIT {
88

99
@Test
1010
void contextLoads() {
11+
// loads application context
1112
}
1213

1314
}

0 commit comments

Comments
 (0)