Category "spring-boot"

org.graalvm.polyglot.PolyglotException: ReferenceError: document is not defined

I am using Spring boot 2.4.4, JDK 1.8, and created ScriptEngine as shown. Page loaded perfectly for the first time but the second time it throws the exception

Spring Api-Gateway: (M1) java.lang.UnsatisfiedLinkError: no netty_resolver_dns_native_macos_aarch_64

Just to clearify this only occurs on M1 Mac, the intel version doesn't seem to have this problem. JDK 17 openjdk version "17.0.1" 2021-10-19 OpenJDK Runtime Env

How to update a JSON array in a Java

I have a JSON file name abc.json Once I opened this file there is data like in square brackets. [{ "1" : "xxx", "20" : "ppp", "25" : "hhh" }] Here in this keys

Conflicting enum values java

I have 2 enums defined as below in 2 separate files: MyErrorCodes.java @Getter public enum MyErrorCodes implements ErrorCode { ERROR1(90, 1, 01), ERROR2

Is it possible that the changes made by a transactional method are visible in database before the transactional method ends

Two Spring boot (spring data jpa) Application A1 and Aplication A2 both read/write to a table named T1. T1 -> ID, data1, isDeleted columns My requirement is

How to use Mono<Boolean> in if else conditional statement?

I am using Flux<Document> in reactive, so as to make my Rest Service reactive. I am returning ResponseEntity<Flux<Document>> as response to my

Failed to connect Azure servicebus topic using JMS - Java

I followed steps as mentioned in Azure ServiceBus JMS Sample with below properties spring.jms.servicebus.connection-string=Endpoint=sb://test-dt.servicebus.wind

StreamsException: Unable to initialize state, this can happen if multiple instances of Kafka Streams are running in the same state directory

This is regarding upgrading existing code base in production which uses windowing from kafka-clients,kafka-streams,spring-kafka 2.4.0 to 2.6.x and also upgradi

How to configure Spring Boot entity for GeoJSON?

I want to save a GeoJSON to database by using Spring Boot and JPA Example JSON object: { "type": "FeatureCollection", "features": [ { "type":

Unable to create a ConnectionFactory Error with H2 and R2DBC in Spring Boot with WebFlux

I've created a Java Spring Boot service using the WebFlux reactive module, H2 in-memory database, and R2DBC reactive driver. When I run the service, it fails wi

Truncating, Selecting data from multiple tables using joins and then inserting data into separate table in spring boot

I am using a spring boot application. I have multiple tables and using inner joins, I want to populate a temp table. Before populating, I have to truncate the t

How to design a Spring REST server with a parallel business logic function

I'm currently building server software in Java. I already have a running backend, which is build with Spring Boot. It has an REST interface to read and write da

Problem to read data from HBase on AWS EMR cluster using Java Spring boot client

I'm trying to write a simple API application to read data from HBase on an AWS EMR cluster. But I get an UnknownHostException when I try to send the reques

How to remove foreign key without deleting the whole entity

I am new to Spring boot and I want to be able to delete the value of a forgein key if its entity is removed without deleting the whole entity linked to it; I ex

How to set a custom principal object during or after authentication?

I've changed the way a user is authenticated in my backend. From now on I am receiving JWT tokens from Firebase which are then validated on my Spring Boot serve

Deploy Jar with external properties file spring boot

I have a problem with external properties file used by jar file generated by spring boot I have created the project below : The model object : package jms.model

How to check spring boot post API if it is available in the database

**Controller** package com.example.curd.curdtesting.controller; import com.example.curd.curdtesting.entity.Book; import com.example.curd.curdtesting.service.Bo

ECS Connecting to AWS Document DB with TLS Enabled

Currently, I am developing a Spring Boot Microservice and Trying to Deploy it over in Fargate using Cloud Formation. I am using packaging type as war and using

After update to spring boot 2.6.3 from 2.5.X hibernate does not work in some query syntax

someone could help me to solve this bug? i have update spring boot from 2.5.x to 2.6.3 and now the query like: @Query("select count(s.subjectId) from PreChe

How to translate GraphQL interfaces to the Java world with graphql-java-kickstart library using spring-boot

I'm quite new to GraphQL and I'm struggling with how to translate the concept of the GraphQL interface to proper java code that works with the graphql-java-kick