订单、退款中心错误日志集

订单、退款中心错误日志

一、swagger启动访问Illegal DefaultValue null for parameter type integer

i.s.m.p.AbstractSerializableParameter [getExample] [TxId: fbdef50e9a010e4b] 
- Illegal DefaultValue null for parameter type integer
java.lang.NumberFormatException: For input string: ""
	at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65) ~[?:1.8.0_181]
	at java.lang.Long.parseLong(Long.java:601) ~[?:1.8.0_181]
	at java.lang.Long.valueOf(Long.java:803) ~[?:1.8.0_181]

修正

    @ApiModelProperty(value = "描述", example = "示例")
    private Integer val;

参数@ApiModelProperty注解在Integer类型参数使用时需添加example属性值

二、打包警告:Generating equals/hashCode implementation but without a call to superclass, even though this class does not extend java.lang.Object. If this is intentional, add ‘@EqualsAndHashCode(callSuper=false)’ to your type.

^
D:\MRXS\fs-tiangou\fs-tiangou-api\src\main\java\com\mrfresh\tiangou\param\refund\RefundPageParam.java:10: 
警告: Generating equals/hashCode implementation but without a call to superclass, even though this class does not extend java.lang.Object. If this is intentional, add '@EqualsAndHashCode(callSuper=false)' to your type.
@Data
^

修正
根据提示添加以下直接就行,也可忽略不计。

@EqualsAndHashCode(callSuper=false)

三、启动异常:XXX.FeignClientSpecification’, defined in null, could not be registered. A bean with that name has already been defined in null and overriding is disabled.

Description:
The bean 'xxxx.FeignClientSpecification', defined in null, could not be registered. A bean with that name has already been defined in null and overriding is disabled.
Action:
Consider renaming one of the beans or enabling overriding by setting spring.main.allow-bean-definition-overriding=true

修正
根据需要进行选择方案

方案一:@FeignClient(…, contextId = “xxxx”,…) contextId与其它重名,修正contextId的值,建议以对应的Feign为contextId。
方案二:如果某与某个不需要的包重名,全局排除对应的包即可。

四、启用异常:Could not resolve placeholder ‘order.order_timeout’ in value “${order.order_timeout}”

Caused by: java.lang.IllegalArgumentException: Could not resolve placeholder 'order.order_timeout' in value "${order.order_timeout}"
	at org.springframework.util.PropertyPlaceholderHelper.parseStringValue(PropertyPlaceholderHelper.java:178) ~[spring-core-5.1.7.RELEASE.jar:5.1.7.RELEASE]
	at org.springframework.util.PropertyPlaceholderHelper.replacePlaceholders(PropertyPlaceholderHelper.java:124) ~[spring-core-5.1.7.RELEASE.jar:5.1.7.RELEASE]
	at org.springframework.core.env.AbstractPropertyResolver.doResolvePlaceholders(AbstractPropertyResolver.java:237) ~[spring-core-5.1.7.RELEASE.jar:5.1.7.RELEASE]
	at org.springframework.core.env.AbstractPropertyResolver.resolveRequiredPlaceholders(AbstractPropertyResolver.java:211) ~[spring-core-5.1.7.RELEASE.jar:5.1.7.RELEASE]

原因:相关配置不存在
修正
根据需要进行选择方案

方案一:

    @Value("${order.order_timeout:10}")
    private int orderTimeout;

方案二:加上对应的配置

五、启动异常:No qualifying bean of type ‘com.mrfresh.order.mysql.mapper.OrderStatusLogMapper’ available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)}

Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'com.mrfresh.order.mysql.mapper.OrderStatusLogMapper' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)}

原因:服务jar出现循环依赖
修正
使用transitive = false,刷新一下依赖,启动。
如果启动失败,请删除本地缓存jar,然后再刷新依赖,启动。
如果失败:目前还没有遇到,遇到再补充。

六、访问数据库异常

1、Invalid bound statement (not found)

该问题出现在sql语句:排查是否编写sql语句。

2、Data truncation: Out of range value for column ‘huid’ at row 1

该异常出现在字段的长度和类型与数据库中的字段不匹配,调整数据字段长度或类型、更改代码使之与数据库类型一致即可。
其它后续添加

评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值