spring security3.1开发样例

Spring Security3的使用方法有4种:

    一种是全部利用配置文件,将用户、权限、资源(url)硬编码在xml文件中。

    二种是用户和权限用数据库存储,而资源(url)和权限的对应采用硬编码配置。

    三种是细分角色和权限,并将用户、角色、权限和资源均采用数据库存储,并且自定义过滤器,代替原有的FilterSecurityInterceptor过滤器,并分别实现AccessDecisionManager

InvocationSecurityMetadataSourceServiceUserDetailsService,并在配置文件中进行相应配置。

四是修改spring security的源代码,主要是修改InvocationSecurityMetadataSourceServiceUserDetailsService两个类。前者是将配置文件或数据库中存储的资源(url)提取出来加工成为url和权限列表的MapSecurity使用,后者提取用户名和权限组成一个完整的 (UserDetails)User对象,该对象可以提供用户的详细信息供AuthentationManager进行认证与授权使用。该方法理论上可行,但是比较暴力,不推荐使用。

本文有两个例子,我在简单例子章节实现了第一种方法。在复杂例子章节实现了第二种和第三种方法组合使用的例子。简单例子通俗易懂,不再赘述。复杂例子及其使用和扩展,我将穿插详细的配置注释和讲解,包括整个程序的执行过程。

简单例子

创建web工程如下图所示:

<!--[if gte vml 1]><v:shapetype id="_x0000_t75" coordsize="21600,21600" o:spt="75" o:preferrelative="t" path="m@4@5l@4@11@9@11@9@5xe" filled="f" stroked="f"> <v:stroke joinstyle="miter"/> <v:formulas> <v:f eqn="if lineDrawn pixelLineWidth 0"/> <v:f eqn="sum @0 1 0"/> <v:f eqn="sum 0 0 @1"/> <v:f eqn="prod @2 1 2"/> <v:f eqn="prod @3 21600 pixelWidth"/> <v:f eqn="prod @3 21600 pixelHeight"/> <v:f eqn="sum @0 0 1"/> <v:f eqn="prod @6 1 2"/> <v:f eqn="prod @7 21600 pixelWidth"/> <v:f eqn="sum @8 21600 0"/> <v:f eqn="prod @7 21600 pixelHeight"/> <v:f eqn="sum @10 21600 0"/> </v:formulas> <v:path o:extrusionok="f" gradientshapeok="t" o:connecttype="rect"/> <o:lock v:ext="edit" aspectratio="t"/> </v:shapetype><v:shape id="图片_x0020_1" o:spid="_x0000_i1037" type="#_x0000_t75" style='width:415pt;height:259pt;visibility:visible;mso-wrap-style:square'> <v:imagedata src="file://localhost/Users/litong/Library/Caches/TemporaryItems/msoclip/0/clip_image001.png" o:title=""/> </v:shape><![endif]--><!--[if !vml]--><!--[endif]-->

配置如下图所示:

<!--[if gte vml 1]><v:shape id="图片_x0020_4" o:spid="_x0000_i1036" type="#_x0000_t75" style='width:394pt; height:398pt;visibility:visible;mso-wrap-style:square'> <v:imagedata src="file://localhost/Users/litong/Library/Caches/TemporaryItems/msoclip/0/clip_image003.png" o:title=""/> </v:shape><![endif]--><!--[if !vml]--><!--[endif]-->

单击Finish即可。

把从spring网站下载的spring-security-3.1.0.RELEASE解压,并将其中的spring-security-samples-contacts-3.1.0.RELEASE.war解压,把WEB-INF\lib中的jar包拷贝到如下图所示:

<!--[if gte vml 1]><v:shape id="图片_x0020_5" o:spid="_x0000_i1035" type="#_x0000_t75" style='width:415pt; height:3in;visibility:visible;mso-wrap-style:square'> <v:imagedata src="file://localhost/Users/litong/Library/Caches/TemporaryItems/msoclip/0/clip_image005.png" o:title=""/> </v:shape><![endif]--><!--[if !vml]--><!--[endif]-->

修改配置web.xml如下:

<?xml version="1.0" encoding="UTF-8"?>

