404排查总结(struts2)

  • 静态页面(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>

猜你喜欢

转载自blog.csdn.net/weixin_44142296/article/details/85254331