Tuesday, June 16, 2020

How to preserve the format for code piece in Goolge Blogger

Add your code to the line in following section and paste them back in HTML view:

 <pre style="font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; 
                color: #000000; background-color: #eee;
                font-size: 12px; border: 1px dashed #999999;
                line-height: 14px; padding: 5px; 
                overflow: auto; width: 100%">
       <code style="color:#000000;word-wrap:normal;">

            <<<<<<<YOUR CODE HERE>>>>>>>

       </code>
</pre>

Build a fat jar for Spring boot to include classes under 'test' in gradle

       

plugins {
     id 'org.springframework.boot' version '2.2.2.RELEASE'
     id 'io.spring.dependency-management' version '1.0.8.RELEASE'
     id 'java'
     id "com.palantir.docker" version "0.22.1"
     id "com.gorylenko.gradle-git-properties" version "1.5.1"   // auto generate git.properties and visible at /actuator/info
     id 'com.github.johnrengelman.shadow' version '6.0.0'
}


shadowJar {
    mergeServiceFiles()

    manifest {
        attributes 'Main-Class': 'com.company.product.cloud.packageName.TestClassName'
    }
    from sourceSets.test.output.classesDirs
}



Build:

./gradlew :project-name:shadowJar



Run:

java -cp ./project-name/build/libs/* com.company.product.cloud.packageName.TestClassName