Why are the number of threads used are higher than required?

I have an SpringBoot application where I have allowed at most 45 concurrent requests. Now, 1 request in its journey calls 16 external services in parallel using threadPool A. So keeping the average

View details »

Can I upload a file from a local directory to a program running on openshift?

I have a spring boot angular program that uploads a file from local directory. But when I run the program on openshift environment I cannot access that local directory anymore. What can I do about this?

View details »

Log4j2 does not create the logs files Spring boot

I have an Spring boot app and I want to use LOG4J2 to manage my logs in different files, but the logs files isn't create. I have a log4j2.properties configuration under "resources" My log file co

View details »

ZuulProxy removes route path when forwarding requests

the problem is that I need to send request without removing path from initial request Here is my configuration: zuul: sensitive-headers: Cookie,Set-Cookie host: max-total-connecti

View details »

Advice not applied in unit tests

Spring AOP advices are not being applied for unit tests. Everything seems to be working fine during normal execution and integration tests, but fail while unit testing using mocks. Relatively new

View details »

SpringBoot db2 DataSourceBuilder setEncryptionAlgorithm and setSecurityMechanism

How to do the same as : DB2SimpleDataSource ds = new DB2SimpleDataSource(); ds.setDriverType(4); ds.setDatabaseName(this.dbName); ds.setServerName(this.dbServerName); ds.setPortNumb

View details »

Building a Spring-Boot Maven project with Matlab Java API dependency

I am building a spring boot application and using Maven for the dependencies. I need to run some Matlab code from Java and I found out that MathWorks made an official Java API available to use since

View details »

Toggling a button to be disabled/enabled in UI

I am working on an application which is built on spring boot and react JS.Now they are planning to retire this application and asked me to disable few features in the UI part like disabling an optio

View details »

How can I return ResponseEntity<>(HttpStatus.UNAUTHORIZED) when Authentication failed in Spring security basic authentication?

I am using spring security basic authentication in my micro service to authenticate the client and I provided the consumer that I would return the response as ResponseEntity<>(HttpStatus.XXX). I can

View details »

Websocket client on the ESP8266 don`t send data to spring-boot server

I have a simple project with ESP8266 and spring boot server. And I want to send data from ESP to the server via websocket. On ESP I`m using this library to create Stomp client: https://github.com/

View details »

how to get child properties in depth with javers and hibernate entities?

I am using Javers 5.5.2 on my client's project and the problem is the next: I've got 2 entities: Vehicule and affectation. Affectation is the child of vehicule. When I save and commit vehicule enti

View details »

OutOfMemoryError by using gradle

I am new to Gradle. I am using 5.4.1 version. When I am trying build the application I am facing below issue - java.lang.IllegalStateException Caused by: org.springframework.context.Applicatio

View details »

Spring async ConcurrentTaskExecutor not really working correctly?

It's my first time working with Async in Spring boot. Here is how my project is structured. I have the following ExecutorConfig class public class ExecutorConfig { @Bean(name = "ConcurrentTask

View details »

Map Spring Boot port to 80 in docker container

I am specifying PORT 80 in Spring boot application.properties like this server.port=80 So when running on localhost, this runs on port 80 Now I need to run it in a docker container and I did some h

View details »

How to provide a external API/URL to spring boot & angular app?

We have an web app with spring boot as backend and angular 5 as it's front end. Let's name this web app as Web-App 1. We have another web app say Web-App 2 which contains a link. On click of the li

View details »

Mutual authentication using certificates in Spring security

I have a securityconfig class where I am defining the security confifurations @Configuration @EnableWebSecurity @EnableGlobalMethodSecurity(securedEnabled = true) public class SecurityConfig extend

View details »

High Level Rest client 7.1.1 from Spring-Boot : java.lang.NoSuchMethodError: org.elasticsearch.action.bulk.BulkRequest.pipeline()Ljava/lang/String;

I'm using the High Level Rest client from Spring-Boot. Specific version is 7.1.1 against an ES v6.4.3 I'm getting the following error when I try to do a BulkRequest which are all IndexRequests jav

View details »

How to write test cases for Rest API in spring boot..?

I want to write the test case for rest API method please help me in this @RequestMapping(value = "/v0.1/getFySectionDetails", method = RequestMethod.POST) public ResponseEntity<?> getFySectionDetai

View details »

Invalid token character '/' in org.springframework.http.MediaType

I have a basic SpringBoot 2.1.5.RELEASE app. Using Spring Initializer, JPA, embedded Tomcat; I want to create this MediaType MediaType mediaType = new MediaType("application/vnd.bonanza+xml");

View details »

Catching custom exception thrown from subclass of OncePerRequestFilter in AuthenticationEntryPoint

I have a JWTAuthFilter that extends OncePerRequestFilter where I am validating the token. The validateToken method throws custom exceptions(CredentialsChangedException and TooManyDevicesException

View details »