MyBatis(3.2.3) - Mapped statements: The INSERT statement, Autogenerated keys
摘要:We can use the useGeneratedKeys and keyProperty attributes to let the database generate the auto_increment column value and set that generated value i
阅读全文
posted @
2016-03-01 10:19
huey2672
阅读(361)
推荐(0)
MyBatis(3.2.3) - Configuring MyBatis using XML, Mappers
摘要:Mapper XML files contain the mapped SQL statements that will be executed by the application using statement id. We need to configure the locations of
阅读全文
posted @
2016-02-29 16:15
huey2672
阅读(234)
推荐(0)
MyBatis(3.2.3) - Configuring MyBatis using XML, Settings
摘要:The default MyBatis global settings, which can be overridden to better suit application-specific needs, are as follows: <settings> <setting name="cach
阅读全文
posted @
2016-02-29 16:10
huey2672
阅读(238)
推荐(0)
MyBatis(3.2.3) - Configuring MyBatis using XML, typeHandlers
摘要:As discussed in the previous chapter, MyBatis simplifies the persistent logic implementation by abstracting JDBC. MyBatis uses JDBC under the hood and
阅读全文
posted @
2016-02-29 16:08
huey2672
阅读(653)
推荐(0)
MyBatis(3.2.3) - Configuring MyBatis using XML, typeAliases
摘要:In the SQL Mapper configuration file, we need to give the fully qualified name of the JavaBeans for the resultType and parameterType attributes. An ex
阅读全文
posted @
2016-02-29 15:01
huey2672
阅读(334)
推荐(0)
MyBatis(3.2.3) - Configuring MyBatis using XML, Properties
摘要:The properties configuration element can be used to externalize the configuration values into a properties file and use the properties' key names as p
阅读全文
posted @
2016-02-29 14:58
huey2672
阅读(204)
推荐(0)
MyBatis(3.2.3) - Configuring MyBatis using XML, Environment
摘要:The key component of MyBatis is SqlSessionFactory from which we get SqlSession and execute the mapped SQL statements. The SqlSessionFactory object can
阅读全文
posted @
2016-02-29 14:51
huey2672
阅读(904)
推荐(0)
MyBatis(3.2.3) - hello world
摘要:1. 创建数据表(MySQL): DROP TABLE IF EXISTS `department`; CREATE TABLE `department` ( `did` int(10) unsigned NOT NULL AUTO_INCREMENT, `dept_name` varchar(12
阅读全文
posted @
2016-02-27 10:43
huey2672
阅读(395)
推荐(0)
Quartz Scheduler(2.2.1) - Integration with Spring
摘要:1. maven 依赖: 3.2.3.RELEASE 2.2.1 org.springframework spring-beans ${spring.version} org.springframework ...
阅读全文
posted @
2016-01-07 17:26
huey2672
阅读(309)
推荐(0)
Quartz Scheduler(2.2.1) - Working with JobStores
摘要:About Job StoresJobStores are responsible for keeping track of all the work data you give to the scheduler: jobs, triggers, calendars, and so forth.Se...
阅读全文
posted @
2016-01-07 12:42
huey2672
阅读(539)
推荐(0)
Quartz Scheduler(2.2.1) - Working with SchedulerListeners
摘要:SchedulerListenersSchedulerListeners are much like TriggerListeners and JobListeners, except they receive notification of events within the Scheduler ...
阅读全文
posted @
2016-01-07 10:56
huey2672
阅读(296)
推荐(0)
Quartz Scheduler(2.2.1) - Working with TriggerListeners and JobListeners
摘要:TriggerListeners and JobListenersListeners are objects that you create to perform actions based on events occurring within the scheduler. As indicated...
阅读全文
posted @
2016-01-07 10:40
huey2672
阅读(360)
推荐(0)
Quartz Scheduler(2.2.1) - Usage of CronTriggers
摘要:Cron is a UNIX tool that has been around for a long time, so its scheduling capabilities are powerful and proven. The CronTrigger class is based on th...
阅读全文
posted @
2016-01-06 21:38
huey2672
阅读(439)
推荐(0)
Quartz Scheduler(2.2.1) - Usage of SimpleTrigger
摘要:SimpleTrigger should meet your scheduling needs if you need to have a job execute exactly once at a specific moment in time, or at a specific moment i...
阅读全文
posted @
2016-01-06 20:34
huey2672
阅读(321)
推荐(0)
Quartz Scheduler(2.2.1) - Usage of Calendars
摘要:Quartz Calendar objects (notjava.util.Calendar objects) can be associated with triggers at the time the trigger is defined and stored in the scheduler...
阅读全文
posted @
2016-01-06 19:37
huey2672
阅读(239)
推荐(0)
Quartz Scheduler(2.2.1) - Usage of JobDataMap
摘要:The JobDataMap can be used to hold any amount of (serializable) data objects which you wish to have made available to the job instance when it execute...
阅读全文
posted @
2016-01-06 16:29
huey2672
阅读(359)
推荐(0)
Quartz Scheduler(2.2.1) - hello world
摘要:简单示例1. maven 依赖 org.quartz-scheduler quartz 2.2.1 org.quartz-scheduler quartz-jobs 2.2.1 ...
阅读全文
posted @
2016-01-06 11:50
huey2672
阅读(679)
推荐(0)
Log4j(1.2.17) - hello world
摘要:1. Maven 依赖 log4j log4j 1.2.17 2. 配置log4j.propertieslog4j.rootLogger = warn, STDOUT, DEBUG, ERROR## Consolelog4j.appender....
阅读全文
posted @
2015-12-29 10:41
huey2672
阅读(770)
推荐(0)
Commons CLI - Usage
摘要:Usage Scenarios The following sections describe some example scenarios on how to use CLI in applications. Using a boolean option A boolean option is r
阅读全文
posted @
2015-11-24 09:34
huey2672
阅读(444)
推荐(0)
Jedis - hello world
摘要:Maven Dependency: redis.clients jedis 2.7.2 jar compileUse:Jedis jedis = new Jedis("127.0.0.1", 6379);jedis.set("foo", "bar");String va...
阅读全文
posted @
2015-09-29 14:48
huey2672
阅读(222)
推荐(0)