Home » Tag Archives: MyBatis

Tag Archives: MyBatis

SpringBoot : Working with MyBatis

mybatis-logo

MyBatis is a SQL Mapping framework with support for custom SQL, stored procedures and advanced mappings. SpringBoot doesn’t provide official support for MyBatis integration, but MyBatis community built a SpringBoot starter for MyBatis. You can read about the SpringBoot MyBatis Starter release announcement at http://blog.mybatis.org/2015/11/mybatis-spring-boot-released.html and you can explore the source code on GitHub https://github.com/mybatis/mybatis-spring-boot. Create a SpringBoot Maven project ...

Read More »

Pitfalls of the MyBatis Caches with Apache Ignite

mybatis-logo

A week ago, MyBatis and Apache ignite announced of support apache ignite as a MyBatis cache (L2 cache). technically MyBatis support two levels of Caches: Local cache, which is always enable by default L2 cache, optional As Apache Ignite project is fast growing with it’s various functionality, in this blog post we are going to examine the MyBatis support in ...

Read More »

Building Java Web Application Using MyBatis With Spring

mybatis-logo

This post will show how to create a Student Enrollment Application using MYSQL DB with MyBatis framework in a Spring environment. This is a simple application that aims to collect the input details from the user during signup, save the details in the MYSQL DB and authenticate the same during login.     1. Create Java Web Application Project using ...

Read More »

Sustainable peace with database changes into a Java environment

mybatis-logo

Sustainable peace for us is remove uncertainty. In this case over database changes the idea Active Record Migrations of Ruby was welcomed. And what does migration means for us?. Well, it is a convenient way to alter our database schema overtime in a consistent and easy way that removes a lot of uncertainty about database changes in our software development ...

Read More »

Lightweight Web Application Framework: PrimeFaces (JSF) + Guice + MyBatis (Part 2)

apache-myfaces-logo

In this part, I will continue to demonstrate the integration of JSF, Guice and MyBatis. DBCP connection pool and MYSQL database is used in persistence layer. Take a look at Part 1. Integrate Google Guice with MyBatis In the previous post, we have created a ServletContextListener. Now, we just bind the BasicDataSourceProvider and JdbcTransactionFactory in the contextInitialized method. GuiceContextListener.java package ...

Read More »

MyBatis Tutorial – CRUD Operations and Mapping Relationships – Part 1

mybatis-logo

CRUD Operations MyBatis is an SQL Mapper tool which greatly simplifies the database programing when compared to using JDBC directly.                   Step1: Create a Maven project and configure MyBatis dependencies.   <project xmlns='http://maven.apache.org/POM/4.0.0' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:schemaLocation='http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd'> <modelVersion>4.0.0</modelVersion> <groupId>com.sivalabs</groupId> <artifactId>mybatis-demo</artifactId> <version>0.0.1-SNAPSHOT</version> <packaging>jar</packaging> <name>mybatis-demo</name> <url>http://maven.apache.org</url> <properties> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> </properties> <build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <version>2.3.2</version> ...

Read More »

Spring MVC 3 Controller for MyBatis CRUD operation

mybatis-logo

Till now we have created CRUD database service for the domain class “User” and alsointegratedMyBatis configuration with Spring Configuration file. Next, we will create an web page using Spring MVC to use MyBatis CRUD service to perform operations to database. Creating DAO class using MyBatis 3 that will help to perform CRUD operations on database. Setting Environment for integrating MyBatis ...

Read More »

MyBatis 3 – Spring integration tutorial

mybatis-logo

As a first step of this tutorial, Spring MVC 3 CRUD example with MyBatis 3, we will define a MyBatis service that will help us to perform CRUD operation on database. We have a domain class for User and a database table to store the User information on database. We will use xml configuration model for our example to define ...

Read More »

Configuring MyBatis 3

mybatis-logo

MyBatis is a very popular and also most efficient SQL mapping framework. MyBatis is available for both in java as well as .net language. MyBatis is not really an alternative of Hibernate but we can use this framework to reduce our database related code with efficient and high performance provided by MyBatis. This tutorial will show you the steps to ...

Read More »

Want to take your Java skills to the next level?

Grab our programming books for FREE!

Here are some of the eBooks you will get:

  • Spring Interview QnA
  • Multithreading & Concurrency QnA
  • JPA Minibook
  • JVM Troubleshooting Guide
  • Advanced Java
  • Java Interview QnA
  • Java Design Patterns