Posts

How to resolve 'org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type ...' - using stereotype Annotations and using @Configuration, @Bean Annotation

Image
"At the end of the day, it doesn't really matter whether you use XML, annotation or Java configuration. It's important that beans are known to application context." -  Tomasz Nurkiewicz Hello everyone, in this article, we will learn how to resolve org.springframework.beans.factory. NoSuchBeanDefinitionException : No qualifying bean of type 'com.knf.dev.demo.account.HelloManager' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: Using: 1. Stereotype Annotations. 2. @Configuration, @Bean Annotation. Before going to the example just a quick overview of NoSuchBeanDefinitionException ,  @Configuration annotation, @Bean annotation, and  @Component annotation( Stereotype annotation ). NoSuchBeanDefinitionException: The 'org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'com.knf.dev.demo.account.HelloManager' available: expected at least 1 bean which qualifies as

Vaadin + Spring Boot + Spring Data JPA CRUD example

Image
Hello everyone, today we will learn how to develop a simple CRUD web application  using Vaadin, Spring Boot, Spring Data JPA, and H2 Database. Vaadin is the only framework that allows you to write UI 100% in Java without getting bogged down in JS, HTML, and CSS. If you prefer, you can also create layouts in HTML or with a visual designer. Vaadin apps run on the server and handle all communication automatically and securely. The GitHub repository link is provided at the end of this tutorial. You can download the source code. Technologies Used: Spring Boot 2.7.0 JDK 17 Vaadin 14.7.0 Maven 3+ npm package manager H2 Database After completing this tutorial what we will build? We will build a full-stack web application that is a basic User Management Application with CRUD features:     • Create User     • List User     • Update User     • Delete User     • View User Project Structure: Dependency Management - Maven - pom.xml <? xml version ="1.0" encoding ="UTF-8" ?>

Spring Boot + Thymeleaf + Spring Data JPA CRUD Example

Image
Hello everyone, In this post we will learn how to develop a  CRUD web application, using Spring Boot, Thymeleaf, Spring Data JPA and H2 Database. Technologies Used: Java 17 Spring Boot 2.7.0 Spring Data JPA Thymeleaf template engine Maven 3+ Bootstrap 4 H2 Database Project Directory: Pom.xml <? xml version ="1.0" encoding ="UTF-8" ?> < project xmlns ="http://maven.apache.org/POM/4.0.0" xmlns:xsi ="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation ="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" > < modelVersion >4.0.0</ modelVersion > < parent > < groupId >org.springframework.boot</ groupId > < artifactId >spring-boot-starter-parent</ artifactId > < version >2.7.0</ version > < relativePath /> </ parent > < artifactId >springboot-thymeleaf-jpa-crud</ artifactId