Move vet package to infrastructure

This commit is contained in:
Ismail Ismailov 2023-04-27 14:06:56 +02:00
parent 44c3f9308b
commit e1b9a6a18e
9 changed files with 13 additions and 13 deletions

View file

@ -20,8 +20,8 @@ import java.util.List;
import org.springframework.data.domain.Page; import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageRequest; import org.springframework.data.domain.PageRequest;
import org.springframework.data.domain.Pageable; import org.springframework.data.domain.Pageable;
import org.springframework.samples.petclinic.vet.Vet; import org.springframework.samples.petclinic.infrastructure.persistence.vet.Vet;
import org.springframework.samples.petclinic.vet.VetRepository; import org.springframework.samples.petclinic.infrastructure.persistence.vet.VetRepository;
import org.springframework.samples.petclinic.infrastructure.view.Vets; import org.springframework.samples.petclinic.infrastructure.view.Vets;
import org.springframework.stereotype.Controller; import org.springframework.stereotype.Controller;
import org.springframework.ui.Model; import org.springframework.ui.Model;

View file

@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package org.springframework.samples.petclinic.vet; package org.springframework.samples.petclinic.infrastructure.persistence.vet;
import org.springframework.samples.petclinic.infrastructure.persistence.model.NamedEntity; import org.springframework.samples.petclinic.infrastructure.persistence.model.NamedEntity;

View file

@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package org.springframework.samples.petclinic.vet; package org.springframework.samples.petclinic.infrastructure.persistence.vet;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Collections; import java.util.Collections;

View file

@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package org.springframework.samples.petclinic.vet; package org.springframework.samples.petclinic.infrastructure.persistence.vet;
import org.springframework.cache.annotation.Cacheable; import org.springframework.cache.annotation.Cacheable;
import org.springframework.dao.DataAccessException; import org.springframework.dao.DataAccessException;

View file

@ -20,7 +20,7 @@ import java.util.List;
import jakarta.xml.bind.annotation.XmlElement; import jakarta.xml.bind.annotation.XmlElement;
import jakarta.xml.bind.annotation.XmlRootElement; import jakarta.xml.bind.annotation.XmlRootElement;
import org.springframework.samples.petclinic.vet.Vet; import org.springframework.samples.petclinic.infrastructure.persistence.vet.Vet;
/** /**
* Simple domain object representing a list of veterinarians. Mostly here to be used for * Simple domain object representing a list of veterinarians. Mostly here to be used for

View file

@ -27,7 +27,7 @@ import org.springframework.boot.web.client.RestTemplateBuilder;
import org.springframework.http.HttpStatus; import org.springframework.http.HttpStatus;
import org.springframework.http.RequestEntity; import org.springframework.http.RequestEntity;
import org.springframework.http.ResponseEntity; import org.springframework.http.ResponseEntity;
import org.springframework.samples.petclinic.vet.VetRepository; import org.springframework.samples.petclinic.infrastructure.persistence.vet.VetRepository;
import org.springframework.web.client.RestTemplate; import org.springframework.web.client.RestTemplate;
@SpringBootTest(webEnvironment = WebEnvironment.RANDOM_PORT) @SpringBootTest(webEnvironment = WebEnvironment.RANDOM_PORT)

View file

@ -25,10 +25,9 @@ import org.springframework.boot.test.mock.mockito.MockBean;
import org.springframework.data.domain.PageImpl; import org.springframework.data.domain.PageImpl;
import org.springframework.data.domain.Pageable; import org.springframework.data.domain.Pageable;
import org.springframework.http.MediaType; import org.springframework.http.MediaType;
import org.springframework.samples.petclinic.infrastructure.controller.VetController; import org.springframework.samples.petclinic.infrastructure.persistence.vet.Specialty;
import org.springframework.samples.petclinic.vet.Specialty; import org.springframework.samples.petclinic.infrastructure.persistence.vet.Vet;
import org.springframework.samples.petclinic.vet.Vet; import org.springframework.samples.petclinic.infrastructure.persistence.vet.VetRepository;
import org.springframework.samples.petclinic.vet.VetRepository;
import org.springframework.test.web.servlet.MockMvc; import org.springframework.test.web.servlet.MockMvc;
import org.springframework.test.web.servlet.ResultActions; import org.springframework.test.web.servlet.ResultActions;
import org.springframework.test.web.servlet.request.MockMvcRequestBuilders; import org.springframework.test.web.servlet.request.MockMvcRequestBuilders;

View file

@ -34,8 +34,8 @@ import org.springframework.samples.petclinic.owner.OwnerRepository;
import org.springframework.samples.petclinic.owner.Pet; import org.springframework.samples.petclinic.owner.Pet;
import org.springframework.samples.petclinic.owner.PetType; import org.springframework.samples.petclinic.owner.PetType;
import org.springframework.samples.petclinic.owner.Visit; import org.springframework.samples.petclinic.owner.Visit;
import org.springframework.samples.petclinic.vet.Vet; import org.springframework.samples.petclinic.infrastructure.persistence.vet.Vet;
import org.springframework.samples.petclinic.vet.VetRepository; import org.springframework.samples.petclinic.infrastructure.persistence.vet.VetRepository;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;

View file

@ -16,6 +16,7 @@
package org.springframework.samples.petclinic.vet; package org.springframework.samples.petclinic.vet;
import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Test;
import org.springframework.samples.petclinic.infrastructure.persistence.vet.Vet;
import org.springframework.util.SerializationUtils; import org.springframework.util.SerializationUtils;
import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThat;