Browse Source

remove Dockerfile and db scripts

Steve Hu 8 years ago
parent
commit
65b4a9202e

+ 0 - 4
frameworks/Java/light-java/Dockerfile

@@ -1,4 +0,0 @@
-FROM insideo/jre8
-EXPOSE 8080
-ADD /target/swagger-light-java-1.0.0.jar server.jar
-CMD ["/bin/sh","-c","java -Dlight-java-config-dir=/config -jar /server.jar"]

+ 1 - 1
frameworks/Java/light-java/dependency-reduced-pom.xml

@@ -145,7 +145,7 @@
     <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
     <version.encoder>1.2</version.encoder>
     <version.httpclient>4.5.2</version.httpclient>
-    <version.undertow>1.4.4.Final</version.undertow>
+    <version.undertow>1.4.10.Final</version.undertow>
     <version.jose4j>0.5.2</version.jose4j>
     <version.commons-lang>2.6</version.commons-lang>
     <java.version>1.8</java.version>

+ 0 - 55
frameworks/Java/light-java/src/main/resources/script/mysql/create_mysql.sql

@@ -1,55 +0,0 @@
-# modified from SO answer http://stackoverflow.com/questions/5125096/for-loop-in-mysql
-DROP DATABASE IF EXISTS hello_world;
-CREATE DATABASE hello_world;
-USE hello_world;
-
-DROP TABLE IF EXISTS world;
-CREATE TABLE  world (
-  id int(10) unsigned NOT NULL auto_increment,
-  randomNumber int NOT NULL default 0,
-  PRIMARY KEY  (id)
-)
-ENGINE=INNODB;
-
-DROP PROCEDURE IF EXISTS load_data;
-
-DELIMITER #
-CREATE PROCEDURE load_data()
-BEGIN
-
-declare v_max int unsigned default 10000;
-declare v_counter int unsigned default 0;
-
-  TRUNCATE TABLE world;
-  START TRANSACTION;
-  while v_counter < v_max do
-    INSERT INTO world (randomNumber) VALUES ( floor(0 + (rand() * 10000)) );
-    SET v_counter=v_counter+1;
-  end while;
-  commit;
-END #
-
-DELIMITER ;
-
-CALL load_data();
-
-DROP TABLE IF EXISTS fortune;
-CREATE TABLE  fortune (
-  id int(10) unsigned NOT NULL auto_increment,
-  message varchar(2048) CHARACTER SET 'utf8' NOT NULL,
-  PRIMARY KEY  (id)
-)
-ENGINE=INNODB;
-
-INSERT INTO fortune (message) VALUES ('fortune: No such file or directory');
-INSERT INTO fortune (message) VALUES ('A computer scientist is someone who fixes things that aren''t broken.');
-INSERT INTO fortune (message) VALUES ('After enough decimal places, nobody gives a damn.');
-INSERT INTO fortune (message) VALUES ('A bad random number generator: 1, 1, 1, 1, 1, 4.33e+67, 1, 1, 1');
-INSERT INTO fortune (message) VALUES ('A computer program does what you tell it to do, not what you want it to do.');
-INSERT INTO fortune (message) VALUES ('Emacs is a nice operating system, but I prefer UNIX. — Tom Christaensen');
-INSERT INTO fortune (message) VALUES ('Any program that runs right is obsolete.');
-INSERT INTO fortune (message) VALUES ('A list is only as strong as its weakest link. — Donald Knuth');
-INSERT INTO fortune (message) VALUES ('Feature: A bug with seniority.');
-INSERT INTO fortune (message) VALUES ('Computers make very fast, very accurate mistakes.');
-INSERT INTO fortune (message) VALUES ('<script>alert("This should not be displayed in a browser alert box.");</script>');
-INSERT INTO fortune (message) VALUES ('フレームワークのベンチマーク');

+ 0 - 61
frameworks/Java/light-java/src/main/resources/script/postgres/create-postgres.sql

