lundi 16 octobre 2017

Spring Boot {random.int} or {random.uuid} always generating a wrong string as result

I have this configuration on my application.properties file:

random.key-gen.user.password=${random.uuid}
random.customer.confirmation-code=${random.int[10000,99999]}

And I read these values on UserServiceImpland CustomerServiceImpl classes as following:

@Value("${random.key-gen.user.password}")
private UUID uuid;

and

@Value("${random.customer.confirmation-code}")
private Integer randomCode;

respectively, and exactly like this tutorial http://ift.tt/2gnsCpd

The problem is that both {random} entries are generating a string like bf0d379b89c0cedc9ae40fa3b4c92fb6 as result.

What am I missing? Do I need to configure something?

Thanks




Aucun commentaire:

Enregistrer un commentaire