Skip to content
Snippets Groups Projects
Commit 4b18dc53 authored by Antoine Rey's avatar Antoine Rey
Browse files

Merge remote-tracking branch 'upstream/master' into admin

# Conflicts:
#	pom.xml
#	spring-petclinic-api-gateway/pom.xml
parents b9a803ca 6c118e49
No related branches found
No related tags found
No related merge requests found
Showing
with 60 additions and 96 deletions
<!DOCTYPE html>
<html ng-app="petClinicApp" xmlns:th="http://www.thymeleaf.org">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<meta charset="utf-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge"/>
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=0, minimal-ui"/>
<!-- The above 4 meta tags *must* come first in the head; any other head content must come *after* these tags -->
<link rel="shortcut icon" type="image/x-icon" th:href="@{/images/favicon.png}"/>
<title>PetClinic :: a Spring Framework demonstration</title>
<link rel="stylesheet" th:href="@{/bootstrap/css/bootstrap.min.css}"/>
<link rel="stylesheet" th:href="@{/css/petclinic.css}"/>
<script th:src="@{/jquery/jquery.min.js}"></script>
<script th:src="@{/bootstrap/js/bootstrap.min.js}"></script>
<script th:src="@{/angular/angular.js}"></script>
<script th:src="@{/angular-ui-router/release/angular-ui-router.min.js}"></script>
<script th:src="@{/scripts/app.js}"></script>
<script th:src="@{/scripts/owner-list/owner-list.js}"></script>
<script th:src="@{/scripts/owner-list/owner-list.controller.js}"></script>
<script th:src="@{/scripts/owner-list/owner-list.component.js}"></script>
<script th:src="@{/scripts/owner-details/owner-details.js}"></script>
<script th:src="@{/scripts/owner-details/owner-details.controller.js}"></script>
<script th:src="@{/scripts/owner-details/owner-details.component.js}"></script>
<script th:src="@{/scripts/owner-form/owner-form.js}"></script>
<script th:src="@{/scripts/owner-form/owner-form.controller.js}"></script>
<script th:src="@{/scripts/owner-form/owner-form.component.js}"></script>
<script th:src="@{/scripts/pet-form/pet-form.js}"></script>
<script th:src="@{/scripts/pet-form/pet-form.controller.js}"></script>
<script th:src="@{/scripts/pet-form/pet-form.component.js}"></script>
<script th:src="@{/scripts/visits/visits.js}"></script>
<script th:src="@{/scripts/visits/visits.controller.js}"></script>
<script th:src="@{/scripts/visits/visits.component.js}"></script>
<script th:src="@{/scripts/vet-list/vet-list.js}"></script>
<script th:src="@{/scripts/vet-list/vet-list.controller.js}"></script>
<script th:src="@{/scripts/vet-list/vet-list.component.js}"></script>
</head>
<body class="container">
<layout-nav></layout-nav>
<div class="container-fluid">
<div class="container xd-container">
<div ui-view=""></div>
</div>
</div>
<layout-footer></layout-footer>
</body>
</html>
#List of preProcessors
preProcessors=lessCssImport
#List of postProcessors
postProcessors=less4j
\ No newline at end of file
<groups xmlns="http://www.isdc.ro/wro">
<group name="petclinic">
<css>classpath:META-INF/resources/webjars/bootstrap/3.3.6/less/bootstrap.less</css>
<css>/petclinic.less</css>
</group>
</groups>
server.port=0
petclinic.database=hsqldb
spring.datasource.schema=classpath*:db/${petclinic.database}/schema.sql
spring.datasource.data=classpath*:db/${petclinic.database}/data.sql
logging.level.org.springframework=INFO
package org.springframework.samples.petclinic.customers.web;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.autoconfigure.orm.jpa.DataJpaTest;
import org.springframework.boot.test.mock.mockito.MockBean;
import org.springframework.http.MediaType;
import org.springframework.samples.petclinic.customers.model.Owner;
import org.springframework.samples.petclinic.customers.model.OwnerRepository;
import org.springframework.samples.petclinic.customers.model.Pet;
import org.springframework.samples.petclinic.customers.model.PetRepository;
import org.springframework.samples.petclinic.customers.model.PetType;
import org.springframework.test.context.ActiveProfiles;
import org.springframework.test.context.junit4.SpringRunner;
import org.springframework.test.web.servlet.MockMvc;
import static org.assertj.core.api.Assertions.assertThat;
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.content;
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.jsonPath;
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;
/**
* @author Maciej Szarlinski
*/
@RunWith(SpringRunner.class)
@DataJpaTest
@ActiveProfiles("test")
public class PetResourceDatabaseTest {
@Autowired
PetRepository petRepository;
@Autowired
OwnerRepository ownerRepository;
@Test
public void shouldGetAPet() throws Exception {
Pet pet = petRepository.findOne(2);
assertThat(petRepository.findAll()).contains(pet);
}
}
petclinic.database: hsqldb
spring:
datasource:
schema: classpath*:db/${petclinic.database}/schema.sql
data: classpath*:db/${petclinic.database}/data.sql
spring.jpa.hibernate.ddl-auto: none
logging.level.org.springframework: INFO
......
node_modules/
node/
bower_components/
npm-debug.log
{
"name": "spring-petclinic-ui",
"description": "Spring Petclinic AngularJS client application",
"main": "",
"authors": [
"Antoine Rey <antoine.rey@free.fr>"
],
"license": "Apache 2.0",
"homepage": "https://github.com/spring-projects/spring-petclinic",
"moduleType": [],
"private": true,
"ignore": [
"**/.*",
"node_modules",
"bower_components",
"test",
"tests"
],
"dependencies": {
"angular": "~1.5.8",
"bootstrap": "components/bootstrap#~3.3.7",
"jquery": "components/jquery#~3.1.0",
"angular-ui-router": "ui-router#^0.3.2"
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment