application.yml内容
tm:
service:
admin:
username: xxx
password: aaa
email: bbb
配置内容
@Service
public class LoginService {
@Value("${tm.service.admin.username}")
String adminUsername;
@Value("${tm.service.admin.password}")
String adminPassword;
@Value("${tm.service.admin.email}")
String adminEmail;