title: How to create a Spring Security Key for signing a JWT token?
body: <p>I use <code>implementation group: 'io.jsonwebtoken', name: 'jjwt-api', version: '0.10.6'</code> as dependency.</p>
  
  <p>I would like to create a JWT token as follows:</p>
  
  <pre><code>@Value("${jwt.token.secret}")
  private Key secret;
  
  JwtToken.builder().value(Jwts.builder()
                  .setClaims(createClaims(account))
                  .setSubject(subject.toString())
                  .setIssuedAt(Date.from(createdDateTime))
                  .setExpiration(Date.from(expirationDateTime))
                  .signWith(secret)
                  .compact()).expiration(expirationDateTime.toString()).build()
  </code></pre>
  
  <p>I have used to provide a String in the <code>application.properties</code> and reference that key as shown above, but giving a String as a secretkey is deprecated. How should I create the Key secret?</p>