Category "spring-boot"

How can I do in java spring boot not try a database connection on start up?

I need to know if there is a way in Java Spring boot not to try a connection at startup. What I am trying to do is an integrated SQL server connection. I am try

Ways to update many nested Documents with MongoTemplate without creating additional Update object

I use MongoTemplate to update a document using findAndModify() method. There are nested documents inside one document. Example as following: @Document public cl

java.lang.IllegalAccessError: issue coming while running maven build

I am getting the below issue while trying to run the maven build . Project runs fine in java application but while running maven build getting the below issue .

Spring Apache Kafka onFailure Callback of KafkaTemplate not fired on connection error

I'm experimenting a lot with Apache Kafka in a Spring Boot App at the moment. My current goal is to write a REST endpoint that takes in some message payload, wh

Spring Data REST - do not allow to return entities but only views (projections)

My objective is to make sure that a client can't access (retrieve) directly an entity through the Spring Data REST auto-exposed APIs, but rather only to the vie

SpringBoot | Getting null after success response body when request with token

Returning a response in SpringBoot project like this: @GetMapping("/users") public ResponseEntity<List<UserDto>> getUsers() { return ResponseEnt

Replace SpringFox @Api tag with SpringDoc tag

I have this SpringFox @Api tag: @Api(hidden = true) I tried to replace it with: @Tag(hidden = true) But where is not option hidded=true What is the proper way

Is there any way to enable/disable a annotation by property in Spring Boot?

I have some property file like: application.properties enable.test.controller=true enable.cross.origin=false I want to enable/disable some functions based on t

I am getting java.lang.ClassNotFoundException: Cannot find implementation for com.example.demo.mapper.DoctorMapper

This is a mapper interface for mapping: @Mapper public interface DoctorMapper { DoctorMapper INSTANCE = Mappers.getMapper(DoctorMapper.class); DoctorDto toD

Apache Camel SFTP get file content null

Java Code @Component @RequiredArgsConstructor public class WireInboundFileListener extends RouteBuilder { private final JwtWireTokenService jwtWireTokenSe

Spring boot native configuration

I am trying to migrate existing spring boot application to spring native. In this case, I have application.properties and application-dev.properties. package co

How to create Session Factory when sending async messages via ActiveMQ Artemis in Spring Boot?

I'm trying to send simple message to a topic from sender Spring Boot app to a receiver Spring Boot app. But I keep getting two exceptions. First exception occur

Parallel test execution and growing active connections to mongodb

I have an application with thousands of tests through MockMvc. The tests are running in band, so 1 at a time and whole process takes hours. I decided to try par

How to permit child pages from root only

I have a Spring Boot Vaadin web app with Spring Security and keycloak-spring-security-adapter. This works fine on the root page. From the root page I can access

Spring boot AbstractDataSourceBasedMultiTenantConnectionProviderImpl as well as a shared database

I currently have multi tennancy database working by implmenting AbstractDataSourceBasedMultiTenantConnectionProviderImpl. This is working great thankfully. Now

Hibernate validation: Skip Constraint violation in specific situations(api calls)

I have an object User and as part of validation I have provided something like below: import javax.validation.constraints.NotBlank; public class User { pr

How to scale one specific Rest API without microservice?

I am developing web application backend with Spring where client and server talk through Restful APIs. There is a specific API where I assume the hit will be mu

Unable to Transfer spring-boot-starter-parent from maven repository

Below is my pom.xml. I am getting exceptions while fetching the spring-starter-parent from maven repo. what is it that I should specify in my relative path : Wh

Spring boot - adding a secondary data source causes nothing to get save during a integration test

In a project I am working on we added a secondary data source. This meant adding the entity factory and the transaction manager at the @EnableJpaRepositories. W

How to implement multi-tenancy in new Spring Authorization server

Link for Authorization server: https://github.com/spring-projects/spring-authorization-server This project pretty much has everything in terms of OAuth and Iden