240 questions
1
vote
1
answer
59
views
DataJpaTest and AutoConfigureTestDatabase in Spring Boot 4.0.0
I have the following errors using Java 17 with Spring Boot 4.0.0:
Cannot resolve symbol 'DataJpaTest'
Cannot resolve symbol 'AutoConfigureTestDatabase'
The problem happens in a JUnit test class ...
2
votes
0
answers
174
views
How to detect unused maven dependencies in a Spring Boot app that uses spring-boot-starter-* dependencies?
Has anyone found an easy way to detect maven dependencies inside your Spring Boot project pom.xml files that are not or no longer needed and can be removed from the pom.xml file ? My intention is to ...
-1
votes
1
answer
1k
views
Gzip compression not working in spring boot project
I am trying to implement gzip compression in my spring boot project(v2.7.12).
I have added below in application.properties file.
server:
compression:
enabled: true
min-response-...
1
vote
0
answers
69
views
What is the minimal required configuration to run @DataJpaTest against real database?
I wish to perform the testing of the models against a real database.
I am able to run the test cases against the default in-memory database.
Problem
I have not been able to configure the project ...
0
votes
1
answer
102
views
Why wicket autoconfiguration with Spring Boot not working?
I am trying to use this library
https://github.com/MarcGiffing/wicket-spring-boot
I included the maven library. I copied @SpringBootApplication class, HomePage class and HomePage html. As far as I ...
1
vote
1
answer
278
views
Ensuring order in Spring Boot custom starter auto-configuration
I'm writing a custom Spring Boot starter and need to check for certain requirements in the client application's context. I do this at @Conditional evaluation time using custom Condition classes. One ...
1
vote
1
answer
603
views
How can I disable logging for the Spring Boot test ApplicationContextRunner (logging.level.root=warn isn't working)
I'm creating a Spring Boot starter and I'm using ApplicationContextRunner in my tests, but passing in logging.level.root=warn as a property value isn't working for me.
With a test like the following I ...
1
vote
0
answers
97
views
Custom Spring Boot Starter Gradle api vs implementation dependencies
I'm creating a custom spring boot starter which configures a bean from a different spring boot starter.
// my custom starter's build.gradle
dependencies {
implementation 'org.springframework.boot:...
0
votes
2
answers
595
views
Your project setup is incompatible with our requirements due to following reasons: Java Springboot run error after Springboot upgrade
Find error img here
APPLICATION FAILED TO START
Description:
Your project setup is incompatible with our requirements due to following reasons:
Spring Boot [3.1.6] is not compatible with this ...
-2
votes
1
answer
780
views
spring security authorization at spring security version 6.2
@Bean
public SecurityFilterChain filterChain(HttpSecurity http) throws Exception {
return http.csrf().disable()
.authorizeHttpRequests()
.requestMatchers("/home/normal&...
0
votes
2
answers
52
views
What is the right way to share subproject functionality with dependencies?
I'm working on a multimodule gradle (kts) project. Each module is a spring boot kotlin app, that provides Elasticsearch requests and responses, for example:
project
- module core
- module a
- module b
...
1
vote
1
answer
352
views
My import for kafka is not working my spring boot version is 2.7.18
I tried 2.8x to 2.9x but my import for kafka is not working
these imports they are unable to find after kafka plugin
org.springframework.kafka spring-kafka 2.8.0
just tell me the version to go with ?
...
0
votes
1
answer
484
views
Spring boot throwing error : Error creating bean with name 'dataSourceScriptDatabaseInitializer'
I am trying to run simple JPA application using Spring Boot.
It keeps throwing same error whenever I run application.
I keep getting this error:
org.springframework.beans.factory.BeanCreationException:...
0
votes
0
answers
2k
views
SpelEvaluationException: EL1005E: Type cannot be found in Springboot 3.2.0
When upgrading springboot to 3.2.0, the error SpelEvaluationException: EL1005E: Type cannot be found happens.
This has happened from previous springboot version but it has been fixed.
But lately when ...
0
votes
1
answer
224
views
embedded tomcat in spring does not take maven dependencies
I have a spring boot 2 application which I am running on embedded tomcat in production. I want to add another war file to the same tomcat.
I followed spring boot 2 solution provided in link Spring ...
0
votes
2
answers
12k
views
error when springboot3 combines with mybatis-plus 3.5 and JDK 17 [closed]
java.lang.IllegalArgumentException: Invalid value type for attribute 'factoryBeanObjectType': java.lang.String
at org.springframework.beans.factory.support.FactoryBeanRegistrySupport....
0
votes
1
answer
705
views
Postgres JsonBinaryType is not working with Upgrade to SpringBoot Version 3.1.5
I have a SpringBoot project which persists data to a Postgres JsonB Column. So I am using the @TypeDef annotation in entity class, but after upgrading to SpringBoot Version 3.1.5 this annotation is no ...
0
votes
0
answers
91
views
Spring boot Data jpa LazyInitializationException for simple table without any Joins - method getById
I'm running my app in SpringBootTest. Using IN memory db.
I'm getting error in my spring app when i try to get record from db.
I'm using:
<dependency>
<groupId>org....
0
votes
1
answer
62
views
How to work with bootstrap correctly with html
I start learning Bootstrap but when i tried to use it, it doesn't work.
here is my code.
(html)==>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset=&...
1
vote
2
answers
1k
views
Spring Boot Security: Deprecated commands
this is my code and in order to avoid WebSecurityConfigurerAdapter I used SecuirtyFilterChain and UserDetailsService. Now I'm getting an error for the User.Builder() that can not be defined "The ...
0
votes
1
answer
337
views
Elastic Search Spring Data not setting FieldType Nested
I'm working with spring-boot-starter-data-elasticsearch version 2.7.3, ElasticSearch version 8.7.1.
I have a field, B, annotated as @Field(type = FieldType.Nested) in class A.
I create an index on ...
0
votes
1
answer
3k
views
required a bean of type 'org.springframework.session.data.redis.RedisIndexedSessionRepository' that could not be found
I have a project which uses spring boot which uses spring-boot-starter-data-redis to manage distributed session, which was running fine.
I tried to migrate to spring boot 3, i was getting the below ...
0
votes
0
answers
32
views
I declared an exception handler for validation, but it wasn't used
[My Package](https://i.sstatic.net/fxSRS.png)
[In 'EmployeeController' class](https://i.sstatic.net/lSfRB.png)
[In package "advice", ](https://i.sstatic.net/ZyRUc.png)
[Postman response](...
0
votes
1
answer
82
views
When it's necessary to create a custom spring boot starter rather than create a new microservice?
I've a microservice architecture, and need some common logic.
When it's necessary to create a custom spring boot starter rather than create a new microservice?
3
votes
1
answer
13k
views
Consider defining a bean of type 'org.springframework.batch.core.configuration.annotation.JobBuilderFactory' in your configuration
APPLICATION FAILED TO START
Parameter 0 of constructor in com.example.persistence.batch.BatchConfiguration required a bean of type 'org.springframework.batch.core.configuration.annotation....