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
| @ToString(callSuper = true) | |
| abstract class DomainException extends ResponseStatusException { | |
| DomainException(HttpStatus status, String reason) { | |
| super(status, reason); | |
| } | |
| } |
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
| @Slf4j | |
| @Component | |
| class DomainExceptionWrapper extends DefaultErrorAttributes { | |
| private final ReqTracer tracer; | |
| DomainExceptionWrapper(ReqTracer tracer) { | |
| super(false); | |
| this.tracer = tracer; | |
| } |
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
| import io.vavr.collection.List; | |
| import io.vavr.control.Try; | |
| class Lol { | |
| public static void main(String[] args) { | |
| final List<Node> myNodeList = Try.of(NodeUtils::new) | |
| .onFailure(System.out::println) | |
| .mapTry(NodeUtils::retrieveNodes) | |
| .getOrElse(List.empty()); |
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
| task unit(type: Test) | |
| task functional(type: Test) | |
| task check // lifecycle task | |
| task report | |
| check.dependsOn unit, functional | |
| functional.mustRunAfter unit //shouldRunAfter |
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
| task unit(type: Test) | |
| task functional(type: Test) | |
| task check // lifecycle task | |
| task report |
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
| task itMustRun { | |
| doFirst { | |
| println "It's running from start..." | |
| } | |
| doLast { | |
| println "...to an end." | |
| } | |
| } |
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
| task itMustRun |
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
| println 'a' | |
| task t1 { | |
| doFirst { | |
| println 'b' | |
| } | |
| } | |
| println 'c' |
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
| processResources { | |
| def profile = project.properties['profile'] | |
| def replace_tokens = profile ? filter_tokens[profile] : filter_tokens['default'] | |
| exclude '**/log4j-test.xml' | |
| from('src/main/resources') { | |
| exclude '**/*.ttf' |
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
| tasks.withType(CreateStartScripts) { | |
| def tplName = 'unixStartScriptTemplate.txt' | |
| assert new File(tplName).exists() | |
| template = resources.text.fromFile(tplName) | |
| } |