mirror of
https://github.com/spring-projects/spring-boot.git
synced 2024-07-05 00:56:58 +08:00
Merge branch '2.7.x' into 3.0.x
This commit is contained in:
commit
5120242996
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2012-2022 the original author or authors.
|
* Copyright 2012-2023 the original author or authors.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
@ -107,7 +107,7 @@ public class WebFluxEndpointManagementContextConfiguration {
|
|||||||
private boolean shouldRegisterLinksMapping(WebEndpointProperties properties, Environment environment,
|
private boolean shouldRegisterLinksMapping(WebEndpointProperties properties, Environment environment,
|
||||||
String basePath) {
|
String basePath) {
|
||||||
return properties.getDiscovery().isEnabled() && (StringUtils.hasText(basePath)
|
return properties.getDiscovery().isEnabled() && (StringUtils.hasText(basePath)
|
||||||
|| ManagementPortType.get(environment).equals(ManagementPortType.DIFFERENT));
|
|| ManagementPortType.get(environment) == ManagementPortType.DIFFERENT);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Bean
|
@Bean
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2012-2022 the original author or authors.
|
* Copyright 2012-2023 the original author or authors.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
@ -16,8 +16,6 @@
|
|||||||
|
|
||||||
package org.springframework.boot.test.mock.mockito;
|
package org.springframework.boot.test.mock.mockito;
|
||||||
|
|
||||||
import java.lang.reflect.InvocationHandler;
|
|
||||||
import java.lang.reflect.Method;
|
|
||||||
import java.lang.reflect.Proxy;
|
import java.lang.reflect.Proxy;
|
||||||
|
|
||||||
import org.junit.jupiter.api.Test;
|
import org.junit.jupiter.api.Test;
|
||||||
@ -60,14 +58,7 @@ class SpyBeanWithJdkProxyTests {
|
|||||||
@Bean
|
@Bean
|
||||||
ExampleRepository dateService() {
|
ExampleRepository dateService() {
|
||||||
return (ExampleRepository) Proxy.newProxyInstance(getClass().getClassLoader(),
|
return (ExampleRepository) Proxy.newProxyInstance(getClass().getClassLoader(),
|
||||||
new Class<?>[] { ExampleRepository.class }, new InvocationHandler() {
|
new Class<?>[] { ExampleRepository.class }, (proxy, method, args) -> new Example((String) args[0]));
|
||||||
|
|
||||||
@Override
|
|
||||||
public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
|
|
||||||
return new Example((String) args[0]);
|
|
||||||
}
|
|
||||||
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2012-2019 the original author or authors.
|
* Copyright 2012-2023 the original author or authors.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
@ -30,14 +30,7 @@ public class SampleFlywayApplication {
|
|||||||
|
|
||||||
@Bean
|
@Bean
|
||||||
public CommandLineRunner runner(PersonRepository repository) {
|
public CommandLineRunner runner(PersonRepository repository) {
|
||||||
return new CommandLineRunner() {
|
return (args) -> System.err.println(repository.findAll());
|
||||||
|
|
||||||
@Override
|
|
||||||
public void run(String... args) throws Exception {
|
|
||||||
System.err.println(repository.findAll());
|
|
||||||
}
|
|
||||||
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2012-2022 the original author or authors.
|
* Copyright 2012-2023 the original author or authors.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
@ -18,7 +18,6 @@ package smoketest.jersey;
|
|||||||
|
|
||||||
import jakarta.ws.rs.GET;
|
import jakarta.ws.rs.GET;
|
||||||
import jakarta.ws.rs.Path;
|
import jakarta.ws.rs.Path;
|
||||||
import org.glassfish.jersey.server.ResourceConfig;
|
|
||||||
import org.junit.jupiter.api.Test;
|
import org.junit.jupiter.api.Test;
|
||||||
import smoketest.jersey.AbstractJerseyManagementPortTests.ResourceConfigConfiguration;
|
import smoketest.jersey.AbstractJerseyManagementPortTests.ResourceConfigConfiguration;
|
||||||
|
|
||||||
@ -89,12 +88,7 @@ class AbstractJerseyManagementPortTests {
|
|||||||
|
|
||||||
@Bean
|
@Bean
|
||||||
ResourceConfigCustomizer customizer() {
|
ResourceConfigCustomizer customizer() {
|
||||||
return new ResourceConfigCustomizer() {
|
return (config) -> config.register(TestEndpoint.class);
|
||||||
@Override
|
|
||||||
public void customize(ResourceConfig config) {
|
|
||||||
config.register(TestEndpoint.class);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Path("/test")
|
@Path("/test")
|
||||||
|
Loading…
Reference in New Issue
Block a user