本文整理了Java中top.wboost.common.log.entity.Logger.info()
方法的一些代码示例,展示了Logger.info()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Logger.info()
方法的具体详情如下:
包路径:top.wboost.common.log.entity.Logger
类名称:Logger
方法名:info
暂无
代码示例来源:origin: top.wboost/common-utils-web
@Override
public void setApplicationContext(ApplicationContext arg0) throws BeansException {
applicationContext = arg0;
log.info("init");
}
代码示例来源:origin: top.wboost/common-utils-web
@Override
public void setApplicationContext(ApplicationContext arg0) throws BeansException {
applicationContext = arg0;
log.info("init");
}
代码示例来源:origin: top.wboost/common-log
@Override
public boolean sendLog(MethodLog methodLog) {
sendLogService.execute(() -> {
log.info("sendLog...: {}", methodLog);
});
return false;
}
代码示例来源:origin: top.wboost/common-log
@Override
public void onApplicationEvent(ContextClosedEvent event) {
log.info("close sendLogService");
if (!sendLogService.isShutdown()) {
sendLogService.shutdown();
}
}
代码示例来源:origin: top.wboost/common-kylin
@Override
public synchronized boolean checkAuthentication() {
String response = executeQueryJson(checkAuthSearch);
if (StringUtil.notEmpty(response) && (!response.equals("{}"))) {
log.info("checkAuthentication : response {} , is authorized", response);
return true;
} else {
log.info("checkAuthentication : response {} , is unauthorized", response);
return false;
}
}
代码示例来源:origin: top.wboost/common-boost
@Override
public void afterPropertiesSet() throws Exception {
Properties properties = PropertiesUtil.loadProperties(propertiesName);
if (properties == null)
throw new SystemException("cant load properties:" + propertiesName + ", null");
for (Entry<Object, Object> entry : properties.entrySet()) {
String sql = ClassPathDataUtil.loadData(entry.getValue().toString());
sqlMap.put(entry.getKey().toString(), sql);
}
log.info("load sql properties:{}", sqlMap);
}
代码示例来源:origin: top.wboost/common-utils
/**
* 获得属性的读方法
* @author jwSun
* @date 2017年3月29日 上午9:40:50
* @param clazz 类
* @param fieldName 属性名
* @return 读方法
*/
public static Method getReadMethod(Class<?> clazz, String fieldName) {
try {
Assert.notNull(fieldName);
char cha = Character.toUpperCase(fieldName.charAt(0));
//获得方法后名称
String methodName = MethodPrefix.get + String.valueOf(cha) + fieldName.substring(1);
return findMethod(clazz, methodName);
} catch (Exception e) {
log.info("getReadMethod ERROR: {}", e.getLocalizedMessage());
}
return null;
}
代码示例来源:origin: top.wboost/common-web
@Override
public void onWebApplicationEvent(ContextRefreshedEvent event) {
String[] checkers = event.getApplicationContext().getBeanNamesForType(ParameterConfigChecker.class,true, false);
for (int i = 0; i < checkers.length; i++) {
String checkerBeanName = checkers[i];
ParameterConfigChecker checker = event.getApplicationContext().getBean(checkerBeanName,
ParameterConfigChecker.class);
parameterConfigMap.put(checker.getAnnotation(), checker);
}
log.info("manager init:{}", parameterConfigMap);
}
代码示例来源:origin: top.wboost/base-spring-boot-starter
@Override
public boolean[] match(String[] autoConfigurationClasses, AutoConfigurationMetadata autoConfigurationMetadata) {
Set<String> excludes = new HashSet<>();
try {
Class<?> clazz = SpringBootUtil.getLauncherClass();
log.info("get boot class {}", clazz);
DisableDataSource disableDataSource = AnnotationUtils.findAnnotation(clazz, DisableDataSource.class);
if (disableDataSource != null) {
excludes.add(DataSourceAutoConfiguration.class.getName());
excludes.add(DataSourceTransactionManagerAutoConfiguration.class.getName());
excludes.add(HibernateJpaAutoConfiguration.class.getName());
//DataSourceAutoMultipleConfigurationBean
}
} catch (Exception e) {
e.printStackTrace();
}
boolean[] match = new boolean[autoConfigurationClasses.length];
for (int i = 0; i < autoConfigurationClasses.length; i++) {
if (excludes.contains(autoConfigurationClasses[i])) {
match[i] = false;
} else {
match[i] = true;
}
}
return match;
}
代码示例来源:origin: top.wboost/common-utils
/**
* 获得属性的set方法
* @date 2017年3月29日 上午9:41:13
* @param clazz 要获取的类
* @param fieldName 属性名
* @return 写方法
*/
public static Method getWriteMethod(Class<?> clazz, String fieldName) {
try {
Assert.notNull(fieldName);
Field f = findField(clazz, fieldName);
char cha = Character.toUpperCase(fieldName.charAt(0));
//获得方法后名称
String methodName = MethodPrefix.set + String.valueOf(cha) + fieldName.substring(1);
return findMethod(clazz, methodName, f.getType());
} catch (Exception e) {
log.info("getWriteMethod ERROR: {}", e.getLocalizedMessage());
}
return null;
}
代码示例来源:origin: top.wboost/common-context
@Override
protected void registerComponents(XmlReaderContext readerContext, Set<BeanDefinitionHolder> beanDefinitions,
Element element) {
super.registerComponents(readerContext, beanDefinitions, element);
if (Boolean.parseBoolean(
PropertiesUtil.getProperty(ConfigForBase.PropertiesConfig.IS_DEBUG, "properties/config.properties"))) {
StringBuilder sb = new StringBuilder();
beanDefinitions.forEach(bean -> {
sb.append(bean.getBeanName() + ":" + JSONObject.toJSONString(bean.getAliases()) + "\n");
});
log.info(sb.toString());
}
}
代码示例来源:origin: top.wboost/common-utils
/**
* 根据类的读方法获取写方法
* @param clazz 要获取的类
* @param method 对应的读方法
* @return 对应的写方法
*/
public static Method getWriteMethodByRead(Class<?> clazz, Method method) {
try {
Assert.notNull(clazz);
Assert.notNull(method);
String methodName = method.getName();
if (methodName.startsWith(MethodPrefix.get.toString())) {
String fieldName = methodName.substring(3);
char cha = Character.toLowerCase(fieldName.charAt(0));
return getWriteMethod(clazz, String.valueOf(cha) + fieldName.substring(1));
}
} catch (Exception e) {
log.info("getWriteMethod ERROR: {}", e.getLocalizedMessage());
}
return null;
}
代码示例来源:origin: top.wboost/common-utils
/**
* 获得类的所有写方法
* @param clazz 要获取的类
* @return 写方法集合
*/
public static List<Method> getAllWriteMethod(Class<?> clazz, String... ignoreFieldNames) {
List<Method> methodList = new ArrayList<>();
try {
Field[] fields = findFields(clazz);
Set<String> set = null;
if (ignoreFieldNames != null && ignoreFieldNames.length > 0) {
set = new HashSet<>();
Collections.addAll(set, ignoreFieldNames);
}
for (Field field : fields) {
if ("serialVersionUID".equals(field.getName()))
continue;
if (set == null || set.contains(field.getName())) {
Method readMethod = ReflectUtil.getWriteMethod(clazz, field.getName());
if (readMethod == null)
continue;
methodList.add(readMethod);
}
}
} catch (Exception e) {
log.info("getAllWriteMethod ERROR: {}", e.getLocalizedMessage());
}
return methodList;
}
代码示例来源:origin: top.wboost/common-web
protected void autowired(BaseJpaServiceImpl service) {
Class<?> clazz = ClassUtils.getUserClass(service);
if (clazz.getSimpleName().indexOf("ServiceImpl") == -1) {
throw new SystemException("服务层类名必须以ServiceImpl结尾");
}
String className = clazz.getSimpleName().substring(0, clazz.getSimpleName().indexOf("ServiceImpl"));
className = Character.toLowerCase(className.charAt(0)) + className.substring(1, className.length());
String defaultBeanName = className + "Repository";
Object repository = SpringBeanUtil.getBean(defaultBeanName);
if (repository == null) {
log.warn("cant find bean:" + defaultBeanName + ",please check");
return;
}
if (repository instanceof BaseRepository) {
BaseRepository<?, ?> findRepository = (BaseRepository<?, ?>) repository;
log.info("auto config bean: " + defaultBeanName + " to service:" + clazz.getName());
service.setRepository(findRepository);
} else {
throw new BeanNotFindException(defaultBeanName, BaseRepository.class);
}
}
代码示例来源:origin: top.wboost/common-datasource-spring-boot-starter
primaryTransactionManager = new DataSourceTransactionManager(this.beanFactory
.getBean(GlobalForDataSourceBootStarter.PRIMARY_DATASOURCE_NAME, DataSource.class));
log.info("regist primary transactionManager: {} for {}", "transactionManager",
GlobalForDataSourceBootStarter.PRIMARY_DATASOURCE_NAME);
set.remove(GlobalForDataSourceBootStarter.PRIMARY_DATASOURCE_NAME);
primaryTransactionManager = new DataSourceTransactionManager(
this.beanFactory.getBean(dsName, DataSource.class));
log.info("regist primary transactionManager: {} for {}", "transactionManager", dsName);
} else {
this.beanFactory.registerSingleton(dsName + "_TransactionManager",
new DataSourceTransactionManager(this.beanFactory.getBean(dsName, DataSource.class)));
log.info("regist transactionManager: {} for {}", dsName + "_TransactionManager", dsName);
代码示例来源:origin: top.wboost/common-web
@Override
public JSONObject convert(String source) {
if (StringUtil.notEmpty(source)) {
try {
return JSONObject.parseObject(source);
} catch (Exception o_o) {
log.info("parse JSONObject error! source is {}", source);
throw new BusinessCodeException(SystemCode.PARSE_ERROR.getCode()).setPromptMessage("JSONObject",
source);
}
}
return null;
}
代码示例来源:origin: top.wboost/common-kylin
private Callback checkResult(ResponseEntity<String> responseBody) {
if (responseBody.getStatusCode() != HttpStatus.OK) {
if (responseBody.getStatusCode() == HttpStatus.UNAUTHORIZED) {
if (!checkAuthentication()) {
log.info("kylin UNAUTHORIZED ,now doAuthentication");
if (doAuthentication()) {
log.info("restart executeQuery");
return Callback.RESTART;
}
} else {
log.error("UNAUTHORIZED");
throw new KylinAuthenticationException(String.valueOf(responseBody.getStatusCodeValue()));
}
} else if (responseBody.getStatusCode() == HttpStatus.NOT_FOUND) {
throw new KylinConnectionException(responseBody.getStatusCode(), responseBody.getBody());
} else {
log.error("error,responseBody is " + responseBody);
}
} else {
return Callback.RETURN;
}
throw new KylinUnKnowException("responseBody is : " + responseBody);
}
代码示例来源:origin: top.wboost/common-web
protected void autowired(BaseJpaServiceImpl service) {
Class<?> clazz = ClassUtils.getUserClass(service);
Object repository = null;
Class<?> genericInterfaces = ReflectUtil.getGenericInterfaces(clazz, 1);
repository = SpringBeanUtil.getBean(genericInterfaces);
String defaultBeanName = null;
if (repository == null) {
if (clazz.getSimpleName().indexOf("ServiceImpl") == -1) {
throw new SystemException("服务层类名必须以ServiceImpl结尾");
}
String className = clazz.getSimpleName().substring(0, clazz.getSimpleName().indexOf("ServiceImpl"));
className = Character.toLowerCase(className.charAt(0)) + className.substring(1, className.length());
defaultBeanName = className + "Repository";
repository = SpringBeanUtil.getBean(defaultBeanName);
if (repository == null) {
log.warn("cant find bean:" + defaultBeanName + ",please check");
return;
}
} else {
defaultBeanName = genericInterfaces.getName();
}
if (repository != null && repository instanceof BaseRepository) {
BaseRepository<?, ?> findRepository = (BaseRepository<?, ?>) repository;
log.info("auto config bean: " + defaultBeanName + " to service:" + clazz.getName());
service.setRepository(findRepository);
} else {
throw new BeanNotFindException(defaultBeanName, BaseRepository.class);
}
}
代码示例来源:origin: top.wboost/common-kylin
@Override
public synchronized boolean doAuthentication() {
ResponseEntity<String> responseBody = HttpClientUtil.execute(
HttpRequestBuilder.post(kylinUrl + API + AUTHENTICATION).setHeader(kylinAuth.getAuthenticationHeader()),
httpClient);
if (responseBody.getStatusCode() != HttpStatus.OK) {
throw new KylinAuthenticationException(String.valueOf(responseBody.getStatusCodeValue()));
} else {
log.info("kylin connection and authentication ok");
return true;
}
}
代码示例来源:origin: top.wboost/common-web
@Override
public JSONArray convert(String source) {
if (StringUtil.notEmpty(source)) {
try {
return JSONObject.parseArray(source);
} catch (Exception o_o) {
log.info("parse JSONArray error! source is {}", source);
throw new BusinessCodeException(SystemCode.PARSE_ERROR.getCode()).setPromptMessage("JSONArray", source);
}
}
return null;
}
内容来源于网络,如有侵权,请联系作者删除!