Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
708288e
Update OwnerController.java
ky7721 Apr 17, 2026
da1f7a4
Change UI color
ky7721 Apr 18, 2026
19c5f46
Change UI color
ky7721 Apr 18, 2026
13db3ee
Add Welcome text
ky7721 Apr 18, 2026
deca6f1
Change message
ky7721 Apr 18, 2026
70b427c
Update OwnerController.java
ky7721 Apr 18, 2026
b774500
Updated vet repository implementation
Apr 18, 2026
d8c55de
Merge pull request #1 from BigRen0606/feature/request-validation
BigRen0606 Apr 18, 2026
94fc35a
Update UI Text labels in vet list page
Apr 18, 2026
2c83887
Merge pull request #3 from ky7721/feature/ui-text-update
ky7721 Apr 18, 2026
a0fa874
Update Owner List UI
Apr 18, 2026
b38e86a
Update the Successfull messages for PetController
WJunn987 Apr 18, 2026
b8af30f
Merge pull request #4 from ky7721/feature/owner-list-update
BigRen0606 Apr 18, 2026
2ce65df
Merge pull request #5 from ky7721/WJChanges
WJunn987 Apr 18, 2026
6ae9627
Add CI pipeline using Github Actions
Apr 18, 2026
efd7941
Update Pet Controller Add Successfull Msg
WJunn987 Apr 18, 2026
6fbd3da
Fix VetRepository class definition
Apr 18, 2026
967aae1
Merge branch 'main' into PetControllerUpdate
WJunn987 Apr 18, 2026
448eb19
Merge pull request #6 from ky7721/PetControllerUpdate
ky7721 Apr 18, 2026
9be2311
Change UI color
ky7721 Apr 18, 2026
993eb5f
Merge pull request #7 from ky7721/UIUpdate
ky7721 Apr 18, 2026
39a503d
Updated Pet Controller Successfull Msg
WJunn987 Apr 19, 2026
685c828
Update UI for ownerDetail
SushiJk Apr 19, 2026
1b84c1c
Merge pull request #8 from ky7721/feature/owner-details-ui
SushiJk Apr 19, 2026
392c2b3
Merge branch 'main' into PetControllerMsgUpdate
WJunn987 Apr 19, 2026
6cb6757
Merge pull request #9 from ky7721/PetControllerMsgUpdate
BigRen0606 Apr 19, 2026
4fef434
Updated PetController Success Msg
WJunn987 Apr 19, 2026
bce820f
Merge branch 'main' into PetControllerSuccessMsg
WJunn987 Apr 19, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Java CI

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Set up Java
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'

