- 博客(14)
- 收藏
- 关注
原创 使用 springdata MongoRepository,项目启动报错
OnlineFeedbackRepo继承MongoRepository/** * 在线反馈实体仓库 */public interface OnlineFeedbackRepo extends MongoRepository<OnlineFeedback, String> {}service注入OnlineFeedbackRepo@Slf4j@Servicepublic class OnlineFeedbackServiceImpl implements OnlineFeedb
2022-01-18 22:42:10
1202
原创 本地虚拟机搭建nacos集群
本地虚拟机搭建nacos集群准备工作准备好三台服务器:192.168.91.129192.168.91.130192.168.91.131nacos所需环境:jdk1.8、mysql8.0安装jdk1.8三台机器安装jdk1.81、安装之前先卸载linux下自带的openjdk,可以用 java -version命令查看`openj`dk version "1.8.0_262"` `OpenJDK Runtime Environment (build 1.8.0_262-b
2021-10-17 17:14:52
835
原创 使用Mybatis generator生成mybatis 动态SQL代码
使用Mybatis generator生成mybatis 动态SQL代码加入相关依赖<dependency> <groupId>org.mybatis.dynamic-sql</groupId> <artifactId>mybatis-dynamic-sql</artifactId> <version>1.1.4</version></dependency><!-- MyB
2021-09-12 10:13:29
1765
原创 面试:mysql 中where 字段 is null 会使用到索引吗?
面试:xxx是索引字段,那么mysql 中where xxx is null 会使用到索引吗?答案:如果索引字段设置的是可以为空的情况下,是可以使用到索引的。验证:CREATE TABLE `department` (`id` int(10) NOT NULL COMMENT 'id' ,`depname` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci ***NOT NULL*** COMMENT '部门名称' ,`depp
2021-08-23 21:30:51
1859
原创 idea中springboot项目下的 META-INF下配置文件未被读取
场景:我需要将A项目下的META-INF.config 下的local.properties 文件拷贝到B项目。第一次拷贝:鼠标右键复制、粘贴,粘贴到B项目后,发现拷贝出的文件是config以及config文件下的local.properties。没有把META-INF文件夹拷贝过来。第一次解决:鼠标右键选中 config ——> Refactor——>Rename改名字 在config前边加上META-INF.(之前改包名也是这样该)这样改完之后,重启项目,local.proper
2021-06-10 16:00:37
5168
1
原创 对Spring Data JPA中的page对象下的content属性里的实体类对象转换为dto对象
对Spring Data JPA中的page对象下的content属性里的实体类对象转换为dto对象。刚开始试遍历content,进行转换,添加到新的list中,再set进去page。后来发现page没有提供setContent方法。后来发现page有个map方法,看了下源码介绍,试了下可以。之前写法: Specification<ProcessFormView> pageSpecification = builder.generateSpecification();
2020-09-03 17:14:22
5135
7
原创 rabbitMq中使用topic进行消息传递时,设置routingkey失效问题
消息提供者发送消息时会携带routingKey。消息消费者接收消息时会接收事前设置好的routingkey进行接收。发送消息: String routingKey="test"+".test22"+".test3"; rabbitTemplate.convertAndSend(TopicCallbackConfig.EXCHANGE,routingKey, message, correlationData);接收消息设置绑定的routingkey:@Bean
2020-07-28 22:52:22
2961
1
原创 springBoot与freemarker整合后,项目打成Jar包后Freemarker找不到模板的问题
问题介绍springBoot与freemarker整合后,本地测试没有问题,提交到服务器上时。报错获取不到resource/templates的模板:020-07-01 10:52:38 freemarker.template.TemplateNotFoundException: Template not found for name “basicProcessTemplate.ftl”.2020-07-01 10:52:38 The name was interpreted by this T.
2020-07-01 21:52:20
8096
5
原创 springboot项目配置idea的run/debug configurations
springboot项目配置idea的run/debug configurations远程代码克隆到本地后, idea配置 add configuration 2 点击进去后,选择 + 号,然后再选择 springboot , 选择springboot的启动类,这时你发现是没有启动类让选的(我之前红框的springboot启动类是没有的)3 这时因为idea没有识别到该项目是sp...
2020-04-21 11:50:52
28190
4
原创 service层报错找不到方法Invalid bound statement (not found)
问题 :service层报错找不到方法Invalid bound statement (not found)尝试解决方法:mapper.xml的namespace要写所映射接口的全称类名。mapper.xml中的每个statement的id要和接口方法的方法名相同mapper.xml中定义的每个sql的parameterType要和接口方法的形参类型相同mapper.xml中定义的每个...
2020-04-02 09:10:58
1764
1
原创 eureka服务端启动时候报错Cannot execute request on any known server
eureka服务端启动时候报错: Cannot execute request on any known server ## 解决 网上搜出来很多,都是在说,修改配置文件 禁止服务端自己注册自己eureka.client.registerWithEureka=falseeureka.client.fetchRegistry=false但是我的配置文件设置的都是false,...
2019-11-23 10:03:29
471
原创 kafka 本地编写 生产者发送消息失败
本地编写生产者运行后,报错: log4j:WARN No appenders could be found for logger (kafka.utils.VerifiableProperties).log4j:WARN Please initialize the log4j system properly.Exception in thread "main" kafka.common.Fa...
2019-04-22 16:32:24
2003
原创 storm作业提交到storm集群时,应该注意的地方
本地编写storm作业代码时用的storm-core依赖要和集群上依赖一致,否则会报版本错误。<?xml version="1.0" encoding="UTF-8"?>4.0.0<groupId>com.jun.storm</groupId><artifactId>stormCount</artifactId><ver...
2019-04-19 10:14:04
282
原创 storm启动报错,storm-ui界面显示不正常
第一个问题: 启动失败,访问:8080,storm-ui界面,显示“无法访问此网站”解决方法 查看报错信息:The storm client can only be run from within a release. You appear to be trying to run the client from a checkout of Storm's source code.You c...
2019-04-17 17:27:51
2776
1
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人