• 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
  • Tim Cooke
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Knute Snortum
  • paul wheaton
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Ron McLeod
  • Piet Souris
  • Ganesh Patekar
Bartenders:
  • Tim Holloway
  • Carey Brown
  • salvin francis

Problem with @RestController in Spring Boot

 
Ranch Hand
Posts: 447
  • 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: 1035
18
Mac OS X IntelliJ IDE Oracle Spring VI Editor Tomcat Server Redhat Java Linux
  • 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: 447
  • 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: 447
  • 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: 447
  • 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.
 
A wop bop a lu bob a womp bam boom. Tutti frutti ad:
professionally read, modify and write PDF files from Java
https://products.aspose.com/pdf/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!