01 2021 档案
摘要:spring boot 获取ip 地址 按照我这个代码,如果有代理过的,基本也能获取到IP地址。 public String getRemoteHost(HttpServletRequest request) { String ip = request.getHeader("x-forwarded-
阅读全文
posted @ 2021-01-22 09:10
代码召唤师
摘要:CentOS Java 服务 jar 文件 启动脚本 文件名称:xxx-server.sh #!/bin/sh xxx=/home/xxx/server/xxx-0.0.1.jar xxx_log=/home/xxx/server/logs/xxx.log xxx_pid=/home/xxx/ser
阅读全文
posted @ 2021-01-21 13:46
代码召唤师
摘要:插件:Alibaba Cloud Toolkit 在IDEA中打开插件下载页面 介绍:阿里提供的很好用。腾讯也有,但是腾讯的只能用在腾讯云服务器。阿里的允许你用在自己的服务器上,赞👍。 腾讯的插件名称:Tencent Cloud Toolkit 安装 开发平台:IDEA 位置:File → Set
阅读全文
posted @ 2021-01-21 11:43
代码召唤师
摘要:spring boot mybatis plus 多数据库 多数据源 DataSourceConfig package com.xxx.xxx.config; import org.springframework.beans.factory.annotation.Qualifier; import
阅读全文
posted @ 2021-01-21 10:53
代码召唤师
摘要:Result package com.xxx.xxx.api; import lombok.Data; import lombok.experimental.Accessors; import java.io.Serializable; import java.time.LocalDateTime;
阅读全文
posted @ 2021-01-21 10:12
代码召唤师
摘要:spring boot 全局异常处理 package com.xxx.xxx.config; import com.xxx.xxx.api.Result; import lombok.extern.log4j.Log4j2; import org.springframework.web.bind.a
阅读全文
posted @ 2021-01-21 10:04
代码召唤师
摘要:spring boot 跨域 package com.xxx.xxx.config; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configura
阅读全文
posted @ 2021-01-21 09:59
代码召唤师
摘要:Spring Boot 定时任务 使用 注解 @Scheduled package com.xxx.xxx; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Autowired
阅读全文
posted @ 2021-01-21 09:53
代码召唤师
摘要:错误内容 2021-01-21 08:45:51.971 INFO 16148-[tbeatExecutor-0] com.netflix.discovery.DiscoveryClient:DiscoveryClient_TEST/localhost:test:8081 - Re-register
阅读全文
posted @ 2021-01-21 09:02
代码召唤师

浙公网安备 33010602011771号