Support `@LocalArmeriaPort`, `@LocalArmeriaPorts`
See original GitHub issueI’m working on a PR to allow Armeria internal services and spring actuators to only be allowed on certain ports. But I faced one problem.
When I specify a random port, I can’t tell it clearly. So in Armeria, it would be nice to provide annotations like @LocalArmeriaPort and @LocalArmeriaPorts like @LocalServerPort as Spring Boot provides.
Also, this task will bind to that port when management.server.port is set, and it would be nice to use @LocalManagementPort.
This is likely to be a cornerstone for future features that will be added.
See https://docs.spring.io/spring-boot/docs/current/reference/htmlsingle/#howto-discover-the-http-port-at-runtime
See @LocalRSocketServerPort
Issue Analytics
- State:
- Created 4 years ago
- Comments:8 (5 by maintainers)
Top Results From Across the Web
com.linecorp.armeria.spring (Armeria 1.10.0 API reference)
Interface used to configure a service on the default armeria server. DocServiceConfigurator. Configures a DocService built by Armeria auto configuration.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Rethinking, it seems that
management.server.portshould be included after the PR or it should be included.This is because allowing a port allows all other routes to access.
Hmm … If so, what do you think of changing the port from Spring integration module to a random port if the port is set to 0?
This solution is not perfect in timing, but it adds nothing to
ServerPort.