Sringboot
Springboot
啊谋如风
这个作者很懒,什么都没留下…
展开
-
springboot注解之:@SpringBootApplication
项目jar部署到linux服务器上远腾飞 2019-04-23 19:37:47 26555 收藏 77分类专栏: 部署版权部署专栏收录该内容2 篇文章0 订阅订阅专栏将spring boot项目打包成jar部署到linux上就可以通过ip地址访问该项目一.将项目打包成jar(IDEA)由于项目要设置访问端口号,这里来说一下spring boot项目怎么设置端口号如图所示:在application.properties这个文件中加入(端口多少由你自己设置,笔者的是8203)..原创 2022-02-25 14:47:36 · 229 阅读 · 0 评论 -
springboot从自定义配置文件中取值
springboot从自定义配置文件中取值1.自定义文件selfdefine.properties:pdf.templatePath=E:\\shengtingPDF\\src\\main\resources\\pdflocation\\pdf.newPDFPath=E:\\shengtingPDF\\src\\main\resources\\pdflocation\\pdf.fontpath=c://windows//fonts//simsun.ttc2.创建获取类:Pdf.class原创 2022-02-25 11:30:33 · 985 阅读 · 0 评论 -
@Repeatable注解
/** * The annotation type {@code java.lang.annotation.Repeatable} is * used to indicate that the annotation type whose declaration it * (meta-)annotates is <em>repeatable</em>. The value of * {@code @Repeatable} indicates the <em>co..原创 2022-02-11 10:33:19 · 346 阅读 · 0 评论 -
dataxweb部署步骤(仅自己记录,情况也许不一样)
1.前端打包,npm run build:prod,打包完后把打的包移到后端的datax-admin下resourses下的statistic中:2.后端打包:3.打包完后把后端的报上传到服务器并且解压4.到这里编译:运行命令:./install.sh做选择题,答案是 三个y一个n一个y(第一次编译的时候是四个y)5.到服务器上需要修改的地方: 5.1java的位置:在/home/liting/dataxweb2022-2-7/datax-web-2....原创 2022-02-07 15:56:28 · 1362 阅读 · 0 评论 -
SpringContextUtils.getBean(XXX)报空指针
我的原因是SpringContextUtils.getBean(XXX),getBean的目标类没加注解,所以没被扫描到报空指针的错误。在目标类上加上注解(我的是mapper上加上@Mapper)就好了原创 2022-02-07 15:09:27 · 3684 阅读 · 0 评论 -
写一个必传参数校验工具类
需要依赖:1.(使用alibab的fastjson 把对象转成json的时候会自动去掉值为null的字段,所以用下面这个jackson依赖)2.apache工具包 <dependency> <groupId>com.fasterxml.jackson.datatype</groupId> <artifactId>jackson-datatype-guava</artifactId原创 2021-11-04 15:11:33 · 270 阅读 · 0 评论 -
@PostConstruct 注解方法下的Springutils(获取容器中的bwan).getBean时报空指针异常
@PostConstruct ,getBean时报空指针异常发生场景:springboot项目启动时读取数据库中的计划任务,加入到定时任务缓存中等待执行,完成这个功能的方法使用了@PostConstruct 修饰@Servicepublic class TaskPlanService ... ... @PostConstruct public void initTaskScheduled() { //它会在这里调用相应的方法 } ...转载 2021-10-28 15:31:31 · 2047 阅读 · 1 评论 -
SpringBoot缓存详解
SpringBoot缓存详解互联网编程关注12019.04.03 11:01:43字数 1,631阅读 1,894一:Spring缓存抽象Spring从3.1开始定义了org.springframework.cache.Cache和org.springframework.cache.CacheManager接口来统一不同的缓存技术;并支持使用JCache(JSR-107)注解简化我们开发; Cache接口为缓存的组件规范定义,包含缓存的各种操作集合; Cache接口下Sp转载 2021-10-28 10:56:41 · 7944 阅读 · 0 评论 -
springboot配置tdengine数据源运行sql出错:; this operation is NOT supported currently!; nested exception is jav
原因:tdengine 的版本太低,我的版本是2.0.18 更新成2.0.31即可:原创 2021-10-12 18:29:18 · 1569 阅读 · 0 评论 -
使用mybatis-generator过程
1.pom文件中加上两处: <plugin> <groupId>org.mybatis.generator</groupId> <artifactId>mybatis-generator-maven-plugin</artifactId> <version>1.3.2</version>原创 2021-09-23 16:35:55 · 61 阅读 · 0 评论 -
datax-web中增量配置使用querysql不生效
我在datax的web配置的时候,用的是官方给的步骤,但是我发现querysql的sql语句debug的时候是不完整的,也没仔细看,也不想仔细看,因为我觉得用where也可以,改了一下,果然是可以的,用where接传过来的时间:官方给的:这里我把querysql改成了where:...原创 2021-09-09 17:09:46 · 836 阅读 · 0 评论