Myeclipse SSH整合开发 就是Add xxx capabilities那种
可能是jar包的原因,运行程序就是404
网上的ssh整合都是以前的了
额,好吧,我承认我是菜鸟,什么都不会
求手把手搭建一个ssh环境。
给出我全部的分了SSHMyEclipse
可能是jar包的原因,运行程序就是404
网上的ssh整合都是以前的了
额,好吧,我承认我是菜鸟,什么都不会
求手把手搭建一个ssh环境。
给出我全部的分了SSHMyEclipse
解决方案 »
- 一表格中含有迭代若干个checkbox 如何点击删除将所有checked传入action
- 望指点
- Struts2配置文时报错 郁闷了 帮忙看下
- 我用jdbc连接SQL2005,出现了这样的问题,请位高手指点一下,怎么没回复的啊!
- 疯了!org.springframework.beans.factory.BeanCreationException
- eclipse我的包不能编译为什么?
- 江湖救急!Integer变量赋值后,变回默认值0.0
- 关于领域模型的问题
- APACHE2.0.54+TOMCAT5.0.28高手请进(开10个贴,1000分悬赏)!
- 今年做课题,但不知做什么好?哪位指点一下?
- 如何调用局域网另外一台主机的EJB
- hibernate的自动增长和数据库的自动增长问题
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
version="2.5">
<display-name></display-name>
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>classpath:/applicationContext.xml</param-value>
</context-param>
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>
<filter>
<filter-name>struts2</filter-name>
<filter-class>
org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter
</filter-class>
</filter>
<filter-mapping>
<filter-name>struts2</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<welcome-file-list>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>
</web-app>applicationContext.xml配置:
<?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:tx="http://www.springframework.org/schema/tx" xmlns:context="http://www.springframework.org/schema/context"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-3.0.xsd
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-3.0.xsd
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-3.0.xsd"> <context:annotation-config />
<context:component-scan base-package="***.***.***" /> <!-- 读取config.properties配置文件 -->
<context:property-placeholder location="classpath:config.properties" />
<!-- 数据源 -->
<bean id="dataSource" class="com.jolbox.bonecp.BoneCPDataSource"
destroy-method="close">
<property name="driverClass" value="${driverClass}" />
<property name="jdbcUrl" value="${jdbcUrl}" />
<property name="username" value="${username}" />
<property name="password" value="${password}" />
<!--检查数据库连接池中空闲连接的间隔时间,单位是分,默认值:4,如果要取消则设置为0 -->
<property name="idleConnectionTestPeriodInMinutes" value="${idleConnectionTestPeriodInMinutes}" />
<!-- 连接池中未使用的链接最大存活时间,单位是分,默认值:1,如果要永远存活设置为0 -->
<property name="idleMaxAgeInMinutes" value="${idleMaxAgeInMinutes}" />
<!-- 设置每个分区含有connection最大个数 -->
<property name="maxConnectionsPerPartition" value="${maxConnectionsPerPartition}" />
<!-- 设置每个分区含有connection最小个数 -->
<property name="minConnectionsPerPartition" value="${minConnectionsPerPartition}" />
<!-- 分区数 ,默认值2,最小1,推荐3-4,视应用而定 -->
<property name="partitionCount" value="${partitionCount}" />
<!-- 设置分区中的connection增长数量 -->
<property name="acquireIncrement" value="${acquireIncrement}" />
<!-- 设置报告缓冲区大小 -->
<property name="statementsCacheSize" value="${statementsCacheSize}" />
<!-- 设置发布帮助线程数 -->
<property name="releaseHelperThreads" value="${releaseHelperThreads}" />
</bean> <!-- Hibernate3配置,sessionFactory配置 -->
<bean id="sessionFactory"
class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
<!-- 配置SessionFactory所需的数据源,注入上面定义的dataSource -->
<property name="dataSource">
<ref bean="dataSource" />
</property>
<!-- 定义hibernate的SessionFactory的属性 -->
<property name="hibernateProperties">
<props>
<prop key="hibernate.dialect">
org.hibernate.dialect.MySQLDialect
</prop>
<prop key="hibernate.show_sql">false</prop>
</props>
</property>
<!-- mappingResources属性用来列出全部映射文件 -->
<property name="mappingResources">
<list>
<!-- 配置所有PO映射文件 -->
<value>***/****/****.hbm.xml</value>
</list>
</property>
</bean> <!-- 配置事务 -->
<bean id="txManager"
class="org.springframework.orm.hibernate3.HibernateTransactionManager">
<property name="sessionFactory" ref="sessionFactory"></property>
</bean>
<!-- 采用注解方式配置事务 -->
<tx:annotation-driven transaction-manager="txManager" /></beans>
其中的“*”号表示包名。SSH框架集成在一起的配置文件主要是这两个文件,Hibernate的hbm.xml文件按照Hibernate的要求去写就可以了。再加入相关jar包及依赖包就可以了。