批注接口 LocalServerPort
@Target({FIELD,METHOD,PARAMETER,ANNOTATION_TYPE})
@Retention(RUNTIME)
@Documented
@Value("${local.server.port}")
public @interface LocalServerPort
Annotation at the field or method/constructor parameter level that injects the HTTP
server port that was allocated at runtime. Provides a convenient alternative for
@Value("${local.server.port}")
.- 从以下版本开始:
- 2.7.0
- 作者:
- Anand Shah, Stephane Nicoll