Category "spring"

Is it possible to use data.sql without schema.sql

I want to initialise schema using spring.jpa.generate-ddl=true and then populate using data.sql. I tried it but it doesn't seem to work without schema.sql. Any

Spring Boot : CORS Issue

I am using Spring Boot version 2.0.2Release. Below is my security configuration @Configuration @EnableWebSecurity @EnableGlobalMethodSecurity( prePostE

Query through all provided schemas

I have kind of 'restaurant app' with multi tenant architecture. Each Tenant in short words have their Order table where I keep all data regarding orders which w

405 Method not allowed despite exposing all methods when using RepositoryRestConfiguration.disableDefaultExposure()

I don't want to expose my repositories by default and it looks like RepositoryRestConfiguration.disableDefaultExposure() does exactly what I want; however I get

org.springframework.beans.factory.UnsatisfiedDependencyException Spring JPA

i need help to solve this error here, for my college project. I created an online database and from there I tried to develop a service to be consumed later, the

How to customize HTTP response for WebSocket upgrade request in Spring?

I have a WebSocket endpoint configured like this in my WebSocketConfigurer implementation public void registerWebSocketHandlers(WebSocketHandlerRegistry regist

Failed to introspect annotated methods on class org.springframework.data.mongodb.core.SimpleMongoDbFactory

I was getting error: Failed to introspect annotated methods on class org.springframework.data.mongodb.core.SimpleMongoDbFactory. Here is the full stacktrace: 0

Spring boot version changes to 2.6.6 from 2.3.4.RELEASE

I have changed the spring boot version to 2.6.6 from 2.3.4.RELEASE because of security vulnerabilities. My application's deployment is failing. In pom.xml I hav

401 while trying to access Swagger UI - Springdoc

I was writing spring application.I added swagger into my project but somehow It couldn't run properly.Into my project also has bearer authentication with token.

Which is a better approach to persist the spring state machine context or restore the state machine using the state enum on entity object?

I am new to spring state machine and trying to understand which is a better approach whether to persist the state context in a database or to restore the state

Spring Cloud Gateway and Springdoc OpenAPi integration

I was able to integrate Spring Cloud Gateway with the Springdoc OpenAPI in an small application with an architecture oriented to microservices. But now, when I

Preconditions for SpEL DoS vulnerability CVE-2022-22950?

I'm a little confused about CVE-2022-22950 and the corresponding Spring advisory. The latter says that the vulnerability can be exploited through: [...] specia

High CPU usage from the Spring DefaultMessageListenerContainer Thread

I have a application which uses Spring DefaultMessageListenerContainer and IBM mq as the message broker, after running application for certain time, the cpu usa

Hibernate doesn't create tables automatically

I have Maven project with Hibernate/Spring/MySQL. I have basic entity and I want Hibernate to create tables automatically, but Hibernate doesn't create any tabl

Does a simple REST project in Spring Boot use the MVC principle?

I need to create a simple project that uses the Model-View-Controller principle and a MySQL database. And I want to use Spring Boot with Spring MVC and Spring D

com.fasterxml.jackson.databind.exc.InvalidDefinitionException for some REST operations on User entity

I have a few entities: User, Role, Privilege. And for all three entities, I have three operations which are then exposed as REST api. findOne(), findAll(), and

com.fasterxml.jackson.databind.exc.InvalidDefinitionException for some REST operations on User entity

I have a few entities: User, Role, Privilege. And for all three entities, I have three operations which are then exposed as REST api. findOne(), findAll(), and

Getting error: 'Access-Control-Allow-Origin' header contains multiple values '*, *', but only one is allowed

I tried to make a connection between my Angular frontend and a REST Endpoint in Java / Spring (which I didn't developed and don't know so well). By GET, all wor

Can't jUnit test with file from resources folder

I'm trying to unit test with a file located under src/test/resources, but I can't always get a nullpointer when I'm trying to read it. I'm using Spring Boot 2.

How to Integrate Open API 3 with Spring project (not Spring Boot) using springdoc-openapi

My Existing Project is on Spring Framework not Spring Boot. I want to integrate Open API 3 with it. I want to integrate using springdoc-openapi not using Jers