频道栏目
IT货架 > > 正文
myPriva
网友分享于:Jun 12, 2018 11:38:51 PM    来源: IT货架   
web.xml:
<?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
<context-param>
  <param-name>contextConfigLocation</param-name>
  <param-value>/WEB-INF/config/root-context.xml</param-value>
</context-param>
<filter>
  <filter-name>Set Character Encoding</filter-name>
  <filter-class>org.springframework.web.filter.CharacterEncodingFilter</filter-class>
  <init-param>
   <param-name>encoding</param-name>
   <param-value>utf8</param-value>
  </init-param>
</filter>
<filter-mapping>
  <filter-name>Set Character Encoding</filter-name>
  <url-pattern>/*</url-pattern>
</filter-mapping>
<listener>
  <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>
<listener>
  <listener-class>org.springframework.web.context.request.RequestContextListener</listener-class>
</listener>
<servlet>
  <servlet-name>appServlet</servlet-name>
  <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
  <init-param>
   <param-name>contextConfigLocation</param-name>
   <param-value>/WEB-INF/config/servlet-context.xml</param-value>
  </init-param>
  <load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
  <servlet-name>appServlet</servlet-name>
  <url-pattern>*.do</url-pattern>
</servlet-mapping>
<session-config>
  <session-timeout>30</session-timeout>
</session-config>
<distributable></distributable>
<!--
<resource-ref>
    <res-ref-name>jdbc/MyDataSource</res-ref-name>
    <res-type>javax.sql.DataSource</res-type>
    <res-auth>Container</res-auth>
    <res-sharing-scope>Shareable</res-sharing-scope>
  </resource-ref>
  -->
<error-page>
  <error-code>404</error-code>
  <location>/error404.jsp</location>
</error-page>
</web-app>
--------------------------------------------------------
servlet-context.xml:
<?xml version="1.0" encoding="UTF-8"?>
<beans:beans xmlns="http://www.springframework.org/schema/mvc"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:beans="http://www.springframework.org/schema/beans"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:mvc="http://www.springframework.org/schema/mvc"
xsi:schemaLocation="http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-3.0.xsd
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">

<!-- DispatcherServlet Context: defines this servlet's request-processing infrastructure -->

<!-- Enables the Spring MVC @Controller programming model -->
<annotation-driven />
<context:component-scan base-package="com.citi.psp.web.controller" />

<!-- Handles HTTP GET requests for /resources/** by efficiently serving up static resources in the ${webappRoot}/resources directory -->
<!-- <resources mapping="/resources/**" location="/resources/" /> -->
<!-- <mvc:default-servlet-handler/>-->
<!-- <beans:import resource="controllers.xml" /> -->

<!-- added by Wang Bing. start -->
<mvc:view-controller path="/" view-name="index"/>

<beans:bean
class="org.springframework.web.servlet.view.UrlBasedViewResolver">
<beans:property name="viewClass">
<beans:value>
org.springframework.web.servlet.view.tiles2.TilesView
</beans:value>
</beans:property>
</beans:bean>

<beans:bean
class="org.springframework.web.servlet.view.tiles2.TilesConfigurer">
<beans:property name="definitions">
<beans:list>
<beans:value>/WEB-INF/config/tiles.xml</beans:value>
</beans:list>
</beans:property>
<beans:property name="preparerFactoryClass" value="org.springframework.web.servlet.view.tiles2.SpringBeanPreparerFactory" />
</beans:bean>

<!-- Resolves views selected for rendering by @Controllers to .jsp resources in the /WEB-INF/views directory -->
<!-- <beans:bean>
<beans:property name="prefix" value="/WEB-INF/views/" />
<beans:property name="suffix" value=".jsp" />
</beans:bean> -->
<!-- added by Wang Bing. end -->


<!-- Configures Handler Interceptors -->
<mvc:interceptors> 
<mvc:interceptor>
  <mvc:mapping path="/**"/>
  <beans:bean />
</mvc:interceptor>

</mvc:interceptors>

<beans:bean/>

</beans:beans>
----------------------------------
root-context.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"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd">

<!-- Root Context: defines shared resources visible to all other web components -->

<!-- trace method entry and method exit info for debug prupose -->
<bean/>

<import resource="serviceContext.xml" />
<import resource="mail-sender.xml" />

</beans>
----------------------------------------------
serviceContext.xml:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN 2.0//EN"
          "http://www.springframework.org/dtd/spring-beans-2.0.dtd">
<beans>
    <import resource="daoContext.xml" />
<bean
class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
<property name="dataSource">
<ref bean="springDataSource" />
</property>
</bean>

<bean
class="org.springframework.transaction.interceptor.TransactionInterceptor">
<property name="transactionManager">
<ref bean="txManager"/>
</property>
<property name="transactionAttributes">
<props>
<prop key="*">
PROPAGATION_REQUIRED, -Exception,-Error,-Throwable
</prop>
</props>
</property>
</bean>

<bean abstract="true">
<property name="interceptorNames">
<list>
<value>transactionInterceptor</value>
<value>traceInterceptor</value>
</list>
</property>
</bean>

<bean parent="baseBO">
        <property name="target">
            <bean>
            </bean>
        </property>
    </bean>
    <bean parent="baseBO">
        <property name="target">
            <bean>
            </bean>
        </property>
    </bean>
   
    <bean parent="baseBO">
        <property name="target">
            <bean>
                <property name="groupCommonDao">
                    <ref bean="groupCommonDaoTarget"/>
                </property>
            </bean>
        </property>
    </bean>
</beans>
--------------------------------------------
daoContext.xml:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN 2.0//EN"
  "http://www.springframework.org/dtd/spring-beans-2.0.dtd">
<beans>
<bean
class="com.citi.psp.web.common.PropertyPlaceholderConfigurerExt">
<property name="locations">
<list>
<value>classpath:jdbc-uat.properties</value>
<value>/WEB-INF/classes/mail_sender.properties</value>
</list>
</property>
</bean>

<bean
class="org.apache.commons.dbcp.BasicDataSource">
<property name="driverClassName">
<value>${jdbc.driver}</value>
</property>
<property name="url">
<value>${jdbc.url}</value>
</property>
<property name="username">
<value>${jdbc.user}</value>
</property>
<property name="password">
<value>${jdbc.pwd}</value>
</property>
<property name="initialSize">
<value>5</value>
</property>
<property name="maxActive">
<value>15</value>
</property>
</bean>

<bean
class="org.springframework.jdbc.support.nativejdbc.OracleJdbc4NativeJdbcExtractor"
lazy-init="true" />

<bean>
<property name="dataSource" ref="springDataSource" />
<property name="nativeJdbcExtractor" ref="nativeJdbcExtractor" />
</bean>

   <bean abstract="true">
<property name="interceptorNames">
<list>
<value>traceInterceptor</value>
</list>
</property>
</bean>
   
<!-- ibatis configration -->
<bean
class="org.springframework.orm.ibatis.SqlMapClientFactoryBean">
<property name="configLocation">
<value>classpath:sql-map-config.xml</value>
</property>
<property name="dataSource">
<ref bean="springDataSource" />
</property>
</bean>

<bean>
       <property name="sqlMapClient"  ref = "sqlMapClient" />
    </bean>

<bean abstract="true">
        <property name="sqlMapClientTemplate">
            <ref bean="sqlMapClientTemplate" />
        </property>
        <property name="jdbcTemplate">
            <ref bean="jdbcTemplate" />
        </property>
    </bean>
<!-- add dao object here -->
    <bean parent="baseDaoProxy">
         <property name="target">
            <bean parent="baseDao"/>
        </property>
        <property name="proxyInterfaces"  value = "com.citi.psp.dao.groupView.hr.IHrDao" />
    </bean>
</beans>
-----------------------------------------------
PropertyPlaceholderConfigurerExt.java
public class PropertyPlaceholderConfigurerExt extends
PropertyPlaceholderConfigurer {

private final static String PRIVATE_KEY = "abcdefghigklmnopqrstuvwxyz123456789";
@Override
protected void processProperties(
ConfigurableListableBeanFactory beanFactory, Properties props)
throws BeansException {
String password = props.getProperty("jdbc.pwd");
if (password != null) {
DesEncrypter encrypter = new DesEncrypter(PRIVATE_KEY);
String decodecPwd = encrypter.decrypt(password);
props.setProperty("jdbc.pwd", decodecPwd);
}

super.processProperties(beanFactory, props);

}

}
-------------------------------------
MethodTraceInterceptor.java
public class MethodTraceInterceptor implements MethodInterceptor, Serializable {


    /** avoid serializing the logger */
    protected static final transient Log LOGGER = LogFactory.getLog(MethodTraceInterceptor.class);

    /**
     * @see MethodInterceptor#invoke(MethodInvocation)
     */
    public Object invoke(MethodInvocation invocation) throws Throwable {
        String invokeInfo = null;
        if (LOGGER.isDebugEnabled()) {
            invokeInfo = this.buildInvokeInfo(invocation);
            LOGGER.debug("Entering method " + invokeInfo);
        }
        try {
            Object returnValue = invocation.proceed();
            if (LOGGER.isDebugEnabled() && !(returnValue instanceof Void)) {
                LOGGER.debug("return value is:[" + toString(returnValue) + "]");
            }
            return returnValue;
        } finally {
            if (LOGGER.isDebugEnabled()) {
                LOGGER.debug("Exiting method " + invokeInfo);
            }
        }
    }

    private String buildInvokeInfo(MethodInvocation invocation) {
        Method method = invocation.getMethod();
        Class[] paramTypes = method.getParameterTypes();

        StringBuffer invokeInfo = new StringBuffer("'");
        invokeInfo.append(method.getName());
        invokeInfo.append("(");
        int count = paramTypes.length - 1;
        for (int i = 0; i < count; i++) {
            invokeInfo.append(paramTypes[i]);
            invokeInfo.append(", ");
        }
        if (count != -1) {
            invokeInfo.append(paramTypes[count]);
        }
        invokeInfo.append(")' in class [");
        invokeInfo.append(invocation.getThis().getClass().getName());
        invokeInfo.append("]\nArguments value is [");
        Object[] args = invocation.getArguments();
        count = args.length - 1;
        for (int i = 0; i < count; i++) {
            invokeInfo.append(this.toString(args[i]));
            invokeInfo.append(", ");
        }
        if (count != -1) {
            invokeInfo.append(this.toString(args[count]));
        }
        invokeInfo.append("]");
        return invokeInfo.toString();
    }

    private String toString(Object object) {
        if (object == null) {
            return "null";
        }
        return ReflectionToStringBuilder.reflectionToString(object);
    }
}
----------------
tiles.xml:
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE tiles-definitions PUBLIC
       "-//Apache Software Foundation//DTD Tiles Configuration 2.0//EN"
       "http://tiles.apache.org/dtds/tiles-config_2_0.dtd">

