Cannot resolve reference to bean ‘entityManagerFactory’ while setting constructor argument

spring transactional annotation

If you have encountered this problem while you are configuring Spring Data JPA repositories in your application, you are not alone. Don’t be afraid, there is a simple solution for that. Let me provide you a piece of code that

Read More Cannot resolve reference to bean ‘entityManagerFactory’ while setting constructor argument

Spring AOP, @Transactional Annotation and Proxying

spring transactional annotation

Spring, by default, uses runtime weaving (unlike AspectJ – see this) for aspects. In runtime weaving, a proxy class is generated for your “adviced” classes and they are decorated with the advices at runtime. @Transaction annotation works the same way. In

Read More Spring AOP, @Transactional Annotation and Proxying

The type javax.servlet.ServletContext cannot be resolved. It is indirectly referenced from required .class files

If you have encountered this annoying error in Eclipse you are in luck. Here I will be telling you how to fix it! First, right-click the project in Project Explorer and click Properties: On the Properties screen type “build” and

Read More The type javax.servlet.ServletContext cannot be resolved. It is indirectly referenced from required .class files

Spring MVC Workflow – Understanding How Spring MVC Mechanism Works

Let’s start by observing the figure below:   First, the request is received by the DispatcherServlet. DispatcherServlet is a front controller. It is like a super controller who redirects all the requests to the corresponding handler methods inside the controller classes.

Read More Spring MVC Workflow – Understanding How Spring MVC Mechanism Works

Java Error: Could not find or load main class

When you are creating apps using an IDE like Eclipse or IntelliJ IDEA, compiling and running your code is pretty easy since the IDE will take care of many of the things behind the scenes. But you may encounter this

Read More Java Error: Could not find or load main class

Spring Component Annotation and further stereotype annotations

spring transactional annotation

In this post I would like to share with you some enlightening quotes from spring documentation. Here you will see the difference between some of the spring annotations like @component, @service, @repository, @controller, what it means to use them or can

Read More Spring Component Annotation and further stereotype annotations

Microservice Registration and Discovery with Eureka and FeignClient

netflix-eureka

In this post, I will try to guide you on how to develop with Spring’s wrapping of Netflix’s Eureka. Eureka is a REST (Representational State Transfer) based service that is primarily used in the AWS cloud for locating services for the purpose of

Read More Microservice Registration and Discovery with Eureka and FeignClient

There was an unexpected error (type=Internal Server Error, status=500). Exception parsing document: template=

There was an unexpected error (type=Internal Server Error, status=500). Exception parsing document: template= I had this annoying error above today while playing around with thymeleaf. The thing is IntelliJ Idea creates html files that does not close the meta tags

Read More There was an unexpected error (type=Internal Server Error, status=500). Exception parsing document: template=

Com.atlassian.plugin:atlassian-spring-scanner-maven-plugin:2.1.3 not found

I am posting one of my posts from Atlassian community. I think I could help a lot of people… Below was my question/problem: I used atlas-create-bitbucket-plugin command and was able to generate the skeleton project. Then I opened this project

Read More Com.atlassian.plugin:atlassian-spring-scanner-maven-plugin:2.1.3 not found