@@ -1,61 +0,0 @@
-
-DROP TABLE IF EXISTS world;
-CREATE TABLE  world (
-  id integer NOT NULL,
-  randomNumber integer NOT NULL default 0,
-  PRIMARY KEY  (id)
-);
-
-INSERT INTO world (id, randomnumber)
-SELECT x.id, random() * 10000 + 1 FROM generate_series(1,10000) as x(id);
-
-DROP TABLE IF EXISTS fortune;
-CREATE TABLE fortune (
-  id integer NOT NULL,
-  message varchar(2048) NOT NULL,
-  PRIMARY KEY  (id)
-);
-
-INSERT INTO fortune (id, message) VALUES (1, 'fortune: No such file or directory');
-INSERT INTO fortune (id, message) VALUES (2, 'A computer scientist is someone who fixes things that aren''t broken.');
-INSERT INTO fortune (id, message) VALUES (3, 'After enough decimal places, nobody gives a damn.');
-INSERT INTO fortune (id, message) VALUES (4, 'A bad random number generator: 1, 1, 1, 1, 1, 4.33e+67, 1, 1, 1');
-INSERT INTO fortune (id, message) VALUES (5, 'A computer program does what you tell it to do, not what you want it to do.');
-INSERT INTO fortune (id, message) VALUES (6, 'Emacs is a nice operating system, but I prefer UNIX. — Tom Christaensen');
-INSERT INTO fortune (id, message) VALUES (7, 'Any program that runs right is obsolete.');
-INSERT INTO fortune (id, message) VALUES (8, 'A list is only as strong as its weakest link. — Donald Knuth');
-INSERT INTO fortune (id, message) VALUES (9, 'Feature: A bug with seniority.');
-INSERT INTO fortune (id, message) VALUES (10, 'Computers make very fast, very accurate mistakes.');
-INSERT INTO fortune (id, message) VALUES (11, '<script>alert("This should not be displayed in a browser alert box.");</script>');
-INSERT INTO fortune (id, message) VALUES (12, 'フレームワークのベンチマーク');
-
-
-DROP TABLE IF EXISTS "world";
-CREATE TABLE  "world" (
-  id integer NOT NULL,
-  randomNumber integer NOT NULL default 0,
-  PRIMARY KEY  (id)
-);
-
-INSERT INTO "world" (id, randomnumber)
-SELECT x.id, random() * 10000 + 1 FROM generate_series(1,10000) as x(id);
-
-DROP TABLE IF EXISTS "fortune";
-CREATE TABLE "fortune" (
-  id integer NOT NULL,
-  message varchar(2048) NOT NULL,
-  PRIMARY KEY  (id)
-);
-
-INSERT INTO "fortune" (id, message) VALUES (1, 'fortune: No such file or directory');
-INSERT INTO "fortune" (id, message) VALUES (2, 'A computer scientist is someone who fixes things that aren''t broken.');
-INSERT INTO "fortune" (id, message) VALUES (3, 'After enough decimal places, nobody gives a damn.');
-INSERT INTO "fortune" (id, message) VALUES (4, 'A bad random number generator: 1, 1, 1, 1, 1, 4.33e+67, 1, 1, 1');
-INSERT INTO "fortune" (id, message) VALUES (5, 'A computer program does what you tell it to do, not what you want it to do.');
-INSERT INTO "fortune" (id, message) VALUES (6, 'Emacs is a nice operating system, but I prefer UNIX. — Tom Christaensen');
-INSERT INTO "fortune" (id, message) VALUES (7, 'Any program that runs right is obsolete.');
-INSERT INTO "fortune" (id, message) VALUES (8, 'A list is only as strong as its weakest link. — Donald Knuth');
-INSERT INTO "fortune" (id, message) VALUES (9, 'Feature: A bug with seniority.');
-INSERT INTO "fortune" (id, message) VALUES (10, 'Computers make very fast, very accurate mistakes.');
-INSERT INTO "fortune" (id, message) VALUES (11, '<script>alert("This should not be displayed in a browser alert box.");</script>');
-INSERT INTO "fortune" (id, message) VALUES (12, 'フレームワークのベンチマーク');

+ 0 - 49
frameworks/Java/light-java/src/test/java/com/networknt/techempower/handler/JsonTest.java

@@ -1,49 +0,0 @@
-package com.networknt.techempower.handler;
-
-import com.dslplatform.json.DslJson;
-import com.dslplatform.json.JsonWriter;
-import com.dslplatform.json.MapConverter;
-import com.fasterxml.jackson.databind.ObjectMapper;
-import com.networknt.config.Config;
-import com.networknt.techempower.model.World;
-import org.junit.Test;
-
-import java.util.Collections;
-import java.util.Map;
-
-/**
- * Created by steve on 10/02/17.
- */
-public class JsonTest {
-    private static ObjectMapper mapper = Config.getInstance().getMapper();
-    private DslJson<Object> dsl = new DslJson<>();
-    private JsonWriter writer = dsl.newWriter(25000);
-
-    @Test
-    public void testJson() throws Exception {
-        Map map = Collections.singletonMap("message", "Hello, World!");
-        long start = System.nanoTime();
-
-        for(int i = 0; i < 1000000; i++) {
-            writer.reset();
-            MapConverter.serialize(map, writer);
-            byte[] bytes = writer.getByteBuffer();
-        }
-        long stop = System.nanoTime();
-        System.out.println("JsonWriter duration = " + (stop - start)/1000);
-
-        start = System.nanoTime();
-
-        for(int i = 0; i < 1000000; i++) {
-            byte[] bytes = mapper.writeValueAsBytes(map);
-        }
-
-        stop = System.nanoTime();
-        System.out.println("Jackson duration = " + (stop - start)/1000);
-
-        World world = new World(12, 30);
-        writer.reset();
-        world.serialize(writer, true);
-        System.out.println("world = " + writer.toString());
-    }
-}