Spring NoSuchBeanDefinationException issue: how to fix Error creating bean & troubleshooting

preview_player
Показать описание
#Spring #NoSuchBeanDefinationException #TroubleShoot

► SUBSCRIBE & LIKE!!

► Important Information and code guide available bottom of the Description section

► Download the sample java microservice application :

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
► Here is our amazing playlist for Core Java, Spring MVC/Boot, Git and Microservice
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Watch my "Most Watched Videos"
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Information
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@RequestBody and @ResponseBody annotations are used to bind the HTTP request/response body with a domain object in method parameter or return type. Behind the scenes, these annotation uses HTTP Message converters to convert the body of HTTP request/response to domain objects.

The @ResponseBody annotation means that the result returned by this method is directly written into the Http response body, which is generally used when obtaining data asynchronously; after using @RequestMapping, the return value is usually parsed as a jump path, and the return value will not be changed after adding @ResponseBody It is parsed as a jump path, but written directly into the HTTP response body. For example, to obtain Json data asynchronously, plus @ResponseBody, Json data can be returned directly.

The @RequestBody annotation inserts the Http request body into the method, and uses the appropriate HttpMessageCoverter to write the request body into an object

The job of @Controller is to create a Map of the model object and find a view but @RestController simply returns the object and object data is directly written into HTTP response as JSON or XML.
@Controller since Spring 2.5 Officially (3, 3.1) and @RestController Spring 4
@Controller is a common or generic annotation that is used to mark a class as Spring MVC Controller (web controller) while @RestController is a special controller used in RestFull Webservice API and the equivalent of
@RestController = @Controller + @ResponseBody
@Controller is a stereotype annotation or it’s specialization of @Component annotation, while @RestController is a specialization of @Controller annotation
@RestController and @Controller is that you don't need to use @ResponseBody on every handler method once you annotate the class with @RestController
Controller and @RestCotroller in Spring MVC is that once you mark a class @RestController then every method is written a domain object instead of a view.

Instagram: techtalk_debu

if you like my video, please subscribe to my channel and share the video

Thanks & Regards,
Debu Paul
Рекомендации по теме
Комментарии
Автор

Sir i m new to spring but when i started learning spring core then i created a bsic spring core model contexr. Getbean but it is giving an error that bean creation exception cannot create bean with name i have xml and class along eith cinstructor any help will be appreciated

Star_Bawa
Автор

Hi sir, I'm still getting the issue after declaring @bean
Please help me as its emergency for me

rishithasrisyamala
Автор

Hello Sir,
Can you please make a video series of Quarkus in Java ?

Can you please make a video to read a excel file using Quarkus and produce JSON object and send to another service ?

pranoydas
Автор

if u write solution it would be useful for learning people

arunca