diff --git a/src/main/java/org/springframework/samples/petclinic/PetClinicApplication.java b/src/main/java/org/springframework/samples/petclinic/PetClinicApplication.java index 72dc6087a..21d6e053b 100644 --- a/src/main/java/org/springframework/samples/petclinic/PetClinicApplication.java +++ b/src/main/java/org/springframework/samples/petclinic/PetClinicApplication.java @@ -2,6 +2,12 @@ package org.springframework.samples.petclinic; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.context.annotation.Bean; +import org.springframework.ui.ModelMap; +import org.springframework.web.context.request.WebRequest; +import org.springframework.web.context.request.WebRequestInterceptor; +import org.springframework.web.servlet.config.annotation.InterceptorRegistry; +import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter; @SpringBootApplication public class PetClinicApplication { @@ -10,3 +16,4 @@ public class PetClinicApplication { SpringApplication.run(PetClinicApplication.class, args); } } + diff --git a/src/main/webapp/scripts/app/app.js b/src/main/webapp/scripts/app/app.js index 660076158..29b8d78ea 100644 --- a/src/main/webapp/scripts/app/app.js +++ b/src/main/webapp/scripts/app/app.js @@ -4,7 +4,11 @@ var petClinicApp = angular.module('petClinicApp', [ 'ngRoute', 'layoutNav', 'layoutFooter', 'layoutWelcome', 'ownerList', 'ownerDetails', 'ownerForm', 'petForm', 'visits', 'vetList']); -petClinicApp.config(['$locationProvider', '$routeProvider', function ($locationProvider, $routeProvider) { +petClinicApp.config(['$locationProvider', '$routeProvider', '$httpProvider', function( + $locationProvider, $routeProvider, $httpProvider) { + + // safari turns to be lazy sending the Cache-Control header + $httpProvider.defaults.headers.common["Cache-Control"] = 'no-cache'; $locationProvider.hashPrefix('!');