`@SpringBootApplication
public class RegexApplication {
@Resource
private static Environment environment;
@Autowired
private static Environment environment;
public static void main(String[] args) {
SpringApplication.run(RegexApplication.class, args);
System.out.println(environment.getProperty("spring.application.name"));
}
}`
I just want to print this out so I can see what the default spring.application.name is. But I'm having a hard time understanding how to do it.
I tried @Autowired and @Resource both don't seem to work.