Is it also possible to access the management port in a similar way, e.g.:
@SpringBootTest(classes = {Application.class}, webEnvironment = WebEnvironment.RANDOM_PORT)
public class MyTest {
@LocalServerPort
int randomServerPort;
@LocalManagementPort
int randomManagementPort;
More Related Contents:
- How to configure port for a Spring Boot application
- Spring Boot Remove Whitelabel Error Page
- Spring Boot Security CORS
- How to use 2 or more databases with spring?
- Environment Specific application.properties file in Spring Boot application [closed]
- Spring catch all route for index.html
- spring boot war without tomcat embedded
- Why did Spring framework deprecate the use of Guava cache?
- Hibernate Transactions and Concurrency Using attachDirty (saveOrUpdate)
- Spring Boot: Is it possible to use external application.properties files in arbitrary directories with a fat jar?
- Spring injects dependencies in constructor without @Autowired annotation
- How to get custom user info from OAuth2 authorization server /user endpoint
- Process Spring Boot externalized property values
- Added Springfox Swagger-UI and it’s not working, what am I missing?
- How to use LocalDateTime RequestParam in Spring? I get “Failed to convert String to LocalDateTime”
- Failed to configure a DataSource: ‘url’ attribute is not specified and no embedded datasource could be configured
- Spring Boot and how to configure connection details to MongoDB?
- Database application.yml for Spring boot from applications.properties
- Add a Servlet Filter in a Spring Boot application
- Changing default welcome-page for spring-boot application deployed as a war
- Spring Boot Data JPA – Modifying update query – Refresh persistence context
- How can I specify my .keystore file with Spring Boot and Tomcat?
- How to prevent Spring Boot daemon/server application from closing/shutting down immediately?
- How to allow a User only access their own data in Spring Boot / Spring Security?
- Spring – How to stream large multipart file uploads to database without storing on local file system [duplicate]
- With Spring Data REST, why is the @Version property becoming an ETag and not included in the representation?
- Where to handle Exceptions in Spring Applications
- One Spring Boot project, deploy to both JAR or WAR
- How to add a custom health check in spring boot health?
- @SpringBootTest vs @ContextConfiguration vs @Import in Spring Boot Unit Test