<tiles-definitions>
<definition name="base.definition" template="/WEB-INF/views/template.jsp">
<put-attribute name="title" value="" />
<put-attribute name="header" value="" />
<put-attribute name="menu" value="/WEB-INF/views/menu.jsp" />
<put-attribute name="body" value="" />
<put-attribute name="footer" value="" />
</definition>
<!-- common header , menu, footer -->
<definition name="commonDefinition" template="/WEB-INF/views/template.jsp">
<put-attribute name="title" value="" />
<put-attribute name="header" value="/WEB-INF/views/header.jsp" />
<put-attribute name="menu" value="/WEB-INF/views/menu.jsp" />
<put-attribute name="body" value="" />
<put-attribute name="footer" value="/WEB-INF/views/footer.jsp" />
</definition>

<!-- maker part. -->
    <definition name="hrGroup_cw" extends="commonDefinition">
        <put-attribute name="body"   value="/WEB-INF/views/groupViews/hr/body_hr_cw.jsp" />
    </definition>
</tiles-definitions>
-------------------------------------
handleException.java
package com.citi.psp.web.common;

import java.io.IOException;
import java.io.PrintWriter;
import java.io.StringWriter;
import java.util.HashMap;
import java.util.Map;

import javax.annotation.Resource;
import javax.mail.MessagingException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.springframework.web.servlet.HandlerExceptionResolver;
import org.springframework.web.servlet.ModelAndView;

