I can not connect Spring boot with SQL Server Answer I recommend check 3 things Gradle or pom.xml dependency setting check. Make sure dependencies of SQL set what you using DB server firewall check Check your server or router. Firewall could be block networking DB server address or id/pw check Check your DB i…
Tag: spring-boot
How to iterate over StaxEventItemReader/itemreader?
Currently I want to access the objects inside StaxEventItemReader. This is done by using StaxEventItemReader.read() (xml-file has 50 objects/items), so that I can do something with these objects. The question is how you can correctly iterate over the items of StaxEventItemReader? Originally I had something li…
How to make multiple Spring HandlerInterceptors execute in a specific order
I’m currently working on a Spring boot project. I have a dependency on a library project that has an interceptor(LibraryProjectInterceptor.java) and a public class LibraryProjectConfig implements WebMvcConfigurer and overrides the addInterceptors() method to add the LibraryProjectInterceptor to the Inte…
Parameter 0 of method bookIdResolver in com.rest.Application required a bean of type ‘com.bookdata.DataService’ that could not be found
I am receiving this error and I am not sure why I thought I instantiated my beans correctly. And here is mu Application.class where I have What am I missing? Answer You are missing the Bean for DataService
How can I reference a view in the entity? (Spring Boot)
I have a question. Of course, I have previously looked on the Internet and searched for the solution. Unfortunately, I have not found a solution. I have a Spring Boot application that processes the information from customers. But this application should not point to a table as usual but to a view that request…
explain how JobLauncherApplicationRunner class works?
I was reading the source code of JobLauncherApplicationRunner. according to my understanding when we use Spring boot + Spring batch, this class is used to find all the jobs in the application context and use SimpleJobLauncher to execute jobs in startup. I found some cases that contradicts my previous knowledg…
what type your response entity should be to have different types of response
I am writing a spring boot application and in my controller some of my APIs need to return different types. for example when everything is ok, I want to return a list of object and in some cases I want to return error messages. for example I have an API like this: and I want to generate error messages to
Why my query return empry list and gives no error? Java Spring Jpa Repository
Here is my entity class: Here is my Repository: And my controller: Here is my Database: My Database Edit: Here is my ErgebnisseRequest class: So the repository.findAll() gives me all the data from the database. But when i am trying to search by Material it gives me a emptylist and no error. I try all of it li…
Make column non-nullable in liquibase script
In my liquibase script I made a mistake in the first change set, one of the columns (OWNER) in my Primary Key is nullable as I forgot to set nullable to false for it, as shown below when I mvn clean install my springboot app, I get the below error: I tried adding below chnageset but it doesn’t work and
Dynamically configure RabbitMQ users and permissions with Java Spring AMQP
For security reasons, I want to configure separate user accounts with specific permissions to isolates queues in RabbitMQ. As users need to be a dynamic (adding new, removing deactivated…) I would like to achieve this with Java Spring AMQP. Creating queues, exchanges and bindings is possible with The Ra…