This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| --- | |
| version: "3.8" | |
| services: | |
| postgres: | |
| image: postgres:alpine | |
| environment: | |
| POSTGRES_PASSWORD: password | |
| POSTGRES_USER: course_catalog | |
| POSTGRES_DB: course_catalog_development | |
| ports: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| plugins { | |
| id 'org.springframework.boot' version '2.5.1' | |
| id 'io.spring.dependency-management' version '1.0.11.RELEASE' | |
| id 'java' | |
| } | |
| group = 'com.example' | |
| version = '0.0.1-SNAPSHOT' | |
| sourceCompatibility = '16' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| CREATE TABLE courses ( | |
| id BIGINT GENERATED ALWAYS AS IDENTITY PRIMARY KEY, | |
| name TEXT NOT NULL, | |
| start_at TIMESTAMPTZ, | |
| visibility TEXT NOT NULL DEFAULT 'VISIBLE', | |
| seats INT NOT NULL DEFAULT 0, | |
| enrollment_active BOOLEAN NOT NULL DEFAULT TRUE, | |
| created_at TIMESTAMPTZ DEFAULT NOW(), | |
| updated_at TIMESTAMPTZ | |
| ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package com.example.demo.repository; | |
| import static com.example.demo.generated.jooq.Tables.COURSES; | |
| import com.example.demo.generated.jooq.tables.records.CoursesRecord; | |
| import com.example.demo.model.Course; | |
| import com.example.demo.model.Course.Visibility; | |
| import java.util.List; | |
| import java.util.Optional; | |
| import org.jooq.DSLContext; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <configuration> | |
| <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender"> | |
| <encoder class="net.logstash.logback.encoder.LogstashEncoder" /> | |
| </appender> | |
| <root level="info"> | |
| <appender-ref ref="STDOUT" /> | |
| </root> | |
| </configuration> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package com.example.demo.actuator; | |
| import com.example.demo.model.Course; | |
| import com.example.demo.repository.CoursesRepository; | |
| import java.util.List; | |
| import org.springframework.boot.actuate.endpoint.annotation.Endpoint; | |
| import org.springframework.boot.actuate.endpoint.annotation.ReadOperation; | |
| import org.springframework.boot.actuate.endpoint.annotation.WriteOperation; | |
| import org.springframework.stereotype.Component; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| allprojects { | |
| apply plugin: 'java' | |
| group 'com.instructure' | |
| version '0.0-SNAPSHOT' | |
| repositories { | |
| mavenCentral() | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| apply plugin: 'java-library' | |
| dependencies { | |
| annotationProcessor 'org.springframework.boot:spring-boot-autoconfigure-processor:2.5.2' | |
| annotationProcessor 'org.springframework.boot:spring-boot-configuration-processor:2.5.2' | |
| implementation 'org.springframework.boot:spring-boot-starter:2.5.2' | |
| api project(':multi-module-greeter') | |
| } |
OlderNewer