import com.citi.psp.service.mail.IMailSender;
import com.citi.psp.service.mail.impl.MailSenderArgumentNotFoundException;
import com.citi.psp.service.mail.impl.MailSenderDataNotFoundException;

public class ExceptionHandler implements HandlerExceptionResolver {

private PSPSLogger logger = new PSPSLogger(
ToolsUtil.getPropertyValue("PSPS_LOGGER"));

@Resource(name = "sysFailureMailSender")
private IMailSender sysFailMailSender;

@Override
public ModelAndView resolveException(HttpServletRequest req,
HttpServletResponse res, Object obj, Exception ex) {
handleException(ex, req);

String jumpTo = ToolsUtil.getPropertyValue("ERROR_DEFAULT_FORWARD");
String reqUrl = req.getRequestURI();

/*
* Page flow will redirect to the login page if error occurred before
* login in.
*/
if (reqUrl.contains("principle.do")) {
jumpTo = ToolsUtil.getPropertyValue("ACCESS_DENIED");
return new ModelAndView(jumpTo);
}

Map<String, Object> map = new HashMap<String, Object>();
String errorTitle = ToolsUtil.getPropertyValue("GENERAL_ERROR_TITLE");
String errorMsg = ToolsUtil.getPropertyValue("GENERAL_ERROR");
map.put("errorTitle", errorTitle);
map.put("errorMsg", errorMsg);
return new ModelAndView(jumpTo, map);
}

/**
* Do some operation after monitoring exception occurred. 1. Log exception
* info; 2. Send mail to administrator with required info.
*
* @param ex
* @param req
* @throws MessagingException
* @throws MailSenderDataNotFoundException
* @throws MailSenderArgumentNotFoundException
*/
protected void handleException(Exception ex, HttpServletRequest req) {
logger.error("Error occurred as below", ex);
String generalMsg = ToolsUtil.getPropertyValue("GENERAL_ERROR");
String errorTraceStack = "";
try {
errorTraceStack = this.getStackTrace(ex);
} catch (IOException e) {
logger.error("Error:", e);
}

String geID = PrincipleUtility.getUserGEID(req);
String popID = PrincipleUtility.getCurPopID(req);

Map<String, String> args = new HashMap<String, String>();
args.put("generalMsg", generalMsg);
args.put("errorTraceStack", errorTraceStack);

if (logger.isDebugEnabled()) {
logger.debug("Send mail to administrator when an exception occurred.");
}
try {
/*
* Comment it as we don't hope send error detail to business admin, will open once we find proper support team eMail.
*/
//sysFailMailSender.send(geID, popID, args, null);
} catch (Exception e) {
logger.error("Error occurred as below", ex);
}
}

/**
* Get error trace stack.
*
* @param t
* @return
* @throws IOException
*/
private String getStackTrace(Throwable t) throws IOException {
String stackTrace = null;
StringWriter sw = new StringWriter();
PrintWriter pw = new PrintWriter(sw);
t.printStackTrace(pw);
pw.close();
sw.close();
stackTrace = sw.getBuffer().toString();
return stackTrace;
}
}
---------------------------------------
sql-map-config.xml
<?xml version="1.0" encoding="UTF-8" ?>

