Category "spring-boot"

@Size annotation doesn't seem to work for my class

I have a Spring Boot Controller with an endpoint that accepts the following Configuration class (as json). The class has the param maxIterations and has a @Size

No qualifying bean of type 'org.springframework.kafka.core.ProducerFactory<java.lang.Object, java.lang.Object>'

I use this kafka configuration with spring cloud and spring boot 2.6.6: @Configuration @RefreshScope public class KafkaProducerConfig { @Bean(name = "nativeP

@SpringBootTest vs @ContextConfiguration vs @Import in Spring Boot Unit Test

I'm working on a Spring Boot project. I'm writing a Unit Test code based on TDD which is a little bit difficult. @SpringBootTest loaded all beans, which led to

Reason: The elements were left unbound

How can I load List of objects from configuration yml file in java springboot application? I already tried several sources: configuration-properties-in-spring

Injection problem in Spring Boot Test: "messageConverters must not be empty"

I have a strange problem with a Spring Boot Test. The test itself is empty, but it does not even manage to start the application. I get an error "Failed to load

I want to enable logging before running

How can I use Spring boot's logging system before running SpringApplication::run? By the way, I'm using logback and lombok. @slf4j @SpringBootApplication public

Cannot resolve method 'equals(long)'

I'm working on a spring boot application. However in my service impl class I'm getting a "Cannot resolve method 'equals(long)' when I try to use the equals() me

How to display list of questions fetched from database into HTML using Ajax and JavaScript?

I am working on school management system and using Spring Boot framework. I want to display all questions list when student click on start test button and would

Spring Boot Admin : java.net.UnknownHostException: Failed to resolve 'SAURABH-PC.mshome.net' after 3 queries

I had executed spring boot admin with two micro-service and eureka server last time. that time it executed but this time it is giving this error and showing in

@RefereshScope in Spring config server

As per the documentation whenever the bean in RefereshScope and the actuator end-point refresh called the bean got refreshed. Questions : Bean refresh means spr

Terms query in java spring boot

I'm trying to add terms in the should clause of ES query in java spring boot. I need it to look like this: "should": [ { "terms": { "segment_s

Accessing Microsoft Graph API in Vaadin 23 + Spring Security + Azure AD

I'm developing an enterprise Vaadin application and I'd like to know if anyone has figured out how I can obtain the JWT token to make (from backend) a request t

How can I build an web client of the default codecs' maxInMemorySize(3GB)?

I saw usually developers used buffer as just a few MB. However, I think I need to use buffer as more than 1 GB or even 3 ~ 4GB So I built a web client in source

Plugin 'org.springframework.boot:spring-boot-maven-plugin:' not found

I'm facing an error in my pom.xml file given below: Plugin 'org.springframework.boot:spring-boot-maven-plugin:' not found Below is my pom.xml : <?xml versi

Can't find CorsRegistry class?

I'm creating a spring boot project and I'm trying to change the CORS policy because it keeps getting blocked by the browser. The problem is that I can't find wh

How to Customise example value of request body and execute it on swagger-ui with springdoc-open-api

I have created rest webservice using springboot and added springdoc-open-api for ducumentation of webservice, Now i have 2 question 1-how to add custom test val

Write the same data with different file names using single Item writer using Spring Batch

I have a Spring Batch FlatFileItemWriter which writes data to a specific location with a file name(let's say A.txt for example). Now I need the same file to be

Is it possible to require authentication on certain path, but not when certain request param is provided?

Controller: @GetMapping(path = "/new") public String method(@RequestParam(required = false) final String hash) { ... } Get request on /new without prov

Spring Boot /actuator returns 404 not found

I am using spring boot 2.1.4.RELEASE and currently trying to access http://localhost:8080/actuator but i am getting 404 not found. I am not sure what am i doing

how to link Spring boot Rest API unit test, integration test, owasp dependency check coverage to sonarqube

I have a new springboot rest api and i want unit test coverage of the api, integration test to reflect in sonarqube. I created a project from spring initalizer