Skip to content

Commit

Permalink
Upgrade to Spring Boot 3.0 (#16)
Browse files Browse the repository at this point in the history
  • Loading branch information
maciejwalkowiak authored Mar 28, 2023
1 parent 1811d82 commit 8ed306c
Show file tree
Hide file tree
Showing 9 changed files with 25 additions and 28 deletions.
10 changes: 5 additions & 5 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
<modelVersion>4.0.0</modelVersion>
<groupId>org.springframework.samples</groupId>
<artifactId>spring-petclinic-data-jdbc</artifactId>
<version>2.1.0.BUILD-SNAPSHOT</version>
<version>3.0.0.BUILD-SNAPSHOT</version>

<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.7.5</version>
<version>3.0.5</version>
</parent>
<name>petclinic</name>

Expand Down Expand Up @@ -64,7 +64,7 @@
<dependency>
<groupId>org.testcontainers</groupId>
<artifactId>mysql</artifactId>
<version>1.17.4</version>
<version>1.17.6</version>
<scope>test</scope>
</dependency>

Expand Down Expand Up @@ -168,8 +168,8 @@
<!-- Spring Boot Actuator displays build-related information if a git.properties
file is present at the classpath -->
<plugin>
<groupId>pl.project13.maven</groupId>
<artifactId>git-commit-id-plugin</artifactId>
<groupId>io.github.git-commit-id</groupId>
<artifactId>git-commit-id-maven-plugin</artifactId>
<executions>
<execution>
<goals>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
*/
package org.springframework.samples.petclinic.owner;

import javax.validation.constraints.Digits;
import javax.validation.constraints.NotEmpty;
import jakarta.validation.constraints.Digits;
import jakarta.validation.constraints.NotEmpty;
import org.springframework.data.annotation.Id;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,10 @@
*/
package org.springframework.samples.petclinic.owner;

import java.util.Collection;
import jakarta.validation.Valid;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
import javax.validation.Valid;
import org.springframework.samples.petclinic.visit.Visit;
import org.springframework.samples.petclinic.visit.VisitRepository;
import org.springframework.stereotype.Controller;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
*/
package org.springframework.samples.petclinic.owner;

import jakarta.validation.Valid;
import java.util.Collection;
import javax.validation.Valid;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.util.StringUtils;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
*/
package org.springframework.samples.petclinic.owner;

import jakarta.validation.Valid;
import java.util.Map;
import javax.validation.Valid;
import org.springframework.samples.petclinic.visit.Visit;
import org.springframework.samples.petclinic.visit.VisitRepository;
import org.springframework.stereotype.Controller;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@
*/
package org.springframework.samples.petclinic.vet;

import jakarta.validation.constraints.NotEmpty;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import javax.validation.constraints.NotEmpty;
import org.springframework.data.annotation.Id;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
*/
package org.springframework.samples.petclinic.visit;

import jakarta.validation.constraints.NotEmpty;
import java.time.LocalDate;
import javax.validation.constraints.NotEmpty;
import org.springframework.data.annotation.Id;
import org.springframework.format.annotation.DateTimeFormat;

Expand Down
24 changes: 12 additions & 12 deletions src/main/resources/templates/fragments/layout.html
Original file line number Diff line number Diff line change
Expand Up @@ -36,42 +36,42 @@
</div>
<div class="navbar-collapse collapse" id="main-navbar">
<ul class="nav navbar-nav navbar-right">

<li th:fragment="menuItem (path,active,title,glyph,text)" class="active" th:class="${active==menu ? 'active' : ''}">
<a th:href="@{__${path}__}" th:title="${title}">
<span th:class="'glyphicon glyphicon-'+${glyph}" class="glyphicon glyphicon-home" aria-hidden="true"></span>
<span th:text="${text}">Template</span>
</a>
</li>
<li th:replace="::menuItem ('/','home','home page','home','Home')">

<li th:replace="~{::menuItem ('/','home','home page','home','Home')}">
<span class="glyphicon glyphicon-home" aria-hidden="true"></span>
<span>Home</span>
</li>
<li th:replace="::menuItem ('/owners/find','owners','find owners','search','Find owners')">

<li th:replace="~{::menuItem ('/owners/find','owners','find owners','search','Find owners')}">
<span class="glyphicon glyphicon-search" aria-hidden="true"></span>
<span>Find owners</span>
</li>
<li th:replace="::menuItem ('/vets.html','vets','veterinarians','th-list','Veterinarians')">

<li th:replace="~{::menuItem ('/vets.html','vets','veterinarians','th-list','Veterinarians')}">
<span class="glyphicon glyphicon-th-list" aria-hidden="true"></span>
<span>Veterinarians</span>
</li>
<li th:replace="::menuItem ('/oups','error','trigger a RuntimeException to see how it is handled','warning-sign','Error')">

<li th:replace="~{::menuItem ('/oups','error','trigger a RuntimeException to see how it is handled','warning-sign','Error')}">
<span class="glyphicon glyphicon-warning-sign" aria-hidden="true"></span>
<span>Error</span>
</li>

</ul>
</div>
</div>
</nav>
<div class="container-fluid">
<div class="container xd-container">
<th:block th:include="${template}"/>

<th:block th:insert="${template}"/>

<br/>
<br/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,8 @@

import static org.assertj.core.api.Assertions.assertThat;

import jakarta.validation.Validator;
import java.util.Locale;
import java.util.Set;
import javax.validation.ConstraintViolation;
import javax.validation.Validator;
import org.junit.jupiter.api.Test;
import org.springframework.context.i18n.LocaleContextHolder;
import org.springframework.samples.petclinic.owner.Owner;
Expand Down

0 comments on commit 8ed306c

Please sign in to comment.