i’m trying to convert this method to an a reactive method I Have something like this but i don’t know how to conver the ArrayList to return an Mono<List> Answer If you really want a Mono, then just wrap the value that you want to transport in it: But I doubt you really want to return a list in a
Tag: spring
Spring Boot: class with @Service bean bean not found
I have multiple @Service class which implements a class BaseService In a Controller class, I want to call a Service class (which implements BaseService) based on a parameter I’m using a function in Utils and calling it from the Controller class My TestService class has an @Service annotation TestService works if I call it using constructor in the Controller class
Eclipse building the project with a different JRE than the one provided in java build path
I am new to eclipse and trying to run a spring application with a number of modules. I am setting the build path and compiler to use jdk 1.8 but when I run maven install it is building the project using JRE 1.5 for all the modules somehow. I checked the pom.xml but no where the compiler version was defined.
Can Make Redis server return NULL or False instead of JedisConnectionException?
We are developing an application that uses the Redis server as a cache server. So what We do are when a client request API it first go to Redis to get data if there is no data it returns null so the second step go to the MYSQL database to get data, But the problem when we lose the Redis
Can’t create method to get data from database hibernate mySQL + Spring mvc
my page I really hope for your help! The situation is this: I’m trying to get the value of my disciplines from the database, these disciplines are related to the semester. In the display page, the user must select the semester he needs, after which he clicks on the selection button and all disciplines associated with this semester should be
Apache HttpClient: first call very slow, following calls very fast
I am using Apache HttpClient 4.5.13 since some years and I have no problems until today. In a Springboot app when it call a specific server, the first call (or the first call after some inactivity) required about 8 seconds (!!!) then all the following calls (to the same server) are very fast (less than a second). (The same call
Throwing custom errors as Json when a parameter is invalid
I am working on an API and need to throw and exception that looks like this if the sort by parameter is not one of my predetermined values, i have a few parameters to do this for here is what my controller looks like ive remove the url but it works for sorting the incoming data but i need to
HttpMessageConverter for Single Object and List of Object
I have an Object (here: Property) and I want to add csv export ability to my Spring Backend for single and list of objects. I added this to my config: and the Property Converter looks like this: This code works for a Single Property. When I try to return a list of Properties: I tried to add a PropertyListConverter but
Spring Boot, Swagger and Authorisation
I have a Spring Boot API that uses Springdoc (Swagger). The API has security with “apiKey” and “code” fields being passed in the header. I am having difficulty configuring Swagger correctly to enable the Authentication function in the Swagger UI. This is the configuration: I know this is incorrect, but are unsure how to configure it. Any assistance appreciated. Attempts
Why my test passes without a bearer token
I have a simple Spring app. But I don’t understand why the test passes without the need of a bearer token. Here is the controller: Security Configuration: In order to setup the security configs for tests I’m using: So my test class looks like this: If I change the autority in the test to something like ‘foo-user’ the response becomes