org.springframework.boot.context.embedded

Annotation Type LocalServerPort



  • @Target(value={FIELD,METHOD,PARAMETER,ANNOTATION_TYPE})
     @Retention(value=RUNTIME)
     @Documented
     @Value(value="${local.server.port}")
    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:
    1.4.0
    Author:
    Anand Shah, Stephane Nicoll

Copyright © 2016 Pivotal Software, Inc.. All rights reserved.