404排查總結(struts2)
阿新 • • 發佈:2019-01-04
- 靜態頁面(JSP或freemarker等模板)的URL是否寫錯:URI、萬用字元、方法名、action、拼寫等問題
- 控制層:Action的方法名、返回值、註解(@Controller @Scope(“prototype”))
- struts.xml: 中的萬用字元、路徑、name等
spring管理struts:< constant name = “struts.objectFactory” value = “spring” /> - applicationContext-dao.xml
spring 整合hibernate中新增xxxx.hbm.xml
<bean id="sessionFactory" class="org.springFramework.orm.hibernate5.LocalSessionFactoryBean">
<property name="dataSource" ref="dataSource" />
<property name="mappingResources">
<list>
<value>com/chuai/pojo/Role.hbm.xml</value>
<value>com/chuai/pojo/user. hbm.xml</value>
</list>
</property>
</bean>