public final class SpringUtils extends Object
| 限定符和类型 | 字段和说明 |
|---|---|
static String |
SPRING_BOOT_CONTEXT_PATH
Spring-boot web server servlet context-path key
|
static String |
SPRING_BOOT_SERVER_PORT
Spring-boot web server port key
|
| 构造器和说明 |
|---|
SpringUtils() |
| 限定符和类型 | 方法和说明 |
|---|---|
static void |
addPropertySource(org.springframework.core.env.ConfigurableEnvironment env,
String propertySourceName,
Map<String,?> map) |
static void |
addPropertySourceIfAbsent(org.springframework.core.env.ConfigurableEnvironment env,
String propertySourceName,
Map<String,?> map) |
static <T extends Annotation> |
getAnnotatedUrlPath(org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping mapping,
Class<T> annotationType) |
static <T extends Annotation> |
getAnnotation(org.springframework.web.method.HandlerMethod handlerMethod,
Class<T> annotationType) |
static org.springframework.core.annotation.AnnotationAttributes |
getAnnotationAttributes(Class<? extends Annotation> type,
org.springframework.core.type.AnnotatedTypeMetadata metadata) |
static org.springframework.core.io.Resource |
getResource(String resourceLocation) |
static int |
getWebServerPort(org.springframework.boot.web.context.WebServerApplicationContext webServerApplicationContext) |
static <T extends Annotation> |
parseAnnotation(Class<T> type,
org.springframework.core.type.AnnotatedTypeMetadata metadata) |
static <T extends Annotation> |
parseAnnotation(Class<T> type,
Map<String,Object> attributes) |
public static final String SPRING_BOOT_SERVER_PORT
public static org.springframework.core.io.Resource getResource(String resourceLocation) throws IOException
IOExceptionpublic static int getWebServerPort(org.springframework.boot.web.context.WebServerApplicationContext webServerApplicationContext)
public static <T extends Annotation> T getAnnotation(org.springframework.web.method.HandlerMethod handlerMethod, Class<T> annotationType)
public static <T extends Annotation> Set<String> getAnnotatedUrlPath(org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping mapping, Class<T> annotationType)
public static org.springframework.core.annotation.AnnotationAttributes getAnnotationAttributes(Class<? extends Annotation> type, org.springframework.core.type.AnnotatedTypeMetadata metadata)
public static <T extends Annotation> T parseAnnotation(Class<T> type, org.springframework.core.type.AnnotatedTypeMetadata metadata)
public static <T extends Annotation> T parseAnnotation(Class<T> type, Map<String,Object> attributes)
public static void addPropertySource(org.springframework.core.env.ConfigurableEnvironment env,
String propertySourceName,
Map<String,?> map)
Copyright © 2025. All rights reserved.