Skip to content

Instantly share code, notes, and snippets.

View nikeshpathak's full-sized avatar

Nikesh Pathak nikeshpathak

View GitHub Profile
#spring-beans
customerImpl:
class: com.example.yamlbeanExample.Customer
properties:
firstName: Rohit
lastName: jain
phone: 203428304230
address: ref::addressImpl
addressImpl:
@nikeshpathak
nikeshpathak / spring-beans.xml
Last active November 4, 2017 12:05
spring beans declaration
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd">
<bean id="customerImpl" class="com.example.yamlbeanExample.Customer">
<property name="firstName">
<value>Rohit</value>
</property>
@nikeshpathak
nikeshpathak / Main.java
Created October 29, 2017 13:24
flat file pars with ffpojo libs
package com.nik;
import com.github.ffpojo.FFPojoHelper;
import com.github.ffpojo.exception.FFPojoException;
import java.io.*;
import java.util.ArrayList;
import java.util.List;
public class Main {
@nikeshpathak
nikeshpathak / .java
Created September 29, 2017 03:23
corn scheduler in spring with external configuration
//example
// in .properties file
test.scheduling.mytask = 0 0 0 1 1/2 ?
//or
test.scheduling.mytask = 0 0/5 * 1/1 * ?
//or
test.scheduling.mytask = 0 0/2 * 1/1 * ?
//or
test.scheduling.mytask = 0 0 0/1 1/1 * ?