发表于: 2017-05-18 21:52:32
2 1153
今天所做:
今天的效率低下。理想是把任务一尽善尽美的完成,对照着任务表补漏。但从这个点跳到那个点,完成的反倒不多。
把深度思考里的问题想了一下,有关数据库数据类型的几个问题没思考过。看到建议怎么用就直接用了。思考回答就先不贴出来了。
1:

这个要求,在插入数据的时候断了网,单元测试出错了。测试异常代码可以正确执行???我好像没写这样的异常代码。
org.springframework.dao.TransientDataAccessResourceException:
### Error updating database. Cause: java.sql.SQLException: Could not retrieve transation read-only status server
### The error may involve com.dj.dao.spring.SpringStudentDao.insert-Inline
### The error occurred while setting parameters
### SQL: insert into student1 (name,type,time,school,online_id,wish,rec_senior,create_at,update_at) values (?,?,?,?,?,?,?,?,?)
### Cause: java.sql.SQLException: Could not retrieve transation read-only status server
; SQL []; Could not retrieve transation read-only status server; nested exception is java.sql.SQLException: Could not retrieve transation read-only status server
Caused by: java.sql.SQLException: Could not retrieve transation read-only status server
Caused by: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure
The last packet successfully received from the server was 19,168 milliseconds ago. The last packet sent successfully to the server was 19,167 milliseconds ago.
2:
忘记了在服务器上用maven test 是不是要先弄个jar 包到服务器上再maven test 。直接在eclipse上maven test 。
3:
这个是在用spring之前做过的,用了mybatis和spring之前的代码删掉了,这条任务要求做到什么没有领会到。只写了一个for循环,重复插数据n次。不知道怎么用线程池和连接池。
所遇问题:
从深度思考和回观任务一的小任务,发现还有挺多知识盲点的。之前的尝试很浅。
明天要做:
明天上课+考前复习。学习时间不多,把深度思考总结下。
评论