Skip to content

Instantly share code, notes, and snippets.

@honux77
Last active March 14, 2020 10:19
Show Gist options
  • Save honux77/98ca68399c12a594949d06352e923dbc to your computer and use it in GitHub Desktop.
Save honux77/98ca68399c12a594949d06352e923dbc to your computer and use it in GitHub Desktop.
Java and Spring cheatsheet
<configuration>
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
<encoder>
<pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern>
</encoder>
</appender>
<root level="debug">
<appender-ref ref="STDOUT" />
</root>
</configuration>
plugins {
id 'java'
}
group 'net.honux'
version '1.0-SNAPSHOT'
sourceCompatibility = 1.8
repositories {
mavenCentral()
}
dependencies {
//junit and assertj
testCompile("org.junit.jupiter:junit-jupiter-api:5.6.0")
testCompile("org.assertj:assertj-core:3.11.1")
//springframework-context
compile group: 'org.springframework', name: 'org.springframework.context', version: '3.2.2.RELEASE'
//logback
compile group: 'org.slf4j', name: 'slf4j-api', version: '1.7.30'
compile group: 'ch.qos.logback', name: 'logback-core', version: '1.2.3'
compile group: 'ch.qos.logback', name: 'logback-classic', version: '1.2.3'
}
test {
useJUnitPlatform()
}
plugins {
id 'org.springframework.boot' version '2.2.5.RELEASE'
id 'io.spring.dependency-management' version '1.0.9.RELEASE'
id 'java'
}
group = 'com.honux'
version = '0.0.1-SNAPSHOT'
sourceCompatibility = '1.8'
configurations {
developmentOnly
runtimeClasspath {
extendsFrom developmentOnly
}
}
repositories {
mavenCentral()
}
dependencies {
testCompile("org.assertj:assertj-core:3.11.1")
implementation 'org.springframework.boot:spring-boot-starter-data-jdbc'
implementation 'org.springframework.boot:spring-boot-starter-web'
developmentOnly 'org.springframework.boot:spring-boot-devtools'
testImplementation('org.springframework.boot:spring-boot-starter-test') {
exclude group: 'org.junit.vintage', module: 'junit-vintage-engine'
}
}
test {
useJUnitPlatform()
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment