• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
Bartenders:
  • Piet Souris
  • Himai Minh

Connecting to rest endpoint

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 93
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
knowledge is the difference between drudgery and strategic action -- tiny ad
free, earth-friendly heat - a kickstarter for putting coin in your pocket while saving the earth
https://coderanch.com/t/751654/free-earth-friendly-heat-kickstarter
reply
    Bookmark Topic Watch Topic
  • New Topic