<!DOCTYPE sqlMapConfig     
    PUBLIC "-//ibatis.apache.org//DTD SQL Map Config 2.0//EN"     
    "http://ibatis.apache.org/dtd/sql-map-config-2.dtd">
<sqlMapConfig>
<settings lazyLoadingEnabled="true"/>
<sqlMap resource="package.dao.xml"/>
</sqlMapConfig>
------------------------------
log4j.properties
#log4j.rootLogger = [ level ] , appenderName, appenderName, ...
#lever:ERROR>WARN>INFO>DEBUG
#you can only have one rootLogger! it means rootlogger's configuration will be applied to all other loggers.
log4j.rootLogger = info, console, infoRecorder

#level=INFO,all can be output
#console is set to be a ConsoleAppender
log4j.appender.console = org.apache.log4j.ConsoleAppender
#log4j.appender.console.Threshold = DEBUG
#console have four patterns
log4j.appender.console.layout = org.apache.log4j.PatternLayout
#define the output type
log4j.appender.console.layout.ConversionPattern =%p [%t] %C.%M(%L) | %m%n


#file is set to output to a extra file
log4j.appender.infoRecorder = org.apache.log4j.RollingFileAppender
#the absolute route of the log4j file
#log4j.appender.infoRecorder.File = ${webapp.root}/logs/inforLog.log
log4j.appender.infoRecorder.File = /mylog.log
#the size
log4j.appender.infoRecorder.MaxFileSize = 1000KB
#back up a file
log4j.appender.infoRecorder.MaxBackupIndex = 1
log4j.appender.infoRecorder.layout = org.apache.log4j.PatternLayout
log4j.appender.infoRecorder.layout.ConversionPattern=%-d{yyyy-MM-dd HH\:mm\:ss} [%c]-[%p] - %m%n
#log4j.appender.infoRecorder.Threshold = DEBUG

