0424工作日志
Java
1.出现循环引用的问题
***************************
APPLICATION FAILED TO START
***************************
Description:
The dependencies of some of the beans in the application context form a cycle:
servletEndpointRegistrar defined in class path resource [org/springframework/boot/actuate/autoconfigure/endpoint/web/ServletEndpointManagementContextConfiguration.class]
↓
healthEndpoint defined in class path resource [org/springframework/boot/actuate/autoconfigure/health/HealthEndpointConfiguration.class]
↓
org.springframework.boot.actuate.autoconfigure.jdbc.DataSourceHealthIndicatorAutoConfiguration
┌─────┐
| dataSource
↑ ↓
| scopedTarget.dataSource defined in class path resource [org/springframework/boot/autoconfigure/jdbc/DataSourceConfiguration$Hikari.class]
↑ ↓
| org.springframework.boot.autoconfigure.jdbc.DataSourceInitializerInvoker
└─────┘
问题描述:添加 spring-boot-starter-actuator 依赖后出现上述问题
解决:添加springcloud的配置,如下:
Spring
cloud:
refresh:
refreshable: none
2.在使用通用Mapper时出现异常
当使用selectByPrimaryID时报错,刚开始以为是有地方没有配置好,但是对于同服务中使用通用Mapper的功能都可以正常使用,只能对照代码找原因。
有的人出错找不到数据是因为没有添加@Id
在主键上,检查后发现已经添加了。
找来找去发现是主键的类型写错了,Long类型写成了long类型,结果导致报错。实在是因为粗心,记录一下吧。
C#
最近在做WCF服务,需要通过网络访问该服务,所以要配置WebHttpBinding,同时,因为要传Base64的字符串,所以还要设置最大字符串的值,这些明天再做补充吧。
今天主要完成了文件转字符串,字符串转文件以及文件压缩的问题,明天上代码。