Win a copy of Java Database Connections & Transactions (e-book only) this week in the JDBC forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Devaka Cooray
  • Knute Snortum
  • Paul Clapham
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Bear Bibeault
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Ron McLeod
  • Piet Souris
  • Frits Walraven
Bartenders:
  • Ganesh Patekar
  • Tim Holloway
  • salvin francis

Connecting to rest endpoint  RSS feed

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am currently trying to create a simple Spring Boot application that I can send a request from my Postman application to a rest endpoint and the application will perform a basic operation on the data handed over and return the result in a Response.

Here is my RestService class with one endpoint that returns a message to say it was connected to:



Here is my main class:



I hava an index.html containing a simple title and paragraphwhich shos when I run the app on server. I orginally had a web.xml but I found that my IDE, STS, doesn't need it and it actually got in the way so I deleted it.

When I connect to localhost:8080/testApplication via Postman or in my browser I am met with a 404 displaying "The origin server did not find a current representation for the target resource or is not willing to disclose that one exists"



Here is my current pom.xml:



I have posted this to StackOverflow as well. One user has given me a configuration they say works for them but it does not work for me.

I am completely at the end of what I can do to fix this. What should be a simple task to introduce myself to Spring has turned into a nightmare. Any help will be appreciated. I will be more than happy to provide any additional information needed to solve this.
 
Ranch Hand
Posts: 85
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I've always considered Restful apps an advanced topic.  Might not be the best place for you to start.  Here is a tutorial for Restful apps using Spring Boot:  Spring Boot Restful apps
 
Billiam leefer
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
My code is right, I am sure of that, however my environment is wrong. I just got to figure out how it is wrong.
 
Creativity is allowing yourself to make mistakes; art is knowing which ones to keep. Keep this tiny ad:
how do I do my own kindle-like thing - without amazon
https://coderanch.com/t/711421/engineering/kindle-amazon
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!