一个栗子 private static Integer port; @Value("${server.port}") public void setreturnPort(Integer returnPort){ port = returnPort; }