David Thornley 6 years ago
parent
commit
78de1a60b3

+ 5
- 5
pom.xml View File

@@ -92,11 +92,11 @@
92 92
             <artifactId>jquery</artifactId>
93 93
             <version>3.1.0</version>
94 94
         </dependency>
95
-        <!--<dependency>-->
96
-            <!--<groupId>org.apache.tomcat</groupId>-->
97
-            <!--<artifactId>tomcat-jdbc</artifactId>-->
98
-            <!--<version>8.5.31</version>-->
99
-        <!--</dependency>-->
95
+        <dependency>
96
+            <groupId>org.apache.tomcat</groupId>
97
+            <artifactId>tomcat-jdbc</artifactId>
98
+            <version>8.5.31</version>
99
+        </dependency>
100 100
     </dependencies>
101 101
 
102 102
     <build>

+ 0
- 14
src/main/java/com/ziplinegreen/vault/Controller/PostController.java View File

@@ -1,27 +1,13 @@
1 1
 package com.ziplinegreen.vault.Controller;
2 2
 
3
-import com.sun.deploy.net.HttpResponse;
4
-import com.ziplinegreen.vault.Exception.ResourceNotFoundException;
5 3
 import com.ziplinegreen.vault.Model.Post;
6
-import com.ziplinegreen.vault.Model.User;
7
-import com.ziplinegreen.vault.Repository.PostRepository;
8
-import com.ziplinegreen.vault.Repository.UsersRepository;
9 4
 import com.ziplinegreen.vault.Service.PostService;
10
-import com.ziplinegreen.vault.Service.UserService;
11 5
 import org.springframework.beans.factory.annotation.Autowired;
12
-import org.springframework.data.domain.Page;
13
-import org.springframework.data.domain.Pageable;
14
-import org.springframework.http.HttpStatus;
15 6
 import org.springframework.http.ResponseEntity;
16
-import org.springframework.messaging.handler.annotation.DestinationVariable;
17 7
 import org.springframework.messaging.handler.annotation.MessageMapping;
18 8
 import org.springframework.messaging.handler.annotation.SendTo;
19
-import org.springframework.stereotype.Controller;
20 9
 import org.springframework.web.bind.annotation.*;
21 10
 
22
-import javax.validation.Valid;
23
-import java.util.Set;
24
-
25 11
 @RestController
26 12
 public class PostController {
27 13
 

+ 0
- 10
src/main/java/com/ziplinegreen/vault/Controller/UserController.java View File

@@ -1,21 +1,11 @@
1 1
 package com.ziplinegreen.vault.Controller;
2 2
 
3
-import com.ziplinegreen.vault.Exception.ResourceNotFoundException;
4
-import com.ziplinegreen.vault.Model.Post;
5 3
 import com.ziplinegreen.vault.Model.User;
6
-import com.ziplinegreen.vault.Repository.UsersRepository;
7 4
 import com.ziplinegreen.vault.Service.UserService;
8 5
 import org.springframework.beans.factory.annotation.Autowired;
9
-import org.springframework.data.domain.Page;
10
-import org.springframework.data.domain.Pageable;
11
-import org.springframework.http.HttpStatus;
12 6
 import org.springframework.http.ResponseEntity;
13 7
 import org.springframework.web.bind.annotation.*;
14 8
 
15
-import javax.validation.Valid;
16
-import java.util.List;
17
-import java.util.Set;
18
-
19 9
 @RestController
20 10
 public class UserController {
21 11
 

+ 0
- 1
src/main/java/com/ziplinegreen/vault/Model/Post.java View File

@@ -1,7 +1,6 @@
1 1
 package com.ziplinegreen.vault.Model;
2 2
 
3 3
 
4
-import com.fasterxml.jackson.annotation.JsonIgnore;
5 4
 import org.hibernate.annotations.OnDelete;
6 5
 import org.hibernate.annotations.OnDeleteAction;
7 6
 

+ 0
- 4
src/main/java/com/ziplinegreen/vault/Model/User.java View File

@@ -1,9 +1,5 @@
1 1
 package com.ziplinegreen.vault.Model;
2 2
 
3
-import com.fasterxml.jackson.annotation.JsonIgnore;
4
-import org.hibernate.annotations.OnDelete;
5
-import org.hibernate.annotations.OnDeleteAction;
6
-
7 3
 import javax.persistence.*;
8 4
 import javax.validation.constraints.NotNull;
9 5
 import java.util.ArrayList;

+ 0
- 5
src/main/java/com/ziplinegreen/vault/Repository/PostRepository.java View File

@@ -1,13 +1,8 @@
1 1
 package com.ziplinegreen.vault.Repository;
2 2
 
3 3
 import com.ziplinegreen.vault.Model.Post;
4
-import org.springframework.data.domain.Page;
5
-import org.springframework.data.domain.Pageable;
6 4
 import org.springframework.data.jpa.repository.JpaRepository;
7
-import org.springframework.data.jpa.repository.Query;
8
-import org.springframework.data.repository.query.Param;
9 5
 import org.springframework.data.rest.core.annotation.RepositoryRestResource;
10
-import org.springframework.stereotype.Repository;
11 6
 
12 7
 @RepositoryRestResource
13 8
 public interface PostRepository extends JpaRepository<Post,Long> {

+ 0
- 7
src/main/java/com/ziplinegreen/vault/Service/UserService.java View File

@@ -1,18 +1,11 @@
1 1
 package com.ziplinegreen.vault.Service;
2 2
 
3
-import com.ziplinegreen.vault.Controller.PostController;
4
-import com.ziplinegreen.vault.Exception.ResourceNotFoundException;
5
-import com.ziplinegreen.vault.Model.Post;
6 3
 import com.ziplinegreen.vault.Model.User;
7 4
 import com.ziplinegreen.vault.Repository.UsersRepository;
8 5
 import org.springframework.beans.factory.annotation.Autowired;
9 6
 import org.springframework.http.HttpStatus;
10 7
 import org.springframework.http.ResponseEntity;
11 8
 import org.springframework.stereotype.Service;
12
-import org.springframework.web.server.ResponseStatusException;
13
-
14
-import javax.xml.ws.Response;
15
-import java.util.List;
16 9
 
17 10
 @Service
18 11
 public class UserService {