Category "spring"

SAX Feature Not Supported in Spring Boot 2.6.1

Spring boot 2.6.1 supports logback 1.2.7 I've added the following dependencies in project <dependency> <groupId>ch.qos.logback&l

Spring AMQP - RabbitMQ connection is not created on application startup

I have a Spring Boot application and my goal is to declare queues, exchanges, and bindings on application startup. The application will produce messages to vari

How to properly use JPA/Hibernate?

I'm trying to understand annotations better with JPA / Hibernate and SQL Server. I created a simple project: an abstract class named "Articles". Two classes inh

spring security authorization error 401 unauthorized

I'm new to spring security and I am trying to create a web application with Jwt Token the problem is that i cant authenticate it always give me 401 error with i

Convert ByteArray to Base64 in Kotlin

I am trying to convert a ByteArray to Base64 in a Spring project, written in Kotlin. I have checked existing posts but they didnt help me. Actually I am trying

Mockito mockStatic cannot resolve symbol

I'm using Spring Boot and in a unit test, I'm trying to mock the Files.delete(myFile.toPath()) method. To do so I'm trying to use the Mockito.mockStatic() metho

Implement own in memory cache mechanism in spring boot

I was asked to implement an in memory cache mechanism in my spring boot application. My application is related to social media. User can register and login User

How to set a variable for Controller from HttpInterceptor? [closed]

I am building a Spring Boot application. I like to set a variable for the Spring Boot application. This variable should be set in an HTTP inte

Is there a better way of writing native SQL query with EntityManager Java Spring Boot application?

My current code look like this. I am not using any ORM framework like Hibernate. I need to use this raw SQL query. public List<String> getEndcodedKeyByLen

Post request with content type application/x-www-form-urlencoded not working in Spring

I'm using OpenAPI generator to generate Spring REST APIs. Here is a fragment: openapi: 3.0.2 info: version: 1.0.0 title: Auth paths: '/auth/v1/token':

Spring jar can't see resources

I have Spring Boot web app which work on IntelliJ. I build jar file from maven. Jar starts but css, js and img "blocked" in Chrome console show error 404, Firef

Copying a Java Dynamic Web Project and renaming it to new one causes the error in Tomcat

In eclipse whenever we copying a java dynamic web project into new one by renaming it and trying to run the new copied project in tomcat server it causes below

How to pass parameters from Modal form to Spring Controller with thymeleaf or Jquery?

Anyone can help me? I made a Modal with a form to update a database. I receive data from Mysql DB but when i click on submit, the modal closes, but new paramete

Unable to save an encrypted password with BCryptPassword in database

I am trying to save an encrypted password in postgreSQL database with BCrypt and I have an error. I saw the other answers on stackoverflow I tried to use those

why nginx error 404 when downloading a file

When I try to download a file on a workbench with 3000+ records, a 404 nginx error crashes. When I try to download a file with fewer entries, everything is ok.

Access GlusterFS file system in spring boot application

I am new to GlusterFS. After watching this video https://youtu.be/IGEtVYh0C2o , I have a big picture of how the GlusterFS servers are working. I understand a cl

change the json object value

{ "onboardingInformation": { "apiInvokerPublicKey": "string", "apiInvokerCertificate": "string", "onboardingSecret": "string" }, "notification

Spring boot autowired service all variable fields are null

Currently I have many spring boot services annotated with @Service. Every service works fine and there are no problems. There is a problem only with LogsService

Does Spring framework @value annotation work with other frameworks?

I am developing a library with a Spring framework and adding as a dependent for different frameworks. Does Spring framework @Value annotation inside library wor

Unable to use default username password and make jsonResourcePassword.json work with Apereo CAS SSO

Here is what I have done so far: https://github.com/jnbdz/tutorial-baeldung-spring-security-cas-sso In here you can see my configs: https://github.com/jnbdz/tut