- 博客(17)
- 收藏
- 关注
原创 kafka 远程连接本地 java.net.UnknownHostException
WARN [AdminClient clientId=adminclient-1] Error connecting to node computerXU.mshome.net:9092 (id: 0 rack: null) (org.apache.kafka.clients.NetworkClient)java.net.UnknownHostException: computerXU.mshome.net at java.net.InetAddress.getAllByName0(Ine
2022-02-23 17:01:21 2262
原创 Flink CDC 实时同步mysql
1、创建环境 StreamExecutionEnvironment bsEnv = StreamExecutionEnvironment.getExecutionEnvironment(); EnvironmentSettings bsSettings = EnvironmentSettings.newInstance().useBlinkPlanner().inStreamingMode().build(); StreamTableEnvironment tEnv = Stream
2021-11-11 11:10:10 5431 2
原创 更改Mysql时区
环境:腾讯云主机CentOS部署:Docker部署进入Docker:docker exec -it 容器id bash进入mysql:mysql -u root -p密码//mysql -uroot -p密码方法1:查看Mysql时区:mysql>show variables like ‘%time_zone%’;设置为北京时间:mysql> set time_zone='+8:00';查看时间以验证:mysql> select now();方法2:可以通过修改my
2021-04-02 21:31:21 133
原创 搭建云服务器并部署Vue和SringBoot项目
1、访问域名时不输入端口号:添加端口映射当访问域名的时候,端口默认指定的是80;而80端口在Linux系统下,1024之前的端口是只有root用户才能使用的,因此我们需要映射一下端口。比如我们设置的端口是8081,因此将系统层面将端口80 映射到8081iptables -t nat -A PREROUTING -p tcp --dport 80 -j REDIRECT --to-port 8081-t nat : 指出我要操作什么表.(不写就表示filter.默认是filter)-A PRER
2021-01-25 11:39:43 311
原创 IDEA下 SpringBoot maven镜像问题解决 Could not transfer artifact org.springframework.boot:spring-boot-starte
1、mirrors标签下把镜像改为:<mirror> <id>mirrorId</id> <mirrorOf>repositoryId</mirrorOf> <name>Human Readable Name for this Mirror.</name> <url>http://my.repository.com/repo/path</url>
2020-11-12 18:44:41 1128
原创 IDEA中进行Junit单元测试时,sql语句运行了一次执行了两次
使用Mybatis,Spring时Junit单元测试时,出现sql语句运行了一次执行了两次解决方法:
2020-11-03 18:09:58 806
原创 Spring bean中数据库连接报错:java.sql.SQLException: Connections could not be acquired from the underlying dat
报错:java.sql.SQLException: Connections could not be acquired from the underlying database! c3p0数据库连接池报错:Caused by: com.mchange.v2.resourcepool.CannotAcquireResourceException: A ResourcePool could not acquire a resource from its primary factory or source.原因
2020-11-02 19:06:49 603 2
原创 Mybatis报误错: Type interface com.xu.dao.IAccountDao is not known to the MapperRegistry.
org.apache.ibatis.binding.BindingException: Type interface com.xu.dao.IAccountDao is not known to the MapperRegistry.原因是未在 SqlMapConfig.xml 中注册映射 <!-- 映射注册 指定带有注解的dao接口所在位置 --> <mappers> <package name="com.xu.dao"></packa
2020-10-31 16:13:55 258
原创 getRequestDispatcher()与sendRedirect()的区别
getRequestDispatcher()与sendRedirect()的区别1.request.getRequestDispatcher()是请求转发,前后页面共享一个request ;response.sendRedirect()是重新定向,前后页面不是一个request。request.getRequestDispather();返回的是一个RequestDispatcher对象。2.RequestDispatcher.forward()是在服务器端运行;HttpServletResp
2020-10-06 12:40:23 235 1
原创 SQL外键,java.sql.SQLException: Cannot add or update a child row: a foreign key constraint fails
十月 05, 2020 10:36:08 下午 com.alibaba.druid.support.logging.JakartaCommonsLoggingImpl info信息: {dataSource-1} initedjava.sql.SQLException: Cannot add or update a child row: a foreign key constraint fails (`book`.`t_order_item`, CONSTRAINT `t_order_item_ibfk
2020-10-05 22:47:54 349
原创 servlet页面重定向失败+使用线程池线程销毁失败等
xml servlet配置BookServlet继承BaseServlet(有doGet,doPost方法)a标签+servlet,图书管理页面转发失败正确的跳转路径:http://localhost:8080/book/manager/bookServlet?action=list实际跳转的路径:http://localhost:8080/book/pages/manager/manager/bookServlet?action=list直接输入正确路径能得到正确界面:重新启动T
2020-09-27 00:22:19 657 1
原创 1)包装类拆装箱 valueOf方法的源码 2)float f=3.4;是否正确?
public class test { @Test public void test() { Integer i1 = 100; Integer i2 = 100; Integer i3 = 200; Integer i4 = 200; System.out.println(i1 == i2); //true System.out.println(i3 == i4); //false
2020-09-24 15:46:42 188
原创 Pycharm配置Flask无法启动,报No module named flask.__main__; ‘flask‘ is a package and cannot be direct
配置详情:点击启动后的报错信息:
2020-09-23 16:01:02 5140
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人