Skip to content

Repository files navigation

MyBatis JPetStore

Java CI Container Support Coverage Status Docs License

mybatis-jpetstore

JPetStore 6 is a full web application built on top of MyBatis 3, Spring 5 and Stripes.

Other versions that you may want to know about

Run on Application Server

Running JPetStore sample under Tomcat (using the cargo-maven2-plugin).

  • Clone this repository

    $ git clone https://github.com/mybatis/jpetstore-6.git
    
  • Build war file

    $ cd jpetstore-6
    $ ./mvnw clean package
    
  • Startup the Tomcat server and deploy web application

    $ ./mvnw cargo:run -P tomcat9
    

    Note:

    We provide maven profiles per application server as follow:

    Profile Description
    tomcat9 (preferred) Running under the Tomcat 9.0
    glassfish5 Running under the GlassFish 5
    jetty12-ee8 Running under the Jetty 12
    liberty26-ee8 Running under the WebSphere Liberty
    payara5 Running under the Payara 5
    resin4 Running under the Resin 4
    tomee8 Running under the TomEE 8.0
    wildfly26 Running under the WildFly 26
  • Run application in browser http://localhost:8080/jpetstore/

  • Press Ctrl-C to stop the server.

  • When using 'glassfish5', it must run under java 8 as it does not work with newer versions. The code is set to 'D:/jdk/jdk-1.8.0.501'. Your usage likely differs, so simply call with '-Dcargo.java.home=PATH-TO-JDK8'.

  • When using 'payara', the full maven buil must run under java 17, this is unlike glassfish5 due to how it connects with cargo. In that case, use '-Denforcer.skip=true' to accomplish.

Run on Docker

docker build . -t jpetstore
docker run -p 8080:8080 jpetstore

or with Docker Compose:

docker compose up -d

Try integration tests

Perform integration tests for screen transition.

$ ./mvnw clean verify -P tomcat9

About

A web application built on top of MyBatis 3, Spring 3 and Stripes

Topics

Resources

Stars

605 stars

Watchers

69 watching

Forks

Releases

Packages

Used by

Contributors

Languages