Skip to content
Advertisement

Tag: spring

SpringBoot app does not run with exceptions

I am new at Spring Boot so I’m trying to create a simple Crud but I keep getting this error when I run my application I spose it must be some version problem but I don’t know how to fix it. I created the project with STS on ubuntu using mostly default options Answer It looks like you have java

JPA Specification for Enum

My JPA Entity as an Enum field Where If I add a where condition with a specification what is the correct way to include Enums into Specification queries? Answer Try doing this:

How to find a Bean instance of MongoRepository?

I am trying to use a MongoRepository, but Spring complains, that no instance of the MonoRepository-Interface is in the context. The server complains: my maven pom.xml: How can I get a bean instance of my MongoRepository? Answer The dependency is incorrect. spring-data-mongodb only makes it compile: But you need additional dependencies, to make it run. For convenience you can import

Spring boot and Zuul proxy DeferringLoadBalancerExchangeFilterFunction Error

I have a simple app that uses Netflix Zuul as an API gateway I added the Zuul dependency in the pom.xml file as follows: and @EnableZuulProxy for the main class of the app The problem is that whenever I try to run the API, It fails to start and shows in the console: Consider defining a bean of type ‘org.springframework.cloud.client.loadbalancer.reactive.DeferringLoadBalancerExchangeFilterFunction’

Spring session attribute lost on page calling itself

So, I’ve got a very simple 2 controller Spring MVC app. First controller logs user in and puts it on session like this model.addAttribute( “user”, userDto ); Second controller displays project based on projectId, but expects user to be in session. First call to this controller works just fine. However, if user changes project on UI ( through select onchange=”‘location

Advertisement