InstanceName depending on user's locale

It’s that possible ?. In our application we have several entities in which instanceName must depend on user’s locale. We try achieve that injecting CurrentAuthentication in entity class and get user’s locale with currentAuthentication.getLocale(), but when start app raise an exception “Error creating bean with name ‘’: Unsatisfied dependency expressed through field ‘userRepository’;”
Thanks in advance,
We attach small test project. (290.2 KB)

Solved !. The method annotated with @InstanceName can accept CurrentAuthentication bean as parameter.

1 Like