This file contains 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
Use the latest version of all existing tech | |
Technology: | |
- Groovy as the language // don't use 3.x, it's beta still | |
- Springboot as the framework | |
- Gradle for building | |
Business Requirements: | |
Create an API that takes manages products. | |
- Can create object |
This file contains 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.hatz.test | |
import com.tngtech.archunit.core.domain.JavaClasses | |
import com.tngtech.archunit.core.importer.ClassFileImporter | |
import groovy.util.logging.Slf4j | |
import org.springframework.boot.context.properties.ConfigurationProperties | |
import org.springframework.context.annotation.Configuration | |
import org.springframework.stereotype.Service | |
import org.springframework.web.bind.annotation.RestController | |
import spock.lang.Ignore |
This file contains 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> | |
<pattern>%d{YYYY-MM-dd HH:mm:ss.SSS} | %highlight(%-5level) | %gray(%-40logger{20}) | %-20thread{20} | MDC:[%mdc] | - %msg%n%xEx</pattern> | |
</encoder> | |
</appender> | |
<logger name="Exposed" level="INFO"> | |
<appender-ref ref="STDOUT" /> | |
</logger> |
This file contains 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
// This task performs a dependency lock on the main project as well as every subproject. | |
// This should stay create so that all the projects get the dependencyLocking config applied right away | |
// This isn't normal lazy gradle, but it is self-contained and that is nice | |
tasks.create<Exec>("lockItUp") { | |
allprojects { | |
// allprojects needs this | |
dependencyLocking { | |
lockAllConfigurations() |