Skip to content

Tag: java

Getting a map and collectors error in kotlin function

I am trying to convert this java function to kotlin. I end up with the following: However on the line I get the following error: Answer You don’t need stream() in kotlin. The collections classes in kotlin provides all methods you need. (e.g. map, distinct, toMap). Here is the kotlin way to write your fu…

how java backend get value in a dropdown from frontend

In java backend which method can be used to get value in the frontend dropdown? eg: enter a country name in frontend dropdown, how can I pass this value to backend to search in database? Answer Your back end will expose a rest api that your front end will access via Rest Api call. Your dropdown list will be f…

How to create APT hosted repository using Nexus OSS API

I am creating nexus repositories using nexus API, but I don’t know how to post multiline field in json. The API to create hosted repository needs GPG key and GPG key has multiline. Help me please. Thank you very much. Answer This was an embarrassing question. When replace “linebreak(n)”, I d…