学习写代码呀

导航

2019年12月27日 #

oracle新增的一条数据,用项目接口查不出来

摘要: oracle新增的一条数据,用项目接口查不出来。可能的原因和解决办法: 1、oracle数据库能查询出来,项目查不出来。可能是执行sql的时候没有提交事务,oracle数据不支持自动提交事务。 2、检查项目连接数据库的配置文件有没有问题。配置文件是不是正确 3、就是我遇到的这种,突然就查不出来了。实 阅读全文

posted @ 2019-12-27 10:29 学习写代码呀 阅读(676) 评论(0) 推荐(0) 编辑

eclipse查看第三方jar源码

摘要: 1、eclipse里面安装jd插件 2、eclipse-preference-editors-file associations 编辑*.class without source 新增jd gui.exe,设置为默认编辑器。 阅读全文

posted @ 2019-12-27 10:23 学习写代码呀 阅读(299) 评论(0) 推荐(0) 编辑

2019年12月9日 #

No qualifying bean of type 'org.apache.ibatis.session.SqlSession' available

摘要: 1、可能是SqlSessionFactoryBean配置错误 <bean id="mySqlSessionFactory" class="org.mybatis.spring.SqlSessionFactoryBean"> <property name="dataSource" ref="dataS 阅读全文

posted @ 2019-12-09 16:11 学习写代码呀 阅读(5727) 评论(0) 推荐(0) 编辑

SpringMVC返回字符串中文乱码

摘要: @ResponseBody @RequestMapping(value = "/save") public String callSomeone() { return "保存成功"; }显示乱码设置了CharacterEncodingFilter为UTF-8,方法一:指定RequestMapping 阅读全文

posted @ 2019-12-09 14:21 学习写代码呀 阅读(1114) 评论(0) 推荐(0) 编辑

Incorrect string value: '\xE9\x98\xBF\xE4\xBE\x9D...' for column 'pname' at row 1乱码问题

摘要: Incorrect string value: '\xE9\x98\xBF\xE4\xBE\x9D...' for column 'pname' at row 1乱码问题 解决方式: 1、简单粗暴:把mysql表的乱码的那个字段编码改成utf8 2、用软件改变表的编码为utf8;或者用sql语句 3 阅读全文

posted @ 2019-12-09 14:21 学习写代码呀 阅读(2919) 评论(0) 推荐(0) 编辑

java.lang.UnsupportedOperationException at org.apache.ibatis.reflection.wrapper.CollectionWrapper.findProperty(CollectionWrapper.java:42)

摘要: UserMapper.xml配置有问题: 返回List需要另外配置resultMap public List<User> queryAll(); <mapper namespace="com.ssm.dao.UserDao"><!-- 自定义返回结果集 --> <resultMap id="user 阅读全文

posted @ 2019-12-09 14:20 学习写代码呀 阅读(957) 评论(0) 推荐(0) 编辑

No mapping found for HTTP request with URI [/ssmDemo/test] in DispatcherServlet

摘要: 可能的问题: 1、访问路径有问题 2、没有扫描到注解 解决方法: 配置文件:开启注解,扫描到@Controller和@RequestMapping <context:component-scan base-package="com" /> <!-- 扩充了注解驱动,可以将请求参数绑定到控制器参数 - 阅读全文

posted @ 2019-12-09 14:20 学习写代码呀 阅读(2713) 评论(0) 推荐(0) 编辑

Failed to convert property value of type 'org.apache.ibatis.session.defaults.DefaultSqlSessionFactory' to required type 'java.lang.String' for property 'sqlSessionFactoryBeanName';

摘要: <bean id="mySqlSessionFactoryBean" class="org.mybatis.spring.SqlSessionFactoryBean"> <property name="dataSource" ref="dataSource" /> <!-- 自动扫描mapping. 阅读全文

posted @ 2019-12-09 11:02 学习写代码呀 阅读(698) 评论(0) 推荐(0) 编辑

Could not resolve XML resource [null] with public ID [-//Sun Microsystems, Inc.//DTD Web Application

摘要: 创建项目时自动生成的web.xml配置文件头,是2.3的,改成2.5以及以上版本需要更换格式成: <?xml version="1.0" encoding="UTF-8"?><web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 阅读全文

posted @ 2019-12-09 10:57 学习写代码呀 阅读(689) 评论(0) 推荐(0) 编辑

2019年11月7日 #

操作数据库的几种CURD方式

摘要: 1、Hibernate 通过获取session, private void addUser(){ //建立持久化对象 Users user=new Users(); user.setLoginName("Haige"); user.setLoginPwd("123456"); //1.初始化,读取配 阅读全文

posted @ 2019-11-07 15:18 学习写代码呀 阅读(901) 评论(0) 推荐(0) 编辑