项目作者: warumono-for-develop

项目描述 :
Spring Boot with JOOQ tutorial
高级语言: Java
项目地址: git://github.com/warumono-for-develop/spring-boot-jooq-tutorial.git


Spring Boot with JOOQ Tutorial

An tutorial application using Spring Boot as REST API with JOOQ back-end.

More details about the codes, please read the online Spring Boot.

Requirements

Running in

Optional

  • YAML
  • Logback

Dependencies

Latest Update

  • 1.0 (Apr 20, 2017)

How to Run

  • Clone this Git repository
  • Generate Java code from your database
    1. $ ./gradle clean build
  • Build the project gradle build
  • Run the application ./gradlew bootRun
    1. $ ./gradle bootRun

Check Java code with Database

schema file
schema.sql

  • connect database
    1. http://localhost:8080/h2-console

gradle file
build.gradle

  • target packages
    1. def xml = new groovy.xml.MarkupBuilder(writer).configuration('xmlns': 'http://www.jooq.org/xsd/jooq-codegen-3.9.2.xsd') {
    2. ...
    3. generator() {
    4. ...
    5. target() {
    6. packageName('com.warumono.databases') // <----- base package path
    7. directory('src/main/java') // <----- target directory path
    8. }
    9. }
    10. }

API

Configuration

By default Spring Boot applications run on port 9090.
But may vary depending on what ports are in use on your machine (check the terminal after entering the ./gradlew bootRun command).
If you require to change which port the application runs on by default, add the following to:

application.yml

  1. server:
  2. port: 8080 # --> change other port via. 9090

Author

warumono - warumono.for.develop@gmail.com

License

spring-boot-jooq-tutorial is available under the Apache license. See the LICENSE file for more info.