From 6481976fd187fc3a7edea83fe1c1c92486d421f7 Mon Sep 17 00:00:00 2001 From: Florian Date: Tue, 28 Oct 2025 09:23:08 +0100 Subject: [PATCH] Initial commit --- pom.xml | 144 ++++++++++++++++++ .../vets/VetsServiceApplication.java | 35 +++++ .../petclinic/vets/model/Specialty.java | 48 ++++++ .../samples/petclinic/vets/model/Vet.java | 102 +++++++++++++ .../petclinic/vets/model/VetRepository.java | 31 ++++ .../petclinic/vets/system/CacheConfig.java | 30 ++++ .../petclinic/vets/system/VetsProperties.java | 34 +++++ .../petclinic/vets/web/VetResource.java | 49 ++++++ src/main/resources/application.yml | 16 ++ src/main/resources/db/hsqldb/data.sql | 16 ++ src/main/resources/db/hsqldb/schema.sql | 23 +++ src/main/resources/db/mysql/data.sql | 16 ++ src/main/resources/db/mysql/schema.sql | 24 +++ src/main/resources/logback-spring.xml | 6 + .../petclinic/vets/web/VetResourceTest.java | 62 ++++++++ src/test/resources/application-test.yml | 20 +++ 16 files changed, 656 insertions(+) create mode 100644 pom.xml create mode 100644 src/main/java/org/springframework/samples/petclinic/vets/VetsServiceApplication.java create mode 100644 src/main/java/org/springframework/samples/petclinic/vets/model/Specialty.java create mode 100644 src/main/java/org/springframework/samples/petclinic/vets/model/Vet.java create mode 100644 src/main/java/org/springframework/samples/petclinic/vets/model/VetRepository.java create mode 100644 src/main/java/org/springframework/samples/petclinic/vets/system/CacheConfig.java create mode 100644 src/main/java/org/springframework/samples/petclinic/vets/system/VetsProperties.java create mode 100644 src/main/java/org/springframework/samples/petclinic/vets/web/VetResource.java create mode 100644 src/main/resources/application.yml create mode 100644 src/main/resources/db/hsqldb/data.sql create mode 100644 src/main/resources/db/hsqldb/schema.sql create mode 100644 src/main/resources/db/mysql/data.sql create mode 100644 src/main/resources/db/mysql/schema.sql create mode 100644 src/main/resources/logback-spring.xml create mode 100644 src/test/java/org/springframework/samples/petclinic/vets/web/VetResourceTest.java create mode 100644 src/test/resources/application-test.yml diff --git a/pom.xml b/pom.xml new file mode 100644 index 0000000..fc28730 --- /dev/null +++ b/pom.xml @@ -0,0 +1,144 @@ + + + 4.0.0 + + org.springframework.samples.petclinic.vets + spring-petclinic-vets-service + jar + Spring PetClinic Vets Service + + + org.springframework.samples + spring-petclinic-microservices + 3.4.1 + + + + 8081 + ${basedir}/../docker + + + + + + org.springframework.boot + spring-boot-starter-web + + + org.springframework.boot + spring-boot-configuration-processor + true + + + org.springframework.boot + spring-boot-starter-actuator + + + org.springframework.boot + spring-boot-starter-cache + + + org.springframework.boot + spring-boot-starter-data-jpa + + + org.springframework.boot + spring-boot-starter-test + test + + + + + org.springframework.cloud + spring-cloud-starter-config + + + org.springframework.cloud + spring-cloud-starter-netflix-eureka-client + + + + + javax.cache + cache-api + + + jakarta.xml.bind + jakarta.xml.bind-api + + + com.github.ben-manes.caffeine + caffeine + + + org.jolokia + jolokia-core + + + org.hsqldb + hsqldb + runtime + + + com.mysql + mysql-connector-j + runtime + + + io.micrometer + micrometer-registry-prometheus + + + de.codecentric + chaos-monkey-spring-boot + + + io.opentelemetry + opentelemetry-exporter-zipkin + + + io.micrometer + micrometer-observation + + + io.micrometer + micrometer-tracing-bridge-brave + + + io.zipkin.reporter2 + zipkin-reporter-brave + + + net.ttddyy.observation + datasource-micrometer-spring-boot + 1.0.2 + + + + + org.junit.jupiter + junit-jupiter-api + test + + + org.junit.jupiter + junit-jupiter-engine + test + + + + + + buildDocker + + + + org.codehaus.mojo + exec-maven-plugin + + + + + + diff --git a/src/main/java/org/springframework/samples/petclinic/vets/VetsServiceApplication.java b/src/main/java/org/springframework/samples/petclinic/vets/VetsServiceApplication.java new file mode 100644 index 0000000..e11e1b0 --- /dev/null +++ b/src/main/java/org/springframework/samples/petclinic/vets/VetsServiceApplication.java @@ -0,0 +1,35 @@ +/* + * Copyright 2002-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.springframework.samples.petclinic.vets; + +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.boot.context.properties.EnableConfigurationProperties; +import org.springframework.cloud.client.discovery.EnableDiscoveryClient; +import org.springframework.samples.petclinic.vets.system.VetsProperties; + +/** + * @author Maciej Szarlinski + */ +@EnableDiscoveryClient +@SpringBootApplication +@EnableConfigurationProperties(VetsProperties.class) +public class VetsServiceApplication { + + public static void main(String[] args) { + SpringApplication.run(VetsServiceApplication.class, args); + } +} diff --git a/src/main/java/org/springframework/samples/petclinic/vets/model/Specialty.java b/src/main/java/org/springframework/samples/petclinic/vets/model/Specialty.java new file mode 100644 index 0000000..eeeea28 --- /dev/null +++ b/src/main/java/org/springframework/samples/petclinic/vets/model/Specialty.java @@ -0,0 +1,48 @@ +/* + * Copyright 2002-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.springframework.samples.petclinic.vets.model; + +import jakarta.persistence.*; + +/** + * Models a {@link Vet Vet's} specialty (for example, dentistry). + * + * @author Juergen Hoeller + * @author Ramazan Sakin + */ + +@Entity +@Table(name = "specialties") +public class Specialty { + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + private Integer id; + + @Column(name = "name") + private String name; + + public Integer getId() { + return this.id; + } + + public String getName() { + return this.name; + } + + public void setName(String name) { + this.name = name; + } +} diff --git a/src/main/java/org/springframework/samples/petclinic/vets/model/Vet.java b/src/main/java/org/springframework/samples/petclinic/vets/model/Vet.java new file mode 100644 index 0000000..150b19a --- /dev/null +++ b/src/main/java/org/springframework/samples/petclinic/vets/model/Vet.java @@ -0,0 +1,102 @@ +/* + * Copyright 2002-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.springframework.samples.petclinic.vets.model; + +import jakarta.persistence.*; +import jakarta.validation.constraints.NotBlank; +import jakarta.xml.bind.annotation.XmlElement; +import org.springframework.beans.support.MutableSortDefinition; +import org.springframework.beans.support.PropertyComparator; + +import java.util.*; + +/** + * Simple JavaBean domain object representing a veterinarian. + * + * @author Ken Krebs + * @author Juergen Hoeller + * @author Sam Brannen + * @author Arjen Poutsma + * @author Maciej Szarlinski + * @author Ramazan Sakin + */ +@Entity +@Table(name = "vets") +public class Vet { + + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + private Integer id; + + @Column(name = "first_name") + @NotBlank + private String firstName; + + @Column(name = "last_name") + @NotBlank + private String lastName; + + @ManyToMany(fetch = FetchType.EAGER) + @JoinTable(name = "vet_specialties", joinColumns = @JoinColumn(name = "vet_id"), + inverseJoinColumns = @JoinColumn(name = "specialty_id")) + private Set specialties; + + protected Set getSpecialtiesInternal() { + if (this.specialties == null) { + this.specialties = new HashSet<>(); + } + return this.specialties; + } + + @XmlElement + public List getSpecialties() { + List sortedSpecs = new ArrayList<>(getSpecialtiesInternal()); + PropertyComparator.sort(sortedSpecs, new MutableSortDefinition("name", true, true)); + return Collections.unmodifiableList(sortedSpecs); + } + + public int getNrOfSpecialties() { + return getSpecialtiesInternal().size(); + } + + public void addSpecialty(Specialty specialty) { + getSpecialtiesInternal().add(specialty); + } + + public Integer getId() { + return this.id; + } + + public String getFirstName() { + return this.firstName; + } + + public String getLastName() { + return this.lastName; + } + + public void setId(Integer id) { + this.id = id; + } + + public void setFirstName(String firstName) { + this.firstName = firstName; + } + + public void setLastName(String lastName) { + this.lastName = lastName; + } +} diff --git a/src/main/java/org/springframework/samples/petclinic/vets/model/VetRepository.java b/src/main/java/org/springframework/samples/petclinic/vets/model/VetRepository.java new file mode 100644 index 0000000..cb22d14 --- /dev/null +++ b/src/main/java/org/springframework/samples/petclinic/vets/model/VetRepository.java @@ -0,0 +1,31 @@ +/* + * Copyright 2002-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.springframework.samples.petclinic.vets.model; + +import org.springframework.data.jpa.repository.JpaRepository; + +/** + * Repository class for Vet domain objects All method names are compliant with Spring Data naming + * conventions so this interface can easily be extended for Spring Data See here: http://static.springsource.org/spring-data/jpa/docs/current/reference/html/jpa.repositories.html#jpa.query-methods.query-creation + * + * @author Ken Krebs + * @author Juergen Hoeller + * @author Sam Brannen + * @author Michael Isvy + * @author Maciej Szarlinski + */ +public interface VetRepository extends JpaRepository { +} diff --git a/src/main/java/org/springframework/samples/petclinic/vets/system/CacheConfig.java b/src/main/java/org/springframework/samples/petclinic/vets/system/CacheConfig.java new file mode 100644 index 0000000..2f3fb79 --- /dev/null +++ b/src/main/java/org/springframework/samples/petclinic/vets/system/CacheConfig.java @@ -0,0 +1,30 @@ +/* + * Copyright 2002-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.springframework.samples.petclinic.vets.system; + +import org.springframework.cache.annotation.EnableCaching; +import org.springframework.context.annotation.Configuration; +import org.springframework.context.annotation.Profile; + +/** + * Cache could be disable in unit test. + * @author Maciej Szarlinski + */ +@Configuration +@EnableCaching +@Profile("production") +class CacheConfig { +} diff --git a/src/main/java/org/springframework/samples/petclinic/vets/system/VetsProperties.java b/src/main/java/org/springframework/samples/petclinic/vets/system/VetsProperties.java new file mode 100644 index 0000000..f369a6f --- /dev/null +++ b/src/main/java/org/springframework/samples/petclinic/vets/system/VetsProperties.java @@ -0,0 +1,34 @@ +/* + * Copyright 2002-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.springframework.samples.petclinic.vets.system; + +import org.springframework.boot.context.properties.ConfigurationProperties; + +/** + * Typesafe custom configuration. + * + * @author Maciej Szarlinski + */ +@ConfigurationProperties(prefix = "vets") +public record VetsProperties( + Cache cache +) { + public record Cache( + int ttl, + int heapSize + ) { + } +} diff --git a/src/main/java/org/springframework/samples/petclinic/vets/web/VetResource.java b/src/main/java/org/springframework/samples/petclinic/vets/web/VetResource.java new file mode 100644 index 0000000..09e4b19 --- /dev/null +++ b/src/main/java/org/springframework/samples/petclinic/vets/web/VetResource.java @@ -0,0 +1,49 @@ +/* + * Copyright 2002-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.springframework.samples.petclinic.vets.web; + +import java.util.List; + +import org.springframework.cache.annotation.Cacheable; +import org.springframework.samples.petclinic.vets.model.Vet; +import org.springframework.samples.petclinic.vets.model.VetRepository; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +/** + * @author Juergen Hoeller + * @author Mark Fisher + * @author Ken Krebs + * @author Arjen Poutsma + * @author Maciej Szarlinski + */ +@RequestMapping("/vets") +@RestController +class VetResource { + + private final VetRepository vetRepository; + + VetResource(VetRepository vetRepository) { + this.vetRepository = vetRepository; + } + + @GetMapping + @Cacheable("vets") + public List showResourcesVetList() { + return vetRepository.findAll(); + } +} diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml new file mode 100644 index 0000000..983a015 --- /dev/null +++ b/src/main/resources/application.yml @@ -0,0 +1,16 @@ +spring: + application: + name: vets-service + config: + import: optional:configserver:${CONFIG_SERVER_URL:http://localhost:8888/} + cache: + cache-names: vets + profiles: + active: production + +--- +spring: + config: + activate: + on-profile: docker + import: configserver:http://config-server:8888 diff --git a/src/main/resources/db/hsqldb/data.sql b/src/main/resources/db/hsqldb/data.sql new file mode 100644 index 0000000..e6658a5 --- /dev/null +++ b/src/main/resources/db/hsqldb/data.sql @@ -0,0 +1,16 @@ +INSERT INTO vets VALUES (1, 'James', 'Carter'); +INSERT INTO vets VALUES (2, 'Helen', 'Leary'); +INSERT INTO vets VALUES (3, 'Linda', 'Douglas'); +INSERT INTO vets VALUES (4, 'Rafael', 'Ortega'); +INSERT INTO vets VALUES (5, 'Henry', 'Stevens'); +INSERT INTO vets VALUES (6, 'Sharon', 'Jenkins'); + +INSERT INTO specialties VALUES (1, 'radiology'); +INSERT INTO specialties VALUES (2, 'surgery'); +INSERT INTO specialties VALUES (3, 'dentistry'); + +INSERT INTO vet_specialties VALUES (2, 1); +INSERT INTO vet_specialties VALUES (3, 2); +INSERT INTO vet_specialties VALUES (3, 3); +INSERT INTO vet_specialties VALUES (4, 2); +INSERT INTO vet_specialties VALUES (5, 1); diff --git a/src/main/resources/db/hsqldb/schema.sql b/src/main/resources/db/hsqldb/schema.sql new file mode 100644 index 0000000..eb916e1 --- /dev/null +++ b/src/main/resources/db/hsqldb/schema.sql @@ -0,0 +1,23 @@ +DROP TABLE vet_specialties IF EXISTS; +DROP TABLE vets IF EXISTS; +DROP TABLE specialties IF EXISTS; + +CREATE TABLE vets ( + id INTEGER IDENTITY PRIMARY KEY, + first_name VARCHAR(30), + last_name VARCHAR(30) +); +CREATE INDEX vets_last_name ON vets (last_name); + +CREATE TABLE specialties ( + id INTEGER IDENTITY PRIMARY KEY, + name VARCHAR(80) +); +CREATE INDEX specialties_name ON specialties (name); + +CREATE TABLE vet_specialties ( + vet_id INTEGER NOT NULL, + specialty_id INTEGER NOT NULL +); +ALTER TABLE vet_specialties ADD CONSTRAINT fk_vet_specialties_vets FOREIGN KEY (vet_id) REFERENCES vets (id); +ALTER TABLE vet_specialties ADD CONSTRAINT fk_vet_specialties_specialties FOREIGN KEY (specialty_id) REFERENCES specialties (id); diff --git a/src/main/resources/db/mysql/data.sql b/src/main/resources/db/mysql/data.sql new file mode 100644 index 0000000..9159eca --- /dev/null +++ b/src/main/resources/db/mysql/data.sql @@ -0,0 +1,16 @@ +INSERT IGNORE INTO vets VALUES (1, 'James', 'Carter'); +INSERT IGNORE INTO vets VALUES (2, 'Helen', 'Leary'); +INSERT IGNORE INTO vets VALUES (3, 'Linda', 'Douglas'); +INSERT IGNORE INTO vets VALUES (4, 'Rafael', 'Ortega'); +INSERT IGNORE INTO vets VALUES (5, 'Henry', 'Stevens'); +INSERT IGNORE INTO vets VALUES (6, 'Sharon', 'Jenkins'); + +INSERT IGNORE INTO specialties VALUES (1, 'radiology'); +INSERT IGNORE INTO specialties VALUES (2, 'surgery'); +INSERT IGNORE INTO specialties VALUES (3, 'dentistry'); + +INSERT IGNORE INTO vet_specialties VALUES (2, 1); +INSERT IGNORE INTO vet_specialties VALUES (3, 2); +INSERT IGNORE INTO vet_specialties VALUES (3, 3); +INSERT IGNORE INTO vet_specialties VALUES (4, 2); +INSERT IGNORE INTO vet_specialties VALUES (5, 1); diff --git a/src/main/resources/db/mysql/schema.sql b/src/main/resources/db/mysql/schema.sql new file mode 100644 index 0000000..bf4f6c5 --- /dev/null +++ b/src/main/resources/db/mysql/schema.sql @@ -0,0 +1,24 @@ +CREATE DATABASE IF NOT EXISTS petclinic; + +USE petclinic; + +CREATE TABLE IF NOT EXISTS vets ( + id INT(4) UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY, + first_name VARCHAR(30), + last_name VARCHAR(30), + INDEX(last_name) +) engine=InnoDB; + +CREATE TABLE IF NOT EXISTS specialties ( + id INT(4) UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY, + name VARCHAR(80), + INDEX(name) +) engine=InnoDB; + +CREATE TABLE IF NOT EXISTS vet_specialties ( + vet_id INT(4) UNSIGNED NOT NULL, + specialty_id INT(4) UNSIGNED NOT NULL, + FOREIGN KEY (vet_id) REFERENCES vets(id), + FOREIGN KEY (specialty_id) REFERENCES specialties(id), + UNIQUE (vet_id,specialty_id) +) engine=InnoDB; diff --git a/src/main/resources/logback-spring.xml b/src/main/resources/logback-spring.xml new file mode 100644 index 0000000..5d03f79 --- /dev/null +++ b/src/main/resources/logback-spring.xml @@ -0,0 +1,6 @@ + + + + + + diff --git a/src/test/java/org/springframework/samples/petclinic/vets/web/VetResourceTest.java b/src/test/java/org/springframework/samples/petclinic/vets/web/VetResourceTest.java new file mode 100644 index 0000000..05e29b9 --- /dev/null +++ b/src/test/java/org/springframework/samples/petclinic/vets/web/VetResourceTest.java @@ -0,0 +1,62 @@ +/* + * Copyright 2002-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.springframework.samples.petclinic.vets.web; + +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.boot.test.autoconfigure.web.servlet.WebMvcTest; +import org.springframework.boot.test.mock.mockito.MockBean; +import org.springframework.http.MediaType; +import org.springframework.samples.petclinic.vets.model.Vet; +import org.springframework.samples.petclinic.vets.model.VetRepository; +import org.springframework.test.context.ActiveProfiles; +import org.springframework.test.context.junit.jupiter.SpringExtension; +import org.springframework.test.web.servlet.MockMvc; + +import static java.util.Arrays.asList; +import static org.mockito.BDDMockito.given; +import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get; +import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.jsonPath; +import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status; + +/** + * @author Maciej Szarlinski + */ +@ExtendWith(SpringExtension.class) +@WebMvcTest(VetResource.class) +@ActiveProfiles("test") +class VetResourceTest { + + @Autowired + MockMvc mvc; + + @MockBean + VetRepository vetRepository; + + @Test + void shouldGetAListOfVets() throws Exception { + + Vet vet = new Vet(); + vet.setId(1); + + given(vetRepository.findAll()).willReturn(asList(vet)); + + mvc.perform(get("/vets").accept(MediaType.APPLICATION_JSON)) + .andExpect(status().isOk()) + .andExpect(jsonPath("$[0].id").value(1)); + } +} diff --git a/src/test/resources/application-test.yml b/src/test/resources/application-test.yml new file mode 100644 index 0000000..684fa89 --- /dev/null +++ b/src/test/resources/application-test.yml @@ -0,0 +1,20 @@ +spring: + cloud: + config: + enabled: false + sql: + init: + schema-locations: classpath*:db/hsqldb/schema.sql + data-locations: classpath*:db/hsqldb/data.sql + jpa: + hibernate: + ddl-auto: none + +eureka: + client: + enabled: false + +vets: + cache: + ttl: 10 + heap-size: 10