#---------------------START log configuration for PSPS--------------------------
log4j.additivity.psps_logger=false
log4j.category.psps_logger=ERROR, PSPS_MAIN_TRACE, PSPS_CONSOLE

log4j.appender.PSPS_MAIN_TRACE=org.apache.log4j.RollingFileAppender
log4j.appender.PSPS_MAIN_TRACE.File=/mylog.log
log4j.appender.PSPS_MAIN_TRACE.MaxFileSize=20MB
log4j.appender.PSPS_MAIN_TRACE.MaxBackupIndex=20
log4j.appender.PSPS_MAIN_TRACE.layout=org.apache.log4j.PatternLayout
log4j.appender.PSPS_MAIN_TRACE.layout.ConversionPattern=%d{dd MMM yyyy HH:mm:ss,SSS} [%t] %5p  %C - %M - %m%n


log4j.appender.PSPS_CONSOLE = org.apache.log4j.ConsoleAppender
log4j.appender.PSPS_CONSOLE.layout = org.apache.log4j.PatternLayout
log4j.appender.PSPS_CONSOLE.layout.ConversionPattern=%d{dd MMM yyyy HH:mm:ss,SSS} [%t] %5p  %C - %M - %m%n
#---------------------END log configuration for PSPS--------------------------
-------------------------------------
UpdateAfterHRsChangedProc.java
public class UpdateAfterHRsChangedProc extends StoredProcedure {
private static final String FIRST_PARAM_TITLE = "cv_hr_id_array";
private static final String SECOND_PARAM_TITLE = "cv_pop_id";
private static final String THIRD_PARAM_TITLE = "cv_update_user";
private static final String FOURTH_PARAM_TITLE = "cv_countryAndLvs";
private static final String O_ARRAY = "cv_return_objs";
private static final String ARRAY_TYPE = "PSP_RETURN_OBJ_ARRAY";
private static final String OBJ_TYPE = "PSP_RETURN_OBJ";
private static final String STRING_TYPE_NAME = "STRING_ARRAY";

public UpdateAfterHRsChangedProc(JdbcTemplate jdbcTemplate, String procName) {
super(jdbcTemplate, procName);
setFunction(false);
declareParameter(new SqlParameter(FIRST_PARAM_TITLE, Types.ARRAY));
declareParameter(new SqlParameter(SECOND_PARAM_TITLE, Types.VARCHAR));
declareParameter(new SqlParameter(THIRD_PARAM_TITLE, Types.VARCHAR));
declareParameter(new SqlParameter(FOURTH_PARAM_TITLE, Types.ARRAY));
declareParameter(new SqlOutParameter(O_ARRAY, Types.ARRAY, ARRAY_TYPE,
new SqlReturnType() {

@Override
public List<ReturnObj> getTypeValue(CallableStatement cs,
int colIndx, int sqlType, String typeName)
throws SQLException {
Connection connection = cs.getConnection();
Map typeMap = connection.getTypeMap();
typeMap.put(OBJ_TYPE, ReturnObj.class);
Object[] data = (Object[]) ((Array) cs
.getObject(colIndx)).getArray();
ReturnObj[] returnObjs = Arrays.copyOf(data,
data.length, ReturnObj[].class);
List<ReturnObj> returnObjList = new ArrayList<ReturnObj>();
for (ReturnObj tmp : returnObjs) {
returnObjList.add(tmp);
}
return returnObjList;
}

}));

compile();
}

public List<ReturnObj> execute(List<String> hrs, String popID, String updateUser, List<String> countryAndLvs)
throws SQLException {
Map<String, Object> inputs = new HashMap<String, Object>();
Connection conn = DataSourceUtils.getConnection(this.getJdbcTemplate().getDataSource());
OracleConnection oracleConn = (OracleConnection) this.getJdbcTemplate()
.getNativeJdbcExtractor().getNativeConnection(conn);
ArrayDescriptor arrayDescriptor = new ArrayDescriptor(STRING_TYPE_NAME,
oracleConn);
String[] hrStrs = new String[hrs.size()];
ARRAY hrArray = new ARRAY(arrayDescriptor, oracleConn,
hrs.toArray(hrStrs));

inputs.put(FIRST_PARAM_TITLE, hrArray);
inputs.put(SECOND_PARAM_TITLE, popID);
inputs.put(THIRD_PARAM_TITLE, updateUser);

String[] countryAndLvStrs = new String[countryAndLvs.size()];
ARRAY clArray = new ARRAY(arrayDescriptor, oracleConn,
countryAndLvs.toArray(countryAndLvStrs));
inputs.put(FOURTH_PARAM_TITLE, clArray);

Map<String, Object> results = (Map<String, Object>) execute(inputs);

if ((!results.containsKey(O_ARRAY) || results.get(O_ARRAY) == null)) {
return null;
}
List<ReturnObj> returnObjs = (List<ReturnObj>) results.get(O_ARRAY);

return returnObjs;
}
}
-----------------------------------------
GetRuleProc.java
import javax.sql.DataSource;

