Skip to content

Tag: spring

Config multiple message properties

I have properties files and I need to set them both to be loaded, but I have no idea how to do this with multiple properties Answer Use @PropertySources. Annotate either a config class that holds the attributes of the files, or your Main class. e.g.:

How to assign to a new array an array of objects?

I can’t figure out how I would do the ff. I have the ff. Payload And I just want to get the acctId params and assign it to a new plain array of accountIds. How do I do it in Spring/Java?. Thanks Answer Try using json path. Library can be found here. E.g. say you had json like this: Actual

How to send headers from controller into another class in Java

I have a controller like below SubmitBatchController.java BatchSubmissionRequestModel.java HeaderRequestModel.java Now I have another class, which has to take the headers from SubmitBatchController.java & set it into FullEligibilityService.java FullEligibilityRequestModel.java FullEligibilityService.java …