File tree Expand file tree Collapse file tree 2 files changed +43
-4
lines changed
src/main/java/org/springframework/samples/petclinic/rest Expand file tree Collapse file tree 2 files changed +43
-4
lines changed Original file line number Diff line number Diff line change 5252 <groupId >org.springframework.boot</groupId >
5353 <artifactId >spring-boot-starter-data-jpa</artifactId >
5454 </dependency >
55- <dependency >
56- <groupId >org.springframework.boot</groupId >
57- <artifactId >spring-boot-starter-data-rest</artifactId >
58- </dependency >
5955 <dependency >
6056 <groupId >org.springframework.boot</groupId >
6157 <artifactId >spring-boot-starter-jdbc</artifactId >
Original file line number Diff line number Diff line change 1+ /*
2+ * Copyright 2016-2018 the original author or authors.
3+ *
4+ * Licensed under the Apache License, Version 2.0 (the "License");
5+ * you may not use this file except in compliance with the License.
6+ * You may obtain a copy of the License at
7+ *
8+ * http://www.apache.org/licenses/LICENSE-2.0
9+ *
10+ * Unless required by applicable law or agreed to in writing, software
11+ * distributed under the License is distributed on an "AS IS" BASIS,
12+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+ * See the License for the specific language governing permissions and
14+ * limitations under the License.
15+ */
16+
17+ package org .springframework .samples .petclinic .rest ;
18+
19+ import java .io .IOException ;
20+
21+ import javax .servlet .http .HttpServletResponse ;
22+
23+ import org .springframework .web .bind .annotation .CrossOrigin ;
24+ import org .springframework .web .bind .annotation .RequestMapping ;
25+ import org .springframework .web .bind .annotation .RestController ;
26+
27+ /**
28+ * @author Vitaliy Fedoriv
29+ *
30+ */
31+
32+ @ RestController
33+ @ CrossOrigin (exposedHeaders = "errors, content-type" )
34+ @ RequestMapping ("/" )
35+ public class RootRestController {
36+
37+ @ RequestMapping (value = "/" )
38+ public void redirectToSwagger (HttpServletResponse response ) throws IOException {
39+ response .sendRedirect ("/petclinic/swagger-ui.html" );
40+ }
41+
42+ }
43+
You can’t perform that action at this time.
0 commit comments