Na classe TokenService, recebo essa mensagem nas annotations @Value. O que fazer?
package com.curso.springboot.config.security;
import java.util.Date;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.security.core.Authentication;
import org.springframework.stereotype.Service;
import com.curso.springboot.model.Usuario;
import io.jsonwebtoken.Jwts;
@Service
public class TokenService {
public String gerarToken(Authentication authentication) {
@Value("${projeto.jwt.expiration}")
private String expiration;
@Value("${projeto.jwt.secret}")
private String secret;
Usuario logado = (Usuario) authentication.getPrincipal();
Date hoje = new Date();
Date dataExpiracao = new Date(hoje.getTime() + expiration);
return Jwts.builder()
.setIssuer("Api do curso")
.setSubject(logado.getId().toString())
.setIssuedAt(hoje)
.setExpiration(dataExpiracao)
.signWith(io.jsonwebtoken.SignatureAlgorithm.HS256, secret)
.compact();
}
}