Skip to content

Instantly share code, notes, and snippets.

View visakha's full-sized avatar
💭
Working on Python - Financial and Stock market related

Vamsi Vegi visakha

💭
Working on Python - Financial and Stock market related
View GitHub Profile
@visakha
visakha / gist:120b9a52524573ac3b06793d6272a666
Created May 2, 2019 16:44
How to fix : java.lang.ClassNotFoundException: org.jetbrains.kotlin.cli.common.messages.MessageCollector
After generating the Spring Boot projects using Kotlin (start.spring.io), the mvn compile gives you an error
'
java.lang.ClassNotFoundException: org.jetbrains.kotlin.cli.common.messages.MessageCollector
'
this can fixed by editing the pom.xml
replace
<properties>
<java.version>1.8</java.version>
<kotlin.version>1.2.71</kotlin.version>
@visakha
visakha / gist:90cd8a2c4b6bc1ba1e2d44358eba943a
Created June 15, 2018 07:14
All Public Projects - by Vamsi Vegi
Date: June 2018
https://github.com/visakha/demo-spring-int-flow
@visakha
visakha / LogAppenderResource.java
Last active May 20, 2018 18:23
Here is a gist to test the Log4j2 logging using jUnit
package com.sample.ecm.job.generic;
import org.apache.log4j.*;
import org.junit.rules.ExternalResource;
import java.io.ByteArrayOutputStream;
/**
* @author Vamsi Vegi
@visakha
visakha / gist:01eba061a614d7baa229df4e112e9801
Created May 15, 2018 17:54
Run basic Spring Boot 2.0.2 on Jdk 10
Assuming you did not include Lombok the generic Spring boot app with WebMvc and H2 and Rest and Data-JPA will work with JDK 10
for a gradle base build when the build.gradle has the setting as below
* compile('javax.xml.bind:jaxb-api:2.3.0')
@visakha
visakha / java8streamComparatorRulePick.kt
Last active April 26, 2018 13:19
Java 8 streams : How to surface the comparator winning rule to the domain object
/**
* We have a list of cars identified by Make,
* other attributes are name, rating, mileage
* The idea is to pick 1 car from each make by applying the below rules in sequence
*
* Rule 1 : if there is only one car per make: then mark it for Pick: pick = 'onlyOneItem'
* Rule 2 : if not Rule 1 then Pick the car with better rating: pick = 'higerRating'
* Rule 3 : if not Rule 2 then Pick the car with least mileage: pick= 'lowerMileage'
*