<web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee"

    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

    xsi:schemaLocation="http://java.sun.com/xml/ns/javaee

    http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">

 

    <!-- 加载Spring XML配置文件 -->

    <context-param>

       <param-name>contextConfigLocation</param-name>

       <param-value>

           classpath:securityConfig.xml          

       </param-value>

    </context-param>

    <!-- Spring Secutiry3.1的过滤器链配置  -->

    <filter>

        <filter-name>springSecurityFilterChain</filter-name>

        <filter-class>org.springframework.web.filter.DelegatingFilterProxy</filter-class>

    </filter>

 

     <filter-mapping>

        <filter-name>springSecurityFilterChain</filter-name>

        <url-pattern>/*</url-pattern>

     </filter-mapping>

 

    <!--  Spring 容器启动监听器 -->

    <listener>

       <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>

    </listener>

   

    <!--系统欢迎页面-->

    <welcome-file-list>

       <welcome-file>index.jsp</welcome-file>

    </welcome-file-list>

</web-app>

src中创建securityConfig.xml内容如下:

<?xml version="1.0" encoding="UTF-8"?>

<b:beans xmlns="http://www.springframework.org/schema/security"

    xmlns:b="http://www.springframework.org/schema/beans"

    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

    xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd

                        http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-3.1.xsd">

 

    <!-- 登录页面不过滤 -->

    <http pattern="/login.jsp" security="none"/>

    <http access-denied-page="/accessDenied.jsp" >

        <form-login login-page="/login.jsp" />

    <!-- 访问/admin.jsp资源的用户必须具有ROLE_ADMIN的权限 -->

        <intercept-url pattern="/admin.jsp" access="ROLE_ADMIN"/>

    <!-- 访问/**资源的用户必须具有ROLE_USER的权限 -->

        <intercept-url pattern="/**" access="ROLE_USER"/>

        <session-management>

        <concurrency-control max-sessions="1" error-if-maximum-exceeded="false"/>

        </session-management>

    </http>

    <authentication-manager>

        <authentication-provider>

        <user-service>

            <user name="cyu" password="sap123" authorities="ROLE_USER"/>

        </user-service>

        </authentication-provider>

    </authentication-manager>

</b:beans>

WebRoot中创建login.jsp内容如下:

<%@page language="java" import="java.util.*" pageEncoding="UTF-8"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html>

<head>

<title>登录</title>

</head>

<body>

<form action="j_spring_security_check" method="POST">

<table>

    <tr>

       <td>用户:</td>

       <td><input type='text' name='j_username'></td>

    </tr>

    <tr>

       <td>密码:</td>

       <td><input type='password' name='j_password'></td>

    </tr>

    <tr>

       <td><input name="reset" type="reset"></td>

       <td><input name="submit" type="submit"></td>

    </tr>

</table>

</form>

</body>

</html>

WebRoot中创建accessDenied.jsp,内容如下:

<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html>

  <head>   

    <title>访问拒绝</title>

  </head>

  <body>

    您的访问被拒绝,无权访问该资源!<br>

  </body>

</html>

WebRoot中创建admin.jsp内容如下:

<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html>

  <head>  

    <title>My JSP 'admin.jsp' starting page</title>

  </head>

  <body>

    欢迎来到管理员页面. <br>

  </body>

</html>

修改index.jsp内容如下:

<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>

<%@ taglib prefix="sec" uri="http://www.springframework.org/security/tags" %>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html>

  <head>  

    <title>My JSP 'index.jsp' starting page</title>

  </head>

  <body>

    这是首页,欢迎<sec:authentication property="name"/>!<br>

    <a href="admin.jsp">进入admin页面</a>

    <a href="other.jsp">进入其它页面</a>

  </body>

</html>

进入测试页面:

 

输入用户:cyu密码:sap123,然后回车:

 

点击“进入admin页面”超链,得到如下图所示:

 

复杂例子

修改securityConfig.xml内容如下:

<?xml version="1.0" encoding="UTF-8"?>

<beans:beans xmlns="http://www.springframework.org/schema/security"

    xmlns:beans="http://www.springframework.org/schema/beans"

    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

    xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd

                        http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-3.1.xsd">

 

    <!-- 登录页面不过滤 -->

    <http pattern="/login.jsp" security="none"/>

    <http access-denied-page="/accessDenied.jsp" >

        <form-login login-page="/login.jsp" />

        <!-- 访问/admin.jsp资源的用户必须具有ROLE_ADMIN的权限 -->

        <intercept-url pattern="/admin.jsp" access="ROLE_ADMIN"/>

        <!-- 访问/**资源的用户必须具有ROLE_USER的权限 -->

        <intercept-url pattern="/**" access="ROLE_USER"/>

        <session-management>

        <concurrency-control max-sessions="1" error-if-maximum-exceeded="false"/>

        </session-management>

        <!-- 增加一个filter,这点与Acegi是不一样的,不能修改默认的filter了,

        这个filter位于FILTER_SECURITY_INTERCEPTOR之前  -->

        <custom-filter ref="myFilter" before="FILTER_SECURITY_INTERCEPTOR" />

    </http>

    <!-- 一个自定义的filter,必须包含authenticationManager,accessDecisionManager,securityMetadataSource三个属性,

        我们的所有控制将在这三个类中实现,解释详见具体配置  -->

    <beans:bean id="myFilter" class="com.aostarit.spring.security.MyFilterSecurityInterceptor">

        <beans:property name="authenticationManager"

            ref="authenticationManager" />

        <beans:property name="accessDecisionManager"

            ref="myAccessDecisionManagerBean" />

        <beans:property name="securityMetadataSource"

            ref="securityMetadataSource" />

    </beans:bean>

 

    <!-- 验证配置认证管理器,实现用户认证的入口,主要实现UserDetailsService接口即可 -->

    <authentication-manager alias="authenticationManager">

        <authentication-provider

            user-service-ref="myUserDetailService">

            <!--   如果用户的密码采用加密的话

                <password-encoder hash="md5" />

            -->

        </authentication-provider>

    </authentication-manager>

    <!-- 在这个类中,你就可以从数据库中读入用户的密码,角色信息,是否锁定,账号是否过期等 -->

    <beans:bean id="myUserDetailService"

        class="com.aostarit.spring.security.MyUserDetailService" />

    <!-- 访问决策器,决定某个用户具有的角色,是否有足够的权限去访问某个资源 -->   

    <beans:bean id="myAccessDecisionManagerBean"

        class="com.aostarit.spring.security.MyAccessDecisionManager">

    </beans:bean>

    <!-- 资源源数据定义,将所有的资源和权限对应关系建立起来,即定义某一资源可以被哪些角色访问     -->

    <beans:bean id="securityMetadataSource"

        class="com.aostarit.spring.security.MyInvocationSecurityMetadataSource" />

</beans:beans>

编写UrlMatcher接口,内容如下:

package com.aostarit.spring.security.tool;

 

publicabstractinterface UrlMatcher

{

  publicabstract Object compile(String paramString);

 

  publicabstractboolean pathMatchesUrl(Object paramObject, String paramString);

 

  publicabstract String getUniversalMatchPattern();

 

  publicabstractboolean requiresLowerCaseUrl();

}

这个接口是以前spring版本中的,现在的spring版本中不存在,由于项目需要且使用方便,故加入到项目当中。

编写AntUrlPathMatcher类,内容如下:

package com.aostarit.spring.security.tool;

 

import org.springframework.util.AntPathMatcher;

import org.springframework.util.PathMatcher;

 

publicclass AntUrlPathMatcher

  implements UrlMatcher

{

  privatebooleanrequiresLowerCaseUrl;

  private PathMatcher pathMatcher;

 

  public AntUrlPathMatcher()

  {

    this(true);

  }

 

  public AntUrlPathMatcher(boolean requiresLowerCaseUrl)

  {

    this.requiresLowerCaseUrl = true;

    this.pathMatcher = new AntPathMatcher();

 

    this.requiresLowerCaseUrl = requiresLowerCaseUrl;

  }

 

  public Object compile(String path) {

    if (this.requiresLowerCaseUrl) {

      return path.toLowerCase();

    }

 

    return path;

  }

 

  publicvoid setRequiresLowerCaseUrl(boolean requiresLowerCaseUrl) {

    this.requiresLowerCaseUrl = requiresLowerCaseUrl;

  }

 

  publicboolean pathMatchesUrl(Object path, String url) {

    if (("/**".equals(path)) || ("**".equals(path))) {

      returntrue;

    }

    returnthis.pathMatcher.match((String)path, url);

  }

 

  public String getUniversalMatchPattern() {

    return"/**";

  }

 

  publicboolean requiresLowerCaseUrl() {

    returnthis.requiresLowerCaseUrl;

  }

 

  public String toString() {

    returnsuper.getClass().getName() + "[requiresLowerCase='" + this.requiresLowerCaseUrl + "']";

  }

}

这个类是以前spring版本中的工具类,现在的spring版本中不存在,由于项目需要且使用方便,故加入到项目当中。

编写MyFilterSecurityInterceptor类,内容如下:

package com.aostarit.spring.security;

 

import java.io.IOException;

 

import javax.servlet.Filter;

import javax.servlet.FilterChain;

import javax.servlet.FilterConfig;

import javax.servlet.ServletException;

import javax.servlet.ServletRequest;

import javax.servlet.ServletResponse;

 

import org.springframework.security.access.SecurityMetadataSource;

import org.springframework.security.access.intercept.AbstractSecurityInterceptor;

import org.springframework.security.access.intercept.InterceptorStatusToken;

import org.springframework.security.web.FilterInvocation;

import org.springframework.security.web.access.intercept.FilterInvocationSecurityMetadataSource;

 

publicclass MyFilterSecurityInterceptor extends AbstractSecurityInterceptor

        implements Filter {

 

    private FilterInvocationSecurityMetadataSource securityMetadataSource;

 

    /**

     * Method that is actually called by the filter chain. Simply delegates to

     * the {@link #invoke(FilterInvocation)} method.

     *

     * @param request

     *            the servlet request

     * @param response

     *            the servlet response

     * @param chain

     *            the filter chain

     *

     * @throws IOException

     *             if the filter chain fails

     * @throws ServletException

     *             if the filter chain fails

     */

    publicvoid doFilter(ServletRequest request, ServletResponse response,

            FilterChain chain) throws IOException, ServletException {

        FilterInvocation fi = new FilterInvocation(request, response, chain);

        invoke(fi);

    }

 

    public FilterInvocationSecurityMetadataSource getSecurityMetadataSource() {

        returnthis.securityMetadataSource;

    }

 

    public Class<? extends Object> getSecureObjectClass() {

        return FilterInvocation.class;

    }

 

    publicvoid invoke(FilterInvocation fi) throws IOException,

            ServletException {

        InterceptorStatusToken token = super.beforeInvocation(fi);

        try {

            fi.getChain().doFilter(fi.getRequest(), fi.getResponse());

        } finally {

            super.afterInvocation(token, null);

        }

    }

 

    public SecurityMetadataSource obtainSecurityMetadataSource() {

        returnthis.securityMetadataSource;

    }

 

    publicvoid setSecurityMetadataSource(

            FilterInvocationSecurityMetadataSource newSource) {

        this.securityMetadataSource = newSource;

    }

 

    publicvoid destroy() {

    }

 

    publicvoid init(FilterConfig arg0) throws ServletException {

    }

 

}

