Java Virtal Machine.net

[ News ] rss

February 01, 2011

Mark Wielaard: New GPG key. Finally created a new GPG key using gnupg. The old one was a DSA/1024 bits one and 8 years old. The new one is a RSA/2048 bits one. I will use the new one in the future to sign any release tarballs I might create. pub 2048R/57816A6A 2011-01-29 Key f...

More »

February 01, 2011

Andrew Hughes: [SECURITY] IcedTea6 1.7.8, 1.8.5, 1.9.5 Released!. We are pleased to announce a new set of security releases, IcedTea6 1.7.8, IcedTea6 1.8.5 and IcedTea6 1.9.5. This update contains the following security updates: The IcedTea project provides a harness to build the source code from OpenJDK6 u...

More »

March/2024
SunMonTueWedThuFriSat
     12
3456789
10111213141516
17181920212223
2425262728 2930
31      

[ Archives News
for 'Java Technology' ]

home > news > java technology > integrating mybatis 3.0.3 spring 3.0.5

Integrating MyBatis 3.0.3 Spring 3.0.5

In this post I show how simple is to integrate mybatis and spring framework. The requirements are: Spring Framwork 3.0.5 + dependencies Mybatis 3.0.3 + dependencies aopalliance-1.0 mybatis-spring-1.0.0-RC3 ibatis-sqlmap-2.3.4.726 lombok CoreJavaBeans1.0.1 + dependencies nbsp; First of all, let#039;s define a model bean: 1 /* 2 * Worker.java 3 * 4 * Created on 21-dic-2010 5 * 6 * DACorp ? Software Consulting Services 7 * http://www.dacorpsoft.com 8 * (C) 2005-2010, Dacorp Project Management Committee (DPMC) 9 * 10 */ 11 12 package com.dacorp.fvm.dao.model; 13 14 import lombok.Data; 15 16 /** 17 * 18 * @author Miguel Angel Vega Pabon 19 * @version 1.0, Developed with Netbeans 6.9 20 */ 21 @Data 22 public class Worker { 23 private int id; 24 private String pin, firstName, lastName; 25 /** Default constructor */ 26 public Worker(){ 27 } 28 } 29 30 nbsp; nbsp;I simplify the coding using the Lombok api, @Data annotation encapsulates all the attributes from this class. Mybatis needs to setup the DAO interfaces and behaviours. nbsp; 1 /* 2 * WorkerDao.java 3 * 4 * Created on 21-dic-2010 5 * 6 * DACorp ? Software Consulting Services 7 * http://www.dacorpsoft.com 8 * (C) 2005-2010, Dacorp Project Management Committee (DPMC) 9 * 10 */ 11 package com.dacorp.fvm.dao; 12 13 import com.dacorp.fvm.dao.model.Worker; 14 import com.dacorp.fvm.request.mo...


Date: December, 24 2010
Url: http://www.java.net/blog/mikevegap/archive/2010/12/23/integrating-mybatis-303-spring-305-0


Others News

©2002-2019Java-Virtual-Machine.net free web design software | website designing software | best website builder software | bootstrap navigation menu | free bootstrap templates