diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 00000000000..365ab20372b --- /dev/null +++ b/.github/workflows/ci.yml @@ -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 \ No newline at end of file diff --git a/src/main/java/org/springframework/samples/petclinic/owner/OwnerController.java b/src/main/java/org/springframework/samples/petclinic/owner/OwnerController.java index 199ca361190..413277dee07 100644 --- a/src/main/java/org/springframework/samples/petclinic/owner/OwnerController.java +++ b/src/main/java/org/springframework/samples/petclinic/owner/OwnerController.java @@ -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(); } @@ -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."); return VIEWS_OWNER_CREATE_OR_UPDATE_FORM; } @@ -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}"; } diff --git a/src/main/java/org/springframework/samples/petclinic/owner/PetController.java b/src/main/java/org/springframework/samples/petclinic/owner/PetController.java index e0689c694f1..7b3c006b548 100644 --- a/src/main/java/org/springframework/samples/petclinic/owner/PetController.java +++ b/src/main/java/org/springframework/samples/petclinic/owner/PetController.java @@ -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}"; } @@ -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}"; } diff --git a/src/main/resources/banner.txt b/src/main/resources/banner.txt index 6225d1208c0..53e1b5e909a 100644 --- a/src/main/resources/banner.txt +++ b/src/main/resources/banner.txt @@ -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} diff --git a/src/main/resources/templates/owners/ownerDetails.html b/src/main/resources/templates/owners/ownerDetails.html index cc175cd1315..a90e8014f71 100644 --- a/src/main/resources/templates/owners/ownerDetails.html +++ b/src/main/resources/templates/owners/ownerDetails.html @@ -16,19 +16,19 @@

Owner Information

- + - + - + - +
NameOwner's Name
AddressOwner's Address
CityOwner's City
TelephoneOwner's Telephone
diff --git a/src/main/resources/templates/owners/ownersList.html b/src/main/resources/templates/owners/ownersList.html index 01223c1c57a..a458f6605d3 100644 --- a/src/main/resources/templates/owners/ownersList.html +++ b/src/main/resources/templates/owners/ownersList.html @@ -4,13 +4,13 @@ -

Owners

+

Pet Owners Directory

- - + + diff --git a/src/main/resources/templates/vets/vetList.html b/src/main/resources/templates/vets/vetList.html index e40fd654e47..3e8ba811227 100644 --- a/src/main/resources/templates/vets/vetList.html +++ b/src/main/resources/templates/vets/vetList.html @@ -4,13 +4,13 @@ -

Veterinarians

+

Veterinarian Directory

NameAddressOwner NameHome Address City Telephone Pets
- - + + diff --git a/src/main/scss/petclinic.scss b/src/main/scss/petclinic.scss index 7f3e64ed25a..e754ce71ef5 100644 --- a/src/main/scss/petclinic.scss +++ b/src/main/scss/petclinic.scss @@ -17,20 +17,20 @@ $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; @@ -38,22 +38,22 @@ $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; } @@ -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; @@ -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; } } @@ -128,7 +128,7 @@ h1 { .splash { background: $spring-green; - color: $spring-brown; + color: $spring-black; display: none; } @@ -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 { @@ -206,7 +206,7 @@ table td.action-column { } hr { - border-top: 1px dotted $spring-brown; + border-top: 1px dotted $spring-black; } @import "typography.scss";
NameSpecialtiesVeterinarian NameAreas of Expertise