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

Problem with @RestController in Spring Boot  RSS feed

 
Ranch Hand
Posts: 443
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am creating an application with Spring Starter project and I am selecting 'Web' as a dependency; I cannot use @RestController in a class. The same problem happens if I use Spring Initializr. I have tried additional dependencies like 'Web Services' and 'REST Docs' to no avail. I am new to Spring Boot and I have faille to find a solution in the Internet
 
Bartender
Posts: 1016
18
IntelliJ IDE Java Linux Mac OS X Oracle Redhat Spring Tomcat Server VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Do you know of the spring boot starter guides, which show small projects featuring the different technologies that spring boot can use.

There just happens to be a small project showing a "Hello, World" REST service being implemented --> Spring Boot Starter Rest Service

You could then compare in order to work out what is wrong with your project.
 
Alejandro Barrero
Ranch Hand
Posts: 443
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It doesn't show how to select the dependencies in Spring Initializr; it just gives a pom.
 
Alejandro Barrero
Ranch Hand
Posts: 443
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In my STS I only see:
Web
Reactive Web
Rest Repositories
Rest Repositories HAL Browser
HATEOAS
Web Services For SOAP
Jersey For Restfull Web Services with JAX-RS
REST Docs
Vaading

Maybe I have to use Jersey, although I don't care for JAX-RS, but I don't see anything for JASON.
 
Alejandro Barrero
Ranch Hand
Posts: 443
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Solved; the Maven files in my computer were wrong. I had to delete folder .m2 in my hard drive.
 
passwords must contain 14 characters, a number, punctuation, a small bird, a bit of cheese and a 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!