Moving static resources from WEB-INF to src/main/resources/static
6
.gitignore
vendored
|
@ -1,7 +1,7 @@
|
|||
target/*
|
||||
.settings/*
|
||||
target/
|
||||
.settings/
|
||||
.classpath
|
||||
.project
|
||||
.idea
|
||||
*.iml
|
||||
/target
|
||||
generated/
|
||||
|
|
6
pom.xml
|
@ -30,6 +30,11 @@
|
|||
<artifactId>spring-boot-starter-web</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-thymeleaf</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-data-jpa</artifactId>
|
||||
|
@ -48,6 +53,7 @@
|
|||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-devtools</artifactId>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
|
|
|
@ -0,0 +1,14 @@
|
|||
package org.springframework.samples.petclinic.config;
|
||||
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.web.servlet.config.annotation.ViewControllerRegistry;
|
||||
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;
|
||||
|
||||
@Configuration
|
||||
public class WebConfig extends WebMvcConfigurerAdapter {
|
||||
|
||||
@Override
|
||||
public void addViewControllers(ViewControllerRegistry registry) {
|
||||
registry.addViewController("/").setViewName("index");
|
||||
}
|
||||
}
|
Before Width: | Height: | Size: 83 KiB After Width: | Height: | Size: 83 KiB |
Before Width: | Height: | Size: 362 KiB After Width: | Height: | Size: 362 KiB |
Before Width: | Height: | Size: 528 B After Width: | Height: | Size: 528 B |
Before Width: | Height: | Size: 66 KiB After Width: | Height: | Size: 66 KiB |
Before Width: | Height: | Size: 8.9 KiB After Width: | Height: | Size: 8.9 KiB |
Before Width: | Height: | Size: 3.6 KiB After Width: | Height: | Size: 3.6 KiB |
Before Width: | Height: | Size: 6.7 KiB After Width: | Height: | Size: 6.7 KiB |
Before Width: | Height: | Size: 2.8 KiB After Width: | Height: | Size: 2.8 KiB |
|
@ -38,6 +38,6 @@ petClinicApp.config(['$locationProvider', '$routeProvider', '$httpProvider', fun
|
|||
var mod = 'layout' + c.toUpperCase().substring(0, 1) + c.substring(1);
|
||||
angular.module(mod, []);
|
||||
angular.module(mod).component(mod, {
|
||||
templateUrl: "scripts/app/fragments/" + c + ".html"
|
||||
templateUrl: "scripts/fragments/" + c + ".html"
|
||||
});
|
||||
});
|
|
@ -1,6 +1,6 @@
|
|||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-12 text-center"><img src="/resources/images/spring-pivotal-logo.png"
|
||||
<div class="col-12 text-center"><img src="/images/spring-pivotal-logo.png"
|
||||
alt="Sponsored by Pivotal"/></div>
|
||||
</div>
|
||||
</div>
|
|
@ -2,6 +2,6 @@
|
|||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<img class="img-responsive" src="resources/images/pets.png" alt="pets logo" />
|
||||
<img class="img-responsive" src="images/pets.png" alt="pets logo" />
|
||||
</div>
|
||||
</div>
|
|
@ -5,7 +5,7 @@ angular.module('ownerDetails', [
|
|||
]);
|
||||
|
||||
angular.module("ownerDetails").component("ownerDetails", {
|
||||
templateUrl: "scripts/app/owner-details/owner-details.template.html",
|
||||
templateUrl: "scripts/owner-details/owner-details.template.html",
|
||||
controller: ["$http", '$routeParams', function($http, $routeParams) {
|
||||
var self = this;
|
||||
|
|
@ -5,7 +5,7 @@ angular.module('ownerForm', [
|
|||
]);
|
||||
|
||||
angular.module("ownerForm").component("ownerForm", {
|
||||
templateUrl: "scripts/app/owner-form/owner-form.template.html",
|
||||
templateUrl: "scripts/owner-form/owner-form.template.html",
|
||||
controller: ["$http", '$routeParams', '$location', function ($http, $routeParams, $location) {
|
||||
var self = this;
|
||||
|
|
@ -5,7 +5,7 @@ angular.module('ownerList', [
|
|||
]);
|
||||
|
||||
angular.module("ownerList").component("ownerList", {
|
||||
templateUrl: "scripts/app/owner-list/owner-list.template.html",
|
||||
templateUrl: "scripts/owner-list/owner-list.template.html",
|
||||
controller: ["$http", function ($http) {
|
||||
var self = this;
|
||||
$http.get('owner/list').then(function(resp) {
|
|
@ -5,7 +5,7 @@ angular.module('petForm', [
|
|||
]);
|
||||
|
||||
angular.module("petForm").component("petForm", {
|
||||
templateUrl: "scripts/app/pet-form/pet-form.template.html",
|
||||
templateUrl: "scripts/pet-form/pet-form.template.html",
|
||||
controller: ["$http", '$routeParams', '$location', function ($http, $routeParams, $location) {
|
||||
var self = this;
|
||||
var ownerId = $routeParams.ownerId || 0;
|
|
@ -5,7 +5,7 @@ angular.module('vetList', [
|
|||
]);
|
||||
|
||||
angular.module("vetList").component("vetList", {
|
||||
templateUrl: "scripts/app/vet-list/vet-list.template.html",
|
||||
templateUrl: "scripts/vet-list/vet-list.template.html",
|
||||
controller: ["$http", '$routeParams', function($http) {
|
||||
var self = this;
|
||||
|
|
@ -5,7 +5,7 @@ angular.module('visits', [
|
|||
]);
|
||||
|
||||
angular.module("visits").component("visits", {
|
||||
templateUrl: "scripts/app/visits/visits.template.html",
|
||||
templateUrl: "scripts/visits/visits.template.html",
|
||||
controller: ["$http", '$routeParams', '$location', '$filter', function ($http, $routeParams, $location, $filter) {
|
||||
var self = this;
|
||||
var petId = $routeParams.petId || 0;
|
|
@ -3,10 +3,10 @@
|
|||
<html ng-app="petClinicApp">
|
||||
|
||||
<head>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=0, minimal-ui">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=0, minimal-ui"/>
|
||||
<title>PetClinic :: a Spring Framework demonstration</title>
|
||||
<link rel="stylesheet" href="webjars/bootstrap/3.3.7/css/bootstrap.min.css"/>
|
||||
<link rel="stylesheet" href="resources/css/petclinic.css"/>
|
||||
<link rel="stylesheet" href="../css/petclinic.css"/>
|
||||
|
||||
<script src="webjars/jquery/3.1.0/jquery.min.js"></script>
|
||||
<script src="webjars/bootstrap/3.3.7/js/bootstrap.min.js"></script>
|
||||
|
@ -14,13 +14,13 @@
|
|||
<script src="webjars/angularjs/1.5.8/angular.min.js"></script>
|
||||
<script src="webjars/angularjs/1.5.8/angular-route.min.js"></script>
|
||||
|
||||
<script src="scripts/app/app.js"></script>
|
||||
<script src="scripts/app/owner-list/owner-list.component.js"></script>
|
||||
<script src="scripts/app/owner-details/owner-details.component.js"></script>
|
||||
<script src="scripts/app/owner-form/owner-form.component.js"></script>
|
||||
<script src="scripts/app/pet-form/pet-form.component.js"></script>
|
||||
<script src="scripts/app/visits/visits.component.js"></script>
|
||||
<script src="scripts/app/vet-list/vet-list.component.js"></script>
|
||||
<script src="../scripts/app.js"></script>
|
||||
<script src="../scripts/owner-list/owner-list.component.js"></script>
|
||||
<script src="../scripts/owner-details/owner-details.component.js"></script>
|
||||
<script src="../scripts/owner-form/owner-form.component.js"></script>
|
||||
<script src="../scripts/pet-form/pet-form.component.js"></script>
|
||||
<script src="../scripts/visits/visits.component.js"></script>
|
||||
<script src="../scripts/vet-list/vet-list.component.js"></script>
|
||||
|
||||
</head>
|
||||
|
||||
|
@ -28,7 +28,7 @@
|
|||
<layout-nav></layout-nav>
|
||||
<div class="container-fluid">
|
||||
<div class="container xd-container">
|
||||
<div ng-view></div>
|
||||
<div ng-view=""></div>
|
||||
</div>
|
||||
</div>
|
||||
<layout-footer></layout-footer>
|
1
src/main/webapp/resources/.gitignore
vendored
|
@ -1 +0,0 @@
|
|||
generated/
|