Maven搭建MyEclipse10+Struts2.1+Spring3.3+Hibernate3.3全注解框架
<param-name>forceEncoding</param-name> <param-value>true</param-value> </init-param> </filter> <filter-mapping> <filter-name>Set Character Encoding</filter-name> <url-pattern>/*</url-pattern> </filter-mapping> </web-app>
五、类的添加
1. hibernate反向生成
students表右键->hibernate reverse engineering
选择package : com.inscribe.farsighted.model
勾选create pojo<>db->点选add hibernate mapping annotations to pojo;勾选update hibernate configuration with mapping resource location
勾选java data access object(dao)->勾选generate precise findby methods;点选
sping dao