Questions tagged [spring-rest]

Use this tag for question about the REST architectural style used in Spring framework

REST architectural style used in Spring framework

1305 questions
0
votes
1 answer

spring controller could not recognize

I tried following code to run sample spring rest application with tomcat7. It works properly, but it could not recognize HelloController. Debugger could not able to reach hellocontroller. http://localhost:8080/Sample/welcome throws 404…
RohanB
  • 294
  • 2
  • 5
  • 19
0
votes
2 answers

How to secure restful webservice without using authentication

Can some one please let me know what are all the ways to secure restful web service written in spring boot project using spring rest(there is no user credentials check as this service is invoked by remote application sitting on different…
Pratap A.K
  • 4,337
  • 11
  • 42
  • 79
0
votes
1 answer

Some doubts about the use of parameters into a request toward a REST web service?

I am pretty new in Spring and in REST web services and I have the following dout following a tutorial that show how to implement a RESTful web service using Spring MVC. So, into a controller class I have this…
user4296472
0
votes
0 answers

Spring build a RESTful web service tutorial, whitelabel error page

Question: Why am I getting the whitelabel error page? Exact Error: Whitelabel Error Page This application has no explicit mapping for /error, so you are seeing this as a fallback. Thu Sep 17 12:11:02 CDT 2015 There was an unexpected error…
0
votes
1 answer

Avoid session replication in Spring rest application using Cookies

I am working on Spring 4 mvc application with mysql database, tomcat server. Basically, I am creating a Spring rest which will be used by Angular JS. Note: I am not using Spring security In order to avoid session replication in case of clustered…
Anand
  • 20,708
  • 48
  • 131
  • 198
0
votes
1 answer

REST web services and its Filters

I am studying Filter in REST web-services and I have some confusion in postMatching and preMatching server Request filter , can any one clearly explain it ? when to use ?
PRIYANK SINHA
  • 111
  • 1
  • 10
0
votes
1 answer

Spring Security - "Error: Forbidden" response from rest endpoint

I'm setting up Spring Security in my project and I'm having some trouble hitting one of my rest endpoints. I receive an "Error: Forbidden" response from the server when I hit the endpoint through my client. What I'm doing is going to the login page…
Graham
  • 5,488
  • 13
  • 57
  • 92
0
votes
0 answers

Spring Rest template weird time out exception

I am using Spring rest template to generate a REST call to a server. from the application, it returns I/O error on GET request for "http://XX.XX.XX.XX/v1/api":Connect to XX.XX.XX.XX:80 [/XX.XX.XX.XX] failed: connect timed out" But if I use the…
Ido Barash
  • 4,856
  • 11
  • 41
  • 78
0
votes
1 answer

How to eliminate variables with null value using JSON

I am getting json response in below format { "employees": [ { "emp_id": 101, "name": null, "company": "Onmobile", "test_beans": null }, { "emp_id": 101, …
Sharique
  • 781
  • 5
  • 12
  • 33
0
votes
1 answer

Mongo DB configuration not working when loaded

I have the following mongo db configuration for spring framework:
Hong Wei Wang
  • 1,388
  • 3
  • 19
  • 29
0
votes
1 answer

How to prevent malicious input in Spring JPA+Spring REST+jHipster

I'm new to Spring JPA/jHipster. My question is inspired by the jHipster talk by Julien Dubois: https://youtu.be/R3jm2qmqctI?t=43m7s Assume you have a bank account with operations on it (+100$ for restaurant, -50$ ATM, ...) Each bank account has an…
Andy Verbunt
  • 387
  • 1
  • 4
  • 13
0
votes
1 answer

Spring Boot exclude Tomcat server and hibernate validator?

Question seems repeated but I facing some issue, when I am following below configuration from this spring boot war without tomcat embedded to Exclude embedded tomcat server I am using Spring-Web in JOB to call Rest Service using Rest…
Viraj
  • 1,360
  • 3
  • 18
  • 38
0
votes
1 answer

How to set true or false if there is no record in table using hibernate

I am using Spring REST with Hibernate and i am fetching a particular record from database table passing id into my method. The method is working properly but if there is no record in table then i want false in a variable and if record exist then i…
Nadeem Ahmed
  • 371
  • 2
  • 8
  • 24
-1
votes
1 answer

Does writing each rest api in it's own specific java file will help in performance boost even though they have the same base path

For example, I have two rest APIs with the same base path. First REST API api1.java -> Annotated with @RestController @RestController("/basepath") public class Api1 { @GetMapping("/path1") public String gethelloWorld(){ return…
-1
votes
1 answer

Why spring boot didn't save my sessions and cookies between requests?

Spring boot doesn't save sessions between requests. I have to methods: /login and another one is /getInfo. They're placed in different controllers. DB for sessions is MongoDB and I can see through Mongo Compass that there are adding new sessions…
user303680
  • 15
  • 1
  • 4