• 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
  • Liutauras Vilda
  • Bear Bibeault
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Paul Clapham
  • Devaka Cooray
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Frits Walraven
Bartenders:
  • Carey Brown
  • salvin francis
  • Claude Moore

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: 1012
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.
 
There’s no place like 127.0.0.1. But I'll always remember this tiny ad:
ScroogeXHTML - the small and fast RTF to HTML converter library
https://coderanch.com/t/707504/ScroogeXHTML-RTF-HTML-XHTML-converter
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!