核心的是InterceptorStatusToken token = super.beforeInvocation(fi);会调用我们定义的accessDecisionManager:decide(Object object)securityMetadataSource:getAttributes(Object object)方法。

编写MyInvocationSecurityMetadataSource类,内容如下:

package com.aostarit.spring.security;

 

import java.util.ArrayList;

import java.util.Collection;

import java.util.HashMap;

import java.util.Iterator;

import java.util.Map;

import org.springframework.security.access.ConfigAttribute;

import org.springframework.security.access.SecurityConfig;

import org.springframework.security.web.FilterInvocation;

import org.springframework.security.web.access.intercept.FilterInvocationSecurityMetadataSource;

 

import com.aostarit.spring.security.tool.AntUrlPathMatcher;

import com.aostarit.spring.security.tool.UrlMatcher;

 

/**

 *

 * 此类在初始化时,应该取到所有资源及其对应角色的定义

 *

 */

publicclass MyInvocationSecurityMetadataSource

        implements FilterInvocationSecurityMetadataSource {

    private UrlMatcher urlMatcher = new AntUrlPathMatcher();

    privatestatic Map<String, Collection<ConfigAttribute>> resourceMap = null;

 

    public MyInvocationSecurityMetadataSource() {

        loadResourceDefine();

    }

 

    privatevoid loadResourceDefine() {

        resourceMap = new HashMap<String, Collection<ConfigAttribute>>();

        Collection<ConfigAttribute> atts = new ArrayList<ConfigAttribute>();

        ConfigAttribute ca = new SecurityConfig("ROLE_USER");

        atts.add(ca);

        resourceMap.put("/index.jsp", atts);

       

        Collection<ConfigAttribute> attsno = new ArrayList<ConfigAttribute>();

        ConfigAttribute cano = new SecurityConfig("ROLE_NO");

        attsno.add(cano);

        resourceMap.put("/other.jsp", attsno);

    }

 

    // According to a URL, Find out permission configuration of this URL.

    public Collection<ConfigAttribute> getAttributes(Object object)

            throws IllegalArgumentException {

        // guess object is a URL.

        String url = ((FilterInvocation)object).getRequestUrl();

        Iterator<String> ite = resourceMap.keySet().iterator();

        while (ite.hasNext()) {

            String resURL = ite.next();

            if (urlMatcher.pathMatchesUrl(resURL, url)) {

                returnresourceMap.get(resURL);

            }

        }

        returnnull;

    }

 

    publicboolean supports(Class<?> clazz) {

        returntrue;

    }

   

    public Collection<ConfigAttribute> getAllConfigAttributes() {

        returnnull;

    }

 

}

