Skip to content
Advertisement

Tag: spring

Spring Boot Application won’t start (IllegalStateException could not evaluate condition on DevToolsDataSourceAutoConfiguration)

I’ve tried to start my Spring Boot Application using IntelliJ. However, I cannot seem to make it work no matter whatever solutions I tried to implement to fix it. I believe it has something to do with spring.autoconfigure package, yet the root problem remains a mystery to me. I am trying to take advantage of both Maven Multi Module System

how do I add JRE to Spring Tool Suite

I’ve just installed JDK 16 on MacOS: $echo $JAVA_HOME So now how do I define new JRE in STS in Installed JREs window? Which folder do I pick up? Answer windows->preferences->installed JRE – JRE Home :go to sts installed folder c:…sts-4.10.0.RELEASEpluginsorg.eclipse.justj.openjdk.hotspot.jre.full.win32.x86_64_15.0.2.v20210201-0955jre.

Download pdf from response (okHttp3) – JAVA spring boot / display on browser

I’m working with external API , when I execute one of the request that returns pdf I cannot handle it in the server side . If I copy paste the api request : https://api.worldota.net/api/b2b/v3/hotel/order/document/voucher/download/?data={“partner_order_id” : “0d7836b4-2eba-475f-b2d6-1b95092534b0” , “language”:”en”} the browser open a pdf in the browser and download it . when I execute this url in the java code how

Why Cookies are not set in the browser but works in Postman?

Backend is Spring boots. I setup cookie there and it is working fine with postman. Front End is ReactJS, I’ve used a POST method using Axios to get Login information. I am getting response, but cookies are not set. Tried many things. No Luck Answer Got a fix finally. WithCredentials should be passed like this from front-end. in Backend code,

Spring Boot – Dynamically creating prototype Beans using properties

Is it possible to create prototype beans using some pattern in @Value annotation with properties / yaml configuration? There is an example what I mean: Example object: Example properties: I need to create two prototype beans first with key “first” second with key “second” Ideal – if they will initialized like singletons on startup application Answer Yes you want to

How to have an asynchronous and non-concurrent scheduler in Spring?

I have in the main class that starts the app: and a scheduler I want to prevent the scheduler from being launched again if the internal process takes more than 15 minutes to start the task again. I can’t find the way. I have tried implementing @DisallowConcurrentExecution with the quartz library but it is still concurrent. Any ideas? Answer I’ve

Autowired property is null in EnvironmentPostProcessor implementation class on startup

In my SpringBoot app, I have Autowired an configObject in the class that implements EnvironmentPostProcessor. The injected class reads data from a different source on startup as this is required for the app to work. But upon starting the application, the configObject is coming off as Null. And the AppEnvironmentPostProcessor class where the Autowired object is called. This class is

How to ignore a field from DB [closed]

Closed. This question needs details or clarity. It is not currently accepting answers. Want to improve this question? Add details and clarify the problem by editing this post. Closed 1 year ago. Improve this question I have a list of persons in DB everyone having a CV field which is a MultiPart File in Spring. I’m trying to get all

Spring Boot StackOverFlowError : Null

I have a problem when I want save repository by foreach loop . By Foreach loop user come and save it to another entity User.class public class Attendance { } User.class This is user class of User Entity Error show :: java.lang.StackOverflowError: null Answer Mixing what I saw in your code and what you said in comments I found the

Who should be parent in spring JPA relationship

I have 3 tables book, publisher, author. Here author and publisher can refer to same record in book therefore I decided to make book as relationship parent. However I also want to make it so that if a publisherA is deleted, all the book record related to publisherA also get deleted. same goes for author. I tried using cascade, but

Advertisement