Skip to content

Commit 6479aaa

Browse files
committed
fix #17 - remove Spring Data Rest from project
1 parent 0ac7ab1 commit 6479aaa

File tree

2 files changed

+43
-4
lines changed

2 files changed

+43
-4
lines changed

pom.xml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,10 +52,6 @@
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>
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
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+

0 commit comments

Comments
 (0)