对于资源的访问权限的定义,我们通过实现FilterInvocationSecurityMetadataSource这个接口来初始化数据。看看loadResourceDefine方法,我在这里,假定index.jsp这个资源,需要ROLE_USER角色的用户才能访问, other.jsp这个资源,需要ROLE_NO角色的用户才能访问。这个类中,还有一个最核心的地方,就是提供某个资源对应的权限定义,即getAttributes方法返回的结果。注意,我例子中使用的是 AntUrlPathMatcher这个path matcher来检查URL是否与资源定义匹配,事实上你还要用正则的方式来匹配,或者自己实现一个matcher

这里的角色和资源都可以从数据库中获取,建议通过我们封装的平台级持久层管理类获取和管理。

编写MyAccessDecisionManager类,内容如下:

package com.aostarit.spring.security;

 

import java.util.Collection;

import java.util.Iterator;

 

import org.springframework.security.access.AccessDecisionManager;

import org.springframework.security.access.AccessDeniedException;

import org.springframework.security.access.ConfigAttribute;

import org.springframework.security.access.SecurityConfig;

import org.springframework.security.authentication.InsufficientAuthenticationException;

import org.springframework.security.core.Authentication;

import org.springframework.security.core.GrantedAuthority;

 

publicclass MyAccessDecisionManager implements AccessDecisionManager {

 

    //In this method, need to compare authentication with configAttributes.

    // 1, A object is a URL, a filter was find permission configuration by this URL, and pass to here.

    // 2, Check authentication has attribute in permission configuration (configAttributes)

    // 3, If not match corresponding authentication, throw a AccessDeniedException.

    publicvoid decide(Authentication authentication, Object object,

            Collection<ConfigAttribute> configAttributes)

            throws AccessDeniedException, InsufficientAuthenticationException {

        if(configAttributes == null){

            return ;

        }

        System.out.println(object.toString());  //object is a URL.

        Iterator<ConfigAttribute> ite=configAttributes.iterator();

        while(ite.hasNext()){

            ConfigAttribute ca=ite.next();

            String needRole=((SecurityConfig)ca).getAttribute();

            for(GrantedAuthority ga:authentication.getAuthorities()){

                if(needRole.equals(ga.getAuthority())){  //ga is user's role.

                    return;

                }

            }

        }

        thrownew AccessDeniedException("no right");

    }

 

    publicboolean supports(ConfigAttribute attribute) {

        // TODO Auto-generated method stub

        returntrue;

    }

 

    publicboolean supports(Class<?> clazz) {

        returntrue;

    }

 

 

}

在这个类中,最重要的是decide方法,如果不存在对该资源的定义,直接放行;否则,如果找到正确的角色,即认为拥有权限,并放行,否则throw new AccessDeniedException("no right")。所有的异常建议平台统一进行封装并管理。

编写MyUserDetailService类,内容如下:

package com.aostarit.spring.security;

import java.util.ArrayList;

import java.util.Collection;

 

import org.springframework.dao.DataAccessException;

import org.springframework.security.core.GrantedAuthority;

import org.springframework.security.core.authority.GrantedAuthorityImpl;

import org.springframework.security.core.userdetails.User;

import org.springframework.security.core.userdetails.UserDetails;

import org.springframework.security.core.userdetails.UserDetailsService;

