Skip to content

Instantly share code, notes, and snippets.

View amorales4u's full-sized avatar

amorales4u amorales4u

View GitHub Profile
package c20.dev.commons.transformer.core;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;
import lombok.extern.slf4j.Slf4j;
import java.io.*;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.function.Function;
package com.c20.app;
import java.util.Properties;
import javax.naming.Context;
import javax.naming.InitialContext;
import javax.naming.NamingException;
import javax.persistence.EntityManagerFactory;
import javax.servlet.MultipartConfigElement;
import javax.servlet.ServletContext;
package com.c20.workflow;
import java.util.Properties;
import javax.naming.NamingException;
import javax.persistence.EntityManagerFactory;
import javax.sql.DataSource;
import org.apache.commons.logging.LogFactory;
import org.springframework.beans.factory.annotation.Autowired;
import dev.c20.test2.demo.stg.Entidad;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Conditional;
import org.springframework.context.annotation.Configuration;
import javax.sql.DataSource;
@Configuration
public class DemoConfig {
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Condition;
import org.springframework.context.annotation.ConditionContext;
import org.springframework.core.type.AnnotatedTypeMetadata;
@SpringBootApplication
public class DemoApplication implements Condition {
package v1.bpm.services
import com.c20.rest.Del
import com.c20.rest.Get
import com.c20.rest.PathVariable
import com.c20.rest.Post
import com.c20.rest.Put
import com.c20.services.micro.FileSystemServiceBeanLocal
import org.apache.log4j.Logger
import java.beans.PropertyEditor;
import java.beans.PropertyEditorManager;
public static Object toObject( Class targetType, String value ) {
PropertyEditor editor = PropertyEditorManager.findEditor(targetType);
editor.setAsText(value);
return editor.getValue();
}
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.app.</groupId>
<artifactId>App-commons</artifactId>
<version>1.0.0.FINAL</version>
<jersey.version>2.31</jersey.version>
<dependency>
<groupId>org.glassfish.jersey.core</groupId>
<artifactId>jersey-common</artifactId>
<version>${jersey.version}</version>
</dependency>
<dependency>
<groupId>org.glassfish.jersey.core</groupId>
<artifactId>jersey-client</artifactId>
package v1.admin
context.logger.info("START GROOVY SERVICE")
/*
def currentSession = Session.validateSession(context);
if( currentSession.error ) {
return currentSession;