org.springframework.boot.web.server

Annotation Type LocalServerPort


  • Deprecated. 
    since 2.7.0 for removal in 3.0.0 in favor of org.springframework.boot.test.web.server.LocalServerPort

    @Target(value={FIELD,METHOD,PARAMETER,ANNOTATION_TYPE})
     @Retention(value=RUNTIME)
     @Documented
     @Value(value="${local.server.port}")
     @Deprecated
    public @interface LocalServerPort
    Annotation at the field or method/constructor parameter level that injects the HTTP port that got allocated at runtime. Provides a convenient alternative for @Value("${local.server.port}").
    Since:
    2.0.0