Add LocalManagementPort
Add an annotation alias for the actual management port, similar to what was done for the main context (`LocalServerPort`). See gh-5548
This commit is contained in:
@@ -22,7 +22,7 @@ import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.boot.actuate.autoconfigure.LocalManagementPort;
|
||||
import org.springframework.boot.autoconfigure.security.SecurityProperties;
|
||||
import org.springframework.boot.context.web.LocalServerPort;
|
||||
import org.springframework.boot.test.context.SpringBootTest;
|
||||
@@ -53,7 +53,7 @@ public class InsecureManagementPortAndPathSampleActuatorApplicationTests {
|
||||
@LocalServerPort
|
||||
private int port = 9010;
|
||||
|
||||
@Value("${local.management.port}")
|
||||
@LocalManagementPort
|
||||
private int managementPort = 9011;
|
||||
|
||||
@Test
|
||||
|
||||
@@ -21,7 +21,7 @@ import java.util.Map;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.boot.actuate.autoconfigure.LocalManagementPort;
|
||||
import org.springframework.boot.context.web.LocalServerPort;
|
||||
import org.springframework.boot.test.context.SpringBootTest;
|
||||
import org.springframework.boot.test.context.SpringBootTest.WebEnvironment;
|
||||
@@ -48,7 +48,7 @@ public class ManagementAddressActuatorApplicationTests {
|
||||
@LocalServerPort
|
||||
private int port = 9010;
|
||||
|
||||
@Value("${local.management.port}")
|
||||
@LocalManagementPort
|
||||
private int managementPort = 9011;
|
||||
|
||||
@Test
|
||||
|
||||
@@ -22,7 +22,7 @@ import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.boot.actuate.autoconfigure.LocalManagementPort;
|
||||
import org.springframework.boot.autoconfigure.security.SecurityProperties;
|
||||
import org.springframework.boot.context.web.LocalServerPort;
|
||||
import org.springframework.boot.test.context.SpringBootTest;
|
||||
@@ -52,7 +52,7 @@ public class ManagementPortAndPathSampleActuatorApplicationTests {
|
||||
@LocalServerPort
|
||||
private int port = 9010;
|
||||
|
||||
@Value("${local.management.port}")
|
||||
@LocalManagementPort
|
||||
private int managementPort = 9011;
|
||||
|
||||
@Test
|
||||
|
||||
@@ -22,7 +22,7 @@ import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.boot.actuate.autoconfigure.LocalManagementPort;
|
||||
import org.springframework.boot.autoconfigure.security.SecurityProperties;
|
||||
import org.springframework.boot.context.web.LocalServerPort;
|
||||
import org.springframework.boot.test.context.SpringBootTest;
|
||||
@@ -52,7 +52,7 @@ public class ManagementPortSampleActuatorApplicationTests {
|
||||
@LocalServerPort
|
||||
private int port = 9010;
|
||||
|
||||
@Value("${local.management.port}")
|
||||
@LocalManagementPort
|
||||
private int managementPort = 9011;
|
||||
|
||||
@Test
|
||||
|
||||
Reference in New Issue
Block a user