import org.springframework.security.core.userdetails.UsernameNotFoundException;

 

publicclass MyUserDetailService implements UserDetailsService {

 

    public UserDetails loadUserByUsername(String username)

            throws UsernameNotFoundException, DataAccessException {

        Collection<GrantedAuthority> auths=new ArrayList<GrantedAuthority>();

        GrantedAuthorityImpl auth2=new GrantedAuthorityImpl("ROLE_ADMIN");

//        auths.add(auth2);

        if(username.equals("cyu")){

            auths=new ArrayList<GrantedAuthority>();

            GrantedAuthorityImpl auth1=new GrantedAuthorityImpl("ROLE_USER");

            auths.add(auth1);

            auths.add(auth2);

        }

       

//        User(String username, String password, boolean enabled, boolean accountNonExpired,

//                    boolean credentialsNonExpired, boolean accountNonLocked, Collection<GrantedAuthority> authorities) {

        User user = new User(username,

                "sap123", true, true, true, true, auths);

        return user;

    }

   

}

在这个类中,你就可以从数据库中读入用户的密码,角色信息,是否锁定,账号是否过期等。建议通过我们封装的平台级持久层管理类获取和管理。

 

<!--[if !supportLists]-->l  <!--[endif]-->整个程序执行的过程如下:

1、容器启动(MyInvocationSecurityMetadataSourceloadResourceDefine加载系统资源与权限列表)

2、用户发出请求

3、过滤器拦截(MyFilterSecurityInterceptor:doFilter)

4、取得请求资源所需权限(MyInvocationSecurityMetadataSource:getAttributes)

5、匹配用户拥有权限和请求权限(MyAccessDecisionManager:decide),如果用户没有相应的权限,执行第6步,否则执行第7

6、登录

7、验证并授权(MyUserDetailService:loadUserByUsername)

8、重复4,5

 

发布,测试页面如下:

 

输入用户:cyu密码:sap123,然后回车:

 

点击“进入admin页面”超链,得到如下图所示:

 

点击“进入其它页面”超链,得到如下图所示:

转自:http://wenku.baidu.com/view/abf23846336c1eb91a375d83.html

