Win a copy of JDBC Workbook this week in the JDBC and Relational Databases forum
or A Day in Code in the A Day in Code 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
  • Paul Clapham
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • salvin francis
  • fred rosenberger

Connecting to rest endpoint

 
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: 91
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.
 
New rule: no elephants at the chess tournament. Tiny ads are still okay.
Devious Experiments for a Truly Passive Greenhouse!
https://www.kickstarter.com/projects/paulwheaton/greenhouse-1
    Bookmark Topic Watch Topic
  • New Topic