diff --git a/spring-rest-angular/bin/pom.xml b/spring-rest-angular/bin/pom.xml deleted file mode 100644 index 331c9a644c..0000000000 --- a/spring-rest-angular/bin/pom.xml +++ /dev/null @@ -1,95 +0,0 @@ - - - 4.0.0 - spring-rest-angular - spring-rest-angular - com.baeldung - 1.0 - war - - org.springframework.boot - spring-boot-starter-parent - 1.3.3.RELEASE - - - - org.springframework.boot - spring-boot-starter-tomcat - provided - - - org.springframework.boot - spring-boot-starter-web - - - org.springframework.data - spring-data-commons - - - org.springframework.boot - spring-boot-starter-data-jpa - - - org.hsqldb - hsqldb - runtime - - - org.springframework - spring-test - test - - - org.apache.commons - commons-lang3 - 3.3 - - - com.google.guava - guava - 19.0 - - - junit - junit - test - - - io.rest-assured - rest-assured - 3.0.0 - test - - - io.rest-assured - spring-mock-mvc - 3.0.0 - test - - - - angular-spring-rest-sample - - - - org.apache.maven.plugins - maven-compiler-plugin - - 1.8 - 1.8 - - - - - org.apache.maven.plugins - maven-war-plugin - - false - - - - - - diff --git a/spring-rest-angular/bin/src/main/resources/application.properties b/spring-rest-angular/bin/src/main/resources/application.properties deleted file mode 100644 index e24db89c8f..0000000000 --- a/spring-rest-angular/bin/src/main/resources/application.properties +++ /dev/null @@ -1,4 +0,0 @@ -server.contextPath=/ -spring.h2.console.enabled=true -logging.level.org.hibernate.SQL=info -spring.jpa.hibernate.ddl-auto=none \ No newline at end of file diff --git a/spring-rest-angular/bin/src/main/resources/db/sql/data.sql b/spring-rest-angular/bin/src/main/resources/db/sql/data.sql deleted file mode 100644 index 418381a681..0000000000 --- a/spring-rest-angular/bin/src/main/resources/db/sql/data.sql +++ /dev/null @@ -1,47 +0,0 @@ -CREATE TABLE student ( - id INTEGER PRIMARY KEY, - name VARCHAR(30), - gender VARCHAR(10), - age INTEGER -); - -INSERT INTO student (id,name,gender,age) -VALUES (1,'Bryan', 'Male',20); -INSERT INTO student (id,name,gender,age) -VALUES (2, 'Ben', 'Male', 22); -INSERT INTO student (id,name,gender,age) -VALUES (3,'Lisa', 'Female',24); -INSERT INTO student (id,name,gender,age) -VALUES (4,'Sarah', 'Female',20); -INSERT INTO student (id,name,gender,age) -VALUES (5,'Jay', 'Male',20); -INSERT INTO student (id,name,gender,age) -VALUES (6,'John', 'Male',22); -INSERT INTO student (id,name,gender,age) -VALUES (7,'Jordan', 'Male',24); -INSERT INTO student (id,name,gender,age) -VALUES (8,'Rob', 'Male',26); -INSERT INTO student (id,name,gender,age) -VALUES (9,'Will', 'Male',20); -INSERT INTO student (id,name,gender,age) -VALUES (10,'Shawn', 'Male',22); -INSERT INTO student (id,name,gender,age) -VALUES (11,'Taylor', 'Female',24); -INSERT INTO student (id,name,gender,age) -VALUES (12,'Venus', 'Female',26); -INSERT INTO student (id,name,gender,age) -VALUES (13,'Vince', 'Male',20); -INSERT INTO student (id,name,gender,age) -VALUES (14,'Carol', 'Female',22); -INSERT INTO student (id,name,gender,age) -VALUES (15,'Joana', 'Female',24); -INSERT INTO student (id,name,gender,age) -VALUES (16,'Dion', 'Male',26); -INSERT INTO student (id,name,gender,age) -VALUES (17,'Evans', 'Male',20); -INSERT INTO student (id,name,gender,age) -VALUES (18,'Bart', 'Male',22); -INSERT INTO student (id,name,gender,age) -VALUES (19,'Jenny', 'Female',24); -INSERT INTO student (id,name,gender,age) -VALUES (20,'Kristine', 'Female',26); \ No newline at end of file diff --git a/spring-rest-angular/bin/src/main/webapp/WEB-INF/web.xml b/spring-rest-angular/bin/src/main/webapp/WEB-INF/web.xml deleted file mode 100644 index 6adf31503f..0000000000 --- a/spring-rest-angular/bin/src/main/webapp/WEB-INF/web.xml +++ /dev/null @@ -1,11 +0,0 @@ - - - - - index.html - - - \ No newline at end of file diff --git a/spring-rest-angular/bin/src/main/webapp/index.html b/spring-rest-angular/bin/src/main/webapp/index.html deleted file mode 100644 index 49e0d6393d..0000000000 --- a/spring-rest-angular/bin/src/main/webapp/index.html +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - - - -
-
-
- - \ No newline at end of file diff --git a/spring-rest-angular/bin/src/main/webapp/view/app.js b/spring-rest-angular/bin/src/main/webapp/view/app.js deleted file mode 100644 index a41026d2c3..0000000000 --- a/spring-rest-angular/bin/src/main/webapp/view/app.js +++ /dev/null @@ -1,56 +0,0 @@ -var app = angular.module('app', ['ui.grid','ui.grid.pagination']); - -app.controller('StudentCtrl', ['$scope','StudentService', function ($scope,StudentService) { - var paginationOptions = { - pageNumber: 1, - pageSize: 5, - sort: null - }; - - StudentService.getStudents(paginationOptions.pageNumber, - paginationOptions.pageSize).success(function(data){ - $scope.gridOptions.data = data.content; - $scope.gridOptions.totalItems = data.totalElements; - }); - - $scope.gridOptions = { - paginationPageSizes: [5, 10, 20], - paginationPageSize: paginationOptions.pageSize, - enableColumnMenus:false, - useExternalPagination: true, - columnDefs: [ - { name: 'id' }, - { name: 'name' }, - { name: 'gender' }, - { name: 'age' } - ], - onRegisterApi: function(gridApi) { - $scope.gridApi = gridApi; - gridApi.pagination.on.paginationChanged($scope, function (newPage, pageSize) { - paginationOptions.pageNumber = newPage; - paginationOptions.pageSize = pageSize; - StudentService.getStudents(newPage,pageSize).success(function(data){ - $scope.gridOptions.data = data.content; - $scope.gridOptions.totalItems = data.totalElements; - }); - }); - } - }; - -}]); - -app.service('StudentService',['$http', function ($http) { - - function getStudents(pageNumber,size) { - pageNumber = pageNumber > 0?pageNumber - 1:0; - return $http({ - method: 'GET', - url: 'student/get?page='+pageNumber+'&size='+size - }); - } - - return { - getStudents:getStudents - }; - -}]); \ No newline at end of file