Code Monkey home page Code Monkey logo

mybatis-graalvm-demo's Introduction

mybatis-graalvm-demo

This project is demo application using MyBatis + PostgreSQL on GraalVM.

Requirements

  • Installed the Docker
  • Installed the JDK 8+

Versions

  • MyBatis 3.5.1 (Some class override to support GraalVM at temporary)
  • PostgreSQL 11.3
  • GraalVM 19.0.0

How to build and star container

$ ./docker-build.sh
...
Successfully built a31b6097719d
Successfully tagged mybatis-graalvm-demo:latest
8ae2757caa98ef44002bab0d9e35dc6c847ebb9719236429c21c31f80ee91330
root@8ae2757caa98:/#

How to run the demo application

root@8ae2757caa98:/# ./mybatis-graalvm-demo
Logging initialized using 'class org.apache.ibatis.logging.stdout.StdOutImpl' adapter.
2019-06-03T17:17:50.575: initialize configuration...
2019-06-03T17:17:51.927: initialize data source...
drop table if exists city

create table city (
  id int primary key generated by default as identity,
  name varchar not null,
  state varchar,
  country varchar
)

insert into city (name, state, country) values ('San Francisco', 'CA', 'US')

commit

2019-06-03T17:17:51.957: building sql session factory...
2019-06-03T17:17:51.957: open new session...
Opening JDBC Connection
Setting autocommit to false on JDBC Connection [org.postgresql.jdbc.PgConnection@7f241fc52d18]
==>  Preparing: INSERT INTO city (name, state, country) VALUES(?, ?, ?) 
==> Parameters: 
<==    Updates: 1
==>  Preparing: select id, name, state, country from city where id = ? 
==> Parameters: 
<==    Columns: id, name, state, country
<==        Row: 2, Toshima-ku, Tokyo, JP
<==      Total: 1
2,Toshima-ku,Tokyo,JP
2019-06-03T17:17:51.972: commit session...
Committing JDBC Connection [org.postgresql.jdbc.PgConnection@7f241fc52d18]
Resetting autocommit to true on JDBC Connection [org.postgresql.jdbc.PgConnection@7f241fc52d18]
Closing JDBC Connection [org.postgresql.jdbc.PgConnection@7f241fc52d18]
root@8ae2757caa98:/#

Project Structure

.
├── Dockerfile
├── README.md
├── docker-build.sh
├── mvnw
├── mvnw.cmd
├── pom.xml
└── src
    ├── main
    │   ├── java
    │   │   ├── com
    │   │   │   └── example
    │   │   │       ├── Application.java
    │   │   │       ├── domain
    │   │   │       │   └── City.java
    │   │   │       └── mapper
    │   │   │           └── CityMapper.java
    │   │   └── org
    │   │       └── apache
    │   │           └── ibatis
    │   │               ├── binding
    │   │               │   └── MapperProxy.java
    │   │               ├── builder
    │   │               │   └── annotation
    │   │               │       └── MapperAnnotationBuilder.java
    │   │               ├── reflection
    │   │               │   └── SystemMetaObject.java
    │   │               └── session
    │   │                   └── Configuration.java
    │   └── resources
    │       ├── META-INF
    │       │   └── native-image
    │       │       ├── dynamic-proxy-config.json
    │       │       ├── mybatis-reflection-config.json
    │       │       ├── native-image.properties
    │       │       ├── reflection-config.json
    │       │       └── resource-config.json
    │       ├── com
    │       │   └── example
    │       │       └── mapper
    │       │           └── CityMapper.xml
    │       ├── initDb.sql
    │       └── mybatis-config.xml
    └── test
        └── java

mybatis-graalvm-demo's People

Contributors

kazuki43zoo avatar

Stargazers

mh avatar  avatar  avatar hopper avatar sudotty avatar Iván Caamaño avatar Andrzej Hankus avatar Nithin Philips avatar

Watchers

James Cloos avatar  avatar Iván Caamaño avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.