Skip to content

Tag: java

Get all properties as map in properties file Spring Boot

I have a spring boot project , I want to get those properties as map by prefix , in this exemple the prefix is root : application.properties : I dont want to change my filetype from properties to YAML. Answer “Easy-peasy”: With, application.properties: And pom.xml: … console prints: To resid…

Magnolia REST Endpoint for Categories

I understanding now, how the Magnolia works. I writing REST Endpoint for Magnolia Content App in Java. My Content App is Categories – App and it looks like this: My task is, to define a REST endpoint for the Categories app in Java, which delivers the subcategories based on a passed category name and dis…

Return string next to another inside a .txt file (JAVA)

I have a .txt file that reads for example: The idea is to create a function that receives a strinf and compares it to the first three characters, in this case, AAA, ZZZ or LKH, and if it is equal, it returns the numeric value, but my comparison isn’t working as intended, because the comparison doesn&#82…