发表于: 2018-02-28 23:11:29

1 726


  1. 完成

  2. 用Tiles来完成页面的复用配置

  3. 配置文件如下

  4. layout.xml

  5. <?xml version="1.0" encoding="UTF-8" ?>
    <!DOCTYPE tiles-definitions PUBLIC
           "-//Apache Software Foundation//DTD Tiles Configuration 3.0//EN"
           "http://tiles.apache.org/dtds/tiles-config_3_0.dtd">

    <tiles-definitions>
       <definition name="10" template="jsp/t10template.jsp">
           <put-attribute name="title" value=""/>
           <put-attribute name="header" value="/jsp/t10header.jsp"/>
           <put-attribute name="menu" value=""/>
           <put-attribute name="body" value="/jsp/t10body.jsp"/>
           <put-attribute name="footer" value="/jsp/t10footer.jsp"/>
       </definition>

       <definition name="11" template="jsp/t11template.jsp">
           <put-attribute name="title" value=""/>
           <put-attribute name="header" value="/jsp/t11header.jsp"/>
           <put-attribute name="menu" value=""/>
           <put-attribute name="body" value="/jsp/t11body.jsp"/>
           <put-attribute name="footer" value="/jsp/t11footer.jsp"/>
       </definition>

    </tiles-definitions>

    mvc配置文件

  6. <beans xmlns="http://www.springframework.org/schema/beans"
          xmlns:context="http://www.springframework.org/schema/context"
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xmlns:p="http://www.springframework.org/schema/p"
          xsi:schemaLocation="http://www.springframework.org/schema/beans
      http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
      http://www.springframework.org/schema/context
      http://www.springframework.org/schema/context/spring-context-3.0.xsd">

       <!-- xml配置了这个标签后,spring可以自动去扫描base-pack下面或者子包下面的Java文件,
       如果扫描到有@Component @Controller@Service等这些注解的类,则把这些类注册为bean -->
       <context:component-scan base-package="com.wlj.tutorialspoint"/>


       <!--viewResolver将把逻辑视图名解析为具体的view,通过这种策略模式,很容易更换其他视图模式-->
       <bean class="org.springframework.web.servlet.view.InternalResourceViewResolver">
           <property name="prefix" value="jsp/"/>
           <property name="suffix" value=".jsp"/>
       </bean>

       <bean id="tilesViewResolver" class="org.springframework.web.servlet.view.tiles3.TilesViewResolver" p:order="1"/>
       <bean id="tilesConfigurer" class="org.springframework.web.servlet.view.tiles3.TilesConfigurer">
           <property name="definitions">
               <list>
                   <value>classpath:layout.xml</value>
               </list>
           </property>
       </bean>
    </beans>

    tiles学习心得:https://www.jianshu.com/p/fe0cd090bd78


2.开始任务五,学习了DES算法(http://blog.chinaunix.net/uid-20318867-id-1705780.html

DES全称为Data Encryption Standard,即数据加密标准,是一种使用密钥加密块算法
是对称加密算法

DES的密钥是64位的
用这64比特的数据产生1648比特的密钥

在整个算法过程中, DES不停的移动比特位置换

流程如下:

参考http://z2009zxiaolong.iteye.com/blog/1562197写了一个例子,还在理解中


3.学习token

Token是一个用户自定义的任意字符串。在成功提交了开发者自定义的这个字符串之后,Token的值会保存到微信后台。只有服务器和微信后台知道这个字符串,也就是说只有微信后台和公众账号服务器知道这个字符串。于是Token就成了这两台服务器之间的密钥,它可以让公众账号服务器确认请求是来自微信后台还是恶意的第三方。


4.学习ASCII内码(http://tool.oschina.net/commons?type=4

ASCII是American Standard Code for Information Interchange的缩写,用来制订计算机中每个符号对应的代码,这也叫做计算机的内码(code)。
每个ASCII码以1个字节(Byte)储存,从0到数字127代表不同的常用符号,例如大写A的ASCII码是65,小写a则是97。由于ASCII字节的七个位,最高位并不使用,所以后来又将最高的一个位也编入这套内码中,成为八个位的延伸ASCII(ExtendedASCII)码,这套内码加上了许多外文和表格等特殊符号,成为目前常用的内码。


问题

DES算法没弄懂


收获

用debug模式调试代码,渐渐熟练

花时间了解了IDEA的基本操作


计划

学session,cookie

DES接着看

resin突然打不开了,修一修


返回列表 返回列表
评论

    分享到