Search Posts

Category: spring

Angular 4 & Spring Security

I have two seperate server which is port 4200 for angular and port 8080 for backend using Spring. Angular for frontend and Spring as backend. I already succesfful in making Spring Security but seem i have fail combine with angular.. How to make spring security send to angular to redirect to login page if username and password were wrong. Its seem angular send parameter to spring because i can see at the console spring if […]

JDBC + ng-grid(AngularJS 1.4+) Pagination Oracle 11(Millions of records)

Want to know the best way/approach to stream millions of records from DB table(oracle 11) I tried simple stmt.executeQuery() with setFetchSize on stmt, resultset etc. but it did not return any records when table has millions of records tried with oracle ‘rownum’ clause, still returns nothing no execption There are procedures like below http://www.sqlines.com/postgresql-to-oracle/copy_export_csv_from_procedure but it needs file package… My question is there any best approach to stream such millions of records to UI from […]

Browser back button is not working in Springboot project

I created a project that contains some popup.I can close the popup via $uibModalInstance.dismiss(‘cancel’).It is working on all my pages.But When i want to close the popup via browser back button,the popup is not closed.I noticed when i click the browser back button, run function is working. function run(stateHandler,$uidModalStack,$rootScope){ $rootScope.$on(‘stateChangeStart’,function(event){ //to do } } I cannot use $uibModalInstance.dismiss(‘cancel’) or something like that($uidModalStack).Do you have any idea?` Source: AngularJS

"server.contextPath" and "base href" to work together ?

In one of my web-application war, I have both UI and spring rest API calls implemented. Now in order to have it hook up with other pieces, I need to add these 2 extra things. 1) Adding “server.contextPath=/reservation-api” in the application.properties file. 2) Adding “base href=”/ui/reservation-dashboard/” in the index.html Is it possible I have these two in one war file ? What I have found is my api-calls still working, but the Ui fails as […]

Angularjs $http spring rest controller – 404 error

I am getting 404 error on making a $http call from angularjs to spring controller, here is the code : Factory : factory.checkCodeAvail = function(url){ return $http({ url: url, responseType:”json”, method: “GET”, headers: { “Content-Type”: “application/json” } }); } This factory method is called by controller : commonFactory.checkCodeAvail(‘findDepartment’) .then(function (success){ console.log(success); },function (error){ console.log(error); }); This is the error i m getting in browser console : GET http://localhost:8080/TexERP/findDepartment 404 () Spring controller : @RestController public […]

Spring Boot ngRoute

I’m trying to make a single page application with a Spring back end and an AngularJS front end. I’ve followed tutorials and looked up similar questions but ngRoute just doesn’t seem to work with a Spring back end (I got it to work with a NodeJS back end). index.html <!DOCTYPE html> <html lang=”en”> <head> <meta charset=”UTF-8″/> <title>Spring Demo</title> <script src=”https://ajax.googleapis.com/ajax/libs/angularjs/1.6.4/angular.min.js”></script> <script src=”https://ajax.googleapis.com/ajax/libs/angularjs/1.6.4/angular-route.js”></script> <script src=”../static/index.js”></script> </head> <body ng-app=”index” ng-controller=”indexController”> <a href=”/test”>test</a> <div ng-view=””></div> </body> </html> test.html […]

How to bring special characters with angular 1.6 and RestController (spring)?

Hello to the community I commented that I am using angular 1.6, and I am sending a json with special characters (ñ, é), but when checking in the controller I get distorted. service – angular var json_ins = { … } ; // special characters var data = encodeURIComponent(JSON.stringify(json_ins)); $http.get(VAR_CONTEXT+’/team/update?data=’ + data).then( function (response) { deferred.resolve(response); }, function (errResponse) { console.error(‘Error: Service Users’); deferred.reject(errResponse); } ); RestController @RequestMapping(value = “/team/update”, method = RequestMethod.GET) public String […]

Next Page »