| 构造器和说明 |
|---|
Jboot() |
| 限定符和类型 | 方法和说明 |
|---|---|
static <T> T |
config(Class<T> clazz)
获取配置信息
|
static <T> T |
config(Class<T> clazz,
String prefix)
读取配置文件信息
|
static <T> T |
config(Class<T> clazz,
String prefix,
String file)
读取配置文件信息
|
static String |
configValue(String key)
读取某个配置信息
|
static String |
configValue(String key,
String defaultValue)
读取某个配置信息
|
static <T> T |
getBean(Class<T> clazz)
根据类名获取 Aop 下的 Bean
|
static <T> T |
getBean(String name)
根据名称获取 Aop 下的 Bean
|
static JbootCache |
getCache()
获取 缓存
|
static JbootCache |
getCache(String name)
获取指定的缓存
|
static com.codahale.metrics.MetricRegistry |
getMetric()
获取 MetricRegistry
|
static Jbootmq |
getMq()
获取 Mq
|
static Jbootmq |
getMq(String name)
获取指定的 MQ
|
static JbootRedis |
getRedis()
获取 JbootRedis 工具类,方便操作Redis请求
|
static JbootRedis |
getRedis(String name)
获取指定的 Redis
|
static JbootSerializer |
getSerializer()
获取序列化对象
|
static JbootSerializer |
getSerializer(String name)
获取序列化对象
|
static boolean |
isDevMode()
是否是开发模式
|
static void |
sendEvent(JbootEvent event)
想本地系统发送一个事件
|
static void |
sendEvent(String action,
Object data)
向本地系统发送一个事件
|
static <T> T |
service(Class<T> clazz)
获取 RPC 服务
|
static <T> T |
service(Class<T> clazz,
JbootrpcReferenceConfig config)
获取 RPC 服务
|
public Jboot()
public static boolean isDevMode()
public static JbootCache getCache()
public static JbootCache getCache(String name)
name - public static JbootRedis getRedis()
public static JbootRedis getRedis(String name)
name - public static com.codahale.metrics.MetricRegistry getMetric()
public static JbootSerializer getSerializer()
public static JbootSerializer getSerializer(String name)
name - public static <T> T config(Class<T> clazz, String prefix)
T - clazz - prefix - public static <T> T config(Class<T> clazz, String prefix, String file)
T - clazz - prefix - file - public static String configValue(String key)
key - public static String configValue(String key, String defaultValue)
key - defaultValue - 当获取不到的时候发挥此默认值public static <T> T service(Class<T> clazz, JbootrpcReferenceConfig config)
T - clazz - config - rpc 配置public static void sendEvent(JbootEvent event)
event - Copyright © 2024. All rights reserved.