David Thornley 6 years ago
parent
commit
78de1a60b3

+ 5
- 5
pom.xml View File

92
             <artifactId>jquery</artifactId>
92
             <artifactId>jquery</artifactId>
93
             <version>3.1.0</version>
93
             <version>3.1.0</version>
94
         </dependency>
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
     </dependencies>
100
     </dependencies>
101
 
101
 
102
     <build>
102
     <build>

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

1
 package com.ziplinegreen.vault.Controller;
1
 package com.ziplinegreen.vault.Controller;
2
 
2
 
3
-import com.sun.deploy.net.HttpResponse;
4
-import com.ziplinegreen.vault.Exception.ResourceNotFoundException;
5
 import com.ziplinegreen.vault.Model.Post;
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
 import com.ziplinegreen.vault.Service.PostService;
4
 import com.ziplinegreen.vault.Service.PostService;
10
-import com.ziplinegreen.vault.Service.UserService;
11
 import org.springframework.beans.factory.annotation.Autowired;
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
 import org.springframework.http.ResponseEntity;
6
 import org.springframework.http.ResponseEntity;
16
-import org.springframework.messaging.handler.annotation.DestinationVariable;
17
 import org.springframework.messaging.handler.annotation.MessageMapping;
7
 import org.springframework.messaging.handler.annotation.MessageMapping;
18
 import org.springframework.messaging.handler.annotation.SendTo;
8
 import org.springframework.messaging.handler.annotation.SendTo;
19
-import org.springframework.stereotype.Controller;
20
 import org.springframework.web.bind.annotation.*;
9
 import org.springframework.web.bind.annotation.*;
21
 
10
 
22
-import javax.validation.Valid;
23
-import java.util.Set;
24
-
25
 @RestController
11
 @RestController
26
 public class PostController {
12
 public class PostController {
27
 
13
 

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

1
 package com.ziplinegreen.vault.Controller;
1
 package com.ziplinegreen.vault.Controller;
2
 
2
 
3
-import com.ziplinegreen.vault.Exception.ResourceNotFoundException;
4
-import com.ziplinegreen.vault.Model.Post;
5
 import com.ziplinegreen.vault.Model.User;
3
 import com.ziplinegreen.vault.Model.User;
6
-import com.ziplinegreen.vault.Repository.UsersRepository;
7
 import com.ziplinegreen.vault.Service.UserService;
4
 import com.ziplinegreen.vault.Service.UserService;
8
 import org.springframework.beans.factory.annotation.Autowired;
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
 import org.springframework.http.ResponseEntity;
6
 import org.springframework.http.ResponseEntity;
13
 import org.springframework.web.bind.annotation.*;
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
 @RestController
9
 @RestController
20
 public class UserController {
10
 public class UserController {
21
 
11
 

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

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

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

1
 package com.ziplinegreen.vault.Model;
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
 import javax.persistence.*;
3
 import javax.persistence.*;
8
 import javax.validation.constraints.NotNull;
4
 import javax.validation.constraints.NotNull;
9
 import java.util.ArrayList;
5
 import java.util.ArrayList;

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

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

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

1
 package com.ziplinegreen.vault.Service;
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
 import com.ziplinegreen.vault.Model.User;
3
 import com.ziplinegreen.vault.Model.User;
7
 import com.ziplinegreen.vault.Repository.UsersRepository;
4
 import com.ziplinegreen.vault.Repository.UsersRepository;
8
 import org.springframework.beans.factory.annotation.Autowired;
5
 import org.springframework.beans.factory.annotation.Autowired;
9
 import org.springframework.http.HttpStatus;
6
 import org.springframework.http.HttpStatus;
10
 import org.springframework.http.ResponseEntity;
7
 import org.springframework.http.ResponseEntity;
11
 import org.springframework.stereotype.Service;
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
 @Service
10
 @Service
18
 public class UserService {
11
 public class UserService {