本文整理了Java中top.wboost.common.log.entity.Logger.debug()
方法的一些代码示例,展示了Logger.debug()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Logger.debug()
方法的具体详情如下:
包路径:top.wboost.common.log.entity.Logger
类名称:Logger
方法名:debug
暂无
代码示例来源:origin: top.wboost/common-utils
public static void debug() {
StackTraceElement[] stacks = (new Throwable()).getStackTrace();
for (StackTraceElement stack : stacks) {
log.debug(stack.getClassName() + "-" + stack.getMethodName());
}
}
代码示例来源:origin: top.wboost/common-web
public static void loadMessageByPath(String path) {
log.debug("loadMessageByPath... {}", path);
Properties messageProperties = PropertiesUtil.loadProperties(path);
for (Entry<Object, Object> businessCode : messageProperties.entrySet()) {
try {
Integer code = Integer.valueOf((String) businessCode.getKey());
String message = (String) businessCode.getValue();
codeMessageMap.put(code, message == null ? "" : message);
} catch (Exception e) {
log.error("key : {},value: {} ,error is : {}", businessCode.getKey(), businessCode.getValue(),
e.getLocalizedMessage());
}
}
log.debug("loadMessageByPath end...");
}
代码示例来源:origin: top.wboost/common-web
/**
* 读取配置文件信息
*/
private void loadMessage() {
log.debug("init code and message...");
Properties messageProperties = PropertiesUtil.loadProperties(this.realMessagePath);
for (Entry<Object, Object> businessCode : messageProperties.entrySet()) {
try {
Integer code = Integer.valueOf((String) businessCode.getKey());
String message = (String) businessCode.getValue();
codeMessageMap.put(code, message == null ? "" : message);
} catch (Exception e) {
log.error("key : {},value: {} ,error is : {}", businessCode.getKey(), businessCode.getValue(),
e.getLocalizedMessage());
}
}
log.debug("init code and message end...");
}
代码示例来源:origin: top.wboost/common-boost
/**
* 执行并组装sql语句
* @param sql 要执行的sql语句
* @return
*/
protected List<Map<String, Object>> executeSqlAuto(Map<String, Object> replaceMap, String sql) {
List<String> autoFieldsName = sqlWildCardManager.getAutoFieldsNames(sql);
log.debug("auto get fieldsName:{}", autoFieldsName);
return executeSql(replaceMap, sql, autoFieldsName.toArray(new String[autoFieldsName.size()]));
}
代码示例来源:origin: top.wboost/common-sql
public String render() {
final StringBuilder buf = new StringBuilder(selectValueList.size() * 10);
final HashSet<String> uniqueAliases = new HashSet<String>();
boolean firstExpression = true;
for (SelectValue selectValue : selectValueList) {
if (selectValue.alias != null) {
if (!uniqueAliases.add(selectValue.alias)) {
log.debug("Skipping select-value with non-unique alias");
continue;
}
}
if (firstExpression) {
firstExpression = false;
} else {
buf.append(", ");
}
if (selectValue.qualifier != null) {
buf.append(selectValue.qualifier).append('.');
}
buf.append(selectValue.value);
if (selectValue.alias != null) {
buf.append(" as ").append(selectValue.alias);
}
}
return buf.toString();
}
}
代码示例来源:origin: top.wboost/common-boost
/**
* 执行sql语句
* @param sql 要执行的sql语句
* @return
*/
protected List<?> executeSql(Map<String, Object> replaceMap, String sql) {
String executeSql = replaceSql(replaceMap, sql);
log.debug("execute sql : {}", executeSql);
try {
return jdbcExecutor.findModeResult(executeSql);
} catch (SQLException e) {
throw new RuntimeException(e);
}
}
代码示例来源:origin: top.wboost/common-web
public HttpRequestBuilder addParameter(final String name, final String value, Boolean canEmpty) {
if ((!canEmpty) && (!StringUtil.notEmpty(value))) {
if (log.isDebugEnabled()) {
log.debug("{} cant empty and value is empty. ignore", name);
return this;
}
}
return addParameter(new BasicNameValuePair(name, value));
}
代码示例来源:origin: top.wboost/common-web
@Override
public boolean checkParameter(Method domethod, Object[] args) {
Annotation[][] paramsAnnotationsArray = domethod.getParameterAnnotations();
for (int i = 0; i < paramsAnnotationsArray.length; i++) {
Annotation[] paramAnnotationsArray = paramsAnnotationsArray[i];
for (int j = 0; j < paramAnnotationsArray.length; j++) {
Annotation paramAnnotation = paramAnnotationsArray[j];
if (paramAnnotation.annotationType().isAnnotationPresent(ParameterConfig.class)) {
ParameterConfigChecker checker = parameterConfigMap.get(paramAnnotation.annotationType());
log.debug("get checker:{}", checker);
if (checker == null) {
throw new BusinessException();
}
if (!checker.check(args[i], paramAnnotation,
parameterNameDiscoverer.getParameterNames(domethod)[i])) {
return false;
}
}
}
}
return true;
}
代码示例来源:origin: top.wboost/common-web
@SuppressWarnings("unchecked")
public <T> T getRepository(Class<T> repositoryInterface, Object customImplementation) {
ProxyFactory result = new ProxyFactory();
T t = super.getRepository(repositoryInterface, customImplementation);
if (Proxy.isProxyClass(t.getClass())) {
log.debug("addAdvice for FieldsConvert");
result.setTarget(t);
result.addAdvice(new SetResultInterceptor(t));
}
return (T) result.getProxy(classLoader);
}
代码示例来源:origin: top.wboost/common-web
/**
* 有查询结果(不为null且若为map或集合则需要size大于0)
* @param object 待判断数据
* @param businessCode 返回码
*/
public static void hasRecord(Object object, int businessCode, String... promptMessage) {
boolean result = true;
if (object == null) {
result = false;
} else if (object instanceof Collection) {
Collection<?> collection = (Collection<?>) object;
if (CollectionUtil.isEmpty(collection)) {
result = false;
}
} else if (object instanceof Map) {
Map<?, ?> map = (Map<?, ?>) object;
if (map.size() == 0) {
result = false;
}
} else {
log.debug("cant decide this param : {} ,return true", object);
}
if (!result) {
throwBusinessException(businessCode, promptMessage);
}
}
代码示例来源:origin: top.wboost/common-web
propertiesVal = PropertiesUtil.getProperty(nutNullEntry.getKey(), nutNullEntry.getValue());
log.debug("find notNullMap properties : {} in {} , value is {}.", nutNullEntry.getKey(),
nutNullEntry.getValue(), propertiesVal);
if (StringUtil.notEmpty(propertiesVal)) {
propertiesVal = PropertiesUtil.getProperty(canNullEntry.getKey(), canNullEntry.getValue());
log.debug("find canNullMap properties : {} in {} , value is {}.", canNullEntry.getKey(),
canNullEntry.getValue(), propertiesVal);
if (propertiesVal == null) {
代码示例来源:origin: top.wboost/common-boost
@Override
@Explain(exceptionCode = 0, value = "boost")
public ModelAndView handle(HttpServletRequest request, HttpServletResponse response) {
if (log.isDebugEnabled()) {
log.debug("boostHandler handle...");
}
return handleInternal(request, response);
}
代码示例来源:origin: top.wboost/common-web
/**
* 方法执行之前
* @param joinPoint 目标类连接点对象
*/
@Before("explainParameterAspect()")
public void beforeAop(JoinPoint joinPoint) {
Object[] args = joinPoint.getArgs();
MethodSignature methodSignature = ((MethodSignature) joinPoint.getSignature());
Method domethod = methodSignature.getMethod();
if (log.isDebugEnabled()) {
log.debug("checkPatameter for {}", domethod);
}
manager.checkParameter(domethod, args);
}
代码示例来源:origin: top.wboost/common-web
/**
* 有查询结果(不为null且若为map或集合则需要size大于0)
* @param object 待判断数据
*/
public static void hasRecord(Object object, String... promptMessage) {
boolean result = true;
if (object == null) {
result = false;
} else if (object instanceof Collection) {
Collection<?> collection = (Collection<?>) object;
if (CollectionUtil.isEmpty(collection)) {
result = false;
}
} else if (object instanceof Map) {
Map<?, ?> map = (Map<?, ?>) object;
if (map.size() == 0) {
result = false;
}
} else {
log.debug("cant decide this param : {} ,return true", object);
}
if (!result) {
throwBusinessException(SystemCode.NO_RECORD.getCode(), promptMessage);
}
}
代码示例来源:origin: top.wboost/common-web
/**
* 根据id修改单个属性
* @date 2016年10月13日下午8:17:47
* @param id
* 修改资源id
* @param key
* 修改资源key
* @param value
* 修改资源value
*/
public void updateById(ID id, Field key, Object value) {
if (key == null) {
throw new RuntimeException("NO FIELD!");
}
T t = getBaseRepository().getOne(id);
if (t == null) {
log.debug("method:updateById entity is undefined");
return;
}
try {
ReflectUtil.getWriteMethod(t.getClass(), key.getName()).invoke(t, value);
getRepository().save(t);
} catch (Exception e) {
log.error(e.getMessage());
}
}
代码示例来源:origin: top.wboost/common-web
/**
* 根据id修改单个属性
* @date 2016年10月13日下午8:17:47
* @param id
* 修改资源id
* @param key
* 修改资源key
* @param value
* 修改资源value
*/
public void updateById(String id, Field key, Object value) {
if (key == null) {
throw new RuntimeException("NO FIELD!");
}
T t = getBaseRepository().getOne(id);
if (t == null) {
log.debug("method:updateById entity is undefined");
return;
}
try {
ReflectUtil.getWriteMethod(t.getClass(), key.getName()).invoke(t, value);
getRepository().save(t);
} catch (Exception e) {
log.error(e.getMessage());
}
}
代码示例来源:origin: top.wboost/swagger-spring-boot-starter
@Override
public void apply(RequestMappingContext context) {
List<ApiResponseDoc> annotations = context.findAnnotations(ApiResponseDoc.class);
if (annotations != null && annotations.size() > 0) {
ClassGeneratorEntity classGenerator = new ClassGeneratorEntity();
try {
if (!genMap.containsKey(annotations.get(0).value().getSimpleName())) {
classGenerator.setName("ModelShow_" + annotations.get(0).value().getSimpleName());
//classGenerator.setVisitClass(ResultEntityNoDataTemplate.class);
classGenerator.addFieldGenerator(new ClassGeneratorEntity.FieldGenerator("data", annotations.get(0).value()));
classGenerator.addFieldGenerator(new ClassGeneratorEntity.FieldGenerator("info", ResultEntityTemplate.ReturnInfoTemplate.class));
classGenerator.addFieldGenerator(new ClassGeneratorEntity.FieldGenerator("status", Integer.class));
classGenerator.addFieldGenerator(new ClassGeneratorEntity.FieldGenerator("validate", Boolean.class));
Class<?> generatorClass = ClassGenerator.generatorClass(classGenerator);
genMap.put(annotations.get(0).value().getSimpleName(), generatorClass);
}
ResolvedType modelType = context.alternateFor(typeResolver.resolve(genMap.get(annotations.get(0).value().getSimpleName())));
logger.debug("Adding return parameter of type {}", resolvedTypeSignature(modelType).or("<null>"));
context.operationModelsBuilder().addReturn(modelType);
} catch (IOException e) {
e.printStackTrace();
throw new SystemCodeException(SystemCode.DO_FAIL,"ASM CREATE ERROR! " + JSONObject.toJSONString(classGenerator));
}
}
}
}
代码示例来源:origin: top.wboost/common-kylin
/**
* 根据cube名查询project
* @param cubeName cube名
* @return {@link top.wboost.common.kylin.entity.ProjectsReadable}
*/
public static ProjectsReadable queryProjectByCubeName(String cubeName) {
List<ProjectsReadable> projectsReadableList = KylinQueryUtil
.queryList(KylinApi.createApiProjectsReadableSearch(), ProjectsReadable.class);
Checker.hasRecord(projectsReadableList);
for (ProjectsReadable projectsReadable : projectsReadableList) {
List<Realizations> realizationsList = projectsReadable.getRealizations();
if (!CollectionUtil.isEmpty(realizationsList)) {
for (Realizations realizations : realizationsList) {
if (realizations.getType().equals("CUBE") && realizations.getRealization().equals(cubeName)) {
return projectsReadable;
}
}
}
}
log.debug("not find project by cubeName : {}", cubeName);
return null;
}
代码示例来源:origin: top.wboost/common-kylin
private static Object[] executeDistinctSelect(String projectName, String sql) {
ApiSqlSearch sqlSearch = KylinApi.createApiSqlSearch(projectName, sql);
log.debug("distinct sql:{}", sqlSearch.getSql());
ApiSqlResultEntity result = KylinQueryUtil.queryByApiSql(sqlSearch);
Object[] retArray = new Object[result.getResults().size()];
for (int i = 0; i < retArray.length; i++) {
JSONArray resultOne = (JSONArray) result.getResults().get(i);
retArray[i] = resultOne.get(0);
}
return retArray;
}
代码示例来源:origin: top.wboost/common-web
@Override
public Date convert(String source) {
if (!StringUtil.notEmpty(source)) {
return null;
}
if (StringUtil.getAllPatternMattcher(source, DateUtil.DATE.PATTERN_YYYY_MM_DD_HH_MM_SS, 0) != null) {
return DateUtil.parse(source, DateUtil.DATE.YYYY_MM_DD_HH_MM_SS);
}
if (StringUtil.getAllPatternMattcher(source, DateUtil.DATE.PATTERN_YYYY_MM_DD_HH_MM, 0) != null) {
return DateUtil.parse(source, DateUtil.DATE.YYYY_MM_DD_HH_MM);
}
if (StringUtil.getAllPatternMattcher(source, DateUtil.DATE.PATTERN_YYYY_MM_DD, 0) != null) {
return DateUtil.parse(source, DateUtil.DATE.YYYY_MM_DD);
}
log.debug("cant convert :" + source);
return null;
}
内容来源于网络,如有侵权,请联系作者删除!