- 浏览: 442149 次
- 性别:
- 来自: 北京
-
文章分类
- 全部博客 (211)
- 思考》感想 (11)
- 数据库操作 譬如Oracle大叔 (7)
- java,咱们有缘吗 (16)
- delphi,你还好吗 (2)
- SSH,哥三儿好 (31)
- 问题!问题?问题!? (9)
- WITH WORK (1)
- 算法与模式 莫事^_^ (10)
- JSP,可以叫你P兄么 (2)
- 啊,咋科斯╮(╯▽╰)╭ (6)
- 巨人肩上的小石子 (2)
- flash她妹flex (38)
- 项目管理 (10)
- 奥特曼,你弟Android来了 (4)
- 麻辣儿gis (0)
- maven 嘛味儿 (3)
- ws 哇塞 webservice (5)
- Oh,no!!!,NoSql (1)
- QQ他哥也是个企鹅,Linux (6)
- 姓i还是姓my 你都叫batis ibatis (3)
- 我喜欢夏天(春天旁边的那个季节)Springside (1)
- 测试! 测就测吧,没有喝(⊙o⊙) (3)
- 是晕+_+ 是浮云 还是云计算 (4)
- ExtJS 你是flex他哥还是他妹 (10)
- svg 你丫的资料真少 (3)
- 叫屁屁还是叫加加 ⊙﹏⊙ c++ (5)
- 鸟,还是只百灵鸟 BIRT (1)
- 权限管理 有权真好 是吧-_-! (1)
- SSH (2)
- 哥三儿好 (2)
- nginx (1)
- Oh (1)
- no!!! (1)
- NoSql (1)
最新评论
-
mong619226543:
谢谢
No identifier specified for entity -
akka_li:
没看懂啥意思!什么原因导致java.net.SocketExc ...
java.net.SocketException: Connection reset 问题解决方法 -
west_jing:
1L正解,<mvc:annotation-driven/ ...
<mvc:default-servlet-handler/> 导致 Controller失效 -
u010954806:
tgfhfdhdf
Spring Security 国际化文件 messages_zh_CN.properties 中文解释 -
yenshen:
我也碰到这个问题了,找了一大圈,最终问题解决了:<con ...
<mvc:default-servlet-handler/> 导致 Controller失效
web.xml----->
beans.xml(spring配置)----->
struts.cfg.xml----->
persistence.xml----->
<?xml version="1.0" encoding="UTF-8"?> <web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"> <!-- web容器实例化spring实例 --> <context-param> <param-name>contextConfigLocation</param-name> <param-value>classpath:beans.xml</param-value> </context-param> <listener> <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class> </listener> <!--OpenEntityManagerInView --> <filter> <filter-name>Spring OpenEntityManagerInViewFilter</filter-name> <filter-class>org.springframework.orm.jpa.support.OpenEntityManagerInViewFilter</filter-class> </filter> <filter-mapping> <filter-name>Spring OpenEntityManagerInViewFilter</filter-name> <url-pattern>/*</url-pattern> </filter-mapping> <!-- 处理中文字符乱码问题 --> <filter> <filter-name>encoding</filter-name> <filter-class>org.springframework.web.filter.CharacterEncodingFilter</filter-class> <init-param> <param-name>encoding</param-name> <param-value>UTF-8</param-value> </init-param> </filter> <filter-mapping> <filter-name>encoding</filter-name> <url-pattern>/*</url-pattern> </filter-mapping> <!-- 整合struts --> <servlet> <servlet-name>struts</servlet-name> <servlet-class>org.apache.struts.action.ActionServlet</servlet-class> <init-param> <param-name>config</param-name> <param-value>/WEB-INF/struts-config.xml</param-value> </init-param> <load-on-startup>0</load-on-startup> </servlet> <servlet-mapping> <servlet-name>struts</servlet-name> <url-pattern>*.do</url-pattern> </servlet-mapping> <welcome-file-list> <welcome-file>index.jsp</welcome-file> </welcome-file-list> </web-app>
beans.xml(spring配置)----->
<?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:p="http://www.springframework.org/schema/p" xmlns:aop="http://www.springframework.org/schema/aop" xmlns:context="http://www.springframework.org/schema/context" xmlns:jee="http://www.springframework.org/schema/jee" xmlns:tx="http://www.springframework.org/schema/tx" xsi:schemaLocation=" http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.5.xsd http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-2.5.xsd http://www.springframework.org/schema/jee http://www.springframework.org/schema/jee/spring-jee-2.5.xsd http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.5.xsd"> <!-- 配置entityManagerFactory 相当于(SessionFactory) --> <bean id="entityManagerFactory" class="org.springframework.orm.jpa.LocalEntityManagerFactoryBean"> <property name="persistenceUnitName" value="itcast"/> </bean> <!-- 配置事务信息 --> <bean id="txManager" class="org.springframework.orm.jpa.JpaTransactionManager"> <property name="entityManagerFactory" ref="entityManagerFactory"/> </bean> <!-- 采用注解方式进行事务配置 --> <tx:annotation-driven transaction-manager="txManager"/> <!-- 采用注解注入对象 --> <context:annotation-config/> <bean id="personService" class="com.xx.service.impl.PersonServiceBean"></bean> <bean name="/list" class="com.xx.web.action.PersonAction"></bean> </beans>
struts.cfg.xml----->
<?xml version="1.0" encoding="UTF-8" ?> <!DOCTYPE struts-config PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 1.3//EN" "http://struts.apache.org/dtds/struts-config_1_3.dtd"> <struts-config> <action-mappings> <action path="/list" type="com.xx.web.action.PersonAction" scope="request" validate="false"> <forward name="list" path="/WEB-INF/page/list.jsp"/> </action> </action-mappings> <!-- 目的是让spring管理action bean--> <controller> <set-property property="processorClass" value="org.springframework.web.struts.DelegatingRequestProcessor"/> </controller> </struts-config>
persistence.xml----->
<?xml version="1.0"?> <persistence xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd" version="1.0"> <persistence-unit name="itcast" transaction-type="RESOURCE_LOCAL"> <properties> <property name="hibernate.dialect" value="org.hibernate.dialect.MySQL5Dialect"/> <property name="hibernate.connection.driver_class" value="org.gjt.mm.mysql.Driver"/> <property name="hibernate.connection.username" value="root"/> <property name="hibernate.connection.password" value="root"/> <property name="hibernate.connection.url" value="jdbc:mysql://localhost:3306/test?useUnicode=true&characterEncoding=UTF-8"/> <property name="hibernate.max_fetch_depth" value="3"/> <property name="hibernate.hbm2ddl.auto" value="update"/> </properties> </persistence-unit> </persistence>
发表评论
-
Spring Security 国际化文件 messages_zh_CN.properties 中文解释
2011-05-04 17:08 7162Spring Security 国际化文件 messages_ ... -
两个Spring Security问题
2011-05-04 17:06 2119两个Spring Security问题 ---------》 ... -
一个spring security 配置列子
2011-05-03 16:48 1272<?xml version="1.0" ... -
spring security与数据库交互实现简单例子
2011-04-19 16:34 1696spring security与数据库交互实现简单例子 最近 ... -
用struts2 验证用户登录demo
2011-01-28 15:38 2191用struts2 验证用户登录de ... -
Struts2.1.8 执行顺序
2011-01-28 15:18 897public class LoginAction extend ... -
Struts2令人纠结的一个问题
2011-01-27 09:47 1028我用Struts2加入自定义的library如下图,就报错, ... -
一份spring配置文件
2011-01-13 14:05 998<?xml version="1.0" ... -
Hibernate关系映射总结
2010-10-18 10:35 1284其实这些东东完全可以参考帮助文档;这里只是总结下。 》》》一对 ... -
No identifier specified for entity:XX.xx
2010-10-12 17:25 1691No identifier specified for ent ... -
Annotation对Hibernate中联合主键定义
2010-10-11 13:28 2246public class User { private in ... -
@MappedSuperclass的用法
2010-10-11 10:21 12685@MappedSuperclass的用法 用在实体的继承过程 ... -
公共dao的结构
2010-09-29 16:17 1396-----------》公共dao的结构 -----共用接口 ... -
No identifier specified for entity
2010-09-29 16:07 12034org.hibernate.AnnotationExcepti ... -
一个简单的ssh配置模板
2009-09-12 17:08 1743web.xml------> <?xml vers ... -
Struts----学习笔记 用form提交和sturts提交
2009-09-12 17:02 1243struts是这么配置的 <action path= ... -
Spring学习笔记------Spring和Hibernate的整合配置
2009-09-12 09:15 1433Spring和Hibernate整合配置有两种方式: 方 ... -
Spring学习笔记--------AOP操作
2009-09-10 10:29 1082* AOP操作可与通过注解和xml的方式实现; * 有个问题, ... -
Hibernate学习笔记1--------一个简单的应用
2009-08-30 08:26 1043工具类---------> /** *用单例模式 ... -
Hibernate学习笔记2--------------------一对多、多对一简单配置
2009-08-30 08:40 1034一的一端------------------------> ...
相关推荐
在"SSJ.rar_Jap_spring_ssj"这个项目中,开发者可能已经配置好了这三个组件的集成,使得它们能够协同工作。文件列表中只有一个"SSJ",这可能是项目的主入口点或者是配置文件的集合。在这个项目中,可能包含了以下...
在压缩包`ssj9685.github.io-master`中,我们可以期待找到项目的源代码、静态资源和配置文件。 JavaScript是一种广泛应用于Web开发的脚本语言,由Netscape公司的Brendan Eich在1995年发明。它是Web前端开发的核心...
通过这个项目,参与者将学习到如何使用YII2框架进行PHP开发,包括MVC的设计模式、路由配置、数据库交互、模板渲染、表单处理、认证和授权等核心概念。同时,他们也会了解如何利用Composer管理依赖,以及如何使用Git...
8. **SSJ**:标签中提到的“ssj”可能是指Spring + SpringMVC + JPA(Java Persistence API),JPA是Java EE规范,用于对象关系映射。相比于MyBatis,JPA提供了更高层次的抽象,可以直接操作对象而不是SQL,简化了...
6. **终身受用**:这个描述意味着该项目提供的SSM配置和实现是经过验证和优化的,可以作为一个基础模板,为其他类似的项目提供参考。无论是初学者还是有经验的开发者,都能从中学习到SSM框架的实用技巧和最佳实践。 ...
在"ssj"这个压缩包中,我们可以期待看到以下常见的项目目录和文件结构: 1. **src/main/java**:包含所有Java源代码,如Action类、Service层、DAO层等。 2. **src/main/resources**:可能存放配置文件,如Struts2的...