mirror of
https://github.com/spring-projects/spring-boot.git
synced 2024-07-20 01:27:02 +08:00
Merge branch '2.3.x'
Closes gh-24412
This commit is contained in:
commit
e95c514661
@ -38,6 +38,9 @@ public enum AccessLevel {
|
|||||||
*/
|
*/
|
||||||
FULL;
|
FULL;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The request attribute used to store the {@link AccessLevel}.
|
||||||
|
*/
|
||||||
public static final String REQUEST_ATTRIBUTE = "cloudFoundryAccessLevel";
|
public static final String REQUEST_ATTRIBUTE = "cloudFoundryAccessLevel";
|
||||||
|
|
||||||
private final List<String> ids;
|
private final List<String> ids;
|
||||||
|
@ -58,24 +58,54 @@ public class CloudFoundryAuthorizationException extends RuntimeException {
|
|||||||
*/
|
*/
|
||||||
public enum Reason {
|
public enum Reason {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Access Denied.
|
||||||
|
*/
|
||||||
ACCESS_DENIED(HttpStatus.FORBIDDEN),
|
ACCESS_DENIED(HttpStatus.FORBIDDEN),
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Invalid Audience.
|
||||||
|
*/
|
||||||
INVALID_AUDIENCE(HttpStatus.UNAUTHORIZED),
|
INVALID_AUDIENCE(HttpStatus.UNAUTHORIZED),
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Invalid Issuer.
|
||||||
|
*/
|
||||||
INVALID_ISSUER(HttpStatus.UNAUTHORIZED),
|
INVALID_ISSUER(HttpStatus.UNAUTHORIZED),
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Invalid Key ID.
|
||||||
|
*/
|
||||||
INVALID_KEY_ID(HttpStatus.UNAUTHORIZED),
|
INVALID_KEY_ID(HttpStatus.UNAUTHORIZED),
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Invalid Signature.
|
||||||
|
*/
|
||||||
INVALID_SIGNATURE(HttpStatus.UNAUTHORIZED),
|
INVALID_SIGNATURE(HttpStatus.UNAUTHORIZED),
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Invalid Token.
|
||||||
|
*/
|
||||||
INVALID_TOKEN(HttpStatus.UNAUTHORIZED),
|
INVALID_TOKEN(HttpStatus.UNAUTHORIZED),
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Missing Authorization.
|
||||||
|
*/
|
||||||
MISSING_AUTHORIZATION(HttpStatus.UNAUTHORIZED),
|
MISSING_AUTHORIZATION(HttpStatus.UNAUTHORIZED),
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Token Expired.
|
||||||
|
*/
|
||||||
TOKEN_EXPIRED(HttpStatus.UNAUTHORIZED),
|
TOKEN_EXPIRED(HttpStatus.UNAUTHORIZED),
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Unsupported Token Signing Algorithm.
|
||||||
|
*/
|
||||||
UNSUPPORTED_TOKEN_SIGNING_ALGORITHM(HttpStatus.UNAUTHORIZED),
|
UNSUPPORTED_TOKEN_SIGNING_ALGORITHM(HttpStatus.UNAUTHORIZED),
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Service Unavailable.
|
||||||
|
*/
|
||||||
SERVICE_UNAVAILABLE(HttpStatus.SERVICE_UNAVAILABLE);
|
SERVICE_UNAVAILABLE(HttpStatus.SERVICE_UNAVAILABLE);
|
||||||
|
|
||||||
private final HttpStatus status;
|
private final HttpStatus status;
|
||||||
|
@ -48,6 +48,9 @@ import org.springframework.core.annotation.Order;
|
|||||||
@Documented
|
@Documented
|
||||||
public @interface AutoConfigureOrder {
|
public @interface AutoConfigureOrder {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The default order value.
|
||||||
|
*/
|
||||||
int DEFAULT_ORDER = 0;
|
int DEFAULT_ORDER = 0;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -83,6 +83,10 @@ import org.springframework.core.io.support.SpringFactoriesLoader;
|
|||||||
@Import(AutoConfigurationImportSelector.class)
|
@Import(AutoConfigurationImportSelector.class)
|
||||||
public @interface EnableAutoConfiguration {
|
public @interface EnableAutoConfiguration {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Environment property that can be used to override when auto-configuration is
|
||||||
|
* enabled.
|
||||||
|
*/
|
||||||
String ENABLED_OVERRIDE_PROPERTY = "spring.boot.enableautoconfiguration";
|
String ENABLED_OVERRIDE_PROPERTY = "spring.boot.enableautoconfiguration";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -401,23 +401,28 @@ public final class ConditionMessage {
|
|||||||
*/
|
*/
|
||||||
public enum Style {
|
public enum Style {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Render with normal styling.
|
||||||
|
*/
|
||||||
NORMAL {
|
NORMAL {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected Object applyToItem(Object item) {
|
protected Object applyToItem(Object item) {
|
||||||
return item;
|
return item;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public Collection<?> applyTo(Collection<?> items) {
|
|
||||||
return items;
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Render with the item surrounded by quotes.
|
||||||
|
*/
|
||||||
QUOTE {
|
QUOTE {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected String applyToItem(Object item) {
|
protected String applyToItem(Object item) {
|
||||||
return (item != null) ? "'" + item + "'" : null;
|
return (item != null) ? "'" + item + "'" : null;
|
||||||
}
|
}
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
public Collection<?> applyTo(Collection<?> items) {
|
public Collection<?> applyTo(Collection<?> items) {
|
||||||
|
@ -32,6 +32,8 @@ import org.springframework.core.type.AnnotatedTypeMetadata;
|
|||||||
/**
|
/**
|
||||||
* {@link HazelcastConfigResourceCondition} that checks if the
|
* {@link HazelcastConfigResourceCondition} that checks if the
|
||||||
* {@code spring.hazelcast.config} configuration key is defined.
|
* {@code spring.hazelcast.config} configuration key is defined.
|
||||||
|
*
|
||||||
|
* @author Stephane Nicoll
|
||||||
*/
|
*/
|
||||||
class HazelcastClientConfigAvailableCondition extends HazelcastConfigResourceCondition {
|
class HazelcastClientConfigAvailableCondition extends HazelcastConfigResourceCondition {
|
||||||
|
|
||||||
|
@ -69,13 +69,13 @@ import org.springframework.web.servlet.DispatcherServlet;
|
|||||||
@AutoConfigureAfter(ServletWebServerFactoryAutoConfiguration.class)
|
@AutoConfigureAfter(ServletWebServerFactoryAutoConfiguration.class)
|
||||||
public class DispatcherServletAutoConfiguration {
|
public class DispatcherServletAutoConfiguration {
|
||||||
|
|
||||||
/*
|
/**
|
||||||
* The bean name for a DispatcherServlet that will be mapped to the root URL "/"
|
* The bean name for a DispatcherServlet that will be mapped to the root URL "/".
|
||||||
*/
|
*/
|
||||||
public static final String DEFAULT_DISPATCHER_SERVLET_BEAN_NAME = "dispatcherServlet";
|
public static final String DEFAULT_DISPATCHER_SERVLET_BEAN_NAME = "dispatcherServlet";
|
||||||
|
|
||||||
/*
|
/**
|
||||||
* The bean name for a ServletRegistrationBean for the DispatcherServlet "/"
|
* The bean name for a ServletRegistrationBean for the DispatcherServlet "/".
|
||||||
*/
|
*/
|
||||||
public static final String DEFAULT_DISPATCHER_SERVLET_REGISTRATION_BEAN_NAME = "dispatcherServletRegistration";
|
public static final String DEFAULT_DISPATCHER_SERVLET_REGISTRATION_BEAN_NAME = "dispatcherServletRegistration";
|
||||||
|
|
||||||
|
@ -145,8 +145,14 @@ import org.springframework.web.util.pattern.PathPatternParser;
|
|||||||
ValidationAutoConfiguration.class })
|
ValidationAutoConfiguration.class })
|
||||||
public class WebMvcAutoConfiguration {
|
public class WebMvcAutoConfiguration {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The default Spring MVC view prefix.
|
||||||
|
*/
|
||||||
public static final String DEFAULT_PREFIX = "";
|
public static final String DEFAULT_PREFIX = "";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The default Spring MVC view suffix.
|
||||||
|
*/
|
||||||
public static final String DEFAULT_SUFFIX = "";
|
public static final String DEFAULT_SUFFIX = "";
|
||||||
|
|
||||||
private static final String[] SERVLET_LOCATIONS = { "/" };
|
private static final String[] SERVLET_LOCATIONS = { "/" };
|
||||||
|
@ -15,8 +15,8 @@
|
|||||||
<suppress files="[\\/]src[\\/]test[\\/]java[\\/]" checks="Javadoc*" />
|
<suppress files="[\\/]src[\\/]test[\\/]java[\\/]" checks="Javadoc*" />
|
||||||
<suppress files="[\\/]src[\\/]test[\\/]java[\\/]" id="mainCodeIllegalImportCheck" />
|
<suppress files="[\\/]src[\\/]test[\\/]java[\\/]" id="mainCodeIllegalImportCheck" />
|
||||||
<suppress files="[\\/]src[\\/]test[\\/]java[\\/]" checks="NonEmptyAtclauseDescription" />
|
<suppress files="[\\/]src[\\/]test[\\/]java[\\/]" checks="NonEmptyAtclauseDescription" />
|
||||||
<suppress files="[\\/]autoconfigure[\\/]" checks="JavadocType" />
|
<suppress files="[\\/]autoconfigure[\\/].*Properties\.java" checks="JavadocType" />
|
||||||
<suppress files="[\\/]autoconfigure[\\/]" checks="JavadocVariable" />
|
<suppress files="[\\/]autoconfigure[\\/].*Properties\.java" checks="JavadocVariable" />
|
||||||
<suppress files="[\\/]spring-boot-docs[\\/]" checks="JavadocType" />
|
<suppress files="[\\/]spring-boot-docs[\\/]" checks="JavadocType" />
|
||||||
<suppress files="[\\/]spring-boot-smoke-tests[\\/]" checks="JavadocType" />
|
<suppress files="[\\/]spring-boot-smoke-tests[\\/]" checks="JavadocType" />
|
||||||
<suppress files="[\\/]spring-boot-smoke-tests[\\/]" checks="ImportControl" />
|
<suppress files="[\\/]spring-boot-smoke-tests[\\/]" checks="ImportControl" />
|
||||||
|
Loading…
Reference in New Issue
Block a user