发表于: 2017-08-07 21:59:35

2 1100


今天完成的事情:

1. SSM完成

2. 完成service和dao的单元测试

3.把WEB的网页放入项目,能正常访问,并小部分的把静态资源改为动态


明天计划的事情:

1. 深入学习JSP(以前没看明白)

2. 尝试替换一部分静态资源


遇到的问题:

1. jsp打开后乱码中文为????

在jsp上方加入:

<%@ page contentType="text/html;charset=UTF-8" language="java" %>

2. mybatis莫名奇妙的问题:

org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.reflection.ReflectionException: There is no getter for property named 'status' in 'class java.lang.Integer'

百度后发现:

<select id="selectStudentNumber" parameterType="java.lang.Integer" resultType="java.lang.Integer">
 SELECT
COUNT(id)
FROM student
<where>
 <if test="status != -1">
  status = #{status,jdbcType=INTEGER}
</if>
 </where>
</select>


status变为

_parameter

不报错,莫名其妙



收获:

1. 把WEB的网页放入项目,能正常访问,并小部分的把静态资源改为动态



2。 SSM完成

发现了新的知识点

    @Resource

    private StudentMapper studentMapper;

    @Resource完成了@Autowired的工作ApplicationContext ctx;

放在spring.xml的配置,@Resource需要它才可以完成

    <context:component-scan base-package="task.jnshu"/>



精简了代码

去除了jdbc.properties需要通过appliCation.xml才能和spring.xml联系起来。


3.用了一把动态SQL语句

<select id="selectStudentNumber" parameterType="java.lang.Integer" resultType="java.lang.Integer">
 SELECT
COUNT(id)
FROM student
<where>
 <if test="_parameter!= -1">
  status = #{_parameter,jdbcType=INTEGER}
</if>
 </where>


当status为-1是查询学生的数量。

当不唯一是根据条件:0为已经结业的1为在学的查询其数量



进度: 

         任务开始时间:8.6

         预计完成时间:8.11

         是否有延期风险:有

                           JSP和Tag标签都不理解,没有基础,得看看才行

 

禅道:http://task.ptteng.com/zentao/project-task-264-unclosed.html

                          


PS:我估计任务4我要卡一卡了



返回列表 返回列表
评论

    分享到