Mybatis can't run update
<p>updateOneArticle.jsp</p>

<pre><code>&lt;%@ taglib prefix="s" uri="/struts-tags" %&gt;
&lt;%--
  Created by IntelliJ IDEA.
  User: jack
  Date: 16-4-4
  Time: 下午3:16
  To change this template use File | Settings | File Templates.
--%&gt;
&lt;%@ page contentType="text/html;charset=UTF-8" language="java" %&gt;
&lt;html&gt;
&lt;head&gt;
    &lt;title&gt;一个文章的修改界面&lt;/title&gt;
&lt;/head&gt;
&lt;s:form action="updateonearticleaction"&gt;
    &lt;s:textfield  label="标题" name="article.title" /&gt;
    &lt;s:textfield label="类别"  name="article.archive" /&gt;
    &lt;s:textarea label="内容" name="article.content" cols="20" rows="3"/&gt;
    &lt;s:submit   value="修改"/&gt;
&lt;/s:form&gt;
&lt;s:debug/&gt;
&lt;/body&gt;
&lt;/html&gt;
</code></pre>

<p>struts.xml</p>

<pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;

&lt;!DOCTYPE struts PUBLIC
        "-//Apache Software Foundation//DTD Struts Configuration 2.3//EN"
        "http://struts.apache.org/dtds/struts-2.3.dtd"&gt;

&lt;struts&gt;
    &lt;constant name="struts.devMode" value="true"/&gt;
    &lt;package name="default" namespace="/" extends="struts-default"&gt;
        &lt;action name="useraction" class="main.java.cn.qingtianr.action.UserAction"&gt;
            &lt;result name="success"&gt;
                backend.jsp
            &lt;/result&gt;
            &lt;result name="fail"&gt;
                fail.jsp
            &lt;/result&gt;
        &lt;/action&gt;

        &lt;action name="articleaction" class="main.java.cn.qingtianr.action.ArticleAction" method="writeArticle"&gt;
            &lt;result name="lookarticle"&gt;
                lookarticle.jsp
            &lt;/result&gt;
        &lt;/action&gt;

        &lt;action name="articleactionshow" class="main.java.cn.qingtianr.action.ArticleAction" method="showArticle"&gt;
            &lt;result name="lookarticle"&gt;
                lookarticle.jsp
            &lt;/result&gt;
        &lt;/action&gt;
        &lt;action name="getarticleaction" class="main.java.cn.qingtianr.action.ArticleAction" method="getOneArticle"&gt;
            &lt;result name="post"&gt;
                post.jsp
            &lt;/result&gt;
        &lt;/action&gt;
        &lt;action name="managearticleaction" class="main.java.cn.qingtianr.action.ArticleAction" method="manageArticle"&gt;
            &lt;result name="managearticle"&gt;
                managearticle.jsp
            &lt;/result&gt;
        &lt;/action&gt;
        &lt;action name="updatearticleaction" class="main.java.cn.qingtianr.action.ArticleAction" method="updateArticle"&gt;
            &lt;result name="updateOneArticle"&gt;
                updateOneArticle.jsp
            &lt;/result&gt;
        &lt;/action&gt;
        &lt;action name="updateonearticleaction" class="main.java.cn.qingtianr.action.ArticleAction" method="updateOneArticle"&gt;
        &lt;result name="success"&gt;
            success.jsp
        &lt;/result&gt;
        &lt;/action&gt;
    &lt;/package&gt;
&lt;/struts&gt;
</code></pre>

<p>ArticleDao.java</p>

<pre><code>package main.java.cn.qingtianr.dao;

import main.java.cn.qingtianr.model.Article;

import java.util.ArrayList;

/**
 * Created by jack on 16-3-30.
 */
public interface ArticleDao {
    public Boolean addArticle(Article article);
    public ArrayList&lt;Article&gt; showArticle();
    public Article getOneArticle(String title);
    public int updateArticle(Article article);
}
</code></pre>

<p>ArticleDao.xml</p>

<pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"&gt;

&lt;mapper namespace="main.java.cn.qingtianr.dao.ArticleDao"&gt;

    &lt;update id="updateArticle" parameterType="main.java.cn.qingtianr.model.Article"&gt;
        UPDATE article SET archive = #{archive} , content =#{content} WHERE title = #{title}
    &lt;/update&gt;

&lt;/mapper&gt;
</code></pre>

<p>ArticleServiceImpl.java</p>

<pre><code>public boolean updateArticle(Article article) {
    try{
        System.out.println(article.getTitle());
        System.out.println(article.getArchive());
        System.out.println(article.getContent());
        int s = MybatisSqlSessionFactory.getSession().getMapper(ArticleDao.class).updateArticle(article);
        System.out.println("hello It is in updateArticle");
        System.out.println(s);
    }
    catch (Exception e)
    {
        e.printStackTrace();
        throw e;
    }
    finally
    {
        MybatisSqlSessionFactory.closeSession();
    }
    return true;
}
</code></pre>

<p>sql</p>

<pre><code>CREATE TABLE `article` (
  `title` varchar(20) NOT NULL,
  `archive` varchar(20) DEFAULT NULL,
  `content` varchar(100) DEFAULT NULL,
  PRIMARY KEY (`title`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8
</code></pre>

<p>Article.java</p>

<pre><code>package main.java.cn.qingtianr.model;

/**
 * Created by jack on 16-3-30.
 */
public class Article {
    private String title;
    private String archive;
    private String content;

    public Article(){

    }

    public Article(String title, String archive, String content) {
        this.title = title;
        this.archive = archive;
        this.content = content;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getArchive() {
        return archive;
    }

    public void setArchive(String archive) {
        this.archive = archive;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }
}
</code></pre>

<p>I'm new to mybatis.today,I encountered a problem。I use <strong>ArticleServiceImp.java</strong> to update my data。but It doesn't work.
I promise  when it is in  <strong>public boolean updateArticle(Article article)</strong> ,the article is what i want。bacause I print it。and the var s = 1 when it prints。</p>

<p>And I think problem is in <strong>Article.xml</strong>。</p>

<p>I hava used much time to solve it.So can anyone help me?thx。</p>

<p>And there is no exception.</p>