import oracle.jdbc.OracleTypes;

import org.springframework.jdbc.core.RowMapper;
import org.springframework.jdbc.core.SqlOutParameter;
import org.springframework.jdbc.core.SqlParameter;
import org.springframework.jdbc.object.StoredProcedure;

import com.citi.psp.model.rule.Rule;

public class GetRuleProc extends StoredProcedure {
private static final String FIRST_PARAM_TITLE = "cv_geid";
private static final String SECOND_PARAM_TITLE = "cv_pop_id";
private static final String THIRD_PARAM_TITLE = "cv_rule_result";

public GetRuleProc(DataSource dataSource, String procName) {
super(dataSource, procName);
setFunction(false);
declareParameter(new SqlParameter(FIRST_PARAM_TITLE, Types.VARCHAR));
declareParameter(new SqlParameter(SECOND_PARAM_TITLE, Types.NUMERIC));
declareParameter(new SqlOutParameter(THIRD_PARAM_TITLE,
OracleTypes.CURSOR, new RowMapper() {
public Rule mapRow(ResultSet rs, int rowNum)
throws SQLException {
return new Rule(rs.getLong("RULE_ID"),
rs.getString("HR_CAT"),
rs.getString("GOC_CAT"),
rs.getString("DRR_CAT"),
rs.getString("MRR_CAT"),
rs.getString("ACC_CAT"),
rs.getString("APP"),
rs.getString("RULE_NUMBER"),
rs.getString("ACC_FIN"),
rs.getString("POP_ID"),
rs.getString("STATUS"),
rs.getString("REC_CAT"),
rs.getString("CHECKER"),
rs.getString("EXCP"),
rs.getString("RULE_DESCRIPTION"));
}
}));
compile();
}

public List<Rule> execute(String geID, String popID) {
Map<String, Object> inputs = new HashMap<String, Object>();
inputs.put(FIRST_PARAM_TITLE, geID);
inputs.put(SECOND_PARAM_TITLE, popID);
Map<String, Object> results = execute(inputs);
List<Rule> rules = (List<Rule>) results.get(THIRD_PARAM_TITLE);
return rules;
}
}
------------------------------------------
BaseDao.java
public class BaseDao {

    protected SqlMapClientTemplate sqlMapClientTemplate = null;
   
    protected JdbcTemplate jdbcTemplate = null;

public void setJdbcTemplate(JdbcTemplate jdbcTemplate) {
this.jdbcTemplate = jdbcTemplate;
}

public void setSqlMapClientTemplate(SqlMapClientTemplate sqlMapClientTemplate) {
this.sqlMapClientTemplate = sqlMapClientTemplate;
}
}
-------------------------------------
相关推荐

广告服务联系QQ:1134687142 | 网站地图

版权所有: IT货架- 内容来自互联网,仅供用于技术学习,请遵循相关法律法规. 京ICP备11030978号-1