Category "spring-boot"

how to prevent jdbc from trying to connect to a mysql database during unit testing

I'm making an application for a school project, but I'm running into the issue that when I try to run the unit tests that it tries to connect to the database wh

How to call repository method in entity listener

I'm trying to make call to repository inside my Entity Listener, when I call repository.findById() method inside my @prePersist method the same method is callin

solr exception Expected mime type application/octet-stream but got text/html

Hi I am trying to index an entity in solr using spring boot data solr. But i am getting exception Caused by: org.apache.solr.client.solrj.impl.HttpSolrCli

Spring Boot build image failure for native image

Using spring boot 2.6.2, with java17, trying to create native image but it fails with below error. I am building it on windows 11 machine with docker desktop i

Spring Boot Kotlin Mockito @MockBean dependency throws IllegalStateException null on method call

I am relatively new to Spring and Kotlin. I ran into this problem and it does not seem that there is a comprehensible (for me) explanation anywhere on the Inter

java.lang.NoClassDefFoundError: io/jsonwebtoken/Jwts - maven spring-boot

java.lang.NoClassDefFoundError: io/jsonwebtoken/Jwts When I run locally with mvn spring-boot:run , there's no problem. But when I package my application into

How to protect reactjs resources with spring boot based authentiation?

My current project state: I am working on a Web Application with ReactJs (frontend) and spring boot (backend). When I deploy this application, I package react

How to protect reactjs resources with spring boot based authentiation?

My current project state: I am working on a Web Application with ReactJs (frontend) and spring boot (backend). When I deploy this application, I package react

Performance insert by JPA Spring-boot with Oracle database

the first thanks for your time. I am trying to insert data to the database by JPA(spring-boot), the project is using Oracle. Currently, Insert 5000 record, it t

ByteArrayResource usage

I have a template pdf which is stored in either in physical path or in application classpath. I have to read this template and fill its fields for each request

Northwind - creating orders (MySQL + Spring boot)

I have DB with schema like below: I would like to create an Order. I created DAO of Order with all columns like below and added there relations like this: O

Is it possible to access a property value from another maven project?

I have a SpringBoot service: package test; @Service public class TestService { @Value("${service.readTimeout}") private Duration readTimeout; } service

Spring post method "Required request body is missing"

@PostMapping(path="/login") public ResponseEntity<User> loginUser(@RequestBody Map<String, String> userData) throws Exception { return ResponseE

CSS and JS file not loading while deploying war file on apache tomcat

was using the spring-boot-starter-web-mvc for initial development.When I deploy the war file on the server it is not loading css and js files, but when I run th

Handle Security exceptions in Spring Boot Resource Server

How can I get my custom ResponseEntityExceptionHandler or OAuth2ExceptionRenderer to handle Exceptions raised by Spring security on a pure resource server? We

Kafka Producer Thread, huge amound of threads even when no message is send

i currently profiled my kafka producer spring boot application and found many "kafka-producer-network-thread"s running (47 in total). Which would never stop run

Failed to determine a suitable driver class

when starting the application, see the below error: Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.

Spring SecurityConfig not working

I have played with this for some time, but it does not seem to get wired to my project. Here is the file from the last time I edited it. I have permit all so I

No serializer found for class org.hibernate.proxy.pojo.bytebuddy.ByteBuddyInterceptor

When i try to navigate to an endpoint i get the following error Type definition error: [simple type, class org.hibernate.proxy.pojo.bytebuddy.ByteBuddyIntercep

Removing just one Row in table - SpringBoot & Java & Thymeleaf

New to Spring-boot and Java and Thymeleaf...Trying to make it so the trash button deletes only one row in this table. Right now it if any trash button is clicke