Example - MySQL

jZenith Application Framework

License

License

Categories

Categories

MySQL Data Databases
GroupId

GroupId

org.jzenith
ArtifactId

ArtifactId

jzenith-example-mysql
Last Version

Last Version

0.1
Release Date

Release Date

Type

Type

jar
Description

Description

Example - MySQL
jZenith Application Framework

Download jzenith-example-mysql

How to add to project

<!-- https://jarcasting.com/artifacts/org.jzenith/jzenith-example-mysql/ -->
<dependency>
    <groupId>org.jzenith</groupId>
    <artifactId>jzenith-example-mysql</artifactId>
    <version>0.1</version>
</dependency>
// https://jarcasting.com/artifacts/org.jzenith/jzenith-example-mysql/
implementation 'org.jzenith:jzenith-example-mysql:0.1'
// https://jarcasting.com/artifacts/org.jzenith/jzenith-example-mysql/
implementation ("org.jzenith:jzenith-example-mysql:0.1")
'org.jzenith:jzenith-example-mysql:jar:0.1'
<dependency org="org.jzenith" name="jzenith-example-mysql" rev="0.1">
  <artifact name="jzenith-example-mysql" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.jzenith', module='jzenith-example-mysql', version='0.1')
)
libraryDependencies += "org.jzenith" % "jzenith-example-mysql" % "0.1"
[org.jzenith/jzenith-example-mysql "0.1"]

Dependencies

compile (5)

Group / Artifact Type Version
org.jzenith : jzenith-example-common jar 0.1
org.jzenith : jzenith-jdbc jar 0.1
mysql : mysql-connector-java jar 8.0.13
org.jzenith : jzenith-rest jar 0.1
io.opentracing.contrib » span-reporter-slf4j jar 0.1.0

provided (2)

Group / Artifact Type Version
org.projectlombok : lombok jar 1.18.2
com.github.spotbugs : spotbugs-annotations jar 3.1.8

test (7)

Group / Artifact Type Version
org.jzenith : jzenith-example-common jar 0.1
org.junit.jupiter : junit-jupiter-api jar 5.3.1
org.junit.jupiter : junit-jupiter-params jar 5.3.1
org.junit.jupiter : junit-jupiter-engine jar 5.3.1
org.assertj : assertj-core jar 3.11.1
io.rest-assured : rest-assured jar 3.2.0
org.dbunit : dbunit jar 2.5.4

Project Modules

There are no modules declared in this project.

Codacy Badge Maven Central Javadocs Build Status Quality Gate Coverage Status codecov Known Vulnerabilities Gitter chat security status stability status DepShield Badge Total alerts Language grade: JavaScript

Disclaimer: This is basically me tinkering with tech and keeping myself busy while I'm looking for a new challenge to take on. I don't know if it will ever be released, I don't know if it will ever reach 1.0. Due to this fact the best documentation is currently jzenith-example, though I try to keep this up to date as well. If you want to know what I'm up to check out the Project Plan

Overview

jZenith aims to provide out of the box Java based server applications. It tries to keep up to date with the fast changing Java world by having a minimal dependency footprint.

jZenith consists of a core that can be extended by using different plugins, currently there is a PostgreSQL and a REST plugin. All bindings are configured in code in order to allow for a application that is fully initialized at startup time, hopefully allowing GraalVM support in the future.

jZenith is basically some glue code between existing Java libraries. It uses Guice for dependency injection and Vert.x as it's core technologies.

Try running the Example App and read about the different Plugins.

Getting started

Snapshots are published to the Sonatype OSS repository, see Using Snapshots Version at the end.

<dependency>
  <groupId>org.jzenith</groupId>
  <artifactId>jzenith-core</artifactId>
  <version>0.1</version>
</dependency>

Clone the repository, run mvn clean install. jZenith currently expects Java 10 and a fairly current maven.

A typical jZenith main class will look like:

JZenith.application(args)
       .withPlugins(
           RestPlugin.withResources(UserResource.class),
           PostgresqlPlugin.create()
       )
       .withModules(new ServiceLayerModule(), new PersistenceLayerModule(), new MapperModule())
       .withConfiguration("postgresql.database", "test")
       .run();

Modules are simply Guice Modules, as jZenith uses Guice for dependency injection.

Read more about Plugins and Configuration.

Using Snapshot Versions

Add the following repository configurations to your pom.xml to enable snapshot versions of this plugin to be used.

  <repositories>
    <repository>
      <id>sonatype-nexus-snapshots</id>
      <url>https://oss.sonatype.org/content/repositories/snapshots</url>
      <releases>
        <enabled>false</enabled>
      </releases>
      <snapshots>
        <enabled>true</enabled>
      </snapshots>
    </repository>
  </repositories>
  <pluginRepositories>
    <pluginRepository>
      <id>sonatype-nexus-snapshot</id>
      <url>https://oss.sonatype.org/content/repositories/snapshots</url>
      <releases>
        <enabled>false</enabled>
       </releases>
      <snapshots>
        <enabled>true</enabled>
      </snapshots>
    </pluginRepository>
  </pluginRepositories>

Versions

Version
0.1