<!--[if !mso]> <style> v\:* {behavior:url(#default#VML);} o\:* {behavior:url(#default#VML);} w\:* {behavior:url(#default#VML);} .shape {behavior:url(#default#VML);} </style> <![endif]--><!--[if gte mso 9]><xml> <o:OfficeDocumentSettings> <o:AllowPNG/> </o:OfficeDocumentSettings> </xml><![endif]--> <!--[if gte mso 9]><xml> <w:WordDocument> <w:View>Normal</w:View> <w:Zoom>0</w:Zoom> <w:TrackMoves>false</w:TrackMoves> <w:TrackFormatting/> <w:PunctuationKerning/> <w:DrawingGridVerticalSpacing>10 pt</w:DrawingGridVerticalSpacing> <w:DisplayHorizontalDrawingGridEvery>0</w:DisplayHorizontalDrawingGridEvery> <w:DisplayVerticalDrawingGridEvery>2</w:DisplayVerticalDrawingGridEvery> <w:ValidateAgainstSchemas/> <w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid> <w:IgnoreMixedContent>false</w:IgnoreMixedContent> <w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText> <w:DoNotPromoteQF/> <w:LidThemeOther>EN-US</w:LidThemeOther> <w:LidThemeAsian>ZH-CN</w:LidThemeAsian> <w:LidThemeComplexScript>X-NONE</w:LidThemeComplexScript> <w:Compatibility> <w:SpaceForUL/> <w:BalanceSingleByteDoubleByteWidth/> <w:DoNotLeaveBackslashAlone/> <w:ULTrailSpace/> <w:DoNotExpandShiftReturn/> <w:AdjustLineHeightInTable/> <w:BreakWrappedTables/> <w:SnapToGridInCell/> <w:WrapTextWithPunct/> <w:UseAsianBreakRules/> <w:DontGrowAutofit/> <w:SplitPgBreakAndParaMark/> <w:EnableOpenTypeKerning/> <w:DontFlipMirrorIndents/> <w:OverrideTableStyleHps/> <w:UseFELayout/> </w:Compatibility> <w:NoLineBreaksAfter Lang="JA">$([{£¥·‘“〈《「『【〔〖〝﹙﹛﹝$(.[{£¥</w:NoLineBreaksAfter> <w:NoLineBreaksBefore Lang="JA">!%),.:;&gt;?]}¢¨°·ˇˉ―‖’”…‰′″›℃∶、。〃〉》」』】〕〗〞︶︺︾﹀﹄﹚﹜﹞!"%'),.:;?]`|}~¢</w:NoLineBreaksBefore> <m:mathPr> <m:mathFont m:val="Cambria Math"/> <m:brkBin m:val="before"/> <m:brkBinSub m:val="&#45;-"/> <m:smallFrac m:val="off"/> <m:dispDef/> <m:lMargin m:val="0"/> <m:rMargin m:val="0"/> <m:defJc m:val="centerGroup"/> <m:wrapIndent m:val="1440"/> <m:intLim m:val="subSup"/> <m:naryLim m:val="undOvr"/> </m:mathPr></w:WordDocument> </xml><![endif]--><!--[if gte mso 9]><xml> <w:LatentStyles DefLockedState="false" DefUnhideWhenUsed="true" DefSemiHidden="true" DefQFormat="false" DefPriority="99" LatentStyleCount="276"> <w:LsdException Locked="false" Priority="0" SemiHidden="false" UnhideWhenUsed="false" QFormat="true" Name="Normal"/> <w:LsdException Locked="false" Priority="9" SemiHidden="false" UnhideWhenUsed="false" QFormat="true" Name="heading 1"/> <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 2"/> <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 3"/> <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 4"/> <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 5"/> <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 6"/> <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 7"/> <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 8"/> <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 9"/> <w:LsdException Locked="false" Priority="39" Name="toc 1"/> <w:LsdException Locked="false" Priority="39" Name="toc 2"/> <w:LsdException Locked="false" Priority="39" Name="toc 3"/> <w:LsdException Locked="false" Priority="39" Name="toc 4"/> <w:LsdException Locked="false" Priority="39" Name="toc 5"/> <w:LsdException Locked="false" Priority="39" Name="toc 6"/> <w:LsdException Locked="false" Priority="39" Name="toc 7"/> <w:LsdException Locked="false" Priority="39" Name="toc 8"/> <w:LsdException Locked="false" Priority="39" Name="toc 9"/> <w:LsdException Locked="false" Priority="35" QFormat="true" Name="caption"/> <w:LsdException Locked="false" Priority="10" SemiHidden="false" UnhideWhenUsed="false" QFormat="true" Name="Title"/> <w:LsdException Locked="false" Priority="1" Name="Default Paragraph Font"/> <w:LsdException Locked="false" Priority="11" SemiHidden="false" UnhideWhenUsed="false" QFormat="true" Name="Subtitle"/> <w:LsdException Locked="false" Priority="22" SemiHidden="false" UnhideWhenUsed="false" QFormat="true" Name="Strong"/> <w:LsdException Locked="false" Priority="20" SemiHidden="false" UnhideWhenUsed="false" QFormat="true" Name="Emphasis"/> <w:LsdException Locked="false" Priority="59" SemiHidden="false" UnhideWhenUsed="false" Name="Table Grid"/> <w:LsdException Locked="false" UnhideWhenUsed="false" Name="Placeholder Text"/> <w:LsdException Locked="false" Priority="1" SemiHidden="false" UnhideWhenUsed="false" QFormat="true" Name="No Spacing"/> <w:LsdException Locked="false" Priority="60" SemiHidden="false" UnhideWhenUsed="false" Name="Light Shading"/> <w:LsdException Locked="false" Priority="61" SemiHidden="false" UnhideWhenUsed="false" Name="Light List"/> <w:LsdException Locked="false" Priority="62" SemiHidden="false" UnhideWhenUsed="false" Name="Light Grid"/> <w:LsdException Locked="false" Priority="63" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Shading 1"/> <w:LsdException Locked="false" Priority="64" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Shading 2"/> <w:LsdException Locked="false" Priority="65" SemiHidden="false" UnhideWhenUsed="false" Name="Medium List 1"/> <w:LsdException Locked="false" Priority="66" SemiHidden="false" UnhideWhenUsed="false" Name="Medium List 2"/> <w:LsdException Locked="false" Priority="67" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Grid 1"/> <w:LsdException Locked="false" Priority="68" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Grid 2"/> <w:LsdException Locked="false" Priority="69" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Grid 3"/> <w:LsdException Locked="false" Priority="70" SemiHidden="false" UnhideWhenUsed="false" Name="Dark List"/> <w:LsdException Locked="false" Priority="71" SemiHidden="false" UnhideWhenUsed="false" Name="Colorful Shading"/> <w:LsdException Locked="false" Priority="72" SemiHidden="false" UnhideWhenUsed="false" Name="Colorful List"/> <w:LsdException Locked="false" Priority="73" SemiHidden="false" UnhideWhenUsed="false" Name="Colorful Grid"/> <w:LsdException Locked="false" Priority="60" SemiHidden="false" UnhideWhenUsed="false" Name="Light Shading Accent 1"/> <w:LsdException Locked="false" Priority="61" SemiHidden="false" UnhideWhenUsed="false" Name="Light List Accent 1"/> <w:LsdException Locked="false" Priority="62" SemiHidden="false" UnhideWhenUsed="false" Name="Light Grid Accent 1"/> <w:LsdException Locked="false" Priority="63" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Shading 1 Accent 1"/> <w:LsdException Locked="false" Priority="64" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Shading 2 Accent 1"/> <w:LsdException Locked="false" Priority="65" SemiHidden="false" UnhideWhenUsed="false" Name="Medium List 1 Accent 1"/> <w:LsdException Locked="false" UnhideWhenUsed="false" Name="Revision"/> <w:LsdException Locked="false" Priority="34" SemiHidden="false" UnhideWhenUsed="false" QFormat="true" Name="List Paragraph"/> <w:LsdException Locked="false" Priority="29" SemiHidden="false" UnhideWhenUsed="false" QFormat="true" Name="Quote"/> <w:LsdException Locked="false" Priority="30" SemiHidden="false" UnhideWhenUsed="false" QFormat="true" Name="Intense Quote"/> <w:LsdException Locked="false" Priority="66" SemiHidden="false" UnhideWhenUsed="false" Name="Medium List 2 Accent 1"/> <w:LsdException Locked="false" Priority="67" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Grid 1 Accent 1"/> <w:LsdException Locked="false" Priority="68" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Grid 2 Accent 1"/> <w:LsdException Locked="false" Priority="69" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Grid 3 Accent 1"/> <w:LsdException Locked="false" Priority="70" SemiHidden="false" UnhideWhenUsed="false" Name="Dark List Accent 1"/> <w:LsdException Locked="false" Priority="71" SemiHidden="false" UnhideWhenUsed="false" Name="Colorful Shading Accent 1"/> <w:LsdException Locked="false" Priority="72" SemiHidden="false" UnhideWhenUsed="false" Name="Colorful List Accent 1"/> <w:LsdException Locked="false" Priority="73" SemiHidden="false" UnhideWhenUsed="false" Name="Colorful Grid Accent 1"/> <w:LsdException Locked="false" Priority="60" SemiHidden="false" UnhideWhenUsed="false" Name="Light Shading Accent 2"/> <w:LsdException Locked="false" Priority="61" SemiHidden="false" UnhideWhenUsed="false" Name="Light List Accent 2"/> <w:LsdException Locked="false" Priority="62" SemiHidden="false" UnhideWhenUsed="false" Name="Light Grid Accent 2"/> <w:LsdException Locked="false" Priority="63" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Shading 1 Accent 2"/> <w:LsdException Locked="false" Priority="64" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Shading 2 Accent 2"/> <w:LsdException Locked="false" Priority="65" SemiHidden="false" UnhideWhenUsed="false" Name="Medium List 1 Accent 2"/> <w:LsdException Locked="false" Priority="66" SemiHidden="false" UnhideWhenUsed="false" Name="Medium List 2 Accent 2"/> <w:LsdException Locked="false" Priority="67" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Grid 1 Accent 2"/> <w:LsdException Locked="false" Priority="68" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Grid 2 Accent 2"/> <w:LsdException Locked="false" Priority="69" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Grid 3 Accent 2"/> <w:LsdException Locked="false" Priority="70" SemiHidden="false" UnhideWhenUsed="false" Name="Dark List Accent 2"/> <w:LsdException Locked="false" Priority="71" SemiHidden="false" UnhideWhenUsed="false" Name="Colorful Shading Accent 2"/> <w:LsdException Locked="false" Priority="72" SemiHidden="false" UnhideWhenUsed="false" Name="Colorful List Accent 2"/> <w:LsdException Locked="false" Priority="73" SemiHidden="false" UnhideWhenUsed="false" Name="Colorful Grid Accent 2"/> <w:LsdException Locked="false" Priority="60" SemiHidden="false" UnhideWhenUsed="false" Name="Light Shading Accent 3"/> <w:LsdException Locked="false" Priority="61" SemiHidden="false" UnhideWhenUsed="false" Name="Light List Accent 3"/> <w:LsdException Locked="false" Priority="62" SemiHidden="false" UnhideWhenUsed="false" Name="Light Grid Accent 3"/> <w:LsdException Locked="false" Priority="63" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Shading 1 Accent 3"/> <w:LsdException Locked="false" Priority="64" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Shading 2 Accent 3"/> <w:LsdException Locked="false" Priority="65" SemiHidden="false" UnhideWhenUsed="false" Name="Medium List 1 Accent 3"/> <w:LsdException Locked="false" Priority="66" SemiHidden="false" UnhideWhenUsed="false" Name="Medium List 2 Accent 3"/> <w:LsdException Locked="false" Priority="67" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Grid 1 Accent 3"/> <w:LsdException Locked="false" Priority="68" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Grid 2 Accent 3"/> <w:LsdException Locked="false" Priority="69" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Grid 3 Accent 3"/> <w:LsdException Locked="false" Priority="70" SemiHidden="false" UnhideWhenUsed="false" Name="Dark List Accent 3"/> <w:LsdException Locked="false" Priority="71" SemiHidden="false" UnhideWhenUsed="false" Name="Colorful Shading Accent 3"/> <w:LsdException Locked="false" Priority="72" SemiHidden="false" UnhideWhenUsed="false" Name="Colorful List Accent 3"/> <w:LsdException Locked="false" Priority="73" SemiHidden="false" UnhideWhenUsed="false" Name="Colorful Grid Accent 3"/> <w:LsdException Locked="false" Priority="60" SemiHidden="false" UnhideWhenUsed="false" Name="Light Shading Accent 4"/> <w:LsdException Locked="false" Priority="61" SemiHidden="false" UnhideWhenUsed="false" Name="Light List Accent 4"/> <w:LsdException Locked="false" Priority="62" SemiHidden="false" UnhideWhenUsed="false" Name="Light Grid Accent 4"/> <w:LsdException Locked="false" Priority="63" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Shading 1 Accent 4"/> <w:LsdException Locked="false" Priority="64" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Shading 2 Accent 4"/> <w:LsdException Locked="false" Priority="65" SemiHidden="false" UnhideWhenUsed="false" Name="Medium List 1 Accent 4"/> <w:LsdException Locked="false" Priority="66" SemiHidden="false" UnhideWhenUsed="false" Name="Medium List 2 Accent 4"/> <w:LsdException Locked="false" Priority="67" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Grid 1 Accent 4"/> <w:LsdException Locked="false" Priority="68" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Grid 2 Accent 4"/> <w:LsdException Locked="false" Priority="69" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Grid 3 Accent 4"/> <w:LsdException Locked="false" Priority="70" SemiHidden="false" UnhideWhenUsed="false" Name="Dark List Accent 4"/> <w:LsdException Locked="false" Priority="71" SemiHidden="false" UnhideWhenUsed="false" Name="Colorful Shading Accent 4"/> <w:LsdException Locked="false" Priority="72" SemiHidden="false" UnhideWhenUsed="false" Name="Colorful List Accent 4"/> <w:LsdException Locked="false" Priority="73" SemiHidden="false" UnhideWhenUsed="false" Name="Colorful Grid Accent 4"/> <w:LsdException Locked="false" Priority="60" SemiHidden="false" UnhideWhenUsed="false" Name="Light Shading Accent 5"/> <w:LsdException Locked="false" Priority="61" SemiHidden="false" UnhideWhenUsed="false" Name="Light List Accent 5"/> <w:LsdException Locked="false" Priority="62" SemiHidden="false" UnhideWhenUsed="false" Name="Light Grid Accent 5"/> <w:LsdException Locked="false" Priority="63" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Shading 1 Accent 5"/> <w:LsdException Locked="false" Priority="64" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Shading 2 Accent 5"/> <w:LsdException Locked="false" Priority="65" SemiHidden="false" UnhideWhenUsed="false" Name="Medium List 1 Accent 5"/> <w:LsdException Locked="false" Priority="66" SemiHidden="false" UnhideWhenUsed="false" Name="Medium List 2 Accent 5"/> <w:LsdException Locked="false" Priority="67" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Grid 1 Accent 5"/> <w:LsdException Locked="false" Priority="68" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Grid 2 Accent 5"/> <w:LsdException Locked="false" Priority="69" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Grid 3 Accent 5"/> <w:LsdException Locked="false" Priority="70" SemiHidden="false" UnhideWhenUsed="false" Name="Dark List Accent 5"/> <w:LsdException Locked="false" Priority="71" SemiHidden="false" UnhideWhenUsed="false" Name="Colorful Shading Accent 5"/> <w:LsdException Locked="false" Priority="72" SemiHidden="false" UnhideWhenUsed="false" Name="Colorful List Accent 5"/> <w:LsdException Locked="false" Priority="73" SemiHidden="false" UnhideWhenUsed="false" Name="Colorful Grid Accent 5"/> <w:LsdException Locked="false" Priority="60" SemiHidden="false" UnhideWhenUsed="false" Name="Light Shading Accent 6"/> <w:LsdException Locked="false" Priority="61" SemiHidden="false" UnhideWhenUsed="false" Name="Light List Accent 6"/> <w:LsdException Locked="false" Priority="62" SemiHidden="false" UnhideWhenUsed="false" Name="Light Grid Accent 6"/> <w:LsdException Locked="false" Priority="63" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Shading 1 Accent 6"/> <w:LsdException Locked="false" Priority="64" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Shading 2 Accent 6"/> <w:LsdException Locked="false" Priority="65" SemiHidden="false" UnhideWhenUsed="false" Name="Medium List 1 Accent 6"/> <w:LsdException Locked="false" Priority="66" SemiHidden="false" UnhideWhenUsed="false" Name="Medium List 2 Accent 6"/> <w:LsdException Locked="false" Priority="67" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Grid 1 Accent 6"/> <w:LsdException Locked="false" Priority="68" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Grid 2 Accent 6"/> <w:LsdException Locked="false" Priority="69" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Grid 3 Accent 6"/> <w:LsdException Locked="false" Priority="70" SemiHidden="false" UnhideWhenUsed="false" Name="Dark List Accent 6"/> <w:LsdException Locked="false" Priority="71" SemiHidden="false" UnhideWhenUsed="false" Name="Colorful Shading Accent 6"/> <w:LsdException Locked="false" Priority="72" SemiHidden="false" UnhideWhenUsed="false" Name="Colorful List Accent 6"/> <w:LsdException Locked="false" Priority="73" SemiHidden="false" UnhideWhenUsed="false" Name="Colorful Grid Accent 6"/> <w:LsdException Locked="false" Priority="19" SemiHidden="false" UnhideWhenUsed="false" QFormat="true" Name="Subtle Emphasis"/> <w:LsdException Locked="false" Priority="21" SemiHidden="false" UnhideWhenUsed="false" QFormat="true" Name="Intense Emphasis"/> <w:LsdException Locked="false" Priority="31" SemiHidden="false" UnhideWhenUsed="false" QFormat="true" Name="Subtle Reference"/> <w:LsdException Locked="false" Priority="32" SemiHidden="false" UnhideWhenUsed="false" QFormat="true" Name="Intense Reference"/> <w:LsdException Locked="false" Priority="33" SemiHidden="false" UnhideWhenUsed="false" QFormat="true" Name="Book Title"/> <w:LsdException Locked="false" Priority="37" Name="Bibliography"/> <w:LsdException Locked="false" Priority="39" QFormat="true" Name="TOC Heading"/> </w:LatentStyles> </xml><![endif]--> <!--[if gte mso 10]> <style> /* Style Definitions */ table.MsoNormalTable {mso-style-name:普通表格; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-priority:99; mso-style-parent:""; mso-padding-alt:0cm 5.4pt 0cm 5.4pt; mso-para-margin:0cm; mso-para-margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:10.5pt; mso-bidi-font-size:11.0pt; font-family:Calibri; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin; mso-font-kerning:1.0pt;} </style> <![endif]--> <!--StartFragment--> <!--EndFragment-->

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值