Access the full course here: javabrains.io/courses/spring_bootquickstart
Learn how to create a GET REST API using Spring MVC that maps to a collection URI.
76 Comments on "Spring Boot Quick Start 18 – Getting a single resource"
This man is HERO…
My webpage gives error for "id". Can someone please help? It would be really helpful
Thanks , brilliant
Hello when i create the post topic in Postman i got this error message "timestamp": "2018-04-08T09:58:26.853+0000", "status": 500, "error": "Internal Server Error", "message": "Type definition error: [simple type, class io.javabrains.springbootstarter.topic.Topic]; nested exception is com.fasterxml.jackson.databind.exc.InvalidDefinitionException: Cannot construct instance of `io.javabrains.springbootstarter.topic.Topic` (no Creators, like default construct, exist): cannot deserialize from Object value (no delegate- or property-based Creator)n at [Source: (PushbackInputStream); line: 2, column: 2]", "path": "/topics"Do you have an idea of the problem ?
I'd recommend to not use Optional.get() that straightforward way since it will throw an exception in case of topic is not found by id. Maybe use orElse or at least orElseThrow after findFirst.Anyway, a great tutorial, much appreciated!
i am getting empty braces while runnig it?how can i fix this?
You are a excellent teacher here with spring boot. You have told clearly everything. Thanks a lot. Want a complete web application (E-commerce or anything real world app ) series from you.
Hi,i was following your tutorial and everything was fine until I typed localhost:8080/spring it sends me the error: This application has no explicit mapping for /error, so you are seeing this as a fallback.Fri Nov 17 12:11:51 CST 2017There was an unexpected error (type=Not Found, status=404).No message availableall the ids i have are in lowercase and doublechecked the code and i fine,could you or someone please try to do or makea fix for this please? bc the next tutorials wont help if this doesnt work,thank you in advance…
Because you did not put topics before spring. It should be localhost:8080/topics/spring Try it.
In CodeChannels.com, you can learn to code by watching videos and stay up to date with latest code shows, events and tutorials aggregated from various leading developer communities.
Copyright 2016 By CodeChannels.com All rights reserved.