SPRING BOOT 第2页
CentOS7将SpringCloud服务配置成后台服务并设置开机自启的N种方式-Ddmit

CentOS7将SpringCloud服务配置成后台服务并设置开机自启的N种方式

1. 环境说明 * CentOS Linux release 8.2.2004 (Core) 2. 配置方式 2.1 运行shell脚本的方式 1)创建脚本 在/usr/bin目录下创建脚本,比如我的脚本名为/usr/bin/ruoyi-gen.sh,内容如下: #!/bi...
ddmit的头像-DdmitDdmit5年前
020270
@Component使用@Autowired注入失败报空指针异常-Ddmit

@Component使用@Autowired注入失败报空指针异常

在使用@Component注解的工具类中,注入RestTemplate和读取nacos配置@Value注解读取失败。解决办法是使用@PostConstruct注解进行初始化。 @Component public class SmsUtil { private static Sms...
ddmit的头像-DdmitDdmit4年前
017190
Spring Boot读取jar包文件错误解决-Ddmit

Spring Boot读取jar包文件错误解决

从jar包中读取classpath下文件出错: java.io.FileNotFoundException: class path resource [conf/sendofd.xml] cannot be resolved to absolute file path because it does not reside in the ...
ddmit的头像-DdmitDdmit5年前
016770
SpringBoot实现FTP文件下载及预览功能-Ddmit

SpringBoot实现FTP文件下载及预览功能

SpringBoot将文件上传到FTP之后,后续的在前端进行文件的下载及预览实现方式如下: 前端代码 // 根据文件路径和文件名进行下载 function downLoadFile(filePath, fileName) { // 后台获取文件 v...
ddmit的头像-DdmitDdmit5年前
016150
Spring Boot注解@PostConstruct含义-Ddmit

Spring Boot注解@PostConstruct含义

Spring Boot项目中使用@PostConstruct注解的作用是什么呢? 参考: 注解@PostConstruct与@PreDestroy详解及实例 @PostConstruct Why use @PostConstruct?
ddmit的头像-DdmitDdmit5年前
015930
Spring BOOT三步入门-Ddmit

Spring BOOT三步入门

三步开始一个Spring Boot项目: 1.官网生成框架代码 访问 https://start.spring.io/,添加自己需要的依赖,这里添加web依赖,如下图: 2.新建一个RestController 使用IDEA,File->Open打开解...
ddmit的头像-DdmitDdmit5年前
015360