- name: Build with Maven
run: mvn clean install
Original file line number Diff line number Diff line change
Expand Up @@ -77,12 +77,12 @@ public String initCreationForm() {
@PostMapping("/owners/new")
public String processCreationForm(@Valid Owner owner, BindingResult result, RedirectAttributes redirectAttributes) {
if (result.hasErrors()) {
redirectAttributes.addFlashAttribute("error", "There was an error in creating the owner.");
redirectAttributes.addFlashAttribute("error", "Errorcreating the owner.");
return VIEWS_OWNER_CREATE_OR_UPDATE_FORM;
}

this.owners.save(owner);
redirectAttributes.addFlashAttribute("message", "New Owner Created");
redirectAttributes.addFlashAttribute("message", "Owner Created Successfully");
return "redirect:/owners/" + owner.getId();
}

Expand Down Expand Up @@ -142,7 +142,7 @@ public String initUpdateOwnerForm() {
public String processUpdateOwnerForm(@Valid Owner owner, BindingResult result, @PathVariable("ownerId") int ownerId,
RedirectAttributes redirectAttributes) {
if (result.hasErrors()) {
redirectAttributes.addFlashAttribute("error", "There was an error in updating the owner.");
redirectAttributes.addFlashAttribute("error", "Error updating the owner.");
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why it's better the the old one?

return VIEWS_OWNER_CREATE_OR_UPDATE_FORM;
}

Expand All @@ -154,7 +154,7 @@ public String processUpdateOwnerForm(@Valid Owner owner, BindingResult result, @

owner.setId(ownerId);
this.owners.save(owner);
redirectAttributes.addFlashAttribute("message", "Owner Values Updated");
redirectAttributes.addFlashAttribute("message", "Owner Values Updated Successfully");
return "redirect:/owners/{ownerId}";
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ public String processCreationForm(Owner owner, @Valid Pet pet, BindingResult res

owner.addPet(pet);
this.owners.save(owner);
redirectAttributes.addFlashAttribute("message", "New Pet has been Added");
redirectAttributes.addFlashAttribute("message", "Pet successfully added!");
return "redirect:/owners/{ownerId}";
}

Expand Down Expand Up @@ -154,7 +154,7 @@ public String processUpdateForm(Owner owner, @Valid Pet pet, BindingResult resul
}

updatePetDetails(owner, pet);
redirectAttributes.addFlashAttribute("message", "Pet details has been edited");
redirectAttributes.addFlashAttribute("message", "Pet updated successfully!");
return "redirect:/owners/{ownerId}";
}

Expand Down
5 changes: 5 additions & 0 deletions src/main/resources/banner.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,10 @@
|___| |_______| |___| |_______|_______|___|_| |__|___|_______| / / / /
==================================================================/_/_/_/

Welcome to Pet Clinic

Spring Petclinic is a Spring Boot application built using Maven or Gradle.
Java 17 or later is required for the build, and the application can run with Java 17 or newer.

:: Built with Spring Boot :: ${spring-boot.version}

8 changes: 4 additions & 4 deletions src/main/resources/templates/owners/ownerDetails.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,19 @@ <h2 th:text="#{ownerInformation}">Owner Information</h2>

<table class="table table-striped" th:object="${owner}">
<tr>
<th th:text="#{name}">Name</th>
<th th:text="#{name}">Owner's Name</th>
<td><b th:text="*{firstName + ' ' + lastName}"></b></td>
</tr>
<tr>
<th th:text="#{address}">Address</th>
<th th:text="#{address}">Owner's Address</th>
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're inside Owner table, and there is a label

Pet Owners Directory

not need to be Owner prefix in the columns.

<td th:text="*{address}"></td>
</tr>
<tr>
<th th:text="#{city}">City</th>
<th th:text="#{city}">Owner's City</th>
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're inside Owner table, and there is a label

Pet Owners Directory

not need to be Owner prefix in the columns.

<td th:text="*{city}"></td>
</tr>
<tr>
<th th:text="#{telephone}">Telephone</th>
<th th:text="#{telephone}">Owner's Telephone</th>
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're inside Owner table, and there is a label

Pet Owners Directory

not need to be Owner prefix in the columns.

<td th:text="*{telephone}"></td>
</tr>
</table>
Expand Down
6 changes: 3 additions & 3 deletions src/main/resources/templates/owners/ownersList.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@

<body>

<h2 th:text="#{owners}">Owners</h2>
<h2 th:text="#{owners}">Pet Owners Directory</h2>

<table id="owners" class="table table-striped">
<thead>
<tr>
<th th:text="#{name}" style="width: 150px;">Name</th>
<th th:text="#{address}" style="width: 200px;">Address</th>
<th th:text="#{name}" style="width: 150px;">Owner Name</th>
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're inside Owner table, and there is a label

Pet Owners Directory

not need to be Owner prefix in the columns.

<th th:text="#{address}" style="width: 200px;">Home Address</th>
<th th:text="#{city}">City</th>
<th th:text="#{telephone}" style="width: 120px">Telephone</th>
<th th:text="#{pets}">Pets</th>
Expand Down
6 changes: 3 additions & 3 deletions src/main/resources/templates/vets/vetList.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@

<body>

<h2 th:text="#{vets}">Veterinarians</h2>
<h2 th:text="#{vets}">Veterinarian Directory</h2>
Copy link

Copilot AI Apr 19, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In Thymeleaf, th:text="#\{vets\}" replaces the element body with the value from the message bundle (messages*.properties). Since vets is defined (e.g., messages.properties:20), the new fallback text "Veterinarian Directory" will never be shown in normal operation. If the intent is to change the visible heading, update the vets message value (and translations) or use a new message key.

Suggested change
<h2 th:text="#{vets}">Veterinarian Directory</h2>
<h2 th:text="#{vets}">Vets</h2>

Copilot uses AI. Check for mistakes.

<table id="vets" class="table table-striped">
<thead>
<tr>
<th th:text="#{name}">Name</th>
<th th:text="#{specialties}">Specialties</th>
<th th:text="#{name}">Veterinarian Name</th>
<th th:text="#{specialties}">Areas of Expertise</th>
Comment on lines +12 to +13
Copy link

Copilot AI Apr 19, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These header text changes are only fallbacks; the actual rendered text comes from #{name} and #{specialties} (both defined in messages*.properties), so the page will still display the translated "Name" / "Specialties" strings. If you want the UI to read "Veterinarian Name" / "Areas of Expertise", introduce dedicated message keys (and translations) or change the existing message values (not just the fallback text).

Suggested change
<th th:text="#{name}">Veterinarian Name</th>
<th th:text="#{specialties}">Areas of Expertise</th>
<th th:text="'Veterinarian Name'">Veterinarian Name</th>
<th th:text="'Areas of Expertise'">Areas of Expertise</th>

Copilot uses AI. Check for mistakes.
</tr>
</thead>
<tbody>
Expand Down
50 changes: 25 additions & 25 deletions src/main/scss/petclinic.scss
Original file line number Diff line number Diff line change
Expand Up @@ -17,43 +17,43 @@ $icon-font-path: "../../webjars/bootstrap/fonts/";

$spring-green: #6db33f;
$spring-dark-green: #5fa134;
$spring-brown: #34302D;
$spring-black: #000000;
$spring-grey: #838789;
$spring-light-grey: #f1f1f1;
$spring-white: #ffffff;

$body-bg: $spring-light-grey;
$text-color: $spring-brown;
$body-bg: $spring-white;
$text-color: $spring-black;
$link-color: $spring-dark-green;
$link-hover-color: $spring-dark-green;

$navbar-default-link-color: $spring-light-grey;
$navbar-default-link-active-color: $spring-light-grey;
$navbar-default-link-hover-color: $spring-light-grey;
$navbar-default-link-color: $spring-white;
$navbar-default-link-active-color: $spring-white;
$navbar-default-link-hover-color: $spring-white;
$navbar-default-link-hover-bg: $spring-green;
$navbar-default-toggle-icon-bar-bg: $spring-light-grey;
$navbar-default-toggle-icon-bar-bg: $spring-white;
$navbar-default-toggle-hover-bg: transparent;
$navbar-default-link-active-bg: $spring-green;

$border-radius-base: 0;
$border-radius-large: 0;
$border-radius-small: 0;

$nav-tabs-active-link-hover-color: $spring-light-grey;
$nav-tabs-active-link-hover-bg: $spring-brown;
$nav-tabs-active-link-hover-border-color: $spring-brown;
$nav-tabs-border-color: $spring-brown;
$nav-tabs-active-link-hover-color: $spring-white;
$nav-tabs-active-link-hover-bg: $spring-black;
$nav-tabs-active-link-hover-border-color: $spring-black;
$nav-tabs-border-color: $spring-black;

$pagination-active-bg: $spring-brown;
$pagination-active-bg: $spring-black;
$pagination-active-border: $spring-green;
$table-border-color: $spring-brown;
$table-border-color: $spring-black;

.table > thead > tr > th {
background-color: lighten($spring-brown, 3%);
color: $spring-light-grey;
background-color: lighten($spring-black, 3%);
color: $spring-white;
}

.table-filter {
background-color: $spring-brown;
background-color: $spring-black;
padding: 9px 12px;
}

Expand All @@ -66,7 +66,7 @@ $table-border-color: $spring-brown;
border-width: 2px;
transition: border 0.15s;
color: $spring-light-grey;
background: $spring-brown;
background: $spring-black;
border-color: $spring-green;
-webkit-transition: border 0.15s;
-moz-transition: border 0.15s;
Expand All @@ -78,8 +78,8 @@ $table-border-color: $spring-brown;
&:active,
&.active,
.open .dropdown-toggle {
background-color: $spring-brown;
border-color: $spring-brown;
background-color: $spring-black;
border-color: $spring-black;
}
}

Expand Down Expand Up @@ -128,7 +128,7 @@ h1 {

.splash {
background: $spring-green;
color: $spring-brown;
color: $spring-black;
display: none;
}

Expand Down Expand Up @@ -180,12 +180,12 @@ table td.action-column {
}

.container-details-table th {
background-color: lighten($spring-brown, 3%);
color: $spring-light-grey;
background-color: lighten($spring-black, 3%);
color: $spring-white;
}

.status-help-content-table td {
color: $spring-brown;
color: $spring-black;
}

.logo {
Expand All @@ -206,7 +206,7 @@ table td.action-column {
}

hr {
border-top: 1px dotted $spring-brown;
border-top: 1px dotted $spring-black;
}

@import "typography.scss";
Expand Down