I am considering now the example "Registration, entry through the spring" https://hellokoding.com/registration-and-login-example-with-spring-xml-configuration-maven-jsp-and-mysql/
When registering a new user, after clicking the Submit button, the method that takes in the database ALL existing ROLE (now I have created ROLE_USER and ROLE_ADMIN) and adds them to the user automatically works. 
Question: I can not understand how to send only ROLE_USER to the method, so that the user is automatically created with it, and ROLE_ADMIN is added manually.
Here's an example: https://github.com/hellokoding/registration-login-spring-xml-maven-jsp-mysql
Here is the method that is responsible for saving the new user. https://github.com/hellokoding/registration-login-spring-xml-maven-jsp-mysql/blob/master/src/main/java/com/hellokoding/account/service/UserServiceImpl.java#L24
I tried to pull the first value from the list through new HashSet<>(roleRepository.findAll()) and get(0) , but it didn’t work, it requires that we give it the data type "Role", and I’m not much I can understand how the code should look like.
I would be grateful for any hint. Thank.