随笔 - 30
文章 - 4
评论 - 0
阅读 -
18474
随笔分类 - java
java知识
redis远程连接错误SocketTimeoutException: connect timed out
摘要:redis远程连接错误SocketTimeoutException: connect timed out 解决方案: 编辑redis.conf文件(建议将其 先备份 编辑备份文件 启动redis服务时直接引入修改好的备份文件) 将protected-mode no 设为no 将bind 设为0.0.
阅读全文
IDEA中maven项目右侧maven图标不见了
摘要:右侧maven图标没有了 解决方法:双击shift(或者点击help-->Find Action) 打开搜索功能 > 搜素Maven Project >选择Add Maven project >选择当前项目的pom.xml文件,然后点OK 就可以了,图标就有了
阅读全文
web.xml文件报错'org.springframework.web.filter.CharacterEncodingFilter' is not assignable to 'javax.servlet.Servlet,jakarta.servlet.Servlet'
摘要:在web.xml文件中出现下列错误:'org.springframework.web.filter.CharacterEncodingFilter' is not assignable to 'javax.servlet.Servlet,jakarta.servlet.Servlet' 解决方法:
阅读全文
spring常用注解
摘要:spring的注解: @Component 次注解是写在类上面的 是将这个类交给spring管理 通用注解 为了让用户更加体现出分层架构 MVC有具体的注解 @Controller @Service @Repository(dao层的注解) @Autowired 用于bean对象的DI注入 可以放在
阅读全文
java计时器Timer
摘要:基于java的计时器,定时发送消息 package timer; import java.lang.reflect.Array; import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.
阅读全文
spring的配置文件路径错误 IOException parsing XML document from class path resource
摘要:报错提示: Exception in thread "main" org.springframework.beans.factory.BeanDefinitionStoreException: IOException parsing XML document from class path reso
阅读全文
JAVA发送Email 用于安全验证
摘要:1.基于Oracle提供的mail.jar实现发送email的方式 package com.yang.email; import javax.mail.*; import javax.mail.internet.AddressException; import javax.mail.internet
阅读全文
fatal: unable to access 'https://github.com/yangHabit/ProjectApplicationManager.git/': OpenSSL SSL_read: Connection was reset, errno 10054
摘要:可能是网络原因 git config --global --unset http.proxy git config --global --unset https.proxy
阅读全文
Try setting a different JdbcType for this parameter or a different configuration property. mybatis查询报参数错误
摘要:Request processing failed; nested exception is org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.type.TypeException: Co
阅读全文
时间格式化SimpleDateFormat
摘要:SimpleDateFormat ft = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");//设置时间展示格式 ft.format("需要格式化的时间串");
阅读全文
实体类entity的属性值自动赋值给VO
摘要:使用import org.springframework.beans.BeanUtils提供的工具类BeanUtils可以直接将同名属性值赋值 play为源对象,vo为目标对象,就是将play对象同名的属性值赋给vo对象的属性 BeanUtils.copyProperties(play,vo);
阅读全文
IDEA git提交代码 time out 及解决方法
摘要:可能是网络服务代理的问题,可以尝试在命令行输入一下两行代码
阅读全文
mybatis generator代码自动生成器
摘要:import org.mybatis.generator.api.MyBatisGenerator; import org.mybatis.generator.config.Configuration; import org.mybatis.generator.config.xml.Configur
阅读全文
springmvc实现数据的前后端传递小练习
摘要:题目: 1.从前台页面发送请求/register,并携带数据信息:tenantid=00000 & password=888888 & name=testaccount 2.后台接受数据: 判断用户名是否为testaccount,密码是否为888888; 如果验证成功,日志记录为:欢迎testacc
阅读全文
I常用IDEA快捷键
摘要:Ctrl + R 在当前文件进行批量文本替换 Ctrl + Z 撤销 Ctrl + Y 删除光标所在行 或 删除选中的行 Ctrl + X 剪切光标所在行 或 剪切选择内容 Ctrl + C 复制光标所在行 或 复制选择内容 Alt + Enter可以自动修复错误,如包的引入,补齐 override
阅读全文
原生JDBC流程
摘要:public class TestJDBC { public static void main(String[] args) throws ClassNotFoundException, SQLException { Connection connection = null; PreparedSta
阅读全文
AJAX发送请求
摘要:AJAX发送请求 var xhr = null; if(window.XMLHttpRequest){ xhr = new XMLHttpRequest();//常用的浏览器 }else{ xhr= new ActiveXobject("Microsoft.XMLHttp");//IE6 } xhr
阅读全文
IDEA文件上传乱码解决办法
摘要:1.System.out.println("中文") 输出中文时乱码 在idea配置tomcat时,在 vm 配置 -Dfile.encoding=utf-8 2.文件上传时 普通参数有中文 file.getString("utf-8") 3.文件上传时 ,上传文件的名字有中文 -- file.ge
阅读全文