# FAQ

# log日志编译错误

编译提示log.info等日志错误

TIP

检查是否安装lombok插件 idea安装lombok eclipse安装lombok

# 启动报错

Failed to register application as Application

Failed to register application as Application(name=spring-boot-plus, managementUrl=http://127.0.0.1:8888/api/actuator, healthUrl=http://127.0.0.1:8888/api/actuator/health, serviceUrl=http://127.0.0.1:8888/api) at spring-boot-admin ([http://127.0.0.1:8000/instances]): I/O error on POST request for "http://127.0.0.1:8000/instances": Connection refused (Connection refused); nested exception is java.net.ConnectException: Connection refused (Connection refused). Further attempts are logged on DEBUG level

先启动Spring Boot Admin Server

admin server启动不是必须的,不启动,不影响项目运行

# Long类型精度丢失问题解决

bootstrap/src/main/java/io/geekidea/springbootplus/config/JacksonConfig.java



 
 

    SimpleModule simpleModule = new SimpleModule();
    // Long类型序列化成字符串,避免Long精度丢失
    simpleModule.addSerializer(Long.class, ToStringSerializer.instance);
    simpleModule.addSerializer(Long.TYPE, ToStringSerializer.instance);

导入jackson包

import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;

导入Jackson ToStringSerializer包