mirror of
https://github.com/spring-projects/spring-petclinic.git
synced 2025-07-17 13:05:49 +00:00
Cross Origin support
This commit is contained in:
parent
3aafb3f28f
commit
e9836e634a
5 changed files with 29 additions and 4 deletions
|
@ -0,0 +1,25 @@
|
|||
/*
|
||||
* Copyright 2002-2013 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.web;
|
||||
|
||||
import org.springframework.web.bind.annotation.CrossOrigin;
|
||||
|
||||
/**
|
||||
* @author Antoine Rey
|
||||
*/
|
||||
@CrossOrigin
|
||||
abstract class AbstractResourceController {
|
||||
}
|
|
@ -40,7 +40,7 @@ import javax.validation.Valid;
|
|||
* @author Michael Isvy
|
||||
*/
|
||||
@RestController
|
||||
public class OwnerResource {
|
||||
public class OwnerResource extends AbstractResourceController {
|
||||
|
||||
private final ClinicService clinicService;
|
||||
|
||||
|
|
|
@ -35,7 +35,7 @@ import java.util.Map;
|
|||
* @author Arjen Poutsma
|
||||
*/
|
||||
@RestController
|
||||
public class PetResource {
|
||||
public class PetResource extends AbstractResourceController {
|
||||
|
||||
private final ClinicService clinicService;
|
||||
|
||||
|
|
|
@ -33,7 +33,7 @@ import org.springframework.web.bind.annotation.RestController;
|
|||
* @author Arjen Poutsma
|
||||
*/
|
||||
@RestController
|
||||
public class VetResource {
|
||||
public class VetResource extends AbstractResourceController {
|
||||
|
||||
private final ClinicService clinicService;
|
||||
|
||||
|
|
|
@ -35,7 +35,7 @@ import javax.validation.Valid;
|
|||
* @author Michael Isvy
|
||||
*/
|
||||
@RestController
|
||||
public class VisitResource {
|
||||
public class VisitResource extends AbstractResourceController {
|
||||
|
||||
private final ClinicService clinicService;
|
||||
|
||||
|
|
Loading…
Reference in a new issue