`
wjacketcn
  • 浏览: 26015 次
  • 性别: Icon_minigender_1
  • 来自: 深圳
社区版块
存档分类
最新评论
文章列表
public interface UserMapper { void insertUser(User user);   /** * 注解用来指定SQL语句,但是也可以用MyBatis的映射器XML文件。 * * @Select("SELECT * FROM user WHERE id = #{userId}") * */ User getUser(String userId); }
<?xml version="1.0" encoding="UTF-8"?> <mapper namespace="com.mybatis.mapper.UserMapper"> <insert id="insertUser" parameterType="com.mybatis.domain.User">         insert into user(name,age) values(#{name},#{age})        </inse ...
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE mapper            PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"            "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> <configuration> <settings>         <!-- changes from the defa ...
<bean id="dataSource" class="com.mchange.v2.c3p0.ComboPooledDataSource"> <property name="driverClass" value="oracle.jdbc.driver.OracleDriver"> </property> <property name="jdbcUrl" value=""> </property> ...
java中将数据对象序列化后保存到数据库中,并反序列化取出显示 更具体内容请参照:http://www.ibm.com/developerworks/cn/xml/x-datamineparsephp/index.html * 向数据库插入一条战斗回放记载      * @param matchMovie 比赛回放记载      */ ...
public static String getIpAddr(HttpServletRequest request) { String ip = request.getHeader("x-forwarded-for"); if (ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) { ip = request.getHeader("Proxy-Client-IP"); } if (ip == null || ip.length() = ...
<?xml version="1.0" encoding="UTF-8"?> <!--     Copyright 2010 The myBatis Team     Licensed under the Apache License, Version 2.0 (the "License");     you may not use this file except in compliance with the License.     You may obtain a copy of the License at ...
<?xml version="1.0" encoding="UTF-8"?> <!--     Copyright 2010 The myBatis Team     Licensed under the Apache License, Version 2.0 (the "License");     you may not use this file except in compliance with the License.     You may obtain a copy of the License at ...
<?xml version="1.0" encoding="UTF-8"?> <!--     Copyright 2010 The myBatis Team     Licensed under the Apache License, Version 2.0 (the "License");     you may not use this file except in compliance with the License.     You may obtain a copy of the License at ...
The EHCache integration is built on top of the ehcache-core and comes without any EHCache 3rd part applications. Users that want to use EHCache into their applications, have to download the 1.0.0 zip bundle, decompress it and add the jars in the classpath. just configure it in the mapper XML: <m ...
windows系统 Oracle 数据库连接数的修改 以下操作需要登录dba才能操作:C:\>sqlplus / as sysdba 1. 查看processes和sessions参数 SQL> show parameter processes SQL> show parameter sessions 2. 修改processes和sessions值   SQL> alter system set pro ...
1 JDBC transactions      <bean id="transactionManager" class="org.springframework.jdbc.       datasource.DataSourceTransactionManager">      <property name="dataSource">      <ref bean="dataSource"/>      </property>      </bean ...
Oracle特殊字符查询 (转自http://blog.csdn.net/zzx3q/article/details/6833857). Oracle查询中包含特殊的字符分别为%,_,&,想查询某数据表某字段的包含这种特殊字符的内容,需要使用转义字符,或者拼接字符串的方法。 0.原数据 select * from t_web_groups where groupid=10088; --------------------------------------------------------------------------- GROUPID    GROUPNA ...
Global site tag (gtag.js) - Google Analytics