diff --git a/.gitignore b/.gitignore index 30f0f0cbc2..210807d09e 100644 --- a/.gitignore +++ b/.gitignore @@ -21,3 +21,5 @@ # Maven log/ target/ + +spring-openid/src/main/resources/application.properties diff --git a/.project b/.project index 2d04570bfe..594b00d611 100644 --- a/.project +++ b/.project @@ -1,11 +1,17 @@ - parent - - - - - - - + parent-modules + + + + + + org.eclipse.m2e.core.maven2Builder + + + + + + org.eclipse.m2e.core.maven2Nature + diff --git a/apache-fop/pom.xml b/apache-fop/pom.xml index 95505f9374..658d567a90 100644 --- a/apache-fop/pom.xml +++ b/apache-fop/pom.xml @@ -1,6 +1,6 @@ 4.0.0 - org.baeldung + com.baeldung apache-fop 0.1-SNAPSHOT @@ -142,16 +142,12 @@ - - 4.1.5.RELEASE - 3.2.5.RELEASE - - 4.3.8.Final - 5.1.34 + 4.3.11.Final + 5.1.38 - 2.5.5 + 2.7.2 1.7.9 @@ -161,7 +157,7 @@ 5.1.3.Final - 17.0 + 19.0 3.3.2 @@ -172,14 +168,14 @@ 4.4 4.4 - 2.4.0 + 2.9.0 - 3.2 + 3.5.1 2.6 - 2.18.1 + 2.19.1 2.7 - 1.4.12 + 1.4.18 diff --git a/core-java-8/README.md b/core-java-8/README.md index 8bef3a1be0..b03d24c34e 100644 --- a/core-java-8/README.md +++ b/core-java-8/README.md @@ -8,3 +8,4 @@ - [Java – Try with Resources](http://www.baeldung.com/java-try-with-resources) - [Lambda Expressions and Functional Interfaces: Tips and Best Practices](http://www.baeldung.com/java-8-lambda-expressions-tips) - [The Double Colon Operator in Java 8](http://www.baeldung.com/java-8-double-colon-operator) +- [A Guide to the Java ExecutorService](http://www.baeldung.com/java-executor-service-tutorial) diff --git a/core-java-8/pom.xml b/core-java-8/pom.xml index 07d3bcd146..bc1e402b4d 100644 --- a/core-java-8/pom.xml +++ b/core-java-8/pom.xml @@ -1,10 +1,10 @@ 4.0.0 - org.baeldung - spring-rest + com.baeldung + core-java8 0.1-SNAPSHOT - spring-rest + core-java8 @@ -114,9 +114,9 @@ 1.10.19 - 3.3 + 3.5.1 2.6 - 2.18.1 + 2.19.1 2.7 diff --git a/core-java-8/src/main/java/com/baeldung/unzip/UnzipFile.java b/core-java-8/src/main/java/com/baeldung/unzip/UnzipFile.java new file mode 100644 index 0000000000..d0b4274731 --- /dev/null +++ b/core-java-8/src/main/java/com/baeldung/unzip/UnzipFile.java @@ -0,0 +1,31 @@ +package com.baeldung.unzip; + +import java.io.File; +import java.io.FileInputStream; +import java.io.FileNotFoundException; +import java.io.FileOutputStream; +import java.io.IOException; +import java.util.zip.ZipEntry; +import java.util.zip.ZipInputStream; + +public class UnzipFile { + public static void main(String[] args) throws FileNotFoundException, IOException { + String fileZip = "/opt/zipped/cities.zip"; + byte[] buffer = new byte[1024]; + ZipInputStream zis = new ZipInputStream(new FileInputStream(fileZip)); + ZipEntry zipEntry = zis.getNextEntry(); + while(zipEntry != null){ + String fileName = zipEntry.getName(); + File newFile = new File("/opt/unzipped/" + fileName); + FileOutputStream fos = new FileOutputStream(newFile); + int len; + while ((len = zis.read(buffer)) > 0) { + fos.write(buffer, 0, len); + } + fos.close(); + zipEntry = zis.getNextEntry(); + } + zis.closeEntry(); + zis.close(); + } +} \ No newline at end of file diff --git a/core-java-8/src/main/java/com/baeldung/zip/ZipFile.java b/core-java-8/src/main/java/com/baeldung/zip/ZipFile.java new file mode 100644 index 0000000000..dccd3f2347 --- /dev/null +++ b/core-java-8/src/main/java/com/baeldung/zip/ZipFile.java @@ -0,0 +1,29 @@ +package com.baeldung.zip; + +import java.io.File; +import java.io.FileInputStream; +import java.io.FileNotFoundException; +import java.io.FileOutputStream; +import java.io.IOException; +import java.util.zip.ZipEntry; +import java.util.zip.ZipOutputStream; + +public class ZipFile { + public static void main(String[] args) throws FileNotFoundException, IOException { + String sourceFile = "/opt/photos/photo.png"; + FileOutputStream fos = new FileOutputStream("/opt/zipped/cities.zip"); + ZipOutputStream zipOut = new ZipOutputStream(fos); + File fileToZip = new File(sourceFile); + FileInputStream fis = new FileInputStream(fileToZip); + ZipEntry zipEntry = new ZipEntry(fileToZip.getName()); + zipOut.putNextEntry(zipEntry); + byte[] bytes = new byte[1024]; + int length; + while((length = fis.read(bytes)) >= 0) { + zipOut.write(bytes, 0, length); + } + zipOut.close(); + fis.close(); + fos.close(); + } +} \ No newline at end of file diff --git a/core-java-8/src/test/java/com/baeldung/java8/Java8ExecutorServiceTest.java b/core-java-8/src/test/java/com/baeldung/java8/Java8ExecutorServiceTest.java new file mode 100644 index 0000000000..1609ae98a4 --- /dev/null +++ b/core-java-8/src/test/java/com/baeldung/java8/Java8ExecutorServiceTest.java @@ -0,0 +1,155 @@ +package com.baeldung.java8; + + +import org.junit.Before; +import org.junit.Test; + +import java.util.ArrayList; +import java.util.List; +import java.util.concurrent.*; +import static org.junit.Assert.*; + + +public class Java8ExecutorServiceTest { + + private Runnable runnableTask; + private Callable callableTask; + private List> callableTasks; + + @Before + public void init() { + + runnableTask = () -> { + try { + TimeUnit.MILLISECONDS.sleep(300); + } catch (InterruptedException e) { + e.printStackTrace(); + } + }; + + callableTask = () -> { + TimeUnit.MILLISECONDS.sleep(300); + return "Task's execution"; + }; + + callableTasks = new ArrayList<>(); + callableTasks.add(callableTask); + callableTasks.add(callableTask); + callableTasks.add(callableTask); + } + + @Test + public void creationSubmittingTaskShuttingDown_whenShutDown_thenCorrect() { + + ExecutorService executorService = Executors.newFixedThreadPool(10); + executorService.submit(runnableTask); + executorService.submit(callableTask); + executorService.shutdown(); + + assertTrue(executorService.isShutdown()); + } + + @Test + public void creationSubmittingTasksShuttingDownNow_whenShutDownAfterAwating_thenCorrect() { + + ExecutorService threadPoolExecutor = + new ThreadPoolExecutor(1, 1, 0L, TimeUnit.MILLISECONDS, + new LinkedBlockingQueue<>()); + + for (int i = 0; i < 100; i++) { + threadPoolExecutor.submit(callableTask); + } + + List notExecutedTasks = smartShutdown(threadPoolExecutor); + + assertTrue(threadPoolExecutor.isShutdown()); + assertFalse(notExecutedTasks.isEmpty()); + assertTrue(notExecutedTasks.size() > 0 && notExecutedTasks.size() < 98); + } + + private List smartShutdown(ExecutorService executorService) { + + List notExecutedTasks = new ArrayList<>(); + executorService.shutdown(); + try { + if (!executorService.awaitTermination(800, TimeUnit.MILLISECONDS)) { + notExecutedTasks = executorService.shutdownNow(); + } + } catch (InterruptedException e) { + notExecutedTasks = executorService.shutdownNow(); + } + return notExecutedTasks; + } + + @Test + public void submittingTasks_whenExecutedOneAndAll_thenCorrect() { + + ExecutorService executorService = Executors.newFixedThreadPool(10); + + String result = null; + List> futures = new ArrayList<>(); + try { + result = executorService.invokeAny(callableTasks); + futures = executorService.invokeAll(callableTasks); + } catch (InterruptedException | ExecutionException e) { + e.printStackTrace(); + } + + assertEquals("Task's execution", result); + assertTrue(futures.size() == 3); + } + + @Test + public void submittingTaskShuttingDown_whenGetExpectedResult_thenCorrect() { + + ExecutorService executorService = Executors.newFixedThreadPool(10); + + Future future = executorService.submit(callableTask); + String result = null; + try { + result = future.get(); + result = future.get(200, TimeUnit.MILLISECONDS); + } catch (InterruptedException | ExecutionException | TimeoutException e) { + e.printStackTrace(); + } + + executorService.shutdown(); + + assertEquals("Task's execution", result); + } + + @Test + public void submittingTask_whenCanceled_thenCorrect() { + + ExecutorService executorService = Executors.newFixedThreadPool(10); + + Future future = executorService.submit(callableTask); + + boolean canceled = future.cancel(true); + boolean isCancelled = future.isCancelled(); + + executorService.shutdown(); + + assertTrue(canceled); + assertTrue(isCancelled); + } + + @Test + public void submittingTaskScheduling_whenExecuted_thenCorrect() { + + ScheduledExecutorService executorService = Executors + .newSingleThreadScheduledExecutor(); + + Future resultFuture = executorService.schedule(callableTask, 1, TimeUnit.SECONDS); + String result = null; + try { + result = resultFuture.get(); + } catch (InterruptedException | ExecutionException e) { + e.printStackTrace(); + } + + executorService.shutdown(); + + assertEquals("Task's execution", result); + } +} diff --git a/core-java/pom.xml b/core-java/pom.xml index b439b41f22..e3a9043b09 100644 --- a/core-java/pom.xml +++ b/core-java/pom.xml @@ -1,8 +1,8 @@ 4.0.0 - org.baeldung + com.baeldung core-java - 0.1-SNAPSHOT + 0.1.0-SNAPSHOT core-java @@ -143,16 +143,12 @@ - - 4.1.5.RELEASE - 3.2.5.RELEASE - - 4.3.10.Final - 5.1.35 + 4.3.11.Final + 5.1.38 - 2.5.5 + 2.7.2 1.7.13 @@ -173,14 +169,14 @@ 4.4.1 4.5 - 2.4.1 + 2.9.0 - 3.3 + 3.5.1 2.6 - 2.18.1 + 2.19.1 2.7 - 1.4.14 + 1.4.18 diff --git a/core-java/src/main/webapp/WEB-INF/api-servlet.xml b/core-java/src/main/webapp/WEB-INF/api-servlet.xml deleted file mode 100644 index 4c74be8912..0000000000 --- a/core-java/src/main/webapp/WEB-INF/api-servlet.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - \ No newline at end of file diff --git a/core-java/src/main/webapp/WEB-INF/web.xml b/core-java/src/main/webapp/WEB-INF/web.xml deleted file mode 100644 index 935beae648..0000000000 --- a/core-java/src/main/webapp/WEB-INF/web.xml +++ /dev/null @@ -1,41 +0,0 @@ - - - - Spring MVC Application - - - - contextClass - - org.springframework.web.context.support.AnnotationConfigWebApplicationContext - - - - contextConfigLocation - org.baeldung.config - - - - org.springframework.web.context.ContextLoaderListener - - - - - api - org.springframework.web.servlet.DispatcherServlet - 1 - - - api - / - - - - - - - \ No newline at end of file diff --git a/gson-jackson-performance/.classpath b/gson-jackson-performance/.classpath index 85e0397901..19b2ff18be 100644 --- a/gson-jackson-performance/.classpath +++ b/gson-jackson-performance/.classpath @@ -1,14 +1,13 @@ - - - - - - - - - - - - \ No newline at end of file + + + + + + + + + + + diff --git a/gson-jackson-performance/README.md b/gson-jackson-performance/README.md index 9bbe679dfc..5b08f6cdec 100644 --- a/gson-jackson-performance/README.md +++ b/gson-jackson-performance/README.md @@ -1,5 +1,3 @@ -## Performance of GSON and Jackson +## Performance of Gson and Jackson -## STandalone java programs to measure the performance of both JSON API's - -## based on file size , iterations. \ No newline at end of file +Standalone java programs to measure the performance of both JSON APIs based on file size and object graph complexity. diff --git a/gson-jackson-performance/log.out b/gson-jackson-performance/log.out deleted file mode 100644 index 076ff3892c..0000000000 --- a/gson-jackson-performance/log.out +++ /dev/null @@ -1,35 +0,0 @@ -Java HotSpot(TM) 64-Bit Server VM (25.45-b02) for windows-amd64 JRE (1.8.0_45-b15), built on Apr 30 2015 12:40:44 by "java_re" with MS VC++ 10.0 (VS2010) -Memory: 4k page, physical 8291728k(5579796k free), swap 16581620k(12609940k free) -CommandLine flags: -XX:InitialHeapSize=132667648 -XX:MaxHeapSize=2122682368 -XX:+PrintGC -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -XX:+UseCompressedClassPointers -XX:+UseCompressedOops -XX:-UseLargePagesIndividualAllocation -XX:+UseParallelGC -0.363: [GC (Allocation Failure) [PSYoungGen: 33280K->5096K(38400K)] 33280K->10228K(125952K), 0.0092249 secs] [Times: user=0.00 sys=0.00, real=0.01 secs] -0.414: [GC (Allocation Failure) [PSYoungGen: 38376K->5106K(71680K)] 43508K->24102K(159232K), 0.0186113 secs] [Times: user=0.06 sys=0.00, real=0.02 secs] -0.516: [GC (Allocation Failure) [PSYoungGen: 71666K->5097K(71680K)] 90662K->52229K(159232K), 0.0445313 secs] [Times: user=0.16 sys=0.03, real=0.04 secs] -0.651: [GC (Allocation Failure) [PSYoungGen: 71657K->5109K(138240K)] 118789K->80322K(225792K), 0.0512456 secs] [Times: user=0.19 sys=0.02, real=0.06 secs] -0.702: [Full GC (Ergonomics) [PSYoungGen: 5109K->0K(138240K)] [ParOldGen: 75212K->77437K(170496K)] 80322K->77437K(308736K), [Metaspace: 7004K->7004K(1056768K)], 0.5375812 secs] [Times: user=1.48 sys=0.00, real=0.54 secs] -1.406: [GC (Allocation Failure) [PSYoungGen: 133120K->5088K(138240K)] 210557K->133918K(308736K), 0.1172537 secs] [Times: user=0.34 sys=0.03, real=0.13 secs] -1.523: [Full GC (Ergonomics) [PSYoungGen: 5088K->0K(138240K)] [ParOldGen: 128829K->133416K(284160K)] 133918K->133416K(422400K), [Metaspace: 7004K->7004K(1056768K)], 0.9853907 secs] [Times: user=2.78 sys=0.02, real=0.99 secs] -2.691: [GC (Allocation Failure) [PSYoungGen: 133120K->56497K(227840K)] 266536K->189913K(512000K), 0.1302934 secs] [Times: user=0.33 sys=0.03, real=0.13 secs] -3.015: [GC (Allocation Failure) [PSYoungGen: 222385K->71657K(237568K)] 355801K->259810K(521728K), 0.1589475 secs] [Times: user=0.50 sys=0.02, real=0.17 secs] -3.372: [GC (Allocation Failure) [PSYoungGen: 237545K->112638K(295424K)] 425698K->329655K(579584K), 0.1698426 secs] [Times: user=0.47 sys=0.00, real=0.17 secs] -3.761: [GC (Allocation Failure) [PSYoungGen: 295422K->145918K(328704K)] 512439K->406791K(612864K), 0.2285356 secs] [Times: user=0.67 sys=0.03, real=0.24 secs] -3.989: [Full GC (Ergonomics) [PSYoungGen: 145918K->121734K(328704K)] [ParOldGen: 260872K->283948K(478720K)] 406791K->405682K(807424K), [Metaspace: 7004K->7004K(1056768K)], 2.7389690 secs] [Times: user=7.89 sys=0.00, real=2.74 secs] -6.963: [GC (Allocation Failure) [PSYoungGen: 304518K->189438K(378368K)] 588466K->484050K(857088K), 0.2961369 secs] [Times: user=0.87 sys=0.06, real=0.30 secs] -7.486: [GC (Allocation Failure) [PSYoungGen: 378366K->220926K(413696K)] 672978K->563874K(892416K), 0.2904383 secs] [Times: user=0.86 sys=0.03, real=0.30 secs] -8.002: [GC (System.gc()) [PSYoungGen: 409787K->158432K(460800K)] 752736K->643074K(946176K), 0.3470548 secs] [Times: user=1.01 sys=0.05, real=0.35 secs] -8.349: [Full GC (System.gc()) [PSYoungGen: 158432K->155661K(460800K)] [ParOldGen: 484642K->484968K(485376K)] 643074K->640630K(946176K), [Metaspace: 7039K->7039K(1056768K)], 3.8112607 secs] [Times: user=10.73 sys=0.03, real=3.81 secs] -12.864: [Full GC (Ergonomics) [PSYoungGen: 385748K->319385K(460800K)] [ParOldGen: 484968K->485363K(773632K)] 870716K->804749K(1234432K), [Metaspace: 7719K->7719K(1056768K)], 2.7333253 secs] [Times: user=7.02 sys=0.02, real=2.73 secs] -15.598: [GC (Allocation Failure) [PSYoungGen: 319494K->163753K(460800K)] 805371K->805902K(1234432K), 0.2532505 secs] [Times: user=0.98 sys=0.08, real=0.25 secs] -15.851: [Full GC (Ergonomics) [PSYoungGen: 163753K->31983K(460800K)] [ParOldGen: 642148K->772967K(1150976K)] 805902K->804950K(1611776K), [Metaspace: 7720K->7720K(1056768K)], 3.1227324 secs] [Times: user=8.89 sys=0.05, real=3.12 secs] -19.257: [GC (Allocation Failure) [PSYoungGen: 262383K->169509K(460800K)] 1035350K->974460K(1611776K), 0.1370666 secs] [Times: user=0.36 sys=0.02, real=0.14 secs] -19.691: [GC (Allocation Failure) --[PSYoungGen: 273197K->273197K(460800K)] 1487836K->1656297K(1844224K), 0.1069653 secs] [Times: user=0.06 sys=0.05, real=0.10 secs] -19.798: [Full GC (Ergonomics) [PSYoungGen: 273197K->77314K(460800K)] [ParOldGen: 1383099K->1383092K(1383424K)] 1656297K->1460407K(1844224K), [Metaspace: 7720K->7720K(1056768K)], 2.2582744 secs] [Times: user=6.10 sys=0.02, real=2.26 secs] -22.056: [Full GC (Allocation Failure) [PSYoungGen: 77314K->77314K(460800K)] [ParOldGen: 1383092K->1383008K(1383424K)] 1460407K->1460322K(1844224K), [Metaspace: 7720K->7720K(1056768K)], 3.0326600 secs] [Times: user=7.74 sys=0.02, real=3.04 secs] -Heap - PSYoungGen total 460800K, used 85443K [0x00000000d5d00000, 0x0000000100000000, 0x0000000100000000) - eden space 230400K, 3% used [0x00000000d5d00000,0x00000000d64f02b8,0x00000000e3e00000) - from space 230400K, 33% used [0x00000000f1f00000,0x00000000f6a809a0,0x0000000100000000) - to space 230400K, 0% used [0x00000000e3e00000,0x00000000e3e00000,0x00000000f1f00000) - ParOldGen total 1383424K, used 1383008K [0x0000000081600000, 0x00000000d5d00000, 0x00000000d5d00000) - object space 1383424K, 99% used [0x0000000081600000,0x00000000d5c980e8,0x00000000d5d00000) - Metaspace used 7736K, capacity 7846K, committed 8064K, reserved 1056768K - class space used 849K, capacity 857K, committed 896K, reserved 1048576K diff --git a/gson-jackson-performance/logs_Performance/log4j-application 100mb gson.log b/gson-jackson-performance/logs_Performance/log4j-application 100mb gson.log deleted file mode 100644 index 827fc6b8ff..0000000000 --- a/gson-jackson-performance/logs_Performance/log4j-application 100mb gson.log +++ /dev/null @@ -1,490 +0,0 @@ -2016-02-13 19:37:16 INFO ComplexDataGson:27 - -------Round 1 -2016-02-13 19:37:18 INFO ComplexDataGson:53 - Json Generation Time(ms):: 1278083466 -2016-02-13 19:37:19 INFO ComplexDataGson:29 - Size of Complex content Jackson :: 100 MB -2016-02-13 19:37:19 INFO ComplexDataGson:30 - -------------------------------------------------------------------------- -2016-02-13 19:37:27 INFO ComplexDataGson:63 - Generating Map from json Time(ms):: 8332113036 -2016-02-13 19:37:27 INFO ComplexDataGson:64 - -------------------------------------------------------------------------- -2016-02-13 19:37:30 INFO ComplexDataGson:75 - Generating Actual Object from json Time(ms):: 1113664562 -2016-02-13 19:37:30 INFO ComplexDataGson:76 - -------------------------------------------------------------------------- -2016-02-13 19:37:31 INFO ComplexDataGson:27 - -------Round 2 -2016-02-13 19:37:33 INFO ComplexDataGson:53 - Json Generation Time(ms):: 1000705020 -2016-02-13 19:37:33 INFO ComplexDataGson:29 - Size of Complex content Jackson :: 100 MB -2016-02-13 19:37:33 INFO ComplexDataGson:30 - -------------------------------------------------------------------------- -2016-02-13 19:37:42 INFO ComplexDataGson:63 - Generating Map from json Time(ms):: 8658432353 -2016-02-13 19:37:42 INFO ComplexDataGson:64 - -------------------------------------------------------------------------- -2016-02-13 19:37:44 INFO ComplexDataGson:75 - Generating Actual Object from json Time(ms):: 1243221682 -2016-02-13 19:37:44 INFO ComplexDataGson:76 - -------------------------------------------------------------------------- -2016-02-13 19:37:45 INFO ComplexDataGson:27 - -------Round 3 -2016-02-13 19:37:47 INFO ComplexDataGson:53 - Json Generation Time(ms):: 1008859332 -2016-02-13 19:37:48 INFO ComplexDataGson:29 - Size of Complex content Jackson :: 100 MB -2016-02-13 19:37:48 INFO ComplexDataGson:30 - -------------------------------------------------------------------------- -2016-02-13 19:37:56 INFO ComplexDataGson:63 - Generating Map from json Time(ms):: 8392288043 -2016-02-13 19:37:56 INFO ComplexDataGson:64 - -------------------------------------------------------------------------- -2016-02-13 19:37:58 INFO ComplexDataGson:75 - Generating Actual Object from json Time(ms):: 1277124228 -2016-02-13 19:37:58 INFO ComplexDataGson:76 - -------------------------------------------------------------------------- -2016-02-13 19:37:59 INFO ComplexDataGson:27 - -------Round 4 -2016-02-13 19:38:01 INFO ComplexDataGson:53 - Json Generation Time(ms):: 995015515 -2016-02-13 19:38:02 INFO ComplexDataGson:29 - Size of Complex content Jackson :: 100 MB -2016-02-13 19:38:02 INFO ComplexDataGson:30 - -------------------------------------------------------------------------- -2016-02-13 19:38:10 INFO ComplexDataGson:63 - Generating Map from json Time(ms):: 8797346582 -2016-02-13 19:38:10 INFO ComplexDataGson:64 - -------------------------------------------------------------------------- -2016-02-13 19:38:13 INFO ComplexDataGson:75 - Generating Actual Object from json Time(ms):: 1649643681 -2016-02-13 19:38:13 INFO ComplexDataGson:76 - -------------------------------------------------------------------------- -2016-02-13 19:38:14 INFO ComplexDataGson:27 - -------Round 5 -2016-02-13 19:38:17 INFO ComplexDataGson:53 - Json Generation Time(ms):: 1272820685 -2016-02-13 19:38:17 INFO ComplexDataGson:29 - Size of Complex content Jackson :: 100 MB -2016-02-13 19:38:17 INFO ComplexDataGson:30 - -------------------------------------------------------------------------- -2016-02-13 19:38:26 INFO ComplexDataGson:63 - Generating Map from json Time(ms):: 9312540240 -2016-02-13 19:38:26 INFO ComplexDataGson:64 - -------------------------------------------------------------------------- -2016-02-13 19:38:28 INFO ComplexDataGson:75 - Generating Actual Object from json Time(ms):: 1257408139 -2016-02-13 19:38:28 INFO ComplexDataGson:76 - -------------------------------------------------------------------------- -2016-02-13 19:38:30 INFO ComplexDataGson:27 - -------Round 6 -2016-02-13 19:38:32 INFO ComplexDataGson:53 - Json Generation Time(ms):: 1068332478 -2016-02-13 19:38:32 INFO ComplexDataGson:29 - Size of Complex content Jackson :: 100 MB -2016-02-13 19:38:32 INFO ComplexDataGson:30 - -------------------------------------------------------------------------- -2016-02-13 19:38:41 INFO ComplexDataGson:63 - Generating Map from json Time(ms):: 8912581452 -2016-02-13 19:38:41 INFO ComplexDataGson:64 - -------------------------------------------------------------------------- -2016-02-13 19:38:43 INFO ComplexDataGson:75 - Generating Actual Object from json Time(ms):: 1264009906 -2016-02-13 19:38:43 INFO ComplexDataGson:76 - -------------------------------------------------------------------------- -2016-02-13 19:38:44 INFO ComplexDataGson:27 - -------Round 7 -2016-02-13 19:38:46 INFO ComplexDataGson:53 - Json Generation Time(ms):: 1008157075 -2016-02-13 19:38:46 INFO ComplexDataGson:29 - Size of Complex content Jackson :: 100 MB -2016-02-13 19:38:46 INFO ComplexDataGson:30 - -------------------------------------------------------------------------- -2016-02-13 19:38:55 INFO ComplexDataGson:63 - Generating Map from json Time(ms):: 8505211268 -2016-02-13 19:38:55 INFO ComplexDataGson:64 - -------------------------------------------------------------------------- -2016-02-13 19:38:57 INFO ComplexDataGson:75 - Generating Actual Object from json Time(ms):: 1251681923 -2016-02-13 19:38:57 INFO ComplexDataGson:76 - -------------------------------------------------------------------------- -2016-02-13 19:38:58 INFO ComplexDataGson:27 - -------Round 8 -2016-02-13 19:39:01 INFO ComplexDataGson:53 - Json Generation Time(ms):: 1006583609 -2016-02-13 19:39:01 INFO ComplexDataGson:29 - Size of Complex content Jackson :: 100 MB -2016-02-13 19:39:01 INFO ComplexDataGson:30 - -------------------------------------------------------------------------- -2016-02-13 19:39:10 INFO ComplexDataGson:63 - Generating Map from json Time(ms):: 8752857286 -2016-02-13 19:39:10 INFO ComplexDataGson:64 - -------------------------------------------------------------------------- -2016-02-13 19:39:12 INFO ComplexDataGson:75 - Generating Actual Object from json Time(ms):: 1414701446 -2016-02-13 19:39:12 INFO ComplexDataGson:76 - -------------------------------------------------------------------------- -2016-02-13 19:39:13 INFO ComplexDataGson:27 - -------Round 9 -2016-02-13 19:39:16 INFO ComplexDataGson:53 - Json Generation Time(ms):: 1294525120 -2016-02-13 19:39:16 INFO ComplexDataGson:29 - Size of Complex content Jackson :: 100 MB -2016-02-13 19:39:16 INFO ComplexDataGson:30 - -------------------------------------------------------------------------- -2016-02-13 19:39:26 INFO ComplexDataGson:63 - Generating Map from json Time(ms):: 10191596918 -2016-02-13 19:39:26 INFO ComplexDataGson:64 - -------------------------------------------------------------------------- -2016-02-13 19:39:29 INFO ComplexDataGson:75 - Generating Actual Object from json Time(ms):: 1658383009 -2016-02-13 19:39:29 INFO ComplexDataGson:76 - -------------------------------------------------------------------------- -2016-02-13 19:39:30 INFO ComplexDataGson:27 - -------Round 10 -2016-02-13 19:39:33 INFO ComplexDataGson:53 - Json Generation Time(ms):: 1309101589 -2016-02-13 19:39:33 INFO ComplexDataGson:29 - Size of Complex content Jackson :: 100 MB -2016-02-13 19:39:33 INFO ComplexDataGson:30 - -------------------------------------------------------------------------- -2016-02-13 19:39:43 INFO ComplexDataGson:63 - Generating Map from json Time(ms):: 9762623354 -2016-02-13 19:39:43 INFO ComplexDataGson:64 - -------------------------------------------------------------------------- -2016-02-13 19:39:45 INFO ComplexDataGson:75 - Generating Actual Object from json Time(ms):: 1260306380 -2016-02-13 19:39:45 INFO ComplexDataGson:76 - -------------------------------------------------------------------------- -2016-02-13 19:39:46 INFO ComplexDataGson:39 - -------------------------------------------------------------------------- -2016-02-13 19:39:46 INFO ComplexDataGson:40 - Average Time to Generate JSON : 1124218388 -2016-02-13 19:39:46 INFO ComplexDataGson:41 - Average Time to Parse JSON To Map : 8961759053 -2016-02-13 19:39:46 INFO ComplexDataGson:42 - Average Time to Parse JSON To Actual Object : 1339014495 -2016-02-13 19:39:46 INFO ComplexDataGson:43 - -------------------------------------------------------------------------- -2016-02-13 19:41:32 INFO ComplexDataGson:27 - -------Round 1 -2016-02-13 19:41:34 INFO ComplexDataGson:53 - Json Generation Time(ms):: 1191851136 -2016-02-13 19:41:35 INFO ComplexDataGson:29 - Size of Complex content Jackson :: 100 MB -2016-02-13 19:41:35 INFO ComplexDataGson:30 - -------------------------------------------------------------------------- -2016-02-13 19:41:45 INFO ComplexDataGson:63 - Generating Map from json Time(ms):: 10080407033 -2016-02-13 19:41:45 INFO ComplexDataGson:64 - -------------------------------------------------------------------------- -2016-02-13 19:41:48 INFO ComplexDataGson:75 - Generating Actual Object from json Time(ms):: 1379953348 -2016-02-13 19:41:48 INFO ComplexDataGson:76 - -------------------------------------------------------------------------- -2016-02-13 19:41:50 INFO ComplexDataGson:27 - -------Round 2 -2016-02-13 19:41:52 INFO ComplexDataGson:53 - Json Generation Time(ms):: 956293094 -2016-02-13 19:41:52 INFO ComplexDataGson:29 - Size of Complex content Jackson :: 100 MB -2016-02-13 19:41:52 INFO ComplexDataGson:30 - -------------------------------------------------------------------------- -2016-02-13 19:42:01 INFO ComplexDataGson:63 - Generating Map from json Time(ms):: 8813430199 -2016-02-13 19:42:01 INFO ComplexDataGson:64 - -------------------------------------------------------------------------- -2016-02-13 19:42:03 INFO ComplexDataGson:75 - Generating Actual Object from json Time(ms):: 1274304543 -2016-02-13 19:42:03 INFO ComplexDataGson:76 - -------------------------------------------------------------------------- -2016-02-13 19:42:04 INFO ComplexDataGson:27 - -------Round 3 -2016-02-13 19:42:06 INFO ComplexDataGson:53 - Json Generation Time(ms):: 927398321 -2016-02-13 19:42:06 INFO ComplexDataGson:29 - Size of Complex content Jackson :: 100 MB -2016-02-13 19:42:06 INFO ComplexDataGson:30 - -------------------------------------------------------------------------- -2016-02-13 19:42:15 INFO ComplexDataGson:63 - Generating Map from json Time(ms):: 8356408992 -2016-02-13 19:42:15 INFO ComplexDataGson:64 - -------------------------------------------------------------------------- -2016-02-13 19:42:17 INFO ComplexDataGson:75 - Generating Actual Object from json Time(ms):: 1322685660 -2016-02-13 19:42:17 INFO ComplexDataGson:76 - -------------------------------------------------------------------------- -2016-02-13 19:42:18 INFO ComplexDataGson:27 - -------Round 4 -2016-02-13 19:42:21 INFO ComplexDataGson:53 - Json Generation Time(ms):: 1207259733 -2016-02-13 19:42:21 INFO ComplexDataGson:29 - Size of Complex content Jackson :: 100 MB -2016-02-13 19:42:21 INFO ComplexDataGson:30 - -------------------------------------------------------------------------- -2016-02-13 19:42:31 INFO ComplexDataGson:63 - Generating Map from json Time(ms):: 10045768675 -2016-02-13 19:42:31 INFO ComplexDataGson:64 - -------------------------------------------------------------------------- -2016-02-13 19:42:33 INFO ComplexDataGson:75 - Generating Actual Object from json Time(ms):: 1245056076 -2016-02-13 19:42:33 INFO ComplexDataGson:76 - -------------------------------------------------------------------------- -2016-02-13 19:42:34 INFO ComplexDataGson:27 - -------Round 5 -2016-02-13 19:42:36 INFO ComplexDataGson:53 - Json Generation Time(ms):: 915288634 -2016-02-13 19:42:36 INFO ComplexDataGson:29 - Size of Complex content Jackson :: 100 MB -2016-02-13 19:42:36 INFO ComplexDataGson:30 - -------------------------------------------------------------------------- -2016-02-13 19:42:45 INFO ComplexDataGson:63 - Generating Map from json Time(ms):: 8618376472 -2016-02-13 19:42:45 INFO ComplexDataGson:64 - -------------------------------------------------------------------------- -2016-02-13 19:42:47 INFO ComplexDataGson:75 - Generating Actual Object from json Time(ms):: 1269665068 -2016-02-13 19:42:47 INFO ComplexDataGson:76 - -------------------------------------------------------------------------- -2016-02-13 19:42:49 INFO ComplexDataGson:27 - -------Round 6 -2016-02-13 19:42:50 INFO ComplexDataGson:53 - Json Generation Time(ms):: 932316093 -2016-02-13 19:42:51 INFO ComplexDataGson:29 - Size of Complex content Jackson :: 100 MB -2016-02-13 19:42:51 INFO ComplexDataGson:30 - -------------------------------------------------------------------------- -2016-02-13 19:43:00 INFO ComplexDataGson:63 - Generating Map from json Time(ms):: 8813796130 -2016-02-13 19:43:00 INFO ComplexDataGson:64 - -------------------------------------------------------------------------- -2016-02-13 19:43:02 INFO ComplexDataGson:75 - Generating Actual Object from json Time(ms):: 1313783696 -2016-02-13 19:43:02 INFO ComplexDataGson:76 - -------------------------------------------------------------------------- -2016-02-13 19:43:03 INFO ComplexDataGson:27 - -------Round 7 -2016-02-13 19:43:05 INFO ComplexDataGson:53 - Json Generation Time(ms):: 915598117 -2016-02-13 19:43:05 INFO ComplexDataGson:29 - Size of Complex content Jackson :: 100 MB -2016-02-13 19:43:05 INFO ComplexDataGson:30 - -------------------------------------------------------------------------- -2016-02-13 19:43:14 INFO ComplexDataGson:63 - Generating Map from json Time(ms):: 8961026913 -2016-02-13 19:43:14 INFO ComplexDataGson:64 - -------------------------------------------------------------------------- -2016-02-13 19:43:16 INFO ComplexDataGson:75 - Generating Actual Object from json Time(ms):: 1261592864 -2016-02-13 19:43:16 INFO ComplexDataGson:76 - -------------------------------------------------------------------------- -2016-02-13 19:43:17 INFO ComplexDataGson:27 - -------Round 8 -2016-02-13 19:43:19 INFO ComplexDataGson:53 - Json Generation Time(ms):: 920982875 -2016-02-13 19:43:19 INFO ComplexDataGson:29 - Size of Complex content Jackson :: 100 MB -2016-02-13 19:43:19 INFO ComplexDataGson:30 - -------------------------------------------------------------------------- -2016-02-13 19:43:28 INFO ComplexDataGson:63 - Generating Map from json Time(ms):: 8618532792 -2016-02-13 19:43:28 INFO ComplexDataGson:64 - -------------------------------------------------------------------------- -2016-02-13 19:43:30 INFO ComplexDataGson:75 - Generating Actual Object from json Time(ms):: 1245481219 -2016-02-13 19:43:30 INFO ComplexDataGson:76 - -------------------------------------------------------------------------- -2016-02-13 19:43:31 INFO ComplexDataGson:27 - -------Round 9 -2016-02-13 19:43:33 INFO ComplexDataGson:53 - Json Generation Time(ms):: 913480688 -2016-02-13 19:43:34 INFO ComplexDataGson:29 - Size of Complex content Jackson :: 100 MB -2016-02-13 19:43:34 INFO ComplexDataGson:30 - -------------------------------------------------------------------------- -2016-02-13 19:43:42 INFO ComplexDataGson:63 - Generating Map from json Time(ms):: 8243017597 -2016-02-13 19:43:42 INFO ComplexDataGson:64 - -------------------------------------------------------------------------- -2016-02-13 19:43:44 INFO ComplexDataGson:75 - Generating Actual Object from json Time(ms):: 1230475265 -2016-02-13 19:43:44 INFO ComplexDataGson:76 - -------------------------------------------------------------------------- -2016-02-13 19:43:45 INFO ComplexDataGson:27 - -------Round 10 -2016-02-13 19:43:47 INFO ComplexDataGson:53 - Json Generation Time(ms):: 927227001 -2016-02-13 19:43:47 INFO ComplexDataGson:29 - Size of Complex content Jackson :: 100 MB -2016-02-13 19:43:47 INFO ComplexDataGson:30 - -------------------------------------------------------------------------- -2016-02-13 19:43:55 INFO ComplexDataGson:63 - Generating Map from json Time(ms):: 7879612879 -2016-02-13 19:43:55 INFO ComplexDataGson:64 - -------------------------------------------------------------------------- -2016-02-13 19:43:58 INFO ComplexDataGson:75 - Generating Actual Object from json Time(ms):: 1296596758 -2016-02-13 19:43:58 INFO ComplexDataGson:76 - -------------------------------------------------------------------------- -2016-02-13 19:43:59 INFO ComplexDataGson:27 - -------Round 11 -2016-02-13 19:44:01 INFO ComplexDataGson:53 - Json Generation Time(ms):: 1105414720 -2016-02-13 19:44:01 INFO ComplexDataGson:29 - Size of Complex content Jackson :: 100 MB -2016-02-13 19:44:01 INFO ComplexDataGson:30 - -------------------------------------------------------------------------- -2016-02-13 19:44:12 INFO ComplexDataGson:63 - Generating Map from json Time(ms):: 10599177108 -2016-02-13 19:44:12 INFO ComplexDataGson:64 - -------------------------------------------------------------------------- -2016-02-13 19:44:14 INFO ComplexDataGson:75 - Generating Actual Object from json Time(ms):: 1250150300 -2016-02-13 19:44:14 INFO ComplexDataGson:76 - -------------------------------------------------------------------------- -2016-02-13 19:44:15 INFO ComplexDataGson:27 - -------Round 12 -2016-02-13 19:44:17 INFO ComplexDataGson:53 - Json Generation Time(ms):: 934354968 -2016-02-13 19:44:18 INFO ComplexDataGson:29 - Size of Complex content Jackson :: 100 MB -2016-02-13 19:44:18 INFO ComplexDataGson:30 - -------------------------------------------------------------------------- -2016-02-13 19:44:26 INFO ComplexDataGson:63 - Generating Map from json Time(ms):: 8623628596 -2016-02-13 19:44:26 INFO ComplexDataGson:64 - -------------------------------------------------------------------------- -2016-02-13 19:44:28 INFO ComplexDataGson:75 - Generating Actual Object from json Time(ms):: 1266831567 -2016-02-13 19:44:28 INFO ComplexDataGson:76 - -------------------------------------------------------------------------- -2016-02-13 19:44:30 INFO ComplexDataGson:27 - -------Round 13 -2016-02-13 19:44:32 INFO ComplexDataGson:53 - Json Generation Time(ms):: 915319424 -2016-02-13 19:44:32 INFO ComplexDataGson:29 - Size of Complex content Jackson :: 100 MB -2016-02-13 19:44:32 INFO ComplexDataGson:30 - -------------------------------------------------------------------------- -2016-02-13 19:44:40 INFO ComplexDataGson:63 - Generating Map from json Time(ms):: 8506292877 -2016-02-13 19:44:40 INFO ComplexDataGson:64 - -------------------------------------------------------------------------- -2016-02-13 19:44:43 INFO ComplexDataGson:75 - Generating Actual Object from json Time(ms):: 1263272517 -2016-02-13 19:44:43 INFO ComplexDataGson:76 - -------------------------------------------------------------------------- -2016-02-13 19:44:44 INFO ComplexDataGson:27 - -------Round 14 -2016-02-13 19:44:46 INFO ComplexDataGson:53 - Json Generation Time(ms):: 953177742 -2016-02-13 19:44:46 INFO ComplexDataGson:29 - Size of Complex content Jackson :: 100 MB -2016-02-13 19:44:46 INFO ComplexDataGson:30 - -------------------------------------------------------------------------- -2016-02-13 19:44:55 INFO ComplexDataGson:63 - Generating Map from json Time(ms):: 8520122877 -2016-02-13 19:44:55 INFO ComplexDataGson:64 - -------------------------------------------------------------------------- -2016-02-13 19:44:57 INFO ComplexDataGson:75 - Generating Actual Object from json Time(ms):: 1295778051 -2016-02-13 19:44:57 INFO ComplexDataGson:76 - -------------------------------------------------------------------------- -2016-02-13 19:44:58 INFO ComplexDataGson:27 - -------Round 15 -2016-02-13 19:45:00 INFO ComplexDataGson:53 - Json Generation Time(ms):: 917475933 -2016-02-13 19:45:00 INFO ComplexDataGson:29 - Size of Complex content Jackson :: 100 MB -2016-02-13 19:45:00 INFO ComplexDataGson:30 - -------------------------------------------------------------------------- -2016-02-13 19:45:09 INFO ComplexDataGson:63 - Generating Map from json Time(ms):: 8470522382 -2016-02-13 19:45:09 INFO ComplexDataGson:64 - -------------------------------------------------------------------------- -2016-02-13 19:45:11 INFO ComplexDataGson:75 - Generating Actual Object from json Time(ms):: 1220261157 -2016-02-13 19:45:11 INFO ComplexDataGson:76 - -------------------------------------------------------------------------- -2016-02-13 19:45:12 INFO ComplexDataGson:27 - -------Round 16 -2016-02-13 19:45:14 INFO ComplexDataGson:53 - Json Generation Time(ms):: 915774963 -2016-02-13 19:45:14 INFO ComplexDataGson:29 - Size of Complex content Jackson :: 100 MB -2016-02-13 19:45:14 INFO ComplexDataGson:30 - -------------------------------------------------------------------------- -2016-02-13 19:45:22 INFO ComplexDataGson:63 - Generating Map from json Time(ms):: 7762057680 -2016-02-13 19:45:22 INFO ComplexDataGson:64 - -------------------------------------------------------------------------- -2016-02-13 19:45:24 INFO ComplexDataGson:75 - Generating Actual Object from json Time(ms):: 1231289630 -2016-02-13 19:45:24 INFO ComplexDataGson:76 - -------------------------------------------------------------------------- -2016-02-13 19:45:25 INFO ComplexDataGson:27 - -------Round 17 -2016-02-13 19:45:27 INFO ComplexDataGson:53 - Json Generation Time(ms):: 914879280 -2016-02-13 19:45:27 INFO ComplexDataGson:29 - Size of Complex content Jackson :: 100 MB -2016-02-13 19:45:27 INFO ComplexDataGson:30 - -------------------------------------------------------------------------- -2016-02-13 19:45:36 INFO ComplexDataGson:63 - Generating Map from json Time(ms):: 8748457028 -2016-02-13 19:45:36 INFO ComplexDataGson:64 - -------------------------------------------------------------------------- -2016-02-13 19:45:39 INFO ComplexDataGson:75 - Generating Actual Object from json Time(ms):: 1555775737 -2016-02-13 19:45:39 INFO ComplexDataGson:76 - -------------------------------------------------------------------------- -2016-02-13 19:45:40 INFO ComplexDataGson:27 - -------Round 18 -2016-02-13 19:45:42 INFO ComplexDataGson:53 - Json Generation Time(ms):: 1093209109 -2016-02-13 19:45:43 INFO ComplexDataGson:29 - Size of Complex content Jackson :: 100 MB -2016-02-13 19:45:43 INFO ComplexDataGson:30 - -------------------------------------------------------------------------- -2016-02-13 19:45:52 INFO ComplexDataGson:63 - Generating Map from json Time(ms):: 9098222804 -2016-02-13 19:45:52 INFO ComplexDataGson:64 - -------------------------------------------------------------------------- -2016-02-13 19:45:54 INFO ComplexDataGson:75 - Generating Actual Object from json Time(ms):: 1255617562 -2016-02-13 19:45:54 INFO ComplexDataGson:76 - -------------------------------------------------------------------------- -2016-02-13 19:45:55 INFO ComplexDataGson:27 - -------Round 19 -2016-02-13 19:45:57 INFO ComplexDataGson:53 - Json Generation Time(ms):: 950926099 -2016-02-13 19:45:57 INFO ComplexDataGson:29 - Size of Complex content Jackson :: 100 MB -2016-02-13 19:45:57 INFO ComplexDataGson:30 - -------------------------------------------------------------------------- -2016-02-13 19:46:06 INFO ComplexDataGson:63 - Generating Map from json Time(ms):: 8670918236 -2016-02-13 19:46:06 INFO ComplexDataGson:64 - -------------------------------------------------------------------------- -2016-02-13 19:46:08 INFO ComplexDataGson:75 - Generating Actual Object from json Time(ms):: 1280563669 -2016-02-13 19:46:08 INFO ComplexDataGson:76 - -------------------------------------------------------------------------- -2016-02-13 19:46:09 INFO ComplexDataGson:27 - -------Round 20 -2016-02-13 19:46:11 INFO ComplexDataGson:53 - Json Generation Time(ms):: 933908902 -2016-02-13 19:46:12 INFO ComplexDataGson:29 - Size of Complex content Jackson :: 100 MB -2016-02-13 19:46:12 INFO ComplexDataGson:30 - -------------------------------------------------------------------------- -2016-02-13 19:46:21 INFO ComplexDataGson:63 - Generating Map from json Time(ms):: 9708235748 -2016-02-13 19:46:21 INFO ComplexDataGson:64 - -------------------------------------------------------------------------- -2016-02-13 19:46:24 INFO ComplexDataGson:75 - Generating Actual Object from json Time(ms):: 1574329688 -2016-02-13 19:46:24 INFO ComplexDataGson:76 - -------------------------------------------------------------------------- -2016-02-13 19:46:25 INFO ComplexDataGson:27 - -------Round 21 -2016-02-13 19:46:28 INFO ComplexDataGson:53 - Json Generation Time(ms):: 1066257681 -2016-02-13 19:46:28 INFO ComplexDataGson:29 - Size of Complex content Jackson :: 100 MB -2016-02-13 19:46:28 INFO ComplexDataGson:30 - -------------------------------------------------------------------------- -2016-02-13 19:46:37 INFO ComplexDataGson:63 - Generating Map from json Time(ms):: 9000526594 -2016-02-13 19:46:37 INFO ComplexDataGson:64 - -------------------------------------------------------------------------- -2016-02-13 19:46:39 INFO ComplexDataGson:75 - Generating Actual Object from json Time(ms):: 1241094778 -2016-02-13 19:46:39 INFO ComplexDataGson:76 - -------------------------------------------------------------------------- -2016-02-13 19:46:40 INFO ComplexDataGson:27 - -------Round 22 -2016-02-13 19:46:42 INFO ComplexDataGson:53 - Json Generation Time(ms):: 921404072 -2016-02-13 19:46:42 INFO ComplexDataGson:29 - Size of Complex content Jackson :: 100 MB -2016-02-13 19:46:42 INFO ComplexDataGson:30 - -------------------------------------------------------------------------- -2016-02-13 19:46:51 INFO ComplexDataGson:63 - Generating Map from json Time(ms):: 8424769102 -2016-02-13 19:46:51 INFO ComplexDataGson:64 - -------------------------------------------------------------------------- -2016-02-13 19:46:53 INFO ComplexDataGson:75 - Generating Actual Object from json Time(ms):: 1230215126 -2016-02-13 19:46:53 INFO ComplexDataGson:76 - -------------------------------------------------------------------------- -2016-02-13 19:46:54 INFO ComplexDataGson:27 - -------Round 23 -2016-02-13 19:46:56 INFO ComplexDataGson:53 - Json Generation Time(ms):: 913987938 -2016-02-13 19:46:56 INFO ComplexDataGson:29 - Size of Complex content Jackson :: 100 MB -2016-02-13 19:46:56 INFO ComplexDataGson:30 - -------------------------------------------------------------------------- -2016-02-13 19:47:06 INFO ComplexDataGson:63 - Generating Map from json Time(ms):: 10028036985 -2016-02-13 19:47:06 INFO ComplexDataGson:64 - -------------------------------------------------------------------------- -2016-02-13 19:47:09 INFO ComplexDataGson:75 - Generating Actual Object from json Time(ms):: 1651288202 -2016-02-13 19:47:09 INFO ComplexDataGson:76 - -------------------------------------------------------------------------- -2016-02-13 19:47:10 INFO ComplexDataGson:27 - -------Round 24 -2016-02-13 19:47:12 INFO ComplexDataGson:53 - Json Generation Time(ms):: 916371822 -2016-02-13 19:47:12 INFO ComplexDataGson:29 - Size of Complex content Jackson :: 100 MB -2016-02-13 19:47:12 INFO ComplexDataGson:30 - -------------------------------------------------------------------------- -2016-02-13 19:47:21 INFO ComplexDataGson:63 - Generating Map from json Time(ms):: 8624285851 -2016-02-13 19:47:21 INFO ComplexDataGson:64 - -------------------------------------------------------------------------- -2016-02-13 19:47:23 INFO ComplexDataGson:75 - Generating Actual Object from json Time(ms):: 1258091448 -2016-02-13 19:47:23 INFO ComplexDataGson:76 - -------------------------------------------------------------------------- -2016-02-13 19:47:24 INFO ComplexDataGson:27 - -------Round 25 -2016-02-13 19:47:26 INFO ComplexDataGson:53 - Json Generation Time(ms):: 915687329 -2016-02-13 19:47:27 INFO ComplexDataGson:29 - Size of Complex content Jackson :: 100 MB -2016-02-13 19:47:27 INFO ComplexDataGson:30 - -------------------------------------------------------------------------- -2016-02-13 19:47:35 INFO ComplexDataGson:63 - Generating Map from json Time(ms):: 8610528090 -2016-02-13 19:47:35 INFO ComplexDataGson:64 - -------------------------------------------------------------------------- -2016-02-13 19:47:38 INFO ComplexDataGson:75 - Generating Actual Object from json Time(ms):: 1235425406 -2016-02-13 19:47:38 INFO ComplexDataGson:76 - -------------------------------------------------------------------------- -2016-02-13 19:47:39 INFO ComplexDataGson:27 - -------Round 26 -2016-02-13 19:47:41 INFO ComplexDataGson:53 - Json Generation Time(ms):: 1088816746 -2016-02-13 19:47:41 INFO ComplexDataGson:29 - Size of Complex content Jackson :: 100 MB -2016-02-13 19:47:41 INFO ComplexDataGson:30 - -------------------------------------------------------------------------- -2016-02-13 19:47:52 INFO ComplexDataGson:63 - Generating Map from json Time(ms):: 10322615396 -2016-02-13 19:47:52 INFO ComplexDataGson:64 - -------------------------------------------------------------------------- -2016-02-13 19:47:54 INFO ComplexDataGson:75 - Generating Actual Object from json Time(ms):: 1234155501 -2016-02-13 19:47:54 INFO ComplexDataGson:76 - -------------------------------------------------------------------------- -2016-02-13 19:47:55 INFO ComplexDataGson:27 - -------Round 27 -2016-02-13 19:47:57 INFO ComplexDataGson:53 - Json Generation Time(ms):: 933214540 -2016-02-13 19:47:57 INFO ComplexDataGson:29 - Size of Complex content Jackson :: 100 MB -2016-02-13 19:47:57 INFO ComplexDataGson:30 - -------------------------------------------------------------------------- -2016-02-13 19:48:06 INFO ComplexDataGson:63 - Generating Map from json Time(ms):: 8857891864 -2016-02-13 19:48:06 INFO ComplexDataGson:64 - -------------------------------------------------------------------------- -2016-02-13 19:48:08 INFO ComplexDataGson:75 - Generating Actual Object from json Time(ms):: 1286999247 -2016-02-13 19:48:08 INFO ComplexDataGson:76 - -------------------------------------------------------------------------- -2016-02-13 19:48:10 INFO ComplexDataGson:27 - -------Round 28 -2016-02-13 19:48:12 INFO ComplexDataGson:53 - Json Generation Time(ms):: 944816187 -2016-02-13 19:48:12 INFO ComplexDataGson:29 - Size of Complex content Jackson :: 100 MB -2016-02-13 19:48:12 INFO ComplexDataGson:30 - -------------------------------------------------------------------------- -2016-02-13 19:48:20 INFO ComplexDataGson:63 - Generating Map from json Time(ms):: 8230042621 -2016-02-13 19:48:20 INFO ComplexDataGson:64 - -------------------------------------------------------------------------- -2016-02-13 19:48:23 INFO ComplexDataGson:75 - Generating Actual Object from json Time(ms):: 1387615409 -2016-02-13 19:48:23 INFO ComplexDataGson:76 - -------------------------------------------------------------------------- -2016-02-13 19:48:24 INFO ComplexDataGson:27 - -------Round 29 -2016-02-13 19:48:26 INFO ComplexDataGson:53 - Json Generation Time(ms):: 940160923 -2016-02-13 19:48:26 INFO ComplexDataGson:29 - Size of Complex content Jackson :: 100 MB -2016-02-13 19:48:26 INFO ComplexDataGson:30 - -------------------------------------------------------------------------- -2016-02-13 19:48:35 INFO ComplexDataGson:63 - Generating Map from json Time(ms):: 8740729045 -2016-02-13 19:48:35 INFO ComplexDataGson:64 - -------------------------------------------------------------------------- -2016-02-13 19:48:37 INFO ComplexDataGson:75 - Generating Actual Object from json Time(ms):: 1315723884 -2016-02-13 19:48:37 INFO ComplexDataGson:76 - -------------------------------------------------------------------------- -2016-02-13 19:48:38 INFO ComplexDataGson:27 - -------Round 30 -2016-02-13 19:48:40 INFO ComplexDataGson:53 - Json Generation Time(ms):: 949497111 -2016-02-13 19:48:41 INFO ComplexDataGson:29 - Size of Complex content Jackson :: 100 MB -2016-02-13 19:48:41 INFO ComplexDataGson:30 - -------------------------------------------------------------------------- -2016-02-13 19:48:49 INFO ComplexDataGson:63 - Generating Map from json Time(ms):: 8546455339 -2016-02-13 19:48:49 INFO ComplexDataGson:64 - -------------------------------------------------------------------------- -2016-02-13 19:48:52 INFO ComplexDataGson:75 - Generating Actual Object from json Time(ms):: 1655064756 -2016-02-13 19:48:52 INFO ComplexDataGson:76 - -------------------------------------------------------------------------- -2016-02-13 19:48:53 INFO ComplexDataGson:27 - -------Round 31 -2016-02-13 19:48:56 INFO ComplexDataGson:53 - Json Generation Time(ms):: 1209183341 -2016-02-13 19:48:56 INFO ComplexDataGson:29 - Size of Complex content Jackson :: 100 MB -2016-02-13 19:48:56 INFO ComplexDataGson:30 - -------------------------------------------------------------------------- -2016-02-13 19:49:07 INFO ComplexDataGson:63 - Generating Map from json Time(ms):: 10523212176 -2016-02-13 19:49:07 INFO ComplexDataGson:64 - -------------------------------------------------------------------------- -2016-02-13 19:49:09 INFO ComplexDataGson:75 - Generating Actual Object from json Time(ms):: 1385741146 -2016-02-13 19:49:09 INFO ComplexDataGson:76 - -------------------------------------------------------------------------- -2016-02-13 19:49:10 INFO ComplexDataGson:27 - -------Round 32 -2016-02-13 19:49:12 INFO ComplexDataGson:53 - Json Generation Time(ms):: 926668433 -2016-02-13 19:49:13 INFO ComplexDataGson:29 - Size of Complex content Jackson :: 100 MB -2016-02-13 19:49:13 INFO ComplexDataGson:30 - -------------------------------------------------------------------------- -2016-02-13 19:49:21 INFO ComplexDataGson:63 - Generating Map from json Time(ms):: 8096297617 -2016-02-13 19:49:21 INFO ComplexDataGson:64 - -------------------------------------------------------------------------- -2016-02-13 19:49:23 INFO ComplexDataGson:75 - Generating Actual Object from json Time(ms):: 1237708235 -2016-02-13 19:49:23 INFO ComplexDataGson:76 - -------------------------------------------------------------------------- -2016-02-13 19:49:24 INFO ComplexDataGson:27 - -------Round 33 -2016-02-13 19:49:26 INFO ComplexDataGson:53 - Json Generation Time(ms):: 1194291074 -2016-02-13 19:49:27 INFO ComplexDataGson:29 - Size of Complex content Jackson :: 100 MB -2016-02-13 19:49:27 INFO ComplexDataGson:30 - -------------------------------------------------------------------------- -2016-02-13 19:49:36 INFO ComplexDataGson:63 - Generating Map from json Time(ms):: 9445080077 -2016-02-13 19:49:36 INFO ComplexDataGson:64 - -------------------------------------------------------------------------- -2016-02-13 19:49:39 INFO ComplexDataGson:75 - Generating Actual Object from json Time(ms):: 1488176702 -2016-02-13 19:49:39 INFO ComplexDataGson:76 - -------------------------------------------------------------------------- -2016-02-13 19:49:40 INFO ComplexDataGson:27 - -------Round 34 -2016-02-13 19:49:42 INFO ComplexDataGson:53 - Json Generation Time(ms):: 956147827 -2016-02-13 19:49:42 INFO ComplexDataGson:29 - Size of Complex content Jackson :: 100 MB -2016-02-13 19:49:42 INFO ComplexDataGson:30 - -------------------------------------------------------------------------- -2016-02-13 19:49:50 INFO ComplexDataGson:63 - Generating Map from json Time(ms):: 8222404640 -2016-02-13 19:49:50 INFO ComplexDataGson:64 - -------------------------------------------------------------------------- -2016-02-13 19:49:53 INFO ComplexDataGson:75 - Generating Actual Object from json Time(ms):: 1235773969 -2016-02-13 19:49:53 INFO ComplexDataGson:76 - -------------------------------------------------------------------------- -2016-02-13 19:49:54 INFO ComplexDataGson:27 - -------Round 35 -2016-02-13 19:49:56 INFO ComplexDataGson:53 - Json Generation Time(ms):: 908857793 -2016-02-13 19:49:56 INFO ComplexDataGson:29 - Size of Complex content Jackson :: 100 MB -2016-02-13 19:49:56 INFO ComplexDataGson:30 - -------------------------------------------------------------------------- -2016-02-13 19:50:05 INFO ComplexDataGson:63 - Generating Map from json Time(ms):: 9117024263 -2016-02-13 19:50:05 INFO ComplexDataGson:64 - -------------------------------------------------------------------------- -2016-02-13 19:50:07 INFO ComplexDataGson:75 - Generating Actual Object from json Time(ms):: 1239985931 -2016-02-13 19:50:07 INFO ComplexDataGson:76 - -------------------------------------------------------------------------- -2016-02-13 19:50:08 INFO ComplexDataGson:27 - -------Round 36 -2016-02-13 19:50:10 INFO ComplexDataGson:53 - Json Generation Time(ms):: 912435394 -2016-02-13 19:50:11 INFO ComplexDataGson:29 - Size of Complex content Jackson :: 100 MB -2016-02-13 19:50:11 INFO ComplexDataGson:30 - -------------------------------------------------------------------------- -2016-02-13 19:50:19 INFO ComplexDataGson:63 - Generating Map from json Time(ms):: 8580239068 -2016-02-13 19:50:19 INFO ComplexDataGson:64 - -------------------------------------------------------------------------- -2016-02-13 19:50:21 INFO ComplexDataGson:75 - Generating Actual Object from json Time(ms):: 1258180661 -2016-02-13 19:50:21 INFO ComplexDataGson:76 - -------------------------------------------------------------------------- -2016-02-13 19:50:23 INFO ComplexDataGson:27 - -------Round 37 -2016-02-13 19:50:25 INFO ComplexDataGson:53 - Json Generation Time(ms):: 928991525 -2016-02-13 19:50:25 INFO ComplexDataGson:29 - Size of Complex content Jackson :: 100 MB -2016-02-13 19:50:25 INFO ComplexDataGson:30 - -------------------------------------------------------------------------- -2016-02-13 19:50:34 INFO ComplexDataGson:63 - Generating Map from json Time(ms):: 8749988257 -2016-02-13 19:50:34 INFO ComplexDataGson:64 - -------------------------------------------------------------------------- -2016-02-13 19:50:36 INFO ComplexDataGson:75 - Generating Actual Object from json Time(ms):: 1259627018 -2016-02-13 19:50:36 INFO ComplexDataGson:76 - -------------------------------------------------------------------------- -2016-02-13 19:50:37 INFO ComplexDataGson:27 - -------Round 38 -2016-02-13 19:50:39 INFO ComplexDataGson:53 - Json Generation Time(ms):: 912076963 -2016-02-13 19:50:39 INFO ComplexDataGson:29 - Size of Complex content Jackson :: 100 MB -2016-02-13 19:50:39 INFO ComplexDataGson:30 - -------------------------------------------------------------------------- -2016-02-13 19:50:48 INFO ComplexDataGson:63 - Generating Map from json Time(ms):: 8553354747 -2016-02-13 19:50:48 INFO ComplexDataGson:64 - -------------------------------------------------------------------------- -2016-02-13 19:50:50 INFO ComplexDataGson:75 - Generating Actual Object from json Time(ms):: 1272567256 -2016-02-13 19:50:50 INFO ComplexDataGson:76 - -------------------------------------------------------------------------- -2016-02-13 19:50:51 INFO ComplexDataGson:27 - -------Round 39 -2016-02-13 19:50:53 INFO ComplexDataGson:53 - Json Generation Time(ms):: 937653878 -2016-02-13 19:50:53 INFO ComplexDataGson:29 - Size of Complex content Jackson :: 100 MB -2016-02-13 19:50:53 INFO ComplexDataGson:30 - -------------------------------------------------------------------------- -2016-02-13 19:51:02 INFO ComplexDataGson:63 - Generating Map from json Time(ms):: 8570808929 -2016-02-13 19:51:02 INFO ComplexDataGson:64 - -------------------------------------------------------------------------- -2016-02-13 19:51:04 INFO ComplexDataGson:75 - Generating Actual Object from json Time(ms):: 1278280050 -2016-02-13 19:51:04 INFO ComplexDataGson:76 - -------------------------------------------------------------------------- -2016-02-13 19:51:05 INFO ComplexDataGson:27 - -------Round 40 -2016-02-13 19:51:07 INFO ComplexDataGson:53 - Json Generation Time(ms):: 948231943 -2016-02-13 19:51:08 INFO ComplexDataGson:29 - Size of Complex content Jackson :: 100 MB -2016-02-13 19:51:08 INFO ComplexDataGson:30 - -------------------------------------------------------------------------- -2016-02-13 19:51:16 INFO ComplexDataGson:63 - Generating Map from json Time(ms):: 8258665807 -2016-02-13 19:51:16 INFO ComplexDataGson:64 - -------------------------------------------------------------------------- -2016-02-13 19:51:18 INFO ComplexDataGson:75 - Generating Actual Object from json Time(ms):: 1226364358 -2016-02-13 19:51:18 INFO ComplexDataGson:76 - -------------------------------------------------------------------------- -2016-02-13 19:51:19 INFO ComplexDataGson:27 - -------Round 41 -2016-02-13 19:51:21 INFO ComplexDataGson:53 - Json Generation Time(ms):: 913137256 -2016-02-13 19:51:21 INFO ComplexDataGson:29 - Size of Complex content Jackson :: 100 MB -2016-02-13 19:51:21 INFO ComplexDataGson:30 - -------------------------------------------------------------------------- -2016-02-13 19:51:29 INFO ComplexDataGson:63 - Generating Map from json Time(ms):: 8291304765 -2016-02-13 19:51:29 INFO ComplexDataGson:64 - -------------------------------------------------------------------------- -2016-02-13 19:51:31 INFO ComplexDataGson:75 - Generating Actual Object from json Time(ms):: 1227485837 -2016-02-13 19:51:31 INFO ComplexDataGson:76 - -------------------------------------------------------------------------- -2016-02-13 19:51:33 INFO ComplexDataGson:27 - -------Round 42 -2016-02-13 19:51:35 INFO ComplexDataGson:53 - Json Generation Time(ms):: 913072123 -2016-02-13 19:51:35 INFO ComplexDataGson:29 - Size of Complex content Jackson :: 100 MB -2016-02-13 19:51:35 INFO ComplexDataGson:30 - -------------------------------------------------------------------------- -2016-02-13 19:51:43 INFO ComplexDataGson:63 - Generating Map from json Time(ms):: 8564229663 -2016-02-13 19:51:43 INFO ComplexDataGson:64 - -------------------------------------------------------------------------- -2016-02-13 19:51:46 INFO ComplexDataGson:75 - Generating Actual Object from json Time(ms):: 1247028238 -2016-02-13 19:51:46 INFO ComplexDataGson:76 - -------------------------------------------------------------------------- -2016-02-13 19:51:47 INFO ComplexDataGson:27 - -------Round 43 -2016-02-13 19:51:49 INFO ComplexDataGson:53 - Json Generation Time(ms):: 916980130 -2016-02-13 19:51:49 INFO ComplexDataGson:29 - Size of Complex content Jackson :: 100 MB -2016-02-13 19:51:49 INFO ComplexDataGson:30 - -------------------------------------------------------------------------- -2016-02-13 19:51:58 INFO ComplexDataGson:63 - Generating Map from json Time(ms):: 8671670625 -2016-02-13 19:51:58 INFO ComplexDataGson:64 - -------------------------------------------------------------------------- -2016-02-13 19:52:00 INFO ComplexDataGson:75 - Generating Actual Object from json Time(ms):: 1270874971 -2016-02-13 19:52:00 INFO ComplexDataGson:76 - -------------------------------------------------------------------------- -2016-02-13 19:52:01 INFO ComplexDataGson:27 - -------Round 44 -2016-02-13 19:52:03 INFO ComplexDataGson:53 - Json Generation Time(ms):: 948609717 -2016-02-13 19:52:04 INFO ComplexDataGson:29 - Size of Complex content Jackson :: 100 MB -2016-02-13 19:52:04 INFO ComplexDataGson:30 - -------------------------------------------------------------------------- -2016-02-13 19:52:13 INFO ComplexDataGson:63 - Generating Map from json Time(ms):: 8829447104 -2016-02-13 19:52:13 INFO ComplexDataGson:64 - -------------------------------------------------------------------------- -2016-02-13 19:52:15 INFO ComplexDataGson:75 - Generating Actual Object from json Time(ms):: 1663932772 -2016-02-13 19:52:15 INFO ComplexDataGson:76 - -------------------------------------------------------------------------- -2016-02-13 19:52:17 INFO ComplexDataGson:27 - -------Round 45 -2016-02-13 19:52:19 INFO ComplexDataGson:53 - Json Generation Time(ms):: 1123397471 -2016-02-13 19:52:19 INFO ComplexDataGson:29 - Size of Complex content Jackson :: 100 MB -2016-02-13 19:52:19 INFO ComplexDataGson:30 - -------------------------------------------------------------------------- -2016-02-13 19:52:29 INFO ComplexDataGson:63 - Generating Map from json Time(ms):: 9946999145 -2016-02-13 19:52:29 INFO ComplexDataGson:64 - -------------------------------------------------------------------------- -2016-02-13 19:52:32 INFO ComplexDataGson:75 - Generating Actual Object from json Time(ms):: 1236672021 -2016-02-13 19:52:32 INFO ComplexDataGson:76 - -------------------------------------------------------------------------- -2016-02-13 19:52:33 INFO ComplexDataGson:27 - -------Round 46 -2016-02-13 19:52:35 INFO ComplexDataGson:53 - Json Generation Time(ms):: 912870802 -2016-02-13 19:52:35 INFO ComplexDataGson:29 - Size of Complex content Jackson :: 100 MB -2016-02-13 19:52:35 INFO ComplexDataGson:30 - -------------------------------------------------------------------------- -2016-02-13 19:52:43 INFO ComplexDataGson:63 - Generating Map from json Time(ms):: 8255520848 -2016-02-13 19:52:43 INFO ComplexDataGson:64 - -------------------------------------------------------------------------- -2016-02-13 19:52:46 INFO ComplexDataGson:75 - Generating Actual Object from json Time(ms):: 1263055011 -2016-02-13 19:52:46 INFO ComplexDataGson:76 - -------------------------------------------------------------------------- -2016-02-13 19:52:47 INFO ComplexDataGson:27 - -------Round 47 -2016-02-13 19:52:49 INFO ComplexDataGson:53 - Json Generation Time(ms):: 945563840 -2016-02-13 19:52:49 INFO ComplexDataGson:29 - Size of Complex content Jackson :: 100 MB -2016-02-13 19:52:49 INFO ComplexDataGson:30 - -------------------------------------------------------------------------- -2016-02-13 19:52:58 INFO ComplexDataGson:63 - Generating Map from json Time(ms):: 8534561184 -2016-02-13 19:52:58 INFO ComplexDataGson:64 - -------------------------------------------------------------------------- -2016-02-13 19:53:00 INFO ComplexDataGson:75 - Generating Actual Object from json Time(ms):: 1230407368 -2016-02-13 19:53:00 INFO ComplexDataGson:76 - -------------------------------------------------------------------------- -2016-02-13 19:53:01 INFO ComplexDataGson:27 - -------Round 48 -2016-02-13 19:53:03 INFO ComplexDataGson:53 - Json Generation Time(ms):: 936955963 -2016-02-13 19:53:03 INFO ComplexDataGson:29 - Size of Complex content Jackson :: 100 MB -2016-02-13 19:53:03 INFO ComplexDataGson:30 - -------------------------------------------------------------------------- -2016-02-13 19:53:12 INFO ComplexDataGson:63 - Generating Map from json Time(ms):: 8602107323 -2016-02-13 19:53:12 INFO ComplexDataGson:64 - -------------------------------------------------------------------------- -2016-02-13 19:53:14 INFO ComplexDataGson:75 - Generating Actual Object from json Time(ms):: 1262269462 -2016-02-13 19:53:14 INFO ComplexDataGson:76 - -------------------------------------------------------------------------- -2016-02-13 19:53:15 INFO ComplexDataGson:27 - -------Round 49 -2016-02-13 19:53:17 INFO ComplexDataGson:53 - Json Generation Time(ms):: 931142113 -2016-02-13 19:53:17 INFO ComplexDataGson:29 - Size of Complex content Jackson :: 100 MB -2016-02-13 19:53:17 INFO ComplexDataGson:30 - -------------------------------------------------------------------------- -2016-02-13 19:53:26 INFO ComplexDataGson:63 - Generating Map from json Time(ms):: 8802198431 -2016-02-13 19:53:26 INFO ComplexDataGson:64 - -------------------------------------------------------------------------- -2016-02-13 19:53:29 INFO ComplexDataGson:75 - Generating Actual Object from json Time(ms):: 1268525825 -2016-02-13 19:53:29 INFO ComplexDataGson:76 - -------------------------------------------------------------------------- -2016-02-13 19:53:30 INFO ComplexDataGson:27 - -------Round 50 -2016-02-13 19:53:32 INFO ComplexDataGson:53 - Json Generation Time(ms):: 930833420 -2016-02-13 19:53:32 INFO ComplexDataGson:29 - Size of Complex content Jackson :: 100 MB -2016-02-13 19:53:32 INFO ComplexDataGson:30 - -------------------------------------------------------------------------- -2016-02-13 19:53:41 INFO ComplexDataGson:63 - Generating Map from json Time(ms):: 8785328081 -2016-02-13 19:53:41 INFO ComplexDataGson:64 - -------------------------------------------------------------------------- -2016-02-13 19:53:44 INFO ComplexDataGson:75 - Generating Actual Object from json Time(ms):: 1582174517 -2016-02-13 19:53:44 INFO ComplexDataGson:76 - -------------------------------------------------------------------------- -2016-02-13 19:53:45 INFO ComplexDataGson:39 - -------------------------------------------------------------------------- -2016-02-13 19:53:45 INFO ComplexDataGson:40 - Average Time to Generate JSON : 966789043 -2016-02-13 19:53:45 INFO ComplexDataGson:41 - Average Time to Parse JSON To Map : 8838486733 -2016-02-13 19:53:45 INFO ComplexDataGson:42 - Average Time to Parse JSON To Actual Object : 1313279389 -2016-02-13 19:53:45 INFO ComplexDataGson:43 - -------------------------------------------------------------------------- diff --git a/gson-jackson-performance/logs_Performance/log4j-application 100mb jackson.log b/gson-jackson-performance/logs_Performance/log4j-application 100mb jackson.log deleted file mode 100644 index 49b5ffd43c..0000000000 --- a/gson-jackson-performance/logs_Performance/log4j-application 100mb jackson.log +++ /dev/null @@ -1,370 +0,0 @@ -2016-02-13 20:01:02 INFO ComplexDataJackson:31 - -------Round 1 -2016-02-13 20:01:06 INFO ComplexDataJackson:58 - Json Generation Time(ms):: 2236390565 -2016-02-13 20:01:07 INFO ComplexDataJackson:33 - Size of Complex content Jackson :: 100 MB -2016-02-13 20:01:07 INFO ComplexDataJackson:34 - -------------------------------------------------------------------------- -2016-02-13 20:01:11 INFO ComplexDataJackson:68 - Generating Map from json Time(ms):: 4683849394 -2016-02-13 20:01:14 INFO ComplexDataJackson:81 - Generating Actual Object from json Time(ms):: 1071287562 -2016-02-13 20:01:15 INFO ComplexDataJackson:31 - -------Round 2 -2016-02-13 20:01:17 INFO ComplexDataJackson:58 - Json Generation Time(ms):: 516507379 -2016-02-13 20:01:17 INFO ComplexDataJackson:33 - Size of Complex content Jackson :: 100 MB -2016-02-13 20:01:17 INFO ComplexDataJackson:34 - -------------------------------------------------------------------------- -2016-02-13 20:01:22 INFO ComplexDataJackson:68 - Generating Map from json Time(ms):: 4538998942 -2016-02-13 20:01:24 INFO ComplexDataJackson:81 - Generating Actual Object from json Time(ms):: 726254816 -2016-02-13 20:01:25 INFO ComplexDataJackson:31 - -------Round 3 -2016-02-13 20:01:26 INFO ComplexDataJackson:58 - Json Generation Time(ms):: 456587379 -2016-02-13 20:01:27 INFO ComplexDataJackson:33 - Size of Complex content Jackson :: 100 MB -2016-02-13 20:01:27 INFO ComplexDataJackson:34 - -------------------------------------------------------------------------- -2016-02-13 20:01:28 INFO ComplexDataJackson:68 - Generating Map from json Time(ms):: 1302570482 -2016-02-13 20:01:30 INFO ComplexDataJackson:81 - Generating Actual Object from json Time(ms):: 705463037 -2016-02-13 20:01:31 INFO ComplexDataJackson:31 - -------Round 4 -2016-02-13 20:01:33 INFO ComplexDataJackson:58 - Json Generation Time(ms):: 456497377 -2016-02-13 20:01:33 INFO ComplexDataJackson:33 - Size of Complex content Jackson :: 100 MB -2016-02-13 20:01:33 INFO ComplexDataJackson:34 - -------------------------------------------------------------------------- -2016-02-13 20:01:34 INFO ComplexDataJackson:68 - Generating Map from json Time(ms):: 1315460586 -2016-02-13 20:01:36 INFO ComplexDataJackson:81 - Generating Actual Object from json Time(ms):: 714554876 -2016-02-13 20:01:37 INFO ComplexDataJackson:31 - -------Round 5 -2016-02-13 20:01:38 INFO ComplexDataJackson:58 - Json Generation Time(ms):: 459663651 -2016-02-13 20:01:39 INFO ComplexDataJackson:33 - Size of Complex content Jackson :: 100 MB -2016-02-13 20:01:39 INFO ComplexDataJackson:34 - -------------------------------------------------------------------------- -2016-02-13 20:01:40 INFO ComplexDataJackson:68 - Generating Map from json Time(ms):: 1309177380 -2016-02-13 20:01:42 INFO ComplexDataJackson:81 - Generating Actual Object from json Time(ms):: 720221485 -2016-02-13 20:01:43 INFO ComplexDataJackson:31 - -------Round 6 -2016-02-13 20:01:44 INFO ComplexDataJackson:58 - Json Generation Time(ms):: 455687353 -2016-02-13 20:01:45 INFO ComplexDataJackson:33 - Size of Complex content Jackson :: 100 MB -2016-02-13 20:01:45 INFO ComplexDataJackson:34 - -------------------------------------------------------------------------- -2016-02-13 20:01:46 INFO ComplexDataJackson:68 - Generating Map from json Time(ms):: 1308595522 -2016-02-13 20:01:48 INFO ComplexDataJackson:81 - Generating Actual Object from json Time(ms):: 706818208 -2016-02-13 20:01:49 INFO ComplexDataJackson:31 - -------Round 7 -2016-02-13 20:01:50 INFO ComplexDataJackson:58 - Json Generation Time(ms):: 453952830 -2016-02-13 20:01:51 INFO ComplexDataJackson:33 - Size of Complex content Jackson :: 100 MB -2016-02-13 20:01:51 INFO ComplexDataJackson:34 - -------------------------------------------------------------------------- -2016-02-13 20:01:55 INFO ComplexDataJackson:68 - Generating Map from json Time(ms):: 4143528046 -2016-02-13 20:01:57 INFO ComplexDataJackson:81 - Generating Actual Object from json Time(ms):: 719641600 -2016-02-13 20:01:58 INFO ComplexDataJackson:31 - -------Round 8 -2016-02-13 20:01:59 INFO ComplexDataJackson:58 - Json Generation Time(ms):: 465429737 -2016-02-13 20:01:59 INFO ComplexDataJackson:33 - Size of Complex content Jackson :: 100 MB -2016-02-13 20:01:59 INFO ComplexDataJackson:34 - -------------------------------------------------------------------------- -2016-02-13 20:02:01 INFO ComplexDataJackson:68 - Generating Map from json Time(ms):: 1342607808 -2016-02-13 20:02:03 INFO ComplexDataJackson:81 - Generating Actual Object from json Time(ms):: 713900779 -2016-02-13 20:02:04 INFO ComplexDataJackson:31 - -------Round 9 -2016-02-13 20:02:05 INFO ComplexDataJackson:58 - Json Generation Time(ms):: 456318950 -2016-02-13 20:02:06 INFO ComplexDataJackson:33 - Size of Complex content Jackson :: 100 MB -2016-02-13 20:02:06 INFO ComplexDataJackson:34 - -------------------------------------------------------------------------- -2016-02-13 20:02:07 INFO ComplexDataJackson:68 - Generating Map from json Time(ms):: 1314650958 -2016-02-13 20:02:09 INFO ComplexDataJackson:81 - Generating Actual Object from json Time(ms):: 719420542 -2016-02-13 20:02:10 INFO ComplexDataJackson:31 - -------Round 10 -2016-02-13 20:02:11 INFO ComplexDataJackson:58 - Json Generation Time(ms):: 462624657 -2016-02-13 20:02:12 INFO ComplexDataJackson:33 - Size of Complex content Jackson :: 100 MB -2016-02-13 20:02:12 INFO ComplexDataJackson:34 - -------------------------------------------------------------------------- -2016-02-13 20:02:13 INFO ComplexDataJackson:68 - Generating Map from json Time(ms):: 1340021024 -2016-02-13 20:02:15 INFO ComplexDataJackson:81 - Generating Actual Object from json Time(ms):: 721704949 -2016-02-13 20:02:16 INFO ComplexDataJackson:43 - -------------------------------------------------------------------------- -2016-02-13 20:02:16 INFO ComplexDataJackson:44 - Average Time to Generate JSON : 641965987 -2016-02-13 20:02:16 INFO ComplexDataJackson:45 - Average Time to Parse JSON To Map : 2259946014 -2016-02-13 20:02:16 INFO ComplexDataJackson:46 - Average Time to Parse JSON To Actual Object : 751926785 -2016-02-13 20:02:16 INFO ComplexDataJackson:47 - -------------------------------------------------------------------------- -2016-02-13 20:02:29 INFO ComplexDataJackson:31 - -------Round 1 -2016-02-13 20:02:33 INFO ComplexDataJackson:58 - Json Generation Time(ms):: 2068828281 -2016-02-13 20:02:33 INFO ComplexDataJackson:33 - Size of Complex content Jackson :: 100 MB -2016-02-13 20:02:33 INFO ComplexDataJackson:34 - -------------------------------------------------------------------------- -2016-02-13 20:02:38 INFO ComplexDataJackson:68 - Generating Map from json Time(ms):: 4407230838 -2016-02-13 20:02:41 INFO ComplexDataJackson:81 - Generating Actual Object from json Time(ms):: 1326748014 -2016-02-13 20:02:42 INFO ComplexDataJackson:31 - -------Round 2 -2016-02-13 20:02:44 INFO ComplexDataJackson:58 - Json Generation Time(ms):: 644018520 -2016-02-13 20:02:45 INFO ComplexDataJackson:33 - Size of Complex content Jackson :: 100 MB -2016-02-13 20:02:45 INFO ComplexDataJackson:34 - -------------------------------------------------------------------------- -2016-02-13 20:02:50 INFO ComplexDataJackson:68 - Generating Map from json Time(ms):: 5663806849 -2016-02-13 20:02:52 INFO ComplexDataJackson:81 - Generating Actual Object from json Time(ms):: 714395004 -2016-02-13 20:02:53 INFO ComplexDataJackson:31 - -------Round 3 -2016-02-13 20:02:55 INFO ComplexDataJackson:58 - Json Generation Time(ms):: 453922434 -2016-02-13 20:02:55 INFO ComplexDataJackson:33 - Size of Complex content Jackson :: 100 MB -2016-02-13 20:02:55 INFO ComplexDataJackson:34 - -------------------------------------------------------------------------- -2016-02-13 20:02:56 INFO ComplexDataJackson:68 - Generating Map from json Time(ms):: 1351852020 -2016-02-13 20:02:58 INFO ComplexDataJackson:81 - Generating Actual Object from json Time(ms):: 692848072 -2016-02-13 20:02:59 INFO ComplexDataJackson:31 - -------Round 4 -2016-02-13 20:03:01 INFO ComplexDataJackson:58 - Json Generation Time(ms):: 456597642 -2016-02-13 20:03:01 INFO ComplexDataJackson:33 - Size of Complex content Jackson :: 100 MB -2016-02-13 20:03:01 INFO ComplexDataJackson:34 - -------------------------------------------------------------------------- -2016-02-13 20:03:03 INFO ComplexDataJackson:68 - Generating Map from json Time(ms):: 1326427084 -2016-02-13 20:03:05 INFO ComplexDataJackson:81 - Generating Actual Object from json Time(ms):: 712403893 -2016-02-13 20:03:06 INFO ComplexDataJackson:31 - -------Round 5 -2016-02-13 20:03:07 INFO ComplexDataJackson:58 - Json Generation Time(ms):: 454851671 -2016-02-13 20:03:07 INFO ComplexDataJackson:33 - Size of Complex content Jackson :: 100 MB -2016-02-13 20:03:07 INFO ComplexDataJackson:34 - -------------------------------------------------------------------------- -2016-02-13 20:03:09 INFO ComplexDataJackson:68 - Generating Map from json Time(ms):: 1390244827 -2016-02-13 20:03:11 INFO ComplexDataJackson:81 - Generating Actual Object from json Time(ms):: 700532239 -2016-02-13 20:03:12 INFO ComplexDataJackson:31 - -------Round 6 -2016-02-13 20:03:13 INFO ComplexDataJackson:58 - Json Generation Time(ms):: 447829103 -2016-02-13 20:03:14 INFO ComplexDataJackson:33 - Size of Complex content Jackson :: 100 MB -2016-02-13 20:03:14 INFO ComplexDataJackson:34 - -------------------------------------------------------------------------- -2016-02-13 20:03:15 INFO ComplexDataJackson:68 - Generating Map from json Time(ms):: 1300572267 -2016-02-13 20:03:17 INFO ComplexDataJackson:81 - Generating Actual Object from json Time(ms):: 695462883 -2016-02-13 20:03:18 INFO ComplexDataJackson:31 - -------Round 7 -2016-02-13 20:03:20 INFO ComplexDataJackson:58 - Json Generation Time(ms):: 445790229 -2016-02-13 20:03:20 INFO ComplexDataJackson:33 - Size of Complex content Jackson :: 100 MB -2016-02-13 20:03:20 INFO ComplexDataJackson:34 - -------------------------------------------------------------------------- -2016-02-13 20:03:24 INFO ComplexDataJackson:68 - Generating Map from json Time(ms):: 4166359881 -2016-02-13 20:03:26 INFO ComplexDataJackson:81 - Generating Actual Object from json Time(ms):: 698059536 -2016-02-13 20:03:27 INFO ComplexDataJackson:31 - -------Round 8 -2016-02-13 20:03:28 INFO ComplexDataJackson:58 - Json Generation Time(ms):: 454490872 -2016-02-13 20:03:28 INFO ComplexDataJackson:33 - Size of Complex content Jackson :: 100 MB -2016-02-13 20:03:28 INFO ComplexDataJackson:34 - -------------------------------------------------------------------------- -2016-02-13 20:03:30 INFO ComplexDataJackson:68 - Generating Map from json Time(ms):: 1303103786 -2016-02-13 20:03:32 INFO ComplexDataJackson:81 - Generating Actual Object from json Time(ms):: 696194352 -2016-02-13 20:03:33 INFO ComplexDataJackson:31 - -------Round 9 -2016-02-13 20:03:34 INFO ComplexDataJackson:58 - Json Generation Time(ms):: 448600046 -2016-02-13 20:03:34 INFO ComplexDataJackson:33 - Size of Complex content Jackson :: 100 MB -2016-02-13 20:03:34 INFO ComplexDataJackson:34 - -------------------------------------------------------------------------- -2016-02-13 20:03:36 INFO ComplexDataJackson:68 - Generating Map from json Time(ms):: 1310695582 -2016-02-13 20:03:38 INFO ComplexDataJackson:81 - Generating Actual Object from json Time(ms):: 694635491 -2016-02-13 20:03:39 INFO ComplexDataJackson:31 - -------Round 10 -2016-02-13 20:03:40 INFO ComplexDataJackson:58 - Json Generation Time(ms):: 448167007 -2016-02-13 20:03:40 INFO ComplexDataJackson:33 - Size of Complex content Jackson :: 100 MB -2016-02-13 20:03:40 INFO ComplexDataJackson:34 - -------------------------------------------------------------------------- -2016-02-13 20:03:42 INFO ComplexDataJackson:68 - Generating Map from json Time(ms):: 1460439331 -2016-02-13 20:03:44 INFO ComplexDataJackson:81 - Generating Actual Object from json Time(ms):: 835431485 -2016-02-13 20:03:45 INFO ComplexDataJackson:31 - -------Round 11 -2016-02-13 20:03:47 INFO ComplexDataJackson:58 - Json Generation Time(ms):: 551898916 -2016-02-13 20:03:47 INFO ComplexDataJackson:33 - Size of Complex content Jackson :: 100 MB -2016-02-13 20:03:47 INFO ComplexDataJackson:34 - -------------------------------------------------------------------------- -2016-02-13 20:03:53 INFO ComplexDataJackson:68 - Generating Map from json Time(ms):: 5210407849 -2016-02-13 20:03:54 INFO ComplexDataJackson:81 - Generating Actual Object from json Time(ms):: 700618294 -2016-02-13 20:03:55 INFO ComplexDataJackson:31 - -------Round 12 -2016-02-13 20:03:57 INFO ComplexDataJackson:58 - Json Generation Time(ms):: 466824777 -2016-02-13 20:03:57 INFO ComplexDataJackson:33 - Size of Complex content Jackson :: 100 MB -2016-02-13 20:03:57 INFO ComplexDataJackson:34 - -------------------------------------------------------------------------- -2016-02-13 20:03:58 INFO ComplexDataJackson:68 - Generating Map from json Time(ms):: 1311879826 -2016-02-13 20:04:00 INFO ComplexDataJackson:81 - Generating Actual Object from json Time(ms):: 699696952 -2016-02-13 20:04:02 INFO ComplexDataJackson:31 - -------Round 13 -2016-02-13 20:04:03 INFO ComplexDataJackson:58 - Json Generation Time(ms):: 456079732 -2016-02-13 20:04:03 INFO ComplexDataJackson:33 - Size of Complex content Jackson :: 100 MB -2016-02-13 20:04:03 INFO ComplexDataJackson:34 - -------------------------------------------------------------------------- -2016-02-13 20:04:05 INFO ComplexDataJackson:68 - Generating Map from json Time(ms):: 1351933338 -2016-02-13 20:04:07 INFO ComplexDataJackson:81 - Generating Actual Object from json Time(ms):: 699846956 -2016-02-13 20:04:08 INFO ComplexDataJackson:31 - -------Round 14 -2016-02-13 20:04:09 INFO ComplexDataJackson:58 - Json Generation Time(ms):: 444370320 -2016-02-13 20:04:09 INFO ComplexDataJackson:33 - Size of Complex content Jackson :: 100 MB -2016-02-13 20:04:09 INFO ComplexDataJackson:34 - -------------------------------------------------------------------------- -2016-02-13 20:04:10 INFO ComplexDataJackson:68 - Generating Map from json Time(ms):: 1303638275 -2016-02-13 20:04:12 INFO ComplexDataJackson:81 - Generating Actual Object from json Time(ms):: 701946227 -2016-02-13 20:04:14 INFO ComplexDataJackson:31 - -------Round 15 -2016-02-13 20:04:15 INFO ComplexDataJackson:58 - Json Generation Time(ms):: 531660180 -2016-02-13 20:04:16 INFO ComplexDataJackson:33 - Size of Complex content Jackson :: 100 MB -2016-02-13 20:04:16 INFO ComplexDataJackson:34 - -------------------------------------------------------------------------- -2016-02-13 20:04:21 INFO ComplexDataJackson:68 - Generating Map from json Time(ms):: 5208485427 -2016-02-13 20:04:23 INFO ComplexDataJackson:81 - Generating Actual Object from json Time(ms):: 910483366 -2016-02-13 20:04:24 INFO ComplexDataJackson:31 - -------Round 16 -2016-02-13 20:04:26 INFO ComplexDataJackson:58 - Json Generation Time(ms):: 479905545 -2016-02-13 20:04:26 INFO ComplexDataJackson:33 - Size of Complex content Jackson :: 100 MB -2016-02-13 20:04:26 INFO ComplexDataJackson:34 - -------------------------------------------------------------------------- -2016-02-13 20:04:28 INFO ComplexDataJackson:68 - Generating Map from json Time(ms):: 1702826909 -2016-02-13 20:04:30 INFO ComplexDataJackson:81 - Generating Actual Object from json Time(ms):: 883772734 -2016-02-13 20:04:31 INFO ComplexDataJackson:31 - -------Round 17 -2016-02-13 20:04:33 INFO ComplexDataJackson:58 - Json Generation Time(ms):: 451210120 -2016-02-13 20:04:33 INFO ComplexDataJackson:33 - Size of Complex content Jackson :: 100 MB -2016-02-13 20:04:33 INFO ComplexDataJackson:34 - -------------------------------------------------------------------------- -2016-02-13 20:04:34 INFO ComplexDataJackson:68 - Generating Map from json Time(ms):: 1339389427 -2016-02-13 20:04:36 INFO ComplexDataJackson:81 - Generating Actual Object from json Time(ms):: 722647212 -2016-02-13 20:04:37 INFO ComplexDataJackson:31 - -------Round 18 -2016-02-13 20:04:39 INFO ComplexDataJackson:58 - Json Generation Time(ms):: 446093790 -2016-02-13 20:04:39 INFO ComplexDataJackson:33 - Size of Complex content Jackson :: 100 MB -2016-02-13 20:04:39 INFO ComplexDataJackson:34 - -------------------------------------------------------------------------- -2016-02-13 20:04:40 INFO ComplexDataJackson:68 - Generating Map from json Time(ms):: 1330858920 -2016-02-13 20:04:42 INFO ComplexDataJackson:81 - Generating Actual Object from json Time(ms):: 719837790 -2016-02-13 20:04:43 INFO ComplexDataJackson:31 - -------Round 19 -2016-02-13 20:04:45 INFO ComplexDataJackson:58 - Json Generation Time(ms):: 459770232 -2016-02-13 20:04:45 INFO ComplexDataJackson:33 - Size of Complex content Jackson :: 100 MB -2016-02-13 20:04:45 INFO ComplexDataJackson:34 - -------------------------------------------------------------------------- -2016-02-13 20:04:46 INFO ComplexDataJackson:68 - Generating Map from json Time(ms):: 1348367183 -2016-02-13 20:04:48 INFO ComplexDataJackson:81 - Generating Actual Object from json Time(ms):: 723020249 -2016-02-13 20:04:49 INFO ComplexDataJackson:31 - -------Round 20 -2016-02-13 20:04:51 INFO ComplexDataJackson:58 - Json Generation Time(ms):: 455603272 -2016-02-13 20:04:51 INFO ComplexDataJackson:33 - Size of Complex content Jackson :: 100 MB -2016-02-13 20:04:51 INFO ComplexDataJackson:34 - -------------------------------------------------------------------------- -2016-02-13 20:04:55 INFO ComplexDataJackson:68 - Generating Map from json Time(ms):: 4300788194 -2016-02-13 20:04:57 INFO ComplexDataJackson:81 - Generating Actual Object from json Time(ms):: 721742845 -2016-02-13 20:04:58 INFO ComplexDataJackson:31 - -------Round 21 -2016-02-13 20:05:00 INFO ComplexDataJackson:58 - Json Generation Time(ms):: 449699025 -2016-02-13 20:05:00 INFO ComplexDataJackson:33 - Size of Complex content Jackson :: 100 MB -2016-02-13 20:05:00 INFO ComplexDataJackson:34 - -------------------------------------------------------------------------- -2016-02-13 20:05:01 INFO ComplexDataJackson:68 - Generating Map from json Time(ms):: 1338069784 -2016-02-13 20:05:03 INFO ComplexDataJackson:81 - Generating Actual Object from json Time(ms):: 720708999 -2016-02-13 20:05:04 INFO ComplexDataJackson:31 - -------Round 22 -2016-02-13 20:05:06 INFO ComplexDataJackson:58 - Json Generation Time(ms):: 439571367 -2016-02-13 20:05:06 INFO ComplexDataJackson:33 - Size of Complex content Jackson :: 100 MB -2016-02-13 20:05:06 INFO ComplexDataJackson:34 - -------------------------------------------------------------------------- -2016-02-13 20:05:07 INFO ComplexDataJackson:68 - Generating Map from json Time(ms):: 1379395964 -2016-02-13 20:05:09 INFO ComplexDataJackson:81 - Generating Actual Object from json Time(ms):: 724697929 -2016-02-13 20:05:10 INFO ComplexDataJackson:31 - -------Round 23 -2016-02-13 20:05:11 INFO ComplexDataJackson:58 - Json Generation Time(ms):: 497673947 -2016-02-13 20:05:12 INFO ComplexDataJackson:33 - Size of Complex content Jackson :: 100 MB -2016-02-13 20:05:12 INFO ComplexDataJackson:34 - -------------------------------------------------------------------------- -2016-02-13 20:05:13 INFO ComplexDataJackson:68 - Generating Map from json Time(ms):: 1612324194 -2016-02-13 20:05:16 INFO ComplexDataJackson:81 - Generating Actual Object from json Time(ms):: 884663681 -2016-02-13 20:05:17 INFO ComplexDataJackson:31 - -------Round 24 -2016-02-13 20:05:18 INFO ComplexDataJackson:58 - Json Generation Time(ms):: 503245816 -2016-02-13 20:05:19 INFO ComplexDataJackson:33 - Size of Complex content Jackson :: 100 MB -2016-02-13 20:05:19 INFO ComplexDataJackson:34 - -------------------------------------------------------------------------- -2016-02-13 20:05:24 INFO ComplexDataJackson:68 - Generating Map from json Time(ms):: 5022807757 -2016-02-13 20:05:25 INFO ComplexDataJackson:81 - Generating Actual Object from json Time(ms):: 699435628 -2016-02-13 20:05:26 INFO ComplexDataJackson:31 - -------Round 25 -2016-02-13 20:05:28 INFO ComplexDataJackson:58 - Json Generation Time(ms):: 461511072 -2016-02-13 20:05:28 INFO ComplexDataJackson:33 - Size of Complex content Jackson :: 100 MB -2016-02-13 20:05:28 INFO ComplexDataJackson:34 - -------------------------------------------------------------------------- -2016-02-13 20:05:30 INFO ComplexDataJackson:68 - Generating Map from json Time(ms):: 1359426447 -2016-02-13 20:05:32 INFO ComplexDataJackson:81 - Generating Actual Object from json Time(ms):: 722071275 -2016-02-13 20:05:33 INFO ComplexDataJackson:31 - -------Round 26 -2016-02-13 20:05:34 INFO ComplexDataJackson:58 - Json Generation Time(ms):: 459509304 -2016-02-13 20:05:34 INFO ComplexDataJackson:33 - Size of Complex content Jackson :: 100 MB -2016-02-13 20:05:34 INFO ComplexDataJackson:34 - -------------------------------------------------------------------------- -2016-02-13 20:05:36 INFO ComplexDataJackson:68 - Generating Map from json Time(ms):: 1304302241 -2016-02-13 20:05:38 INFO ComplexDataJackson:81 - Generating Actual Object from json Time(ms):: 706119109 -2016-02-13 20:05:39 INFO ComplexDataJackson:31 - -------Round 27 -2016-02-13 20:05:40 INFO ComplexDataJackson:58 - Json Generation Time(ms):: 443023833 -2016-02-13 20:05:41 INFO ComplexDataJackson:33 - Size of Complex content Jackson :: 100 MB -2016-02-13 20:05:41 INFO ComplexDataJackson:34 - -------------------------------------------------------------------------- -2016-02-13 20:05:42 INFO ComplexDataJackson:68 - Generating Map from json Time(ms):: 1308951979 -2016-02-13 20:05:44 INFO ComplexDataJackson:81 - Generating Actual Object from json Time(ms):: 693649805 -2016-02-13 20:05:45 INFO ComplexDataJackson:31 - -------Round 28 -2016-02-13 20:05:46 INFO ComplexDataJackson:58 - Json Generation Time(ms):: 443872148 -2016-02-13 20:05:46 INFO ComplexDataJackson:33 - Size of Complex content Jackson :: 100 MB -2016-02-13 20:05:46 INFO ComplexDataJackson:34 - -------------------------------------------------------------------------- -2016-02-13 20:05:51 INFO ComplexDataJackson:68 - Generating Map from json Time(ms):: 4176743730 -2016-02-13 20:05:52 INFO ComplexDataJackson:81 - Generating Actual Object from json Time(ms):: 700535397 -2016-02-13 20:05:53 INFO ComplexDataJackson:31 - -------Round 29 -2016-02-13 20:05:55 INFO ComplexDataJackson:58 - Json Generation Time(ms):: 445953655 -2016-02-13 20:05:55 INFO ComplexDataJackson:33 - Size of Complex content Jackson :: 100 MB -2016-02-13 20:05:55 INFO ComplexDataJackson:34 - -------------------------------------------------------------------------- -2016-02-13 20:05:56 INFO ComplexDataJackson:68 - Generating Map from json Time(ms):: 1296523334 -2016-02-13 20:05:58 INFO ComplexDataJackson:81 - Generating Actual Object from json Time(ms):: 701827802 -2016-02-13 20:05:59 INFO ComplexDataJackson:31 - -------Round 30 -2016-02-13 20:06:01 INFO ComplexDataJackson:58 - Json Generation Time(ms):: 443719775 -2016-02-13 20:06:01 INFO ComplexDataJackson:33 - Size of Complex content Jackson :: 100 MB -2016-02-13 20:06:01 INFO ComplexDataJackson:34 - -------------------------------------------------------------------------- -2016-02-13 20:06:02 INFO ComplexDataJackson:68 - Generating Map from json Time(ms):: 1309741475 -2016-02-13 20:06:04 INFO ComplexDataJackson:81 - Generating Actual Object from json Time(ms):: 698006640 -2016-02-13 20:06:06 INFO ComplexDataJackson:31 - -------Round 31 -2016-02-13 20:06:07 INFO ComplexDataJackson:58 - Json Generation Time(ms):: 442733694 -2016-02-13 20:06:07 INFO ComplexDataJackson:33 - Size of Complex content Jackson :: 100 MB -2016-02-13 20:06:07 INFO ComplexDataJackson:34 - -------------------------------------------------------------------------- -2016-02-13 20:06:09 INFO ComplexDataJackson:68 - Generating Map from json Time(ms):: 1322123934 -2016-02-13 20:06:10 INFO ComplexDataJackson:81 - Generating Actual Object from json Time(ms):: 698388757 -2016-02-13 20:06:11 INFO ComplexDataJackson:31 - -------Round 32 -2016-02-13 20:06:13 INFO ComplexDataJackson:58 - Json Generation Time(ms):: 474821189 -2016-02-13 20:06:13 INFO ComplexDataJackson:33 - Size of Complex content Jackson :: 100 MB -2016-02-13 20:06:13 INFO ComplexDataJackson:34 - -------------------------------------------------------------------------- -2016-02-13 20:06:17 INFO ComplexDataJackson:68 - Generating Map from json Time(ms):: 4296608996 -2016-02-13 20:06:19 INFO ComplexDataJackson:81 - Generating Actual Object from json Time(ms):: 705003946 -2016-02-13 20:06:20 INFO ComplexDataJackson:31 - -------Round 33 -2016-02-13 20:06:22 INFO ComplexDataJackson:58 - Json Generation Time(ms):: 449688760 -2016-02-13 20:06:22 INFO ComplexDataJackson:33 - Size of Complex content Jackson :: 100 MB -2016-02-13 20:06:22 INFO ComplexDataJackson:34 - -------------------------------------------------------------------------- -2016-02-13 20:06:23 INFO ComplexDataJackson:68 - Generating Map from json Time(ms):: 1326667485 -2016-02-13 20:06:25 INFO ComplexDataJackson:81 - Generating Actual Object from json Time(ms):: 699966170 -2016-02-13 20:06:26 INFO ComplexDataJackson:31 - -------Round 34 -2016-02-13 20:06:27 INFO ComplexDataJackson:58 - Json Generation Time(ms):: 441669847 -2016-02-13 20:06:28 INFO ComplexDataJackson:33 - Size of Complex content Jackson :: 100 MB -2016-02-13 20:06:28 INFO ComplexDataJackson:34 - -------------------------------------------------------------------------- -2016-02-13 20:06:29 INFO ComplexDataJackson:68 - Generating Map from json Time(ms):: 1299277887 -2016-02-13 20:06:31 INFO ComplexDataJackson:81 - Generating Actual Object from json Time(ms):: 723641978 -2016-02-13 20:06:32 INFO ComplexDataJackson:31 - -------Round 35 -2016-02-13 20:06:34 INFO ComplexDataJackson:58 - Json Generation Time(ms):: 454130467 -2016-02-13 20:06:34 INFO ComplexDataJackson:33 - Size of Complex content Jackson :: 100 MB -2016-02-13 20:06:34 INFO ComplexDataJackson:34 - -------------------------------------------------------------------------- -2016-02-13 20:06:35 INFO ComplexDataJackson:68 - Generating Map from json Time(ms):: 1316463641 -2016-02-13 20:06:37 INFO ComplexDataJackson:81 - Generating Actual Object from json Time(ms):: 722224437 -2016-02-13 20:06:38 INFO ComplexDataJackson:31 - -------Round 36 -2016-02-13 20:06:40 INFO ComplexDataJackson:58 - Json Generation Time(ms):: 444313082 -2016-02-13 20:06:40 INFO ComplexDataJackson:33 - Size of Complex content Jackson :: 100 MB -2016-02-13 20:06:40 INFO ComplexDataJackson:34 - -------------------------------------------------------------------------- -2016-02-13 20:06:44 INFO ComplexDataJackson:68 - Generating Map from json Time(ms):: 4168720870 -2016-02-13 20:06:46 INFO ComplexDataJackson:81 - Generating Actual Object from json Time(ms):: 716292162 -2016-02-13 20:06:47 INFO ComplexDataJackson:31 - -------Round 37 -2016-02-13 20:06:48 INFO ComplexDataJackson:58 - Json Generation Time(ms):: 453859275 -2016-02-13 20:06:49 INFO ComplexDataJackson:33 - Size of Complex content Jackson :: 100 MB -2016-02-13 20:06:49 INFO ComplexDataJackson:34 - -------------------------------------------------------------------------- -2016-02-13 20:06:50 INFO ComplexDataJackson:68 - Generating Map from json Time(ms):: 1354556045 -2016-02-13 20:06:52 INFO ComplexDataJackson:81 - Generating Actual Object from json Time(ms):: 702207944 -2016-02-13 20:06:53 INFO ComplexDataJackson:31 - -------Round 38 -2016-02-13 20:06:54 INFO ComplexDataJackson:58 - Json Generation Time(ms):: 441460631 -2016-02-13 20:06:55 INFO ComplexDataJackson:33 - Size of Complex content Jackson :: 100 MB -2016-02-13 20:06:55 INFO ComplexDataJackson:34 - -------------------------------------------------------------------------- -2016-02-13 20:06:56 INFO ComplexDataJackson:68 - Generating Map from json Time(ms):: 1310969931 -2016-02-13 20:06:58 INFO ComplexDataJackson:81 - Generating Actual Object from json Time(ms):: 698961536 -2016-02-13 20:06:59 INFO ComplexDataJackson:31 - -------Round 39 -2016-02-13 20:07:01 INFO ComplexDataJackson:58 - Json Generation Time(ms):: 452284230 -2016-02-13 20:07:01 INFO ComplexDataJackson:33 - Size of Complex content Jackson :: 100 MB -2016-02-13 20:07:01 INFO ComplexDataJackson:34 - -------------------------------------------------------------------------- -2016-02-13 20:07:02 INFO ComplexDataJackson:68 - Generating Map from json Time(ms):: 1362443112 -2016-02-13 20:07:04 INFO ComplexDataJackson:81 - Generating Actual Object from json Time(ms):: 714802778 -2016-02-13 20:07:05 INFO ComplexDataJackson:31 - -------Round 40 -2016-02-13 20:07:07 INFO ComplexDataJackson:58 - Json Generation Time(ms):: 446338533 -2016-02-13 20:07:07 INFO ComplexDataJackson:33 - Size of Complex content Jackson :: 100 MB -2016-02-13 20:07:07 INFO ComplexDataJackson:34 - -------------------------------------------------------------------------- -2016-02-13 20:07:12 INFO ComplexDataJackson:68 - Generating Map from json Time(ms):: 4707047557 -2016-02-13 20:07:14 INFO ComplexDataJackson:81 - Generating Actual Object from json Time(ms):: 887842982 -2016-02-13 20:07:15 INFO ComplexDataJackson:31 - -------Round 41 -2016-02-13 20:07:16 INFO ComplexDataJackson:58 - Json Generation Time(ms):: 520853950 -2016-02-13 20:07:17 INFO ComplexDataJackson:33 - Size of Complex content Jackson :: 100 MB -2016-02-13 20:07:17 INFO ComplexDataJackson:34 - -------------------------------------------------------------------------- -2016-02-13 20:07:18 INFO ComplexDataJackson:68 - Generating Map from json Time(ms):: 1669910838 -2016-02-13 20:07:21 INFO ComplexDataJackson:81 - Generating Actual Object from json Time(ms):: 792730003 -2016-02-13 20:07:22 INFO ComplexDataJackson:31 - -------Round 42 -2016-02-13 20:07:24 INFO ComplexDataJackson:58 - Json Generation Time(ms):: 446619989 -2016-02-13 20:07:24 INFO ComplexDataJackson:33 - Size of Complex content Jackson :: 100 MB -2016-02-13 20:07:24 INFO ComplexDataJackson:34 - -------------------------------------------------------------------------- -2016-02-13 20:07:28 INFO ComplexDataJackson:68 - Generating Map from json Time(ms):: 4114083784 -2016-02-13 20:07:30 INFO ComplexDataJackson:81 - Generating Actual Object from json Time(ms):: 699097725 -2016-02-13 20:07:31 INFO ComplexDataJackson:31 - -------Round 43 -2016-02-13 20:07:32 INFO ComplexDataJackson:58 - Json Generation Time(ms):: 446668148 -2016-02-13 20:07:33 INFO ComplexDataJackson:33 - Size of Complex content Jackson :: 100 MB -2016-02-13 20:07:33 INFO ComplexDataJackson:34 - -------------------------------------------------------------------------- -2016-02-13 20:07:34 INFO ComplexDataJackson:68 - Generating Map from json Time(ms):: 1315005047 -2016-02-13 20:07:36 INFO ComplexDataJackson:81 - Generating Actual Object from json Time(ms):: 715094891 -2016-02-13 20:07:37 INFO ComplexDataJackson:31 - -------Round 44 -2016-02-13 20:07:38 INFO ComplexDataJackson:58 - Json Generation Time(ms):: 452608713 -2016-02-13 20:07:39 INFO ComplexDataJackson:33 - Size of Complex content Jackson :: 100 MB -2016-02-13 20:07:39 INFO ComplexDataJackson:34 - -------------------------------------------------------------------------- -2016-02-13 20:07:40 INFO ComplexDataJackson:68 - Generating Map from json Time(ms):: 1348105860 -2016-02-13 20:07:42 INFO ComplexDataJackson:81 - Generating Actual Object from json Time(ms):: 727506562 -2016-02-13 20:07:43 INFO ComplexDataJackson:31 - -------Round 45 -2016-02-13 20:07:45 INFO ComplexDataJackson:58 - Json Generation Time(ms):: 458520855 -2016-02-13 20:07:45 INFO ComplexDataJackson:33 - Size of Complex content Jackson :: 100 MB -2016-02-13 20:07:45 INFO ComplexDataJackson:34 - -------------------------------------------------------------------------- -2016-02-13 20:07:46 INFO ComplexDataJackson:68 - Generating Map from json Time(ms):: 1331530782 -2016-02-13 20:07:48 INFO ComplexDataJackson:81 - Generating Actual Object from json Time(ms):: 726158102 -2016-02-13 20:07:49 INFO ComplexDataJackson:31 - -------Round 46 -2016-02-13 20:07:51 INFO ComplexDataJackson:58 - Json Generation Time(ms):: 445496931 -2016-02-13 20:07:51 INFO ComplexDataJackson:33 - Size of Complex content Jackson :: 100 MB -2016-02-13 20:07:51 INFO ComplexDataJackson:34 - -------------------------------------------------------------------------- -2016-02-13 20:07:55 INFO ComplexDataJackson:68 - Generating Map from json Time(ms):: 4215771687 -2016-02-13 20:07:57 INFO ComplexDataJackson:81 - Generating Actual Object from json Time(ms):: 703152577 -2016-02-13 20:07:58 INFO ComplexDataJackson:31 - -------Round 47 -2016-02-13 20:07:59 INFO ComplexDataJackson:58 - Json Generation Time(ms):: 445821809 -2016-02-13 20:08:00 INFO ComplexDataJackson:33 - Size of Complex content Jackson :: 100 MB -2016-02-13 20:08:00 INFO ComplexDataJackson:34 - -------------------------------------------------------------------------- -2016-02-13 20:08:01 INFO ComplexDataJackson:68 - Generating Map from json Time(ms):: 1301186100 -2016-02-13 20:08:03 INFO ComplexDataJackson:81 - Generating Actual Object from json Time(ms):: 700948698 -2016-02-13 20:08:04 INFO ComplexDataJackson:31 - -------Round 48 -2016-02-13 20:08:05 INFO ComplexDataJackson:58 - Json Generation Time(ms):: 447174215 -2016-02-13 20:08:06 INFO ComplexDataJackson:33 - Size of Complex content Jackson :: 100 MB -2016-02-13 20:08:06 INFO ComplexDataJackson:34 - -------------------------------------------------------------------------- -2016-02-13 20:08:07 INFO ComplexDataJackson:68 - Generating Map from json Time(ms):: 1314801751 -2016-02-13 20:08:09 INFO ComplexDataJackson:81 - Generating Actual Object from json Time(ms):: 702852568 -2016-02-13 20:08:10 INFO ComplexDataJackson:31 - -------Round 49 -2016-02-13 20:08:11 INFO ComplexDataJackson:58 - Json Generation Time(ms):: 443597403 -2016-02-13 20:08:12 INFO ComplexDataJackson:33 - Size of Complex content Jackson :: 100 MB -2016-02-13 20:08:12 INFO ComplexDataJackson:34 - -------------------------------------------------------------------------- -2016-02-13 20:08:13 INFO ComplexDataJackson:68 - Generating Map from json Time(ms):: 1307441278 -2016-02-13 20:08:15 INFO ComplexDataJackson:81 - Generating Actual Object from json Time(ms):: 700476579 -2016-02-13 20:08:16 INFO ComplexDataJackson:31 - -------Round 50 -2016-02-13 20:08:17 INFO ComplexDataJackson:58 - Json Generation Time(ms):: 464090357 -2016-02-13 20:08:18 INFO ComplexDataJackson:33 - Size of Complex content Jackson :: 100 MB -2016-02-13 20:08:18 INFO ComplexDataJackson:34 - -------------------------------------------------------------------------- -2016-02-13 20:08:22 INFO ComplexDataJackson:68 - Generating Map from json Time(ms):: 4154225719 -2016-02-13 20:08:23 INFO ComplexDataJackson:81 - Generating Actual Object from json Time(ms):: 702714012 -2016-02-13 20:08:24 INFO ComplexDataJackson:43 - -------------------------------------------------------------------------- -2016-02-13 20:08:24 INFO ComplexDataJackson:44 - Average Time to Generate JSON : 494540894 -2016-02-13 20:08:24 INFO ComplexDataJackson:45 - Average Time to Parse JSON To Map : 2254690740 -2016-02-13 20:08:24 INFO ComplexDataJackson:46 - Average Time to Parse JSON To Actual Object : 738842085 -2016-02-13 20:08:24 INFO ComplexDataJackson:47 - -------------------------------------------------------------------------- diff --git a/gson-jackson-performance/logs_Performance/log4j-application 10kb gson.log b/gson-jackson-performance/logs_Performance/log4j-application 10kb gson.log deleted file mode 100644 index 3798f54438..0000000000 --- a/gson-jackson-performance/logs_Performance/log4j-application 10kb gson.log +++ /dev/null @@ -1,490 +0,0 @@ -2016-02-13 19:28:29 INFO ComplexDataGson:24 - -------Round 1 -2016-02-13 19:28:29 INFO ComplexDataGson:50 - Json Generation Time(ms):: 29919933 -2016-02-13 19:28:29 INFO ComplexDataGson:26 - Size of Complex content Jackson :: 10 KB -2016-02-13 19:28:29 INFO ComplexDataGson:27 - -------------------------------------------------------------------------- -2016-02-13 19:28:29 INFO ComplexDataGson:60 - Generating Map from json Time(ms):: 8431031 -2016-02-13 19:28:29 INFO ComplexDataGson:61 - -------------------------------------------------------------------------- -2016-02-13 19:28:29 INFO ComplexDataGson:72 - Generating Actual Object from json Time(ms):: 6431631 -2016-02-13 19:28:29 INFO ComplexDataGson:73 - -------------------------------------------------------------------------- -2016-02-13 19:28:29 INFO ComplexDataGson:24 - -------Round 2 -2016-02-13 19:28:29 INFO ComplexDataGson:50 - Json Generation Time(ms):: 2422174 -2016-02-13 19:28:29 INFO ComplexDataGson:26 - Size of Complex content Jackson :: 10 KB -2016-02-13 19:28:29 INFO ComplexDataGson:27 - -------------------------------------------------------------------------- -2016-02-13 19:28:29 INFO ComplexDataGson:60 - Generating Map from json Time(ms):: 1543070 -2016-02-13 19:28:29 INFO ComplexDataGson:61 - -------------------------------------------------------------------------- -2016-02-13 19:28:29 INFO ComplexDataGson:72 - Generating Actual Object from json Time(ms):: 1984794 -2016-02-13 19:28:29 INFO ComplexDataGson:73 - -------------------------------------------------------------------------- -2016-02-13 19:28:29 INFO ComplexDataGson:24 - -------Round 3 -2016-02-13 19:28:29 INFO ComplexDataGson:50 - Json Generation Time(ms):: 7451266 -2016-02-13 19:28:29 INFO ComplexDataGson:26 - Size of Complex content Jackson :: 10 KB -2016-02-13 19:28:29 INFO ComplexDataGson:27 - -------------------------------------------------------------------------- -2016-02-13 19:28:29 INFO ComplexDataGson:60 - Generating Map from json Time(ms):: 2946400 -2016-02-13 19:28:29 INFO ComplexDataGson:61 - -------------------------------------------------------------------------- -2016-02-13 19:28:29 INFO ComplexDataGson:72 - Generating Actual Object from json Time(ms):: 1498858 -2016-02-13 19:28:29 INFO ComplexDataGson:73 - -------------------------------------------------------------------------- -2016-02-13 19:28:29 INFO ComplexDataGson:24 - -------Round 4 -2016-02-13 19:28:29 INFO ComplexDataGson:50 - Json Generation Time(ms):: 1223325 -2016-02-13 19:28:29 INFO ComplexDataGson:26 - Size of Complex content Jackson :: 10 KB -2016-02-13 19:28:29 INFO ComplexDataGson:27 - -------------------------------------------------------------------------- -2016-02-13 19:28:29 INFO ComplexDataGson:60 - Generating Map from json Time(ms):: 447250 -2016-02-13 19:28:29 INFO ComplexDataGson:61 - -------------------------------------------------------------------------- -2016-02-13 19:28:29 INFO ComplexDataGson:72 - Generating Actual Object from json Time(ms):: 692783 -2016-02-13 19:28:29 INFO ComplexDataGson:73 - -------------------------------------------------------------------------- -2016-02-13 19:28:29 INFO ComplexDataGson:24 - -------Round 5 -2016-02-13 19:28:29 INFO ComplexDataGson:50 - Json Generation Time(ms):: 806075 -2016-02-13 19:28:29 INFO ComplexDataGson:26 - Size of Complex content Jackson :: 10 KB -2016-02-13 19:28:29 INFO ComplexDataGson:27 - -------------------------------------------------------------------------- -2016-02-13 19:28:29 INFO ComplexDataGson:60 - Generating Map from json Time(ms):: 552647 -2016-02-13 19:28:29 INFO ComplexDataGson:61 - -------------------------------------------------------------------------- -2016-02-13 19:28:29 INFO ComplexDataGson:72 - Generating Actual Object from json Time(ms):: 620939 -2016-02-13 19:28:29 INFO ComplexDataGson:73 - -------------------------------------------------------------------------- -2016-02-13 19:28:29 INFO ComplexDataGson:24 - -------Round 6 -2016-02-13 19:28:29 INFO ComplexDataGson:50 - Json Generation Time(ms):: 917000 -2016-02-13 19:28:29 INFO ComplexDataGson:26 - Size of Complex content Jackson :: 10 KB -2016-02-13 19:28:29 INFO ComplexDataGson:27 - -------------------------------------------------------------------------- -2016-02-13 19:28:29 INFO ComplexDataGson:60 - Generating Map from json Time(ms):: 440934 -2016-02-13 19:28:29 INFO ComplexDataGson:61 - -------------------------------------------------------------------------- -2016-02-13 19:28:29 INFO ComplexDataGson:72 - Generating Actual Object from json Time(ms):: 660808 -2016-02-13 19:28:29 INFO ComplexDataGson:73 - -------------------------------------------------------------------------- -2016-02-13 19:28:29 INFO ComplexDataGson:24 - -------Round 7 -2016-02-13 19:28:29 INFO ComplexDataGson:50 - Json Generation Time(ms):: 799365 -2016-02-13 19:28:29 INFO ComplexDataGson:26 - Size of Complex content Jackson :: 10 KB -2016-02-13 19:28:29 INFO ComplexDataGson:27 - -------------------------------------------------------------------------- -2016-02-13 19:28:29 INFO ComplexDataGson:60 - Generating Map from json Time(ms):: 386063 -2016-02-13 19:28:29 INFO ComplexDataGson:61 - -------------------------------------------------------------------------- -2016-02-13 19:28:29 INFO ComplexDataGson:72 - Generating Actual Object from json Time(ms):: 615807 -2016-02-13 19:28:29 INFO ComplexDataGson:73 - -------------------------------------------------------------------------- -2016-02-13 19:28:29 INFO ComplexDataGson:24 - -------Round 8 -2016-02-13 19:28:29 INFO ComplexDataGson:50 - Json Generation Time(ms):: 676993 -2016-02-13 19:28:29 INFO ComplexDataGson:26 - Size of Complex content Jackson :: 10 KB -2016-02-13 19:28:29 INFO ComplexDataGson:27 - -------------------------------------------------------------------------- -2016-02-13 19:28:29 INFO ComplexDataGson:60 - Generating Map from json Time(ms):: 1876632 -2016-02-13 19:28:29 INFO ComplexDataGson:61 - -------------------------------------------------------------------------- -2016-02-13 19:28:30 INFO ComplexDataGson:72 - Generating Actual Object from json Time(ms):: 380143 -2016-02-13 19:28:30 INFO ComplexDataGson:73 - -------------------------------------------------------------------------- -2016-02-13 19:28:30 INFO ComplexDataGson:24 - -------Round 9 -2016-02-13 19:28:30 INFO ComplexDataGson:50 - Json Generation Time(ms):: 652913 -2016-02-13 19:28:30 INFO ComplexDataGson:26 - Size of Complex content Jackson :: 10 KB -2016-02-13 19:28:30 INFO ComplexDataGson:27 - -------------------------------------------------------------------------- -2016-02-13 19:28:30 INFO ComplexDataGson:60 - Generating Map from json Time(ms):: 4579078 -2016-02-13 19:28:30 INFO ComplexDataGson:61 - -------------------------------------------------------------------------- -2016-02-13 19:28:30 INFO ComplexDataGson:72 - Generating Actual Object from json Time(ms):: 594885 -2016-02-13 19:28:30 INFO ComplexDataGson:73 - -------------------------------------------------------------------------- -2016-02-13 19:28:30 INFO ComplexDataGson:24 - -------Round 10 -2016-02-13 19:28:30 INFO ComplexDataGson:50 - Json Generation Time(ms):: 630018 -2016-02-13 19:28:30 INFO ComplexDataGson:26 - Size of Complex content Jackson :: 10 KB -2016-02-13 19:28:30 INFO ComplexDataGson:27 - -------------------------------------------------------------------------- -2016-02-13 19:28:30 INFO ComplexDataGson:60 - Generating Map from json Time(ms):: 317772 -2016-02-13 19:28:30 INFO ComplexDataGson:61 - -------------------------------------------------------------------------- -2016-02-13 19:28:30 INFO ComplexDataGson:72 - Generating Actual Object from json Time(ms):: 846735 -2016-02-13 19:28:30 INFO ComplexDataGson:73 - -------------------------------------------------------------------------- -2016-02-13 19:28:30 INFO ComplexDataGson:36 - -------------------------------------------------------------------------- -2016-02-13 19:28:30 INFO ComplexDataGson:37 - Average Time to Generate JSON : 4549906 -2016-02-13 19:28:30 INFO ComplexDataGson:38 - Average Time to Parse JSON To Map : 2152087 -2016-02-13 19:28:30 INFO ComplexDataGson:39 - Average Time to Parse JSON To Actual Object : 1432738 -2016-02-13 19:28:30 INFO ComplexDataGson:40 - -------------------------------------------------------------------------- -2016-02-13 19:28:57 INFO ComplexDataGson:27 - -------Round 1 -2016-02-13 19:28:57 INFO ComplexDataGson:53 - Json Generation Time(ms):: 22564197 -2016-02-13 19:28:57 INFO ComplexDataGson:29 - Size of Complex content Jackson :: 10 KB -2016-02-13 19:28:57 INFO ComplexDataGson:30 - -------------------------------------------------------------------------- -2016-02-13 19:28:57 INFO ComplexDataGson:63 - Generating Map from json Time(ms):: 6382682 -2016-02-13 19:28:57 INFO ComplexDataGson:64 - -------------------------------------------------------------------------- -2016-02-13 19:28:57 INFO ComplexDataGson:75 - Generating Actual Object from json Time(ms):: 5925169 -2016-02-13 19:28:57 INFO ComplexDataGson:76 - -------------------------------------------------------------------------- -2016-02-13 19:28:57 INFO ComplexDataGson:27 - -------Round 2 -2016-02-13 19:28:57 INFO ComplexDataGson:53 - Json Generation Time(ms):: 2213352 -2016-02-13 19:28:57 INFO ComplexDataGson:29 - Size of Complex content Jackson :: 10 KB -2016-02-13 19:28:57 INFO ComplexDataGson:30 - -------------------------------------------------------------------------- -2016-02-13 19:28:57 INFO ComplexDataGson:63 - Generating Map from json Time(ms):: 1366223 -2016-02-13 19:28:57 INFO ComplexDataGson:64 - -------------------------------------------------------------------------- -2016-02-13 19:28:57 INFO ComplexDataGson:75 - Generating Actual Object from json Time(ms):: 1049240 -2016-02-13 19:28:57 INFO ComplexDataGson:76 - -------------------------------------------------------------------------- -2016-02-13 19:28:57 INFO ComplexDataGson:27 - -------Round 3 -2016-02-13 19:28:57 INFO ComplexDataGson:53 - Json Generation Time(ms):: 4573551 -2016-02-13 19:28:57 INFO ComplexDataGson:29 - Size of Complex content Jackson :: 10 KB -2016-02-13 19:28:57 INFO ComplexDataGson:30 - -------------------------------------------------------------------------- -2016-02-13 19:28:57 INFO ComplexDataGson:63 - Generating Map from json Time(ms):: 795023 -2016-02-13 19:28:57 INFO ComplexDataGson:64 - -------------------------------------------------------------------------- -2016-02-13 19:28:57 INFO ComplexDataGson:75 - Generating Actual Object from json Time(ms):: 1174770 -2016-02-13 19:28:57 INFO ComplexDataGson:76 - -------------------------------------------------------------------------- -2016-02-13 19:28:58 INFO ComplexDataGson:27 - -------Round 4 -2016-02-13 19:28:58 INFO ComplexDataGson:53 - Json Generation Time(ms):: 1064636 -2016-02-13 19:28:58 INFO ComplexDataGson:29 - Size of Complex content Jackson :: 10 KB -2016-02-13 19:28:58 INFO ComplexDataGson:30 - -------------------------------------------------------------------------- -2016-02-13 19:28:58 INFO ComplexDataGson:63 - Generating Map from json Time(ms):: 432249 -2016-02-13 19:28:58 INFO ComplexDataGson:64 - -------------------------------------------------------------------------- -2016-02-13 19:28:58 INFO ComplexDataGson:75 - Generating Actual Object from json Time(ms):: 537647 -2016-02-13 19:28:58 INFO ComplexDataGson:76 - -------------------------------------------------------------------------- -2016-02-13 19:28:58 INFO ComplexDataGson:27 - -------Round 5 -2016-02-13 19:28:58 INFO ComplexDataGson:53 - Json Generation Time(ms):: 780417 -2016-02-13 19:28:58 INFO ComplexDataGson:29 - Size of Complex content Jackson :: 10 KB -2016-02-13 19:28:58 INFO ComplexDataGson:30 - -------------------------------------------------------------------------- -2016-02-13 19:28:58 INFO ComplexDataGson:63 - Generating Map from json Time(ms):: 570411 -2016-02-13 19:28:58 INFO ComplexDataGson:64 - -------------------------------------------------------------------------- -2016-02-13 19:28:58 INFO ComplexDataGson:75 - Generating Actual Object from json Time(ms):: 711336 -2016-02-13 19:28:58 INFO ComplexDataGson:76 - -------------------------------------------------------------------------- -2016-02-13 19:28:58 INFO ComplexDataGson:27 - -------Round 6 -2016-02-13 19:28:58 INFO ComplexDataGson:53 - Json Generation Time(ms):: 865288 -2016-02-13 19:28:58 INFO ComplexDataGson:29 - Size of Complex content Jackson :: 10 KB -2016-02-13 19:28:58 INFO ComplexDataGson:30 - -------------------------------------------------------------------------- -2016-02-13 19:28:58 INFO ComplexDataGson:63 - Generating Map from json Time(ms):: 268824 -2016-02-13 19:28:58 INFO ComplexDataGson:64 - -------------------------------------------------------------------------- -2016-02-13 19:28:58 INFO ComplexDataGson:75 - Generating Actual Object from json Time(ms):: 718836 -2016-02-13 19:28:58 INFO ComplexDataGson:76 - -------------------------------------------------------------------------- -2016-02-13 19:28:58 INFO ComplexDataGson:27 - -------Round 7 -2016-02-13 19:28:58 INFO ComplexDataGson:53 - Json Generation Time(ms):: 427907 -2016-02-13 19:28:58 INFO ComplexDataGson:29 - Size of Complex content Jackson :: 10 KB -2016-02-13 19:28:58 INFO ComplexDataGson:30 - -------------------------------------------------------------------------- -2016-02-13 19:28:58 INFO ComplexDataGson:63 - Generating Map from json Time(ms):: 430671 -2016-02-13 19:28:58 INFO ComplexDataGson:64 - -------------------------------------------------------------------------- -2016-02-13 19:28:58 INFO ComplexDataGson:75 - Generating Actual Object from json Time(ms):: 676993 -2016-02-13 19:28:58 INFO ComplexDataGson:76 - -------------------------------------------------------------------------- -2016-02-13 19:28:58 INFO ComplexDataGson:27 - -------Round 8 -2016-02-13 19:28:58 INFO ComplexDataGson:53 - Json Generation Time(ms):: 624097 -2016-02-13 19:28:58 INFO ComplexDataGson:29 - Size of Complex content Jackson :: 10 KB -2016-02-13 19:28:58 INFO ComplexDataGson:30 - -------------------------------------------------------------------------- -2016-02-13 19:28:58 INFO ComplexDataGson:63 - Generating Map from json Time(ms):: 409748 -2016-02-13 19:28:58 INFO ComplexDataGson:64 - -------------------------------------------------------------------------- -2016-02-13 19:28:58 INFO ComplexDataGson:75 - Generating Actual Object from json Time(ms):: 643045 -2016-02-13 19:28:58 INFO ComplexDataGson:76 - -------------------------------------------------------------------------- -2016-02-13 19:28:58 INFO ComplexDataGson:27 - -------Round 9 -2016-02-13 19:28:58 INFO ComplexDataGson:53 - Json Generation Time(ms):: 622123 -2016-02-13 19:28:58 INFO ComplexDataGson:29 - Size of Complex content Jackson :: 10 KB -2016-02-13 19:28:58 INFO ComplexDataGson:30 - -------------------------------------------------------------------------- -2016-02-13 19:28:58 INFO ComplexDataGson:63 - Generating Map from json Time(ms):: 441328 -2016-02-13 19:28:58 INFO ComplexDataGson:64 - -------------------------------------------------------------------------- -2016-02-13 19:28:58 INFO ComplexDataGson:75 - Generating Actual Object from json Time(ms):: 545937 -2016-02-13 19:28:58 INFO ComplexDataGson:76 - -------------------------------------------------------------------------- -2016-02-13 19:28:58 INFO ComplexDataGson:27 - -------Round 10 -2016-02-13 19:28:58 INFO ComplexDataGson:53 - Json Generation Time(ms):: 603175 -2016-02-13 19:28:58 INFO ComplexDataGson:29 - Size of Complex content Jackson :: 10 KB -2016-02-13 19:28:58 INFO ComplexDataGson:30 - -------------------------------------------------------------------------- -2016-02-13 19:28:58 INFO ComplexDataGson:63 - Generating Map from json Time(ms):: 388037 -2016-02-13 19:28:58 INFO ComplexDataGson:64 - -------------------------------------------------------------------------- -2016-02-13 19:28:58 INFO ComplexDataGson:75 - Generating Actual Object from json Time(ms):: 555016 -2016-02-13 19:28:58 INFO ComplexDataGson:76 - -------------------------------------------------------------------------- -2016-02-13 19:28:58 INFO ComplexDataGson:27 - -------Round 11 -2016-02-13 19:28:58 INFO ComplexDataGson:53 - Json Generation Time(ms):: 568832 -2016-02-13 19:28:58 INFO ComplexDataGson:29 - Size of Complex content Jackson :: 10 KB -2016-02-13 19:28:58 INFO ComplexDataGson:30 - -------------------------------------------------------------------------- -2016-02-13 19:28:58 INFO ComplexDataGson:63 - Generating Map from json Time(ms):: 360405 -2016-02-13 19:28:58 INFO ComplexDataGson:64 - -------------------------------------------------------------------------- -2016-02-13 19:28:58 INFO ComplexDataGson:75 - Generating Actual Object from json Time(ms):: 545147 -2016-02-13 19:28:58 INFO ComplexDataGson:76 - -------------------------------------------------------------------------- -2016-02-13 19:28:58 INFO ComplexDataGson:27 - -------Round 12 -2016-02-13 19:28:58 INFO ComplexDataGson:53 - Json Generation Time(ms):: 546726 -2016-02-13 19:28:58 INFO ComplexDataGson:29 - Size of Complex content Jackson :: 10 KB -2016-02-13 19:28:58 INFO ComplexDataGson:30 - -------------------------------------------------------------------------- -2016-02-13 19:28:58 INFO ComplexDataGson:63 - Generating Map from json Time(ms):: 221059 -2016-02-13 19:28:58 INFO ComplexDataGson:64 - -------------------------------------------------------------------------- -2016-02-13 19:28:58 INFO ComplexDataGson:75 - Generating Actual Object from json Time(ms):: 541594 -2016-02-13 19:28:58 INFO ComplexDataGson:76 - -------------------------------------------------------------------------- -2016-02-13 19:28:58 INFO ComplexDataGson:27 - -------Round 13 -2016-02-13 19:28:58 INFO ComplexDataGson:53 - Json Generation Time(ms):: 533700 -2016-02-13 19:28:58 INFO ComplexDataGson:29 - Size of Complex content Jackson :: 10 KB -2016-02-13 19:28:58 INFO ComplexDataGson:30 - -------------------------------------------------------------------------- -2016-02-13 19:28:58 INFO ComplexDataGson:63 - Generating Map from json Time(ms):: 393959 -2016-02-13 19:28:58 INFO ComplexDataGson:64 - -------------------------------------------------------------------------- -2016-02-13 19:28:58 INFO ComplexDataGson:75 - Generating Actual Object from json Time(ms):: 537253 -2016-02-13 19:28:58 INFO ComplexDataGson:76 - -------------------------------------------------------------------------- -2016-02-13 19:28:58 INFO ComplexDataGson:27 - -------Round 14 -2016-02-13 19:28:58 INFO ComplexDataGson:53 - Json Generation Time(ms):: 456329 -2016-02-13 19:28:58 INFO ComplexDataGson:29 - Size of Complex content Jackson :: 10 KB -2016-02-13 19:28:58 INFO ComplexDataGson:30 - -------------------------------------------------------------------------- -2016-02-13 19:28:58 INFO ComplexDataGson:63 - Generating Map from json Time(ms):: 347378 -2016-02-13 19:28:58 INFO ComplexDataGson:64 - -------------------------------------------------------------------------- -2016-02-13 19:28:58 INFO ComplexDataGson:75 - Generating Actual Object from json Time(ms):: 478435 -2016-02-13 19:28:58 INFO ComplexDataGson:76 - -------------------------------------------------------------------------- -2016-02-13 19:28:58 INFO ComplexDataGson:27 - -------Round 15 -2016-02-13 19:28:58 INFO ComplexDataGson:53 - Json Generation Time(ms):: 485935 -2016-02-13 19:28:58 INFO ComplexDataGson:29 - Size of Complex content Jackson :: 10 KB -2016-02-13 19:28:58 INFO ComplexDataGson:30 - -------------------------------------------------------------------------- -2016-02-13 19:28:58 INFO ComplexDataGson:63 - Generating Map from json Time(ms):: 336326 -2016-02-13 19:28:58 INFO ComplexDataGson:64 - -------------------------------------------------------------------------- -2016-02-13 19:28:58 INFO ComplexDataGson:75 - Generating Actual Object from json Time(ms):: 436197 -2016-02-13 19:28:58 INFO ComplexDataGson:76 - -------------------------------------------------------------------------- -2016-02-13 19:28:58 INFO ComplexDataGson:27 - -------Round 16 -2016-02-13 19:28:58 INFO ComplexDataGson:53 - Json Generation Time(ms):: 482777 -2016-02-13 19:28:58 INFO ComplexDataGson:29 - Size of Complex content Jackson :: 10 KB -2016-02-13 19:28:58 INFO ComplexDataGson:30 - -------------------------------------------------------------------------- -2016-02-13 19:28:58 INFO ComplexDataGson:63 - Generating Map from json Time(ms):: 309878 -2016-02-13 19:28:58 INFO ComplexDataGson:64 - -------------------------------------------------------------------------- -2016-02-13 19:28:58 INFO ComplexDataGson:75 - Generating Actual Object from json Time(ms):: 926869 -2016-02-13 19:28:58 INFO ComplexDataGson:76 - -------------------------------------------------------------------------- -2016-02-13 19:28:58 INFO ComplexDataGson:27 - -------Round 17 -2016-02-13 19:28:58 INFO ComplexDataGson:53 - Json Generation Time(ms):: 503699 -2016-02-13 19:28:58 INFO ComplexDataGson:29 - Size of Complex content Jackson :: 10 KB -2016-02-13 19:28:58 INFO ComplexDataGson:30 - -------------------------------------------------------------------------- -2016-02-13 19:28:58 INFO ComplexDataGson:63 - Generating Map from json Time(ms):: 322509 -2016-02-13 19:28:58 INFO ComplexDataGson:64 - -------------------------------------------------------------------------- -2016-02-13 19:28:58 INFO ComplexDataGson:75 - Generating Actual Object from json Time(ms):: 483566 -2016-02-13 19:28:58 INFO ComplexDataGson:76 - -------------------------------------------------------------------------- -2016-02-13 19:28:58 INFO ComplexDataGson:27 - -------Round 18 -2016-02-13 19:28:58 INFO ComplexDataGson:53 - Json Generation Time(ms):: 564885 -2016-02-13 19:28:58 INFO ComplexDataGson:29 - Size of Complex content Jackson :: 10 KB -2016-02-13 19:28:58 INFO ComplexDataGson:30 - -------------------------------------------------------------------------- -2016-02-13 19:28:58 INFO ComplexDataGson:63 - Generating Map from json Time(ms):: 298825 -2016-02-13 19:28:58 INFO ComplexDataGson:64 - -------------------------------------------------------------------------- -2016-02-13 19:28:58 INFO ComplexDataGson:75 - Generating Actual Object from json Time(ms):: 403038 -2016-02-13 19:28:58 INFO ComplexDataGson:76 - -------------------------------------------------------------------------- -2016-02-13 19:28:58 INFO ComplexDataGson:27 - -------Round 19 -2016-02-13 19:28:58 INFO ComplexDataGson:53 - Json Generation Time(ms):: 421986 -2016-02-13 19:28:58 INFO ComplexDataGson:29 - Size of Complex content Jackson :: 10 KB -2016-02-13 19:28:58 INFO ComplexDataGson:30 - -------------------------------------------------------------------------- -2016-02-13 19:28:58 INFO ComplexDataGson:63 - Generating Map from json Time(ms):: 128688 -2016-02-13 19:28:58 INFO ComplexDataGson:64 - -------------------------------------------------------------------------- -2016-02-13 19:28:58 INFO ComplexDataGson:75 - Generating Actual Object from json Time(ms):: 222243 -2016-02-13 19:28:58 INFO ComplexDataGson:76 - -------------------------------------------------------------------------- -2016-02-13 19:28:58 INFO ComplexDataGson:27 - -------Round 20 -2016-02-13 19:28:58 INFO ComplexDataGson:53 - Json Generation Time(ms):: 424354 -2016-02-13 19:28:58 INFO ComplexDataGson:29 - Size of Complex content Jackson :: 10 KB -2016-02-13 19:28:58 INFO ComplexDataGson:30 - -------------------------------------------------------------------------- -2016-02-13 19:28:58 INFO ComplexDataGson:63 - Generating Map from json Time(ms):: 238427 -2016-02-13 19:28:58 INFO ComplexDataGson:64 - -------------------------------------------------------------------------- -2016-02-13 19:28:58 INFO ComplexDataGson:75 - Generating Actual Object from json Time(ms):: 396327 -2016-02-13 19:28:58 INFO ComplexDataGson:76 - -------------------------------------------------------------------------- -2016-02-13 19:28:58 INFO ComplexDataGson:27 - -------Round 21 -2016-02-13 19:28:58 INFO ComplexDataGson:53 - Json Generation Time(ms):: 397906 -2016-02-13 19:28:58 INFO ComplexDataGson:29 - Size of Complex content Jackson :: 10 KB -2016-02-13 19:28:58 INFO ComplexDataGson:30 - -------------------------------------------------------------------------- -2016-02-13 19:28:58 INFO ComplexDataGson:63 - Generating Map from json Time(ms):: 161057 -2016-02-13 19:28:58 INFO ComplexDataGson:64 - -------------------------------------------------------------------------- -2016-02-13 19:28:58 INFO ComplexDataGson:75 - Generating Actual Object from json Time(ms):: 236060 -2016-02-13 19:28:58 INFO ComplexDataGson:76 - -------------------------------------------------------------------------- -2016-02-13 19:28:58 INFO ComplexDataGson:27 - -------Round 22 -2016-02-13 19:28:58 INFO ComplexDataGson:53 - Json Generation Time(ms):: 417643 -2016-02-13 19:28:58 INFO ComplexDataGson:29 - Size of Complex content Jackson :: 10 KB -2016-02-13 19:28:58 INFO ComplexDataGson:30 - -------------------------------------------------------------------------- -2016-02-13 19:28:58 INFO ComplexDataGson:63 - Generating Map from json Time(ms):: 466592 -2016-02-13 19:28:58 INFO ComplexDataGson:64 - -------------------------------------------------------------------------- -2016-02-13 19:28:58 INFO ComplexDataGson:75 - Generating Actual Object from json Time(ms):: 392380 -2016-02-13 19:28:58 INFO ComplexDataGson:76 - -------------------------------------------------------------------------- -2016-02-13 19:28:58 INFO ComplexDataGson:27 - -------Round 23 -2016-02-13 19:28:58 INFO ComplexDataGson:53 - Json Generation Time(ms):: 279482 -2016-02-13 19:28:58 INFO ComplexDataGson:29 - Size of Complex content Jackson :: 10 KB -2016-02-13 19:28:58 INFO ComplexDataGson:30 - -------------------------------------------------------------------------- -2016-02-13 19:28:58 INFO ComplexDataGson:63 - Generating Map from json Time(ms):: 134609 -2016-02-13 19:28:58 INFO ComplexDataGson:64 - -------------------------------------------------------------------------- -2016-02-13 19:28:58 INFO ComplexDataGson:75 - Generating Actual Object from json Time(ms):: 325667 -2016-02-13 19:28:58 INFO ComplexDataGson:76 - -------------------------------------------------------------------------- -2016-02-13 19:28:58 INFO ComplexDataGson:27 - -------Round 24 -2016-02-13 19:28:58 INFO ComplexDataGson:53 - Json Generation Time(ms):: 243165 -2016-02-13 19:28:58 INFO ComplexDataGson:29 - Size of Complex content Jackson :: 10 KB -2016-02-13 19:28:58 INFO ComplexDataGson:30 - -------------------------------------------------------------------------- -2016-02-13 19:28:58 INFO ComplexDataGson:63 - Generating Map from json Time(ms):: 223033 -2016-02-13 19:28:58 INFO ComplexDataGson:64 - -------------------------------------------------------------------------- -2016-02-13 19:28:58 INFO ComplexDataGson:75 - Generating Actual Object from json Time(ms):: 337904 -2016-02-13 19:28:58 INFO ComplexDataGson:76 - -------------------------------------------------------------------------- -2016-02-13 19:28:58 INFO ComplexDataGson:27 - -------Round 25 -2016-02-13 19:28:58 INFO ComplexDataGson:53 - Json Generation Time(ms):: 247507 -2016-02-13 19:28:58 INFO ComplexDataGson:29 - Size of Complex content Jackson :: 10 KB -2016-02-13 19:28:58 INFO ComplexDataGson:30 - -------------------------------------------------------------------------- -2016-02-13 19:28:58 INFO ComplexDataGson:63 - Generating Map from json Time(ms):: 135398 -2016-02-13 19:28:58 INFO ComplexDataGson:64 - -------------------------------------------------------------------------- -2016-02-13 19:28:58 INFO ComplexDataGson:75 - Generating Actual Object from json Time(ms):: 179216 -2016-02-13 19:28:58 INFO ComplexDataGson:76 - -------------------------------------------------------------------------- -2016-02-13 19:28:58 INFO ComplexDataGson:27 - -------Round 26 -2016-02-13 19:28:58 INFO ComplexDataGson:53 - Json Generation Time(ms):: 235270 -2016-02-13 19:28:58 INFO ComplexDataGson:29 - Size of Complex content Jackson :: 10 KB -2016-02-13 19:28:58 INFO ComplexDataGson:30 - -------------------------------------------------------------------------- -2016-02-13 19:28:58 INFO ComplexDataGson:63 - Generating Map from json Time(ms):: 112109 -2016-02-13 19:28:58 INFO ComplexDataGson:64 - -------------------------------------------------------------------------- -2016-02-13 19:28:58 INFO ComplexDataGson:75 - Generating Actual Object from json Time(ms):: 202111 -2016-02-13 19:28:58 INFO ComplexDataGson:76 - -------------------------------------------------------------------------- -2016-02-13 19:28:58 INFO ComplexDataGson:27 - -------Round 27 -2016-02-13 19:28:58 INFO ComplexDataGson:53 - Json Generation Time(ms):: 319746 -2016-02-13 19:28:58 INFO ComplexDataGson:29 - Size of Complex content Jackson :: 10 KB -2016-02-13 19:28:58 INFO ComplexDataGson:30 - -------------------------------------------------------------------------- -2016-02-13 19:28:58 INFO ComplexDataGson:63 - Generating Map from json Time(ms):: 114082 -2016-02-13 19:28:58 INFO ComplexDataGson:64 - -------------------------------------------------------------------------- -2016-02-13 19:28:58 INFO ComplexDataGson:75 - Generating Actual Object from json Time(ms):: 171716 -2016-02-13 19:28:58 INFO ComplexDataGson:76 - -------------------------------------------------------------------------- -2016-02-13 19:28:58 INFO ComplexDataGson:27 - -------Round 28 -2016-02-13 19:28:58 INFO ComplexDataGson:53 - Json Generation Time(ms):: 201717 -2016-02-13 19:28:58 INFO ComplexDataGson:29 - Size of Complex content Jackson :: 10 KB -2016-02-13 19:28:58 INFO ComplexDataGson:30 - -------------------------------------------------------------------------- -2016-02-13 19:28:58 INFO ComplexDataGson:63 - Generating Map from json Time(ms):: 112504 -2016-02-13 19:28:58 INFO ComplexDataGson:64 - -------------------------------------------------------------------------- -2016-02-13 19:28:58 INFO ComplexDataGson:75 - Generating Actual Object from json Time(ms):: 165399 -2016-02-13 19:28:58 INFO ComplexDataGson:76 - -------------------------------------------------------------------------- -2016-02-13 19:28:58 INFO ComplexDataGson:27 - -------Round 29 -2016-02-13 19:28:58 INFO ComplexDataGson:53 - Json Generation Time(ms):: 247507 -2016-02-13 19:28:58 INFO ComplexDataGson:29 - Size of Complex content Jackson :: 10 KB -2016-02-13 19:28:58 INFO ComplexDataGson:30 - -------------------------------------------------------------------------- -2016-02-13 19:28:58 INFO ComplexDataGson:63 - Generating Map from json Time(ms):: 112504 -2016-02-13 19:28:58 INFO ComplexDataGson:64 - -------------------------------------------------------------------------- -2016-02-13 19:28:58 INFO ComplexDataGson:75 - Generating Actual Object from json Time(ms):: 176058 -2016-02-13 19:28:58 INFO ComplexDataGson:76 - -------------------------------------------------------------------------- -2016-02-13 19:28:58 INFO ComplexDataGson:27 - -------Round 30 -2016-02-13 19:28:58 INFO ComplexDataGson:53 - Json Generation Time(ms):: 226586 -2016-02-13 19:28:58 INFO ComplexDataGson:29 - Size of Complex content Jackson :: 10 KB -2016-02-13 19:28:58 INFO ComplexDataGson:30 - -------------------------------------------------------------------------- -2016-02-13 19:28:58 INFO ComplexDataGson:63 - Generating Map from json Time(ms):: 114872 -2016-02-13 19:28:58 INFO ComplexDataGson:64 - -------------------------------------------------------------------------- -2016-02-13 19:28:58 INFO ComplexDataGson:75 - Generating Actual Object from json Time(ms):: 179216 -2016-02-13 19:28:58 INFO ComplexDataGson:76 - -------------------------------------------------------------------------- -2016-02-13 19:28:58 INFO ComplexDataGson:27 - -------Round 31 -2016-02-13 19:28:58 INFO ComplexDataGson:53 - Json Generation Time(ms):: 203295 -2016-02-13 19:28:58 INFO ComplexDataGson:29 - Size of Complex content Jackson :: 10 KB -2016-02-13 19:28:58 INFO ComplexDataGson:30 - -------------------------------------------------------------------------- -2016-02-13 19:28:58 INFO ComplexDataGson:63 - Generating Map from json Time(ms):: 98687 -2016-02-13 19:28:58 INFO ComplexDataGson:64 - -------------------------------------------------------------------------- -2016-02-13 19:28:58 INFO ComplexDataGson:75 - Generating Actual Object from json Time(ms):: 176847 -2016-02-13 19:28:58 INFO ComplexDataGson:76 - -------------------------------------------------------------------------- -2016-02-13 19:28:58 INFO ComplexDataGson:27 - -------Round 32 -2016-02-13 19:28:58 INFO ComplexDataGson:53 - Json Generation Time(ms):: 332378 -2016-02-13 19:28:58 INFO ComplexDataGson:29 - Size of Complex content Jackson :: 10 KB -2016-02-13 19:28:58 INFO ComplexDataGson:30 - -------------------------------------------------------------------------- -2016-02-13 19:28:58 INFO ComplexDataGson:63 - Generating Map from json Time(ms):: 208822 -2016-02-13 19:28:58 INFO ComplexDataGson:64 - -------------------------------------------------------------------------- -2016-02-13 19:28:58 INFO ComplexDataGson:75 - Generating Actual Object from json Time(ms):: 340668 -2016-02-13 19:28:58 INFO ComplexDataGson:76 - -------------------------------------------------------------------------- -2016-02-13 19:28:58 INFO ComplexDataGson:27 - -------Round 33 -2016-02-13 19:28:58 INFO ComplexDataGson:53 - Json Generation Time(ms):: 370274 -2016-02-13 19:28:58 INFO ComplexDataGson:29 - Size of Complex content Jackson :: 10 KB -2016-02-13 19:28:58 INFO ComplexDataGson:30 - -------------------------------------------------------------------------- -2016-02-13 19:28:58 INFO ComplexDataGson:63 - Generating Map from json Time(ms):: 120793 -2016-02-13 19:28:58 INFO ComplexDataGson:64 - -------------------------------------------------------------------------- -2016-02-13 19:28:58 INFO ComplexDataGson:75 - Generating Actual Object from json Time(ms):: 185137 -2016-02-13 19:28:58 INFO ComplexDataGson:76 - -------------------------------------------------------------------------- -2016-02-13 19:28:58 INFO ComplexDataGson:27 - -------Round 34 -2016-02-13 19:28:58 INFO ComplexDataGson:53 - Json Generation Time(ms):: 308298 -2016-02-13 19:28:58 INFO ComplexDataGson:29 - Size of Complex content Jackson :: 10 KB -2016-02-13 19:28:58 INFO ComplexDataGson:30 - -------------------------------------------------------------------------- -2016-02-13 19:28:58 INFO ComplexDataGson:63 - Generating Map from json Time(ms):: 230138 -2016-02-13 19:28:58 INFO ComplexDataGson:64 - -------------------------------------------------------------------------- -2016-02-13 19:28:58 INFO ComplexDataGson:75 - Generating Actual Object from json Time(ms):: 270402 -2016-02-13 19:28:58 INFO ComplexDataGson:76 - -------------------------------------------------------------------------- -2016-02-13 19:28:58 INFO ComplexDataGson:27 - -------Round 35 -2016-02-13 19:28:58 INFO ComplexDataGson:53 - Json Generation Time(ms):: 290929 -2016-02-13 19:28:58 INFO ComplexDataGson:29 - Size of Complex content Jackson :: 10 KB -2016-02-13 19:28:58 INFO ComplexDataGson:30 - -------------------------------------------------------------------------- -2016-02-13 19:28:58 INFO ComplexDataGson:63 - Generating Map from json Time(ms):: 206848 -2016-02-13 19:28:58 INFO ComplexDataGson:64 - -------------------------------------------------------------------------- -2016-02-13 19:28:58 INFO ComplexDataGson:75 - Generating Actual Object from json Time(ms):: 178426 -2016-02-13 19:28:58 INFO ComplexDataGson:76 - -------------------------------------------------------------------------- -2016-02-13 19:28:58 INFO ComplexDataGson:27 - -------Round 36 -2016-02-13 19:28:58 INFO ComplexDataGson:53 - Json Generation Time(ms):: 311851 -2016-02-13 19:28:58 INFO ComplexDataGson:29 - Size of Complex content Jackson :: 10 KB -2016-02-13 19:28:58 INFO ComplexDataGson:30 - -------------------------------------------------------------------------- -2016-02-13 19:28:58 INFO ComplexDataGson:63 - Generating Map from json Time(ms):: 222243 -2016-02-13 19:28:58 INFO ComplexDataGson:64 - -------------------------------------------------------------------------- -2016-02-13 19:28:58 INFO ComplexDataGson:75 - Generating Actual Object from json Time(ms):: 174084 -2016-02-13 19:28:58 INFO ComplexDataGson:76 - -------------------------------------------------------------------------- -2016-02-13 19:28:58 INFO ComplexDataGson:27 - -------Round 37 -2016-02-13 19:28:58 INFO ComplexDataGson:53 - Json Generation Time(ms):: 295667 -2016-02-13 19:28:58 INFO ComplexDataGson:29 - Size of Complex content Jackson :: 10 KB -2016-02-13 19:28:58 INFO ComplexDataGson:30 - -------------------------------------------------------------------------- -2016-02-13 19:28:58 INFO ComplexDataGson:63 - Generating Map from json Time(ms):: 210795 -2016-02-13 19:28:58 INFO ComplexDataGson:64 - -------------------------------------------------------------------------- -2016-02-13 19:28:58 INFO ComplexDataGson:75 - Generating Actual Object from json Time(ms):: 220269 -2016-02-13 19:28:58 INFO ComplexDataGson:76 - -------------------------------------------------------------------------- -2016-02-13 19:28:58 INFO ComplexDataGson:27 - -------Round 38 -2016-02-13 19:28:59 INFO ComplexDataGson:53 - Json Generation Time(ms):: 181978 -2016-02-13 19:28:59 INFO ComplexDataGson:29 - Size of Complex content Jackson :: 10 KB -2016-02-13 19:28:59 INFO ComplexDataGson:30 - -------------------------------------------------------------------------- -2016-02-13 19:28:59 INFO ComplexDataGson:63 - Generating Map from json Time(ms):: 131451 -2016-02-13 19:28:59 INFO ComplexDataGson:64 - -------------------------------------------------------------------------- -2016-02-13 19:28:59 INFO ComplexDataGson:75 - Generating Actual Object from json Time(ms):: 170531 -2016-02-13 19:28:59 INFO ComplexDataGson:76 - -------------------------------------------------------------------------- -2016-02-13 19:28:59 INFO ComplexDataGson:27 - -------Round 39 -2016-02-13 19:28:59 INFO ComplexDataGson:53 - Json Generation Time(ms):: 302772 -2016-02-13 19:28:59 INFO ComplexDataGson:29 - Size of Complex content Jackson :: 10 KB -2016-02-13 19:28:59 INFO ComplexDataGson:30 - -------------------------------------------------------------------------- -2016-02-13 19:28:59 INFO ComplexDataGson:63 - Generating Map from json Time(ms):: 125135 -2016-02-13 19:28:59 INFO ComplexDataGson:64 - -------------------------------------------------------------------------- -2016-02-13 19:28:59 INFO ComplexDataGson:75 - Generating Actual Object from json Time(ms):: 160663 -2016-02-13 19:28:59 INFO ComplexDataGson:76 - -------------------------------------------------------------------------- -2016-02-13 19:28:59 INFO ComplexDataGson:27 - -------Round 40 -2016-02-13 19:28:59 INFO ComplexDataGson:53 - Json Generation Time(ms):: 287377 -2016-02-13 19:28:59 INFO ComplexDataGson:29 - Size of Complex content Jackson :: 10 KB -2016-02-13 19:28:59 INFO ComplexDataGson:30 - -------------------------------------------------------------------------- -2016-02-13 19:28:59 INFO ComplexDataGson:63 - Generating Map from json Time(ms):: 214743 -2016-02-13 19:28:59 INFO ComplexDataGson:64 - -------------------------------------------------------------------------- -2016-02-13 19:28:59 INFO ComplexDataGson:75 - Generating Actual Object from json Time(ms):: 260139 -2016-02-13 19:28:59 INFO ComplexDataGson:76 - -------------------------------------------------------------------------- -2016-02-13 19:28:59 INFO ComplexDataGson:27 - -------Round 41 -2016-02-13 19:28:59 INFO ComplexDataGson:53 - Json Generation Time(ms):: 181189 -2016-02-13 19:28:59 INFO ComplexDataGson:29 - Size of Complex content Jackson :: 10 KB -2016-02-13 19:28:59 INFO ComplexDataGson:30 - -------------------------------------------------------------------------- -2016-02-13 19:28:59 INFO ComplexDataGson:63 - Generating Map from json Time(ms):: 114082 -2016-02-13 19:28:59 INFO ComplexDataGson:64 - -------------------------------------------------------------------------- -2016-02-13 19:28:59 INFO ComplexDataGson:75 - Generating Actual Object from json Time(ms):: 147636 -2016-02-13 19:28:59 INFO ComplexDataGson:76 - -------------------------------------------------------------------------- -2016-02-13 19:28:59 INFO ComplexDataGson:27 - -------Round 42 -2016-02-13 19:28:59 INFO ComplexDataGson:53 - Json Generation Time(ms):: 274350 -2016-02-13 19:28:59 INFO ComplexDataGson:29 - Size of Complex content Jackson :: 10 KB -2016-02-13 19:28:59 INFO ComplexDataGson:30 - -------------------------------------------------------------------------- -2016-02-13 19:28:59 INFO ComplexDataGson:63 - Generating Map from json Time(ms):: 181189 -2016-02-13 19:28:59 INFO ComplexDataGson:64 - -------------------------------------------------------------------------- -2016-02-13 19:28:59 INFO ComplexDataGson:75 - Generating Actual Object from json Time(ms):: 224217 -2016-02-13 19:28:59 INFO ComplexDataGson:76 - -------------------------------------------------------------------------- -2016-02-13 19:28:59 INFO ComplexDataGson:27 - -------Round 43 -2016-02-13 19:28:59 INFO ComplexDataGson:53 - Json Generation Time(ms):: 181189 -2016-02-13 19:28:59 INFO ComplexDataGson:29 - Size of Complex content Jackson :: 10 KB -2016-02-13 19:28:59 INFO ComplexDataGson:30 - -------------------------------------------------------------------------- -2016-02-13 19:28:59 INFO ComplexDataGson:63 - Generating Map from json Time(ms):: 121583 -2016-02-13 19:28:59 INFO ComplexDataGson:64 - -------------------------------------------------------------------------- -2016-02-13 19:28:59 INFO ComplexDataGson:75 - Generating Actual Object from json Time(ms):: 139346 -2016-02-13 19:28:59 INFO ComplexDataGson:76 - -------------------------------------------------------------------------- -2016-02-13 19:28:59 INFO ComplexDataGson:27 - -------Round 44 -2016-02-13 19:28:59 INFO ComplexDataGson:53 - Json Generation Time(ms):: 181190 -2016-02-13 19:28:59 INFO ComplexDataGson:29 - Size of Complex content Jackson :: 10 KB -2016-02-13 19:28:59 INFO ComplexDataGson:30 - -------------------------------------------------------------------------- -2016-02-13 19:28:59 INFO ComplexDataGson:63 - Generating Map from json Time(ms):: 101450 -2016-02-13 19:28:59 INFO ComplexDataGson:64 - -------------------------------------------------------------------------- -2016-02-13 19:28:59 INFO ComplexDataGson:75 - Generating Actual Object from json Time(ms):: 135793 -2016-02-13 19:28:59 INFO ComplexDataGson:76 - -------------------------------------------------------------------------- -2016-02-13 19:28:59 INFO ComplexDataGson:27 - -------Round 45 -2016-02-13 19:28:59 INFO ComplexDataGson:53 - Json Generation Time(ms):: 185531 -2016-02-13 19:28:59 INFO ComplexDataGson:29 - Size of Complex content Jackson :: 10 KB -2016-02-13 19:28:59 INFO ComplexDataGson:30 - -------------------------------------------------------------------------- -2016-02-13 19:28:59 INFO ComplexDataGson:63 - Generating Map from json Time(ms):: 101450 -2016-02-13 19:28:59 INFO ComplexDataGson:64 - -------------------------------------------------------------------------- -2016-02-13 19:28:59 INFO ComplexDataGson:75 - Generating Actual Object from json Time(ms):: 139741 -2016-02-13 19:28:59 INFO ComplexDataGson:76 - -------------------------------------------------------------------------- -2016-02-13 19:28:59 INFO ComplexDataGson:27 - -------Round 46 -2016-02-13 19:28:59 INFO ComplexDataGson:53 - Json Generation Time(ms):: 274745 -2016-02-13 19:28:59 INFO ComplexDataGson:29 - Size of Complex content Jackson :: 10 KB -2016-02-13 19:28:59 INFO ComplexDataGson:30 - -------------------------------------------------------------------------- -2016-02-13 19:28:59 INFO ComplexDataGson:63 - Generating Map from json Time(ms):: 211980 -2016-02-13 19:28:59 INFO ComplexDataGson:64 - -------------------------------------------------------------------------- -2016-02-13 19:28:59 INFO ComplexDataGson:75 - Generating Actual Object from json Time(ms):: 137372 -2016-02-13 19:28:59 INFO ComplexDataGson:76 - -------------------------------------------------------------------------- -2016-02-13 19:28:59 INFO ComplexDataGson:27 - -------Round 47 -2016-02-13 19:28:59 INFO ComplexDataGson:53 - Json Generation Time(ms):: 185532 -2016-02-13 19:28:59 INFO ComplexDataGson:29 - Size of Complex content Jackson :: 10 KB -2016-02-13 19:28:59 INFO ComplexDataGson:30 - -------------------------------------------------------------------------- -2016-02-13 19:28:59 INFO ComplexDataGson:63 - Generating Map from json Time(ms):: 114477 -2016-02-13 19:28:59 INFO ComplexDataGson:64 - -------------------------------------------------------------------------- -2016-02-13 19:28:59 INFO ComplexDataGson:75 - Generating Actual Object from json Time(ms):: 134214 -2016-02-13 19:28:59 INFO ComplexDataGson:76 - -------------------------------------------------------------------------- -2016-02-13 19:28:59 INFO ComplexDataGson:27 - -------Round 48 -2016-02-13 19:28:59 INFO ComplexDataGson:53 - Json Generation Time(ms):: 206059 -2016-02-13 19:28:59 INFO ComplexDataGson:29 - Size of Complex content Jackson :: 10 KB -2016-02-13 19:28:59 INFO ComplexDataGson:30 - -------------------------------------------------------------------------- -2016-02-13 19:28:59 INFO ComplexDataGson:63 - Generating Map from json Time(ms):: 128293 -2016-02-13 19:28:59 INFO ComplexDataGson:64 - -------------------------------------------------------------------------- -2016-02-13 19:28:59 INFO ComplexDataGson:75 - Generating Actual Object from json Time(ms):: 143688 -2016-02-13 19:28:59 INFO ComplexDataGson:76 - -------------------------------------------------------------------------- -2016-02-13 19:28:59 INFO ComplexDataGson:27 - -------Round 49 -2016-02-13 19:28:59 INFO ComplexDataGson:53 - Json Generation Time(ms):: 261324 -2016-02-13 19:28:59 INFO ComplexDataGson:29 - Size of Complex content Jackson :: 10 KB -2016-02-13 19:28:59 INFO ComplexDataGson:30 - -------------------------------------------------------------------------- -2016-02-13 19:28:59 INFO ComplexDataGson:63 - Generating Map from json Time(ms):: 189479 -2016-02-13 19:28:59 INFO ComplexDataGson:64 - -------------------------------------------------------------------------- -2016-02-13 19:28:59 INFO ComplexDataGson:75 - Generating Actual Object from json Time(ms):: 220269 -2016-02-13 19:28:59 INFO ComplexDataGson:76 - -------------------------------------------------------------------------- -2016-02-13 19:28:59 INFO ComplexDataGson:27 - -------Round 50 -2016-02-13 19:28:59 INFO ComplexDataGson:53 - Json Generation Time(ms):: 316588 -2016-02-13 19:28:59 INFO ComplexDataGson:29 - Size of Complex content Jackson :: 10 KB -2016-02-13 19:28:59 INFO ComplexDataGson:30 - -------------------------------------------------------------------------- -2016-02-13 19:28:59 INFO ComplexDataGson:63 - Generating Map from json Time(ms):: 209217 -2016-02-13 19:28:59 INFO ComplexDataGson:64 - -------------------------------------------------------------------------- -2016-02-13 19:28:59 INFO ComplexDataGson:75 - Generating Actual Object from json Time(ms):: 248296 -2016-02-13 19:28:59 INFO ComplexDataGson:76 - -------------------------------------------------------------------------- -2016-02-13 19:28:59 INFO ComplexDataGson:39 - -------------------------------------------------------------------------- -2016-02-13 19:28:59 INFO ComplexDataGson:40 - Average Time to Generate JSON : 945540 -2016-02-13 19:28:59 INFO ComplexDataGson:41 - Average Time to Parse JSON To Map : 387445 -2016-02-13 19:28:59 INFO ComplexDataGson:42 - Average Time to Parse JSON To Actual Object : 473642 -2016-02-13 19:28:59 INFO ComplexDataGson:43 - -------------------------------------------------------------------------- diff --git a/gson-jackson-performance/logs_Performance/log4j-application 10kb jackson.log b/gson-jackson-performance/logs_Performance/log4j-application 10kb jackson.log deleted file mode 100644 index 3959c60eb2..0000000000 --- a/gson-jackson-performance/logs_Performance/log4j-application 10kb jackson.log +++ /dev/null @@ -1,370 +0,0 @@ -2016-02-13 19:58:48 INFO ComplexDataJackson:29 - -------Round 1 -2016-02-13 19:58:48 INFO ComplexDataJackson:56 - Json Generation Time(ms):: 87235780 -2016-02-13 19:58:48 INFO ComplexDataJackson:31 - Size of Complex content Jackson :: 10 KB -2016-02-13 19:58:48 INFO ComplexDataJackson:32 - -------------------------------------------------------------------------- -2016-02-13 19:58:48 INFO ComplexDataJackson:66 - Generating Map from json Time(ms):: 29891117 -2016-02-13 19:58:48 INFO ComplexDataJackson:79 - Generating Actual Object from json Time(ms):: 18692902 -2016-02-13 19:58:48 INFO ComplexDataJackson:29 - -------Round 2 -2016-02-13 19:58:48 INFO ComplexDataJackson:56 - Json Generation Time(ms):: 1735313 -2016-02-13 19:58:48 INFO ComplexDataJackson:31 - Size of Complex content Jackson :: 10 KB -2016-02-13 19:58:48 INFO ComplexDataJackson:32 - -------------------------------------------------------------------------- -2016-02-13 19:58:48 INFO ComplexDataJackson:66 - Generating Map from json Time(ms):: 1242667 -2016-02-13 19:58:49 INFO ComplexDataJackson:79 - Generating Actual Object from json Time(ms):: 2039268 -2016-02-13 19:58:49 INFO ComplexDataJackson:29 - -------Round 3 -2016-02-13 19:58:49 INFO ComplexDataJackson:56 - Json Generation Time(ms):: 1130953 -2016-02-13 19:58:49 INFO ComplexDataJackson:31 - Size of Complex content Jackson :: 10 KB -2016-02-13 19:58:49 INFO ComplexDataJackson:32 - -------------------------------------------------------------------------- -2016-02-13 19:58:49 INFO ComplexDataJackson:66 - Generating Map from json Time(ms):: 721205 -2016-02-13 19:58:49 INFO ComplexDataJackson:79 - Generating Actual Object from json Time(ms):: 5425418 -2016-02-13 19:58:49 INFO ComplexDataJackson:29 - -------Round 4 -2016-02-13 19:58:49 INFO ComplexDataJackson:56 - Json Generation Time(ms):: 761864 -2016-02-13 19:58:49 INFO ComplexDataJackson:31 - Size of Complex content Jackson :: 10 KB -2016-02-13 19:58:49 INFO ComplexDataJackson:32 - -------------------------------------------------------------------------- -2016-02-13 19:58:49 INFO ComplexDataJackson:66 - Generating Map from json Time(ms):: 688441 -2016-02-13 19:58:49 INFO ComplexDataJackson:79 - Generating Actual Object from json Time(ms):: 959238 -2016-02-13 19:58:49 INFO ComplexDataJackson:29 - -------Round 5 -2016-02-13 19:58:49 INFO ComplexDataJackson:56 - Json Generation Time(ms):: 636334 -2016-02-13 19:58:49 INFO ComplexDataJackson:31 - Size of Complex content Jackson :: 10 KB -2016-02-13 19:58:49 INFO ComplexDataJackson:32 - -------------------------------------------------------------------------- -2016-02-13 19:58:49 INFO ComplexDataJackson:66 - Generating Map from json Time(ms):: 589754 -2016-02-13 19:58:49 INFO ComplexDataJackson:79 - Generating Actual Object from json Time(ms):: 846735 -2016-02-13 19:58:49 INFO ComplexDataJackson:29 - -------Round 6 -2016-02-13 19:58:49 INFO ComplexDataJackson:56 - Json Generation Time(ms):: 1905844 -2016-02-13 19:58:49 INFO ComplexDataJackson:31 - Size of Complex content Jackson :: 10 KB -2016-02-13 19:58:49 INFO ComplexDataJackson:32 - -------------------------------------------------------------------------- -2016-02-13 19:58:49 INFO ComplexDataJackson:66 - Generating Map from json Time(ms):: 495409 -2016-02-13 19:58:49 INFO ComplexDataJackson:79 - Generating Actual Object from json Time(ms):: 933974 -2016-02-13 19:58:49 INFO ComplexDataJackson:29 - -------Round 7 -2016-02-13 19:58:49 INFO ComplexDataJackson:56 - Json Generation Time(ms):: 654098 -2016-02-13 19:58:49 INFO ComplexDataJackson:31 - Size of Complex content Jackson :: 10 KB -2016-02-13 19:58:49 INFO ComplexDataJackson:32 - -------------------------------------------------------------------------- -2016-02-13 19:58:49 INFO ComplexDataJackson:66 - Generating Map from json Time(ms):: 474882 -2016-02-13 19:58:49 INFO ComplexDataJackson:79 - Generating Actual Object from json Time(ms):: 753574 -2016-02-13 19:58:49 INFO ComplexDataJackson:29 - -------Round 8 -2016-02-13 19:58:49 INFO ComplexDataJackson:56 - Json Generation Time(ms):: 3619051 -2016-02-13 19:58:49 INFO ComplexDataJackson:31 - Size of Complex content Jackson :: 10 KB -2016-02-13 19:58:49 INFO ComplexDataJackson:32 - -------------------------------------------------------------------------- -2016-02-13 19:58:49 INFO ComplexDataJackson:66 - Generating Map from json Time(ms):: 515146 -2016-02-13 19:58:49 INFO ComplexDataJackson:79 - Generating Actual Object from json Time(ms):: 607912 -2016-02-13 19:58:49 INFO ComplexDataJackson:29 - -------Round 9 -2016-02-13 19:58:49 INFO ComplexDataJackson:56 - Json Generation Time(ms):: 404617 -2016-02-13 19:58:49 INFO ComplexDataJackson:31 - Size of Complex content Jackson :: 10 KB -2016-02-13 19:58:49 INFO ComplexDataJackson:32 - -------------------------------------------------------------------------- -2016-02-13 19:58:49 INFO ComplexDataJackson:66 - Generating Map from json Time(ms):: 930816 -2016-02-13 19:58:49 INFO ComplexDataJackson:79 - Generating Actual Object from json Time(ms):: 498566 -2016-02-13 19:58:49 INFO ComplexDataJackson:29 - -------Round 10 -2016-02-13 19:58:49 INFO ComplexDataJackson:56 - Json Generation Time(ms):: 384879 -2016-02-13 19:58:49 INFO ComplexDataJackson:31 - Size of Complex content Jackson :: 10 KB -2016-02-13 19:58:49 INFO ComplexDataJackson:32 - -------------------------------------------------------------------------- -2016-02-13 19:58:49 INFO ComplexDataJackson:66 - Generating Map from json Time(ms):: 270008 -2016-02-13 19:58:49 INFO ComplexDataJackson:79 - Generating Actual Object from json Time(ms):: 547516 -2016-02-13 19:58:49 INFO ComplexDataJackson:41 - -------------------------------------------------------------------------- -2016-02-13 19:58:49 INFO ComplexDataJackson:42 - Average Time to Generate JSON : 9846873 -2016-02-13 19:58:49 INFO ComplexDataJackson:43 - Average Time to Parse JSON To Map : 3581944 -2016-02-13 19:58:49 INFO ComplexDataJackson:44 - Average Time to Parse JSON To Actual Object : 3130510 -2016-02-13 19:58:49 INFO ComplexDataJackson:45 - -------------------------------------------------------------------------- -2016-02-13 19:59:07 INFO ComplexDataJackson:31 - -------Round 1 -2016-02-13 19:59:07 INFO ComplexDataJackson:58 - Json Generation Time(ms):: 68404321 -2016-02-13 19:59:07 INFO ComplexDataJackson:33 - Size of Complex content Jackson :: 10 KB -2016-02-13 19:59:07 INFO ComplexDataJackson:34 - -------------------------------------------------------------------------- -2016-02-13 19:59:07 INFO ComplexDataJackson:68 - Generating Map from json Time(ms):: 27264858 -2016-02-13 19:59:07 INFO ComplexDataJackson:81 - Generating Actual Object from json Time(ms):: 18062489 -2016-02-13 19:59:07 INFO ComplexDataJackson:31 - -------Round 2 -2016-02-13 19:59:07 INFO ComplexDataJackson:58 - Json Generation Time(ms):: 1630310 -2016-02-13 19:59:07 INFO ComplexDataJackson:33 - Size of Complex content Jackson :: 10 KB -2016-02-13 19:59:07 INFO ComplexDataJackson:34 - -------------------------------------------------------------------------- -2016-02-13 19:59:07 INFO ComplexDataJackson:68 - Generating Map from json Time(ms):: 876340 -2016-02-13 19:59:07 INFO ComplexDataJackson:81 - Generating Actual Object from json Time(ms):: 1223324 -2016-02-13 19:59:07 INFO ComplexDataJackson:31 - -------Round 3 -2016-02-13 19:59:07 INFO ComplexDataJackson:58 - Json Generation Time(ms):: 907921 -2016-02-13 19:59:07 INFO ComplexDataJackson:33 - Size of Complex content Jackson :: 10 KB -2016-02-13 19:59:07 INFO ComplexDataJackson:34 - -------------------------------------------------------------------------- -2016-02-13 19:59:07 INFO ComplexDataJackson:68 - Generating Map from json Time(ms):: 660019 -2016-02-13 19:59:07 INFO ComplexDataJackson:81 - Generating Actual Object from json Time(ms):: 1451884 -2016-02-13 19:59:07 INFO ComplexDataJackson:31 - -------Round 4 -2016-02-13 19:59:07 INFO ComplexDataJackson:58 - Json Generation Time(ms):: 838445 -2016-02-13 19:59:07 INFO ComplexDataJackson:33 - Size of Complex content Jackson :: 10 KB -2016-02-13 19:59:07 INFO ComplexDataJackson:34 - -------------------------------------------------------------------------- -2016-02-13 19:59:07 INFO ComplexDataJackson:68 - Generating Map from json Time(ms):: 886999 -2016-02-13 19:59:07 INFO ComplexDataJackson:81 - Generating Actual Object from json Time(ms):: 1187797 -2016-02-13 19:59:07 INFO ComplexDataJackson:31 - -------Round 5 -2016-02-13 19:59:07 INFO ComplexDataJackson:58 - Json Generation Time(ms):: 768970 -2016-02-13 19:59:07 INFO ComplexDataJackson:33 - Size of Complex content Jackson :: 10 KB -2016-02-13 19:59:07 INFO ComplexDataJackson:34 - -------------------------------------------------------------------------- -2016-02-13 19:59:07 INFO ComplexDataJackson:68 - Generating Map from json Time(ms):: 577122 -2016-02-13 19:59:07 INFO ComplexDataJackson:81 - Generating Actual Object from json Time(ms):: 858972 -2016-02-13 19:59:07 INFO ComplexDataJackson:31 - -------Round 6 -2016-02-13 19:59:07 INFO ComplexDataJackson:58 - Json Generation Time(ms):: 756732 -2016-02-13 19:59:07 INFO ComplexDataJackson:33 - Size of Complex content Jackson :: 10 KB -2016-02-13 19:59:07 INFO ComplexDataJackson:34 - -------------------------------------------------------------------------- -2016-02-13 19:59:07 INFO ComplexDataJackson:68 - Generating Map from json Time(ms):: 626465 -2016-02-13 19:59:07 INFO ComplexDataJackson:81 - Generating Actual Object from json Time(ms):: 878709 -2016-02-13 19:59:07 INFO ComplexDataJackson:31 - -------Round 7 -2016-02-13 19:59:07 INFO ComplexDataJackson:58 - Json Generation Time(ms):: 616992 -2016-02-13 19:59:07 INFO ComplexDataJackson:33 - Size of Complex content Jackson :: 10 KB -2016-02-13 19:59:07 INFO ComplexDataJackson:34 - -------------------------------------------------------------------------- -2016-02-13 19:59:07 INFO ComplexDataJackson:68 - Generating Map from json Time(ms):: 414486 -2016-02-13 19:59:07 INFO ComplexDataJackson:81 - Generating Actual Object from json Time(ms):: 779628 -2016-02-13 19:59:07 INFO ComplexDataJackson:31 - -------Round 8 -2016-02-13 19:59:07 INFO ComplexDataJackson:58 - Json Generation Time(ms):: 519093 -2016-02-13 19:59:07 INFO ComplexDataJackson:33 - Size of Complex content Jackson :: 10 KB -2016-02-13 19:59:07 INFO ComplexDataJackson:34 - -------------------------------------------------------------------------- -2016-02-13 19:59:07 INFO ComplexDataJackson:68 - Generating Map from json Time(ms):: 480408 -2016-02-13 19:59:07 INFO ComplexDataJackson:81 - Generating Actual Object from json Time(ms):: 596859 -2016-02-13 19:59:07 INFO ComplexDataJackson:31 - -------Round 9 -2016-02-13 19:59:07 INFO ComplexDataJackson:58 - Json Generation Time(ms):: 482382 -2016-02-13 19:59:07 INFO ComplexDataJackson:33 - Size of Complex content Jackson :: 10 KB -2016-02-13 19:59:07 INFO ComplexDataJackson:34 - -------------------------------------------------------------------------- -2016-02-13 19:59:07 INFO ComplexDataJackson:68 - Generating Map from json Time(ms):: 552647 -2016-02-13 19:59:07 INFO ComplexDataJackson:81 - Generating Actual Object from json Time(ms):: 594096 -2016-02-13 19:59:07 INFO ComplexDataJackson:31 - -------Round 10 -2016-02-13 19:59:07 INFO ComplexDataJackson:58 - Json Generation Time(ms):: 392774 -2016-02-13 19:59:07 INFO ComplexDataJackson:33 - Size of Complex content Jackson :: 10 KB -2016-02-13 19:59:07 INFO ComplexDataJackson:34 - -------------------------------------------------------------------------- -2016-02-13 19:59:07 INFO ComplexDataJackson:68 - Generating Map from json Time(ms):: 337904 -2016-02-13 19:59:07 INFO ComplexDataJackson:81 - Generating Actual Object from json Time(ms):: 966344 -2016-02-13 19:59:07 INFO ComplexDataJackson:31 - -------Round 11 -2016-02-13 19:59:07 INFO ComplexDataJackson:58 - Json Generation Time(ms):: 430671 -2016-02-13 19:59:07 INFO ComplexDataJackson:33 - Size of Complex content Jackson :: 10 KB -2016-02-13 19:59:07 INFO ComplexDataJackson:34 - -------------------------------------------------------------------------- -2016-02-13 19:59:07 INFO ComplexDataJackson:68 - Generating Map from json Time(ms):: 416065 -2016-02-13 19:59:07 INFO ComplexDataJackson:81 - Generating Actual Object from json Time(ms):: 546726 -2016-02-13 19:59:07 INFO ComplexDataJackson:31 - -------Round 12 -2016-02-13 19:59:07 INFO ComplexDataJackson:58 - Json Generation Time(ms):: 353695 -2016-02-13 19:59:07 INFO ComplexDataJackson:33 - Size of Complex content Jackson :: 10 KB -2016-02-13 19:59:07 INFO ComplexDataJackson:34 - -------------------------------------------------------------------------- -2016-02-13 19:59:07 INFO ComplexDataJackson:68 - Generating Map from json Time(ms):: 292508 -2016-02-13 19:59:07 INFO ComplexDataJackson:81 - Generating Actual Object from json Time(ms):: 297245 -2016-02-13 19:59:07 INFO ComplexDataJackson:31 - -------Round 13 -2016-02-13 19:59:07 INFO ComplexDataJackson:58 - Json Generation Time(ms):: 396722 -2016-02-13 19:59:07 INFO ComplexDataJackson:33 - Size of Complex content Jackson :: 10 KB -2016-02-13 19:59:07 INFO ComplexDataJackson:34 - -------------------------------------------------------------------------- -2016-02-13 19:59:07 INFO ComplexDataJackson:68 - Generating Map from json Time(ms):: 341852 -2016-02-13 19:59:07 INFO ComplexDataJackson:81 - Generating Actual Object from json Time(ms):: 420407 -2016-02-13 19:59:07 INFO ComplexDataJackson:31 - -------Round 14 -2016-02-13 19:59:07 INFO ComplexDataJackson:58 - Json Generation Time(ms):: 357247 -2016-02-13 19:59:07 INFO ComplexDataJackson:33 - Size of Complex content Jackson :: 10 KB -2016-02-13 19:59:07 INFO ComplexDataJackson:34 - -------------------------------------------------------------------------- -2016-02-13 19:59:07 INFO ComplexDataJackson:68 - Generating Map from json Time(ms):: 354089 -2016-02-13 19:59:07 INFO ComplexDataJackson:81 - Generating Actual Object from json Time(ms):: 410143 -2016-02-13 19:59:07 INFO ComplexDataJackson:31 - -------Round 15 -2016-02-13 19:59:07 INFO ComplexDataJackson:58 - Json Generation Time(ms):: 382906 -2016-02-13 19:59:07 INFO ComplexDataJackson:33 - Size of Complex content Jackson :: 10 KB -2016-02-13 19:59:07 INFO ComplexDataJackson:34 - -------------------------------------------------------------------------- -2016-02-13 19:59:07 INFO ComplexDataJackson:68 - Generating Map from json Time(ms):: 279087 -2016-02-13 19:59:07 INFO ComplexDataJackson:81 - Generating Actual Object from json Time(ms):: 433039 -2016-02-13 19:59:07 INFO ComplexDataJackson:31 - -------Round 16 -2016-02-13 19:59:07 INFO ComplexDataJackson:58 - Json Generation Time(ms):: 728310 -2016-02-13 19:59:07 INFO ComplexDataJackson:33 - Size of Complex content Jackson :: 10 KB -2016-02-13 19:59:07 INFO ComplexDataJackson:34 - -------------------------------------------------------------------------- -2016-02-13 19:59:07 INFO ComplexDataJackson:68 - Generating Map from json Time(ms):: 713705 -2016-02-13 19:59:07 INFO ComplexDataJackson:81 - Generating Actual Object from json Time(ms):: 1305037 -2016-02-13 19:59:07 INFO ComplexDataJackson:31 - -------Round 17 -2016-02-13 19:59:07 INFO ComplexDataJackson:58 - Json Generation Time(ms):: 318167 -2016-02-13 19:59:07 INFO ComplexDataJackson:33 - Size of Complex content Jackson :: 10 KB -2016-02-13 19:59:07 INFO ComplexDataJackson:34 - -------------------------------------------------------------------------- -2016-02-13 19:59:07 INFO ComplexDataJackson:68 - Generating Map from json Time(ms):: 288166 -2016-02-13 19:59:07 INFO ComplexDataJackson:81 - Generating Actual Object from json Time(ms):: 445670 -2016-02-13 19:59:07 INFO ComplexDataJackson:31 - -------Round 18 -2016-02-13 19:59:07 INFO ComplexDataJackson:58 - Json Generation Time(ms):: 246718 -2016-02-13 19:59:07 INFO ComplexDataJackson:33 - Size of Complex content Jackson :: 10 KB -2016-02-13 19:59:07 INFO ComplexDataJackson:34 - -------------------------------------------------------------------------- -2016-02-13 19:59:07 INFO ComplexDataJackson:68 - Generating Map from json Time(ms):: 287377 -2016-02-13 19:59:07 INFO ComplexDataJackson:81 - Generating Actual Object from json Time(ms):: 453566 -2016-02-13 19:59:07 INFO ComplexDataJackson:31 - -------Round 19 -2016-02-13 19:59:07 INFO ComplexDataJackson:58 - Json Generation Time(ms):: 250270 -2016-02-13 19:59:07 INFO ComplexDataJackson:33 - Size of Complex content Jackson :: 10 KB -2016-02-13 19:59:07 INFO ComplexDataJackson:34 - -------------------------------------------------------------------------- -2016-02-13 19:59:07 INFO ComplexDataJackson:68 - Generating Map from json Time(ms):: 286587 -2016-02-13 19:59:07 INFO ComplexDataJackson:81 - Generating Actual Object from json Time(ms):: 469356 -2016-02-13 19:59:07 INFO ComplexDataJackson:31 - -------Round 20 -2016-02-13 19:59:07 INFO ComplexDataJackson:58 - Json Generation Time(ms):: 234875 -2016-02-13 19:59:07 INFO ComplexDataJackson:33 - Size of Complex content Jackson :: 10 KB -2016-02-13 19:59:07 INFO ComplexDataJackson:34 - -------------------------------------------------------------------------- -2016-02-13 19:59:07 INFO ComplexDataJackson:68 - Generating Map from json Time(ms):: 286981 -2016-02-13 19:59:07 INFO ComplexDataJackson:81 - Generating Actual Object from json Time(ms):: 459487 -2016-02-13 19:59:07 INFO ComplexDataJackson:31 - -------Round 21 -2016-02-13 19:59:07 INFO ComplexDataJackson:58 - Json Generation Time(ms):: 255007 -2016-02-13 19:59:07 INFO ComplexDataJackson:33 - Size of Complex content Jackson :: 10 KB -2016-02-13 19:59:07 INFO ComplexDataJackson:34 - -------------------------------------------------------------------------- -2016-02-13 19:59:07 INFO ComplexDataJackson:68 - Generating Map from json Time(ms):: 350536 -2016-02-13 19:59:07 INFO ComplexDataJackson:81 - Generating Actual Object from json Time(ms):: 620544 -2016-02-13 19:59:07 INFO ComplexDataJackson:31 - -------Round 22 -2016-02-13 19:59:07 INFO ComplexDataJackson:58 - Json Generation Time(ms):: 265666 -2016-02-13 19:59:07 INFO ComplexDataJackson:33 - Size of Complex content Jackson :: 10 KB -2016-02-13 19:59:07 INFO ComplexDataJackson:34 - -------------------------------------------------------------------------- -2016-02-13 19:59:07 INFO ComplexDataJackson:68 - Generating Map from json Time(ms):: 309087 -2016-02-13 19:59:07 INFO ComplexDataJackson:81 - Generating Actual Object from json Time(ms):: 545937 -2016-02-13 19:59:07 INFO ComplexDataJackson:31 - -------Round 23 -2016-02-13 19:59:07 INFO ComplexDataJackson:58 - Json Generation Time(ms):: 235270 -2016-02-13 19:59:07 INFO ComplexDataJackson:33 - Size of Complex content Jackson :: 10 KB -2016-02-13 19:59:07 INFO ComplexDataJackson:34 - -------------------------------------------------------------------------- -2016-02-13 19:59:07 INFO ComplexDataJackson:68 - Generating Map from json Time(ms):: 250270 -2016-02-13 19:59:07 INFO ComplexDataJackson:81 - Generating Actual Object from json Time(ms):: 411328 -2016-02-13 19:59:07 INFO ComplexDataJackson:31 - -------Round 24 -2016-02-13 19:59:07 INFO ComplexDataJackson:58 - Json Generation Time(ms):: 254218 -2016-02-13 19:59:07 INFO ComplexDataJackson:33 - Size of Complex content Jackson :: 10 KB -2016-02-13 19:59:07 INFO ComplexDataJackson:34 - -------------------------------------------------------------------------- -2016-02-13 19:59:07 INFO ComplexDataJackson:68 - Generating Map from json Time(ms):: 236059 -2016-02-13 19:59:07 INFO ComplexDataJackson:81 - Generating Actual Object from json Time(ms):: 394353 -2016-02-13 19:59:07 INFO ComplexDataJackson:31 - -------Round 25 -2016-02-13 19:59:07 INFO ComplexDataJackson:58 - Json Generation Time(ms):: 203690 -2016-02-13 19:59:07 INFO ComplexDataJackson:33 - Size of Complex content Jackson :: 10 KB -2016-02-13 19:59:07 INFO ComplexDataJackson:34 - -------------------------------------------------------------------------- -2016-02-13 19:59:07 INFO ComplexDataJackson:68 - Generating Map from json Time(ms):: 247508 -2016-02-13 19:59:07 INFO ComplexDataJackson:81 - Generating Actual Object from json Time(ms):: 196585 -2016-02-13 19:59:07 INFO ComplexDataJackson:31 - -------Round 26 -2016-02-13 19:59:07 INFO ComplexDataJackson:58 - Json Generation Time(ms):: 244349 -2016-02-13 19:59:07 INFO ComplexDataJackson:33 - Size of Complex content Jackson :: 10 KB -2016-02-13 19:59:07 INFO ComplexDataJackson:34 - -------------------------------------------------------------------------- -2016-02-13 19:59:07 INFO ComplexDataJackson:68 - Generating Map from json Time(ms):: 243954 -2016-02-13 19:59:07 INFO ComplexDataJackson:81 - Generating Actual Object from json Time(ms):: 213953 -2016-02-13 19:59:07 INFO ComplexDataJackson:31 - -------Round 27 -2016-02-13 19:59:08 INFO ComplexDataJackson:58 - Json Generation Time(ms):: 176058 -2016-02-13 19:59:08 INFO ComplexDataJackson:33 - Size of Complex content Jackson :: 10 KB -2016-02-13 19:59:08 INFO ComplexDataJackson:34 - -------------------------------------------------------------------------- -2016-02-13 19:59:08 INFO ComplexDataJackson:68 - Generating Map from json Time(ms):: 167373 -2016-02-13 19:59:08 INFO ComplexDataJackson:81 - Generating Actual Object from json Time(ms):: 436986 -2016-02-13 19:59:08 INFO ComplexDataJackson:31 - -------Round 28 -2016-02-13 19:59:08 INFO ComplexDataJackson:58 - Json Generation Time(ms):: 287377 -2016-02-13 19:59:08 INFO ComplexDataJackson:33 - Size of Complex content Jackson :: 10 KB -2016-02-13 19:59:08 INFO ComplexDataJackson:34 - -------------------------------------------------------------------------- -2016-02-13 19:59:08 INFO ComplexDataJackson:68 - Generating Map from json Time(ms):: 275534 -2016-02-13 19:59:08 INFO ComplexDataJackson:81 - Generating Actual Object from json Time(ms):: 302377 -2016-02-13 19:59:08 INFO ComplexDataJackson:31 - -------Round 29 -2016-02-13 19:59:08 INFO ComplexDataJackson:58 - Json Generation Time(ms):: 258560 -2016-02-13 19:59:08 INFO ComplexDataJackson:33 - Size of Complex content Jackson :: 10 KB -2016-02-13 19:59:08 INFO ComplexDataJackson:34 - -------------------------------------------------------------------------- -2016-02-13 19:59:08 INFO ComplexDataJackson:68 - Generating Map from json Time(ms):: 164216 -2016-02-13 19:59:08 INFO ComplexDataJackson:81 - Generating Actual Object from json Time(ms):: 268034 -2016-02-13 19:59:08 INFO ComplexDataJackson:31 - -------Round 30 -2016-02-13 19:59:08 INFO ComplexDataJackson:58 - Json Generation Time(ms):: 148031 -2016-02-13 19:59:08 INFO ComplexDataJackson:33 - Size of Complex content Jackson :: 10 KB -2016-02-13 19:59:08 INFO ComplexDataJackson:34 - -------------------------------------------------------------------------- -2016-02-13 19:59:08 INFO ComplexDataJackson:68 - Generating Map from json Time(ms):: 152373 -2016-02-13 19:59:08 INFO ComplexDataJackson:81 - Generating Actual Object from json Time(ms):: 201321 -2016-02-13 19:59:08 INFO ComplexDataJackson:31 - -------Round 31 -2016-02-13 19:59:08 INFO ComplexDataJackson:58 - Json Generation Time(ms):: 232112 -2016-02-13 19:59:08 INFO ComplexDataJackson:33 - Size of Complex content Jackson :: 10 KB -2016-02-13 19:59:08 INFO ComplexDataJackson:34 - -------------------------------------------------------------------------- -2016-02-13 19:59:08 INFO ComplexDataJackson:68 - Generating Map from json Time(ms):: 307114 -2016-02-13 19:59:08 INFO ComplexDataJackson:81 - Generating Actual Object from json Time(ms):: 332378 -2016-02-13 19:59:08 INFO ComplexDataJackson:31 - -------Round 32 -2016-02-13 19:59:08 INFO ComplexDataJackson:58 - Json Generation Time(ms):: 325272 -2016-02-13 19:59:08 INFO ComplexDataJackson:33 - Size of Complex content Jackson :: 10 KB -2016-02-13 19:59:08 INFO ComplexDataJackson:34 - -------------------------------------------------------------------------- -2016-02-13 19:59:08 INFO ComplexDataJackson:68 - Generating Map from json Time(ms):: 249086 -2016-02-13 19:59:08 INFO ComplexDataJackson:81 - Generating Actual Object from json Time(ms):: 335536 -2016-02-13 19:59:08 INFO ComplexDataJackson:31 - -------Round 33 -2016-02-13 19:59:08 INFO ComplexDataJackson:58 - Json Generation Time(ms):: 232507 -2016-02-13 19:59:08 INFO ComplexDataJackson:33 - Size of Complex content Jackson :: 10 KB -2016-02-13 19:59:08 INFO ComplexDataJackson:34 - -------------------------------------------------------------------------- -2016-02-13 19:59:08 INFO ComplexDataJackson:68 - Generating Map from json Time(ms):: 262113 -2016-02-13 19:59:08 INFO ComplexDataJackson:81 - Generating Actual Object from json Time(ms):: 325667 -2016-02-13 19:59:08 INFO ComplexDataJackson:31 - -------Round 34 -2016-02-13 19:59:08 INFO ComplexDataJackson:58 - Json Generation Time(ms):: 256587 -2016-02-13 19:59:08 INFO ComplexDataJackson:33 - Size of Complex content Jackson :: 10 KB -2016-02-13 19:59:08 INFO ComplexDataJackson:34 - -------------------------------------------------------------------------- -2016-02-13 19:59:08 INFO ComplexDataJackson:68 - Generating Map from json Time(ms):: 269613 -2016-02-13 19:59:08 INFO ComplexDataJackson:81 - Generating Actual Object from json Time(ms):: 313825 -2016-02-13 19:59:08 INFO ComplexDataJackson:31 - -------Round 35 -2016-02-13 19:59:08 INFO ComplexDataJackson:58 - Json Generation Time(ms):: 230532 -2016-02-13 19:59:08 INFO ComplexDataJackson:33 - Size of Complex content Jackson :: 10 KB -2016-02-13 19:59:08 INFO ComplexDataJackson:34 - -------------------------------------------------------------------------- -2016-02-13 19:59:08 INFO ComplexDataJackson:68 - Generating Map from json Time(ms):: 242375 -2016-02-13 19:59:08 INFO ComplexDataJackson:81 - Generating Actual Object from json Time(ms):: 267244 -2016-02-13 19:59:08 INFO ComplexDataJackson:31 - -------Round 36 -2016-02-13 19:59:08 INFO ComplexDataJackson:58 - Json Generation Time(ms):: 223032 -2016-02-13 19:59:08 INFO ComplexDataJackson:33 - Size of Complex content Jackson :: 10 KB -2016-02-13 19:59:08 INFO ComplexDataJackson:34 - -------------------------------------------------------------------------- -2016-02-13 19:59:08 INFO ComplexDataJackson:68 - Generating Map from json Time(ms):: 227375 -2016-02-13 19:59:08 INFO ComplexDataJackson:81 - Generating Actual Object from json Time(ms):: 287377 -2016-02-13 19:59:08 INFO ComplexDataJackson:31 - -------Round 37 -2016-02-13 19:59:08 INFO ComplexDataJackson:58 - Json Generation Time(ms):: 157899 -2016-02-13 19:59:08 INFO ComplexDataJackson:33 - Size of Complex content Jackson :: 10 KB -2016-02-13 19:59:08 INFO ComplexDataJackson:34 - -------------------------------------------------------------------------- -2016-02-13 19:59:08 INFO ComplexDataJackson:68 - Generating Map from json Time(ms):: 159084 -2016-02-13 19:59:08 INFO ComplexDataJackson:81 - Generating Actual Object from json Time(ms):: 285403 -2016-02-13 19:59:08 INFO ComplexDataJackson:31 - -------Round 38 -2016-02-13 19:59:08 INFO ComplexDataJackson:58 - Json Generation Time(ms):: 249086 -2016-02-13 19:59:08 INFO ComplexDataJackson:33 - Size of Complex content Jackson :: 10 KB -2016-02-13 19:59:08 INFO ComplexDataJackson:34 - -------------------------------------------------------------------------- -2016-02-13 19:59:08 INFO ComplexDataJackson:68 - Generating Map from json Time(ms):: 243165 -2016-02-13 19:59:08 INFO ComplexDataJackson:81 - Generating Actual Object from json Time(ms):: 312640 -2016-02-13 19:59:08 INFO ComplexDataJackson:31 - -------Round 39 -2016-02-13 19:59:08 INFO ComplexDataJackson:58 - Json Generation Time(ms):: 149610 -2016-02-13 19:59:08 INFO ComplexDataJackson:33 - Size of Complex content Jackson :: 10 KB -2016-02-13 19:59:08 INFO ComplexDataJackson:34 - -------------------------------------------------------------------------- -2016-02-13 19:59:08 INFO ComplexDataJackson:68 - Generating Map from json Time(ms):: 244349 -2016-02-13 19:59:08 INFO ComplexDataJackson:81 - Generating Actual Object from json Time(ms):: 298429 -2016-02-13 19:59:08 INFO ComplexDataJackson:31 - -------Round 40 -2016-02-13 19:59:08 INFO ComplexDataJackson:58 - Json Generation Time(ms):: 190268 -2016-02-13 19:59:08 INFO ComplexDataJackson:33 - Size of Complex content Jackson :: 10 KB -2016-02-13 19:59:08 INFO ComplexDataJackson:34 - -------------------------------------------------------------------------- -2016-02-13 19:59:08 INFO ComplexDataJackson:68 - Generating Map from json Time(ms):: 564095 -2016-02-13 19:59:08 INFO ComplexDataJackson:81 - Generating Actual Object from json Time(ms):: 287772 -2016-02-13 19:59:08 INFO ComplexDataJackson:31 - -------Round 41 -2016-02-13 19:59:08 INFO ComplexDataJackson:58 - Json Generation Time(ms):: 216322 -2016-02-13 19:59:08 INFO ComplexDataJackson:33 - Size of Complex content Jackson :: 10 KB -2016-02-13 19:59:08 INFO ComplexDataJackson:34 - -------------------------------------------------------------------------- -2016-02-13 19:59:08 INFO ComplexDataJackson:68 - Generating Map from json Time(ms):: 166583 -2016-02-13 19:59:08 INFO ComplexDataJackson:81 - Generating Actual Object from json Time(ms):: 290534 -2016-02-13 19:59:08 INFO ComplexDataJackson:31 - -------Round 42 -2016-02-13 19:59:08 INFO ComplexDataJackson:58 - Json Generation Time(ms):: 205269 -2016-02-13 19:59:08 INFO ComplexDataJackson:33 - Size of Complex content Jackson :: 10 KB -2016-02-13 19:59:08 INFO ComplexDataJackson:34 - -------------------------------------------------------------------------- -2016-02-13 19:59:08 INFO ComplexDataJackson:68 - Generating Map from json Time(ms):: 215532 -2016-02-13 19:59:08 INFO ComplexDataJackson:81 - Generating Actual Object from json Time(ms):: 279482 -2016-02-13 19:59:08 INFO ComplexDataJackson:31 - -------Round 43 -2016-02-13 19:59:08 INFO ComplexDataJackson:58 - Json Generation Time(ms):: 164215 -2016-02-13 19:59:08 INFO ComplexDataJackson:33 - Size of Complex content Jackson :: 10 KB -2016-02-13 19:59:08 INFO ComplexDataJackson:34 - -------------------------------------------------------------------------- -2016-02-13 19:59:08 INFO ComplexDataJackson:68 - Generating Map from json Time(ms):: 248297 -2016-02-13 19:59:08 INFO ComplexDataJackson:81 - Generating Actual Object from json Time(ms):: 283823 -2016-02-13 19:59:08 INFO ComplexDataJackson:31 - -------Round 44 -2016-02-13 19:59:08 INFO ComplexDataJackson:58 - Json Generation Time(ms):: 211190 -2016-02-13 19:59:08 INFO ComplexDataJackson:33 - Size of Complex content Jackson :: 10 KB -2016-02-13 19:59:08 INFO ComplexDataJackson:34 - -------------------------------------------------------------------------- -2016-02-13 19:59:08 INFO ComplexDataJackson:68 - Generating Map from json Time(ms):: 204479 -2016-02-13 19:59:08 INFO ComplexDataJackson:81 - Generating Actual Object from json Time(ms):: 328825 -2016-02-13 19:59:08 INFO ComplexDataJackson:31 - -------Round 45 -2016-02-13 19:59:08 INFO ComplexDataJackson:58 - Json Generation Time(ms):: 238822 -2016-02-13 19:59:08 INFO ComplexDataJackson:33 - Size of Complex content Jackson :: 10 KB -2016-02-13 19:59:08 INFO ComplexDataJackson:34 - -------------------------------------------------------------------------- -2016-02-13 19:59:08 INFO ComplexDataJackson:68 - Generating Map from json Time(ms):: 240007 -2016-02-13 19:59:08 INFO ComplexDataJackson:81 - Generating Actual Object from json Time(ms):: 262902 -2016-02-13 19:59:08 INFO ComplexDataJackson:31 - -------Round 46 -2016-02-13 19:59:08 INFO ComplexDataJackson:58 - Json Generation Time(ms):: 241586 -2016-02-13 19:59:08 INFO ComplexDataJackson:33 - Size of Complex content Jackson :: 10 KB -2016-02-13 19:59:08 INFO ComplexDataJackson:34 - -------------------------------------------------------------------------- -2016-02-13 19:59:08 INFO ComplexDataJackson:68 - Generating Map from json Time(ms):: 238033 -2016-02-13 19:59:08 INFO ComplexDataJackson:81 - Generating Actual Object from json Time(ms):: 281060 -2016-02-13 19:59:08 INFO ComplexDataJackson:31 - -------Round 47 -2016-02-13 19:59:08 INFO ComplexDataJackson:58 - Json Generation Time(ms):: 215532 -2016-02-13 19:59:08 INFO ComplexDataJackson:33 - Size of Complex content Jackson :: 10 KB -2016-02-13 19:59:08 INFO ComplexDataJackson:34 - -------------------------------------------------------------------------- -2016-02-13 19:59:08 INFO ComplexDataJackson:68 - Generating Map from json Time(ms):: 258165 -2016-02-13 19:59:08 INFO ComplexDataJackson:81 - Generating Actual Object from json Time(ms):: 262113 -2016-02-13 19:59:08 INFO ComplexDataJackson:31 - -------Round 48 -2016-02-13 19:59:08 INFO ComplexDataJackson:58 - Json Generation Time(ms):: 142109 -2016-02-13 19:59:08 INFO ComplexDataJackson:33 - Size of Complex content Jackson :: 10 KB -2016-02-13 19:59:08 INFO ComplexDataJackson:34 - -------------------------------------------------------------------------- -2016-02-13 19:59:08 INFO ComplexDataJackson:68 - Generating Map from json Time(ms):: 125924 -2016-02-13 19:59:08 INFO ComplexDataJackson:81 - Generating Actual Object from json Time(ms):: 163426 -2016-02-13 19:59:08 INFO ComplexDataJackson:31 - -------Round 49 -2016-02-13 19:59:09 INFO ComplexDataJackson:58 - Json Generation Time(ms):: 148030 -2016-02-13 19:59:09 INFO ComplexDataJackson:33 - Size of Complex content Jackson :: 10 KB -2016-02-13 19:59:09 INFO ComplexDataJackson:34 - -------------------------------------------------------------------------- -2016-02-13 19:59:09 INFO ComplexDataJackson:68 - Generating Map from json Time(ms):: 233296 -2016-02-13 19:59:09 INFO ComplexDataJackson:81 - Generating Actual Object from json Time(ms):: 225006 -2016-02-13 19:59:09 INFO ComplexDataJackson:31 - -------Round 50 -2016-02-13 19:59:09 INFO ComplexDataJackson:58 - Json Generation Time(ms):: 219086 -2016-02-13 19:59:09 INFO ComplexDataJackson:33 - Size of Complex content Jackson :: 10 KB -2016-02-13 19:59:09 INFO ComplexDataJackson:34 - -------------------------------------------------------------------------- -2016-02-13 19:59:09 INFO ComplexDataJackson:68 - Generating Map from json Time(ms):: 135004 -2016-02-13 19:59:09 INFO ComplexDataJackson:81 - Generating Actual Object from json Time(ms):: 176453 -2016-02-13 19:59:09 INFO ComplexDataJackson:43 - -------------------------------------------------------------------------- -2016-02-13 19:59:09 INFO ComplexDataJackson:44 - Average Time to Generate JSON : 1711896 -2016-02-13 19:59:09 INFO ComplexDataJackson:45 - Average Time to Parse JSON To Map : 869085 -2016-02-13 19:59:09 INFO ComplexDataJackson:46 - Average Time to Parse JSON To Actual Object : 820641 -2016-02-13 19:59:09 INFO ComplexDataJackson:47 - -------------------------------------------------------------------------- diff --git a/gson-jackson-performance/logs_Performance/log4j-application complex Gson Jackson 250mb 10R.log b/gson-jackson-performance/logs_Performance/log4j-application complex Gson Jackson 250mb 10R.log deleted file mode 100644 index 11e7aa481b..0000000000 --- a/gson-jackson-performance/logs_Performance/log4j-application complex Gson Jackson 250mb 10R.log +++ /dev/null @@ -1,151 +0,0 @@ -2016-02-14 07:09:34 INFO ComplexDataGson:27 - -------Round 1 -2016-02-14 07:13:19 INFO ComplexDataGson:27 - -------Round 1 -2016-02-14 07:13:26 INFO ComplexDataGson:54 - Json Generation Time(ms):: 3300743982 -2016-02-14 07:13:27 INFO ComplexDataGson:29 - Size of Complex content Jackson :: 250 MB -2016-02-14 07:13:27 INFO ComplexDataGson:30 - -------------------------------------------------------------------------- -2016-02-14 07:13:31 INFO ComplexDataGson:64 - Generating Map from json Time(ms):: 3791867873 -2016-02-14 07:13:31 INFO ComplexDataGson:65 - -------------------------------------------------------------------------- -2016-02-14 07:13:38 INFO ComplexDataGson:76 - Generating Actual Object from json Time(ms):: 2877543214 -2016-02-14 07:13:38 INFO ComplexDataGson:77 - -------------------------------------------------------------------------- -2016-02-14 07:13:42 INFO ComplexDataGson:27 - -------Round 2 -2016-02-14 07:13:49 INFO ComplexDataGson:54 - Json Generation Time(ms):: 3081464563 -2016-02-14 07:13:50 INFO ComplexDataGson:29 - Size of Complex content Jackson :: 250 MB -2016-02-14 07:13:50 INFO ComplexDataGson:30 - -------------------------------------------------------------------------- -2016-02-14 07:13:53 INFO ComplexDataGson:64 - Generating Map from json Time(ms):: 3414915004 -2016-02-14 07:13:53 INFO ComplexDataGson:65 - -------------------------------------------------------------------------- -2016-02-14 07:13:59 INFO ComplexDataGson:76 - Generating Actual Object from json Time(ms):: 2745001008 -2016-02-14 07:13:59 INFO ComplexDataGson:77 - -------------------------------------------------------------------------- -2016-02-14 07:14:02 INFO ComplexDataGson:27 - -------Round 3 -2016-02-14 07:14:07 INFO ComplexDataGson:54 - Json Generation Time(ms):: 2452611871 -2016-02-14 07:14:08 INFO ComplexDataGson:29 - Size of Complex content Jackson :: 250 MB -2016-02-14 07:14:08 INFO ComplexDataGson:30 - -------------------------------------------------------------------------- -2016-02-14 07:14:13 INFO ComplexDataGson:64 - Generating Map from json Time(ms):: 5147569477 -2016-02-14 07:14:13 INFO ComplexDataGson:65 - -------------------------------------------------------------------------- -2016-02-14 07:14:49 INFO ComplexDataGson:76 - Generating Actual Object from json Time(ms):: 5151814203 -2016-02-14 07:14:49 INFO ComplexDataGson:77 - -------------------------------------------------------------------------- -2016-02-14 07:14:53 INFO ComplexDataGson:27 - -------Round 4 -2016-02-14 07:14:58 INFO ComplexDataGson:54 - Json Generation Time(ms):: 2499724269 -2016-02-14 07:14:59 INFO ComplexDataGson:29 - Size of Complex content Jackson :: 250 MB -2016-02-14 07:14:59 INFO ComplexDataGson:30 - -------------------------------------------------------------------------- -2016-02-14 07:15:23 INFO ComplexDataGson:64 - Generating Map from json Time(ms):: 23671387986 -2016-02-14 07:15:23 INFO ComplexDataGson:65 - -------------------------------------------------------------------------- -2016-02-14 07:16:30 INFO ComplexDataGson:76 - Generating Actual Object from json Time(ms):: 2889390000 -2016-02-14 07:16:30 INFO ComplexDataGson:77 - -------------------------------------------------------------------------- -2016-02-14 07:16:34 INFO ComplexDataGson:27 - -------Round 5 -2016-02-14 07:16:39 INFO ComplexDataGson:54 - Json Generation Time(ms):: 2421770990 -2016-02-14 07:16:40 INFO ComplexDataGson:29 - Size of Complex content Jackson :: 250 MB -2016-02-14 07:16:40 INFO ComplexDataGson:30 - -------------------------------------------------------------------------- -2016-02-14 07:16:45 INFO ComplexDataGson:64 - Generating Map from json Time(ms):: 4739247161 -2016-02-14 07:16:45 INFO ComplexDataGson:65 - -------------------------------------------------------------------------- -2016-02-14 07:16:59 INFO ComplexDataGson:76 - Generating Actual Object from json Time(ms):: 2774260133 -2016-02-14 07:16:59 INFO ComplexDataGson:77 - -------------------------------------------------------------------------- -2016-02-14 07:17:02 INFO ComplexDataGson:27 - -------Round 6 -2016-02-14 07:17:08 INFO ComplexDataGson:54 - Json Generation Time(ms):: 2418834853 -2016-02-14 07:17:08 INFO ComplexDataGson:29 - Size of Complex content Jackson :: 250 MB -2016-02-14 07:17:08 INFO ComplexDataGson:30 - -------------------------------------------------------------------------- -2016-02-14 07:17:13 INFO ComplexDataGson:64 - Generating Map from json Time(ms):: 4871088293 -2016-02-14 07:17:13 INFO ComplexDataGson:65 - -------------------------------------------------------------------------- -2016-02-14 07:17:21 INFO ComplexDataGson:76 - Generating Actual Object from json Time(ms):: 2690487083 -2016-02-14 07:17:21 INFO ComplexDataGson:77 - -------------------------------------------------------------------------- -2016-02-14 07:17:25 INFO ComplexDataGson:27 - -------Round 7 -2016-02-14 07:17:30 INFO ComplexDataGson:54 - Json Generation Time(ms):: 2447246454 -2016-02-14 07:17:31 INFO ComplexDataGson:29 - Size of Complex content Jackson :: 250 MB -2016-02-14 07:17:31 INFO ComplexDataGson:30 - -------------------------------------------------------------------------- -2016-02-14 07:17:35 INFO ComplexDataGson:64 - Generating Map from json Time(ms):: 4567768185 -2016-02-14 07:17:35 INFO ComplexDataGson:65 - -------------------------------------------------------------------------- -2016-02-14 07:17:43 INFO ComplexDataGson:76 - Generating Actual Object from json Time(ms):: 2672816184 -2016-02-14 07:17:43 INFO ComplexDataGson:77 - -------------------------------------------------------------------------- -2016-02-14 07:17:46 INFO ComplexDataGson:27 - -------Round 8 -2016-02-14 07:17:51 INFO ComplexDataGson:54 - Json Generation Time(ms):: 2453208335 -2016-02-14 07:17:52 INFO ComplexDataGson:29 - Size of Complex content Jackson :: 250 MB -2016-02-14 07:17:52 INFO ComplexDataGson:30 - -------------------------------------------------------------------------- -2016-02-14 07:17:57 INFO ComplexDataGson:64 - Generating Map from json Time(ms):: 5084245563 -2016-02-14 07:17:57 INFO ComplexDataGson:65 - -------------------------------------------------------------------------- -2016-02-14 07:18:05 INFO ComplexDataGson:76 - Generating Actual Object from json Time(ms):: 2931465412 -2016-02-14 07:18:05 INFO ComplexDataGson:77 - -------------------------------------------------------------------------- -2016-02-14 07:18:08 INFO ComplexDataGson:27 - -------Round 9 -2016-02-14 07:18:14 INFO ComplexDataGson:54 - Json Generation Time(ms):: 2447660150 -2016-02-14 07:18:14 INFO ComplexDataGson:29 - Size of Complex content Jackson :: 250 MB -2016-02-14 07:18:14 INFO ComplexDataGson:30 - -------------------------------------------------------------------------- -2016-02-14 07:18:19 INFO ComplexDataGson:64 - Generating Map from json Time(ms):: 4877367551 -2016-02-14 07:18:19 INFO ComplexDataGson:65 - -------------------------------------------------------------------------- -2016-02-14 07:18:26 INFO ComplexDataGson:76 - Generating Actual Object from json Time(ms):: 2738904519 -2016-02-14 07:18:26 INFO ComplexDataGson:77 - -------------------------------------------------------------------------- -2016-02-14 07:18:29 INFO ComplexDataGson:27 - -------Round 10 -2016-02-14 07:18:35 INFO ComplexDataGson:54 - Json Generation Time(ms):: 2463570868 -2016-02-14 07:18:35 INFO ComplexDataGson:29 - Size of Complex content Jackson :: 250 MB -2016-02-14 07:18:35 INFO ComplexDataGson:30 - -------------------------------------------------------------------------- -2016-02-14 07:18:40 INFO ComplexDataGson:64 - Generating Map from json Time(ms):: 4857563433 -2016-02-14 07:18:40 INFO ComplexDataGson:65 - -------------------------------------------------------------------------- -2016-02-14 07:18:47 INFO ComplexDataGson:76 - Generating Actual Object from json Time(ms):: 2706159768 -2016-02-14 07:18:47 INFO ComplexDataGson:77 - -------------------------------------------------------------------------- -2016-02-14 07:18:50 INFO ComplexDataGson:40 - -------------------------------------------------------------------------- -2016-02-14 07:18:52 INFO ComplexDataGson:41 - Average Time to Generate JSON : 2598683633 -2016-02-14 07:18:52 INFO ComplexDataGson:42 - Average Time to Parse JSON To Map : 6502302052 -2016-02-14 07:18:52 INFO ComplexDataGson:43 - Average Time to Parse JSON To Actual Object : 3017784152 -2016-02-14 07:18:52 INFO ComplexDataGson:44 - -------------------------------------------------------------------------- -2016-02-14 07:30:16 INFO ComplexDataJackson:31 - -------Round 1 -2016-02-14 07:30:22 INFO ComplexDataJackson:59 - Json Generation Time(ms):: 1913798065 -2016-02-14 07:30:23 INFO ComplexDataJackson:33 - Size of Complex content Jackson :: 250 MB -2016-02-14 07:30:23 INFO ComplexDataJackson:34 - -------------------------------------------------------------------------- -2016-02-14 07:30:26 INFO ComplexDataJackson:69 - Generating Map from json Time(ms):: 3501212864 -2016-02-14 07:30:33 INFO ComplexDataJackson:82 - Generating Actual Object from json Time(ms):: 2519328644 -2016-02-14 07:30:37 INFO ComplexDataJackson:31 - -------Round 2 -2016-02-14 07:30:41 INFO ComplexDataJackson:59 - Json Generation Time(ms):: 1122079407 -2016-02-14 07:30:42 INFO ComplexDataJackson:33 - Size of Complex content Jackson :: 250 MB -2016-02-14 07:30:42 INFO ComplexDataJackson:34 - -------------------------------------------------------------------------- -2016-02-14 07:30:44 INFO ComplexDataJackson:69 - Generating Map from json Time(ms):: 1650946350 -2016-02-14 07:30:48 INFO ComplexDataJackson:82 - Generating Actual Object from json Time(ms):: 1493836600 -2016-02-14 07:30:51 INFO ComplexDataJackson:31 - -------Round 3 -2016-02-14 07:30:55 INFO ComplexDataJackson:59 - Json Generation Time(ms):: 1056702014 -2016-02-14 07:30:56 INFO ComplexDataJackson:33 - Size of Complex content Jackson :: 250 MB -2016-02-14 07:30:56 INFO ComplexDataJackson:34 - -------------------------------------------------------------------------- -2016-02-14 07:30:58 INFO ComplexDataJackson:69 - Generating Map from json Time(ms):: 1769576448 -2016-02-14 07:31:02 INFO ComplexDataJackson:82 - Generating Actual Object from json Time(ms):: 1515188920 -2016-02-14 07:31:05 INFO ComplexDataJackson:31 - -------Round 4 -2016-02-14 07:31:10 INFO ComplexDataJackson:59 - Json Generation Time(ms):: 1385929835 -2016-02-14 07:31:11 INFO ComplexDataJackson:33 - Size of Complex content Jackson :: 250 MB -2016-02-14 07:31:11 INFO ComplexDataJackson:34 - -------------------------------------------------------------------------- -2016-02-14 07:31:13 INFO ComplexDataJackson:69 - Generating Map from json Time(ms):: 1979048349 -2016-02-14 07:31:17 INFO ComplexDataJackson:82 - Generating Actual Object from json Time(ms):: 1616521550 -2016-02-14 07:31:20 INFO ComplexDataJackson:31 - -------Round 5 -2016-02-14 07:31:24 INFO ComplexDataJackson:59 - Json Generation Time(ms):: 1076380997 -2016-02-14 07:31:25 INFO ComplexDataJackson:33 - Size of Complex content Jackson :: 250 MB -2016-02-14 07:31:25 INFO ComplexDataJackson:34 - -------------------------------------------------------------------------- -2016-02-14 07:31:27 INFO ComplexDataJackson:69 - Generating Map from json Time(ms):: 1786553379 -2016-02-14 07:31:31 INFO ComplexDataJackson:82 - Generating Actual Object from json Time(ms):: 1514234815 -2016-02-14 07:31:34 INFO ComplexDataJackson:31 - -------Round 6 -2016-02-14 07:31:39 INFO ComplexDataJackson:59 - Json Generation Time(ms):: 1068609985 -2016-02-14 07:31:39 INFO ComplexDataJackson:33 - Size of Complex content Jackson :: 250 MB -2016-02-14 07:31:39 INFO ComplexDataJackson:34 - -------------------------------------------------------------------------- -2016-02-14 07:31:42 INFO ComplexDataJackson:69 - Generating Map from json Time(ms):: 2419927122 -2016-02-14 07:31:47 INFO ComplexDataJackson:82 - Generating Actual Object from json Time(ms):: 1525414870 -2016-02-14 07:31:50 INFO ComplexDataJackson:31 - -------Round 7 -2016-02-14 07:31:54 INFO ComplexDataJackson:59 - Json Generation Time(ms):: 1210651015 -2016-02-14 07:31:55 INFO ComplexDataJackson:33 - Size of Complex content Jackson :: 250 MB -2016-02-14 07:31:55 INFO ComplexDataJackson:34 - -------------------------------------------------------------------------- -2016-02-14 07:31:57 INFO ComplexDataJackson:69 - Generating Map from json Time(ms):: 2127036259 -2016-02-14 07:32:03 INFO ComplexDataJackson:82 - Generating Actual Object from json Time(ms):: 2067842595 -2016-02-14 07:32:06 INFO ComplexDataJackson:31 - -------Round 8 -2016-02-14 07:32:10 INFO ComplexDataJackson:59 - Json Generation Time(ms):: 1044809437 -2016-02-14 07:32:10 INFO ComplexDataJackson:33 - Size of Complex content Jackson :: 250 MB -2016-02-14 07:32:10 INFO ComplexDataJackson:34 - -------------------------------------------------------------------------- -2016-02-14 07:32:13 INFO ComplexDataJackson:69 - Generating Map from json Time(ms):: 2159417841 -2016-02-14 07:32:18 INFO ComplexDataJackson:82 - Generating Actual Object from json Time(ms):: 2045629724 -2016-02-14 07:32:21 INFO ComplexDataJackson:31 - -------Round 9 -2016-02-14 07:32:25 INFO ComplexDataJackson:59 - Json Generation Time(ms):: 1063275754 -2016-02-14 07:32:25 INFO ComplexDataJackson:33 - Size of Complex content Jackson :: 250 MB -2016-02-14 07:32:25 INFO ComplexDataJackson:34 - -------------------------------------------------------------------------- -2016-02-14 07:32:28 INFO ComplexDataJackson:69 - Generating Map from json Time(ms):: 2249796606 -2016-02-14 07:32:33 INFO ComplexDataJackson:82 - Generating Actual Object from json Time(ms):: 2037722525 -2016-02-14 07:32:36 INFO ComplexDataJackson:31 - -------Round 10 -2016-02-14 07:32:40 INFO ComplexDataJackson:59 - Json Generation Time(ms):: 1046656069 -2016-02-14 07:32:40 INFO ComplexDataJackson:33 - Size of Complex content Jackson :: 250 MB -2016-02-14 07:32:40 INFO ComplexDataJackson:34 - -------------------------------------------------------------------------- -2016-02-14 07:32:43 INFO ComplexDataJackson:69 - Generating Map from json Time(ms):: 2209315582 -2016-02-14 07:32:48 INFO ComplexDataJackson:82 - Generating Actual Object from json Time(ms):: 2623449380 -2016-02-14 07:32:52 INFO ComplexDataJackson:44 - -------------------------------------------------------------------------- -2016-02-14 07:32:52 INFO ComplexDataJackson:45 - Average Time to Generate JSON : 1198889257 -2016-02-14 07:32:52 INFO ComplexDataJackson:46 - Average Time to Parse JSON To Map : 2185283080 -2016-02-14 07:32:52 INFO ComplexDataJackson:47 - Average Time to Parse JSON To Actual Object : 1895916962 -2016-02-14 07:32:52 INFO ComplexDataJackson:48 - -------------------------------------------------------------------------- diff --git a/gson-jackson-performance/logs_Performance/log4j-application complex Gson Jackson 250mb 50R.log b/gson-jackson-performance/logs_Performance/log4j-application complex Gson Jackson 250mb 50R.log deleted file mode 100644 index f46f494f35..0000000000 --- a/gson-jackson-performance/logs_Performance/log4j-application complex Gson Jackson 250mb 50R.log +++ /dev/null @@ -1,710 +0,0 @@ -2016-02-14 07:40:07 INFO ComplexDataGson:27 - -------Round 1 -2016-02-14 07:40:15 INFO ComplexDataGson:54 - Json Generation Time(ms):: 3797149997 -2016-02-14 07:40:16 INFO ComplexDataGson:29 - Size of Complex content Jackson :: 250 MB -2016-02-14 07:40:16 INFO ComplexDataGson:30 - -------------------------------------------------------------------------- -2016-02-14 07:40:19 INFO ComplexDataGson:64 - Generating Map from json Time(ms):: 3387405404 -2016-02-14 07:40:19 INFO ComplexDataGson:65 - -------------------------------------------------------------------------- -2016-02-14 07:40:27 INFO ComplexDataGson:76 - Generating Actual Object from json Time(ms):: 2878285736 -2016-02-14 07:40:27 INFO ComplexDataGson:77 - -------------------------------------------------------------------------- -2016-02-14 07:40:31 INFO ComplexDataGson:27 - -------Round 2 -2016-02-14 07:40:37 INFO ComplexDataGson:54 - Json Generation Time(ms):: 2490870463 -2016-02-14 07:40:38 INFO ComplexDataGson:29 - Size of Complex content Jackson :: 250 MB -2016-02-14 07:40:38 INFO ComplexDataGson:30 - -------------------------------------------------------------------------- -2016-02-14 07:40:41 INFO ComplexDataGson:64 - Generating Map from json Time(ms):: 3039905087 -2016-02-14 07:40:41 INFO ComplexDataGson:65 - -------------------------------------------------------------------------- -2016-02-14 07:40:47 INFO ComplexDataGson:76 - Generating Actual Object from json Time(ms):: 3045785254 -2016-02-14 07:40:47 INFO ComplexDataGson:77 - -------------------------------------------------------------------------- -2016-02-14 07:40:50 INFO ComplexDataGson:27 - -------Round 3 -2016-02-14 07:40:55 INFO ComplexDataGson:54 - Json Generation Time(ms):: 2523651926 -2016-02-14 07:40:56 INFO ComplexDataGson:29 - Size of Complex content Jackson :: 250 MB -2016-02-14 07:40:56 INFO ComplexDataGson:30 - -------------------------------------------------------------------------- -2016-02-14 07:41:01 INFO ComplexDataGson:64 - Generating Map from json Time(ms):: 4578827448 -2016-02-14 07:41:01 INFO ComplexDataGson:65 - -------------------------------------------------------------------------- -2016-02-14 07:41:23 INFO ComplexDataGson:76 - Generating Actual Object from json Time(ms):: 8280810781 -2016-02-14 07:41:23 INFO ComplexDataGson:77 - -------------------------------------------------------------------------- -2016-02-14 07:41:27 INFO ComplexDataGson:27 - -------Round 4 -2016-02-14 07:41:33 INFO ComplexDataGson:54 - Json Generation Time(ms):: 2370172675 -2016-02-14 07:41:34 INFO ComplexDataGson:29 - Size of Complex content Jackson :: 250 MB -2016-02-14 07:41:34 INFO ComplexDataGson:30 - -------------------------------------------------------------------------- -2016-02-14 07:42:06 INFO ComplexDataGson:64 - Generating Map from json Time(ms):: 32830902935 -2016-02-14 07:42:06 INFO ComplexDataGson:65 - -------------------------------------------------------------------------- -2016-02-14 07:42:14 INFO ComplexDataGson:76 - Generating Actual Object from json Time(ms):: 2791214171 -2016-02-14 07:42:14 INFO ComplexDataGson:77 - -------------------------------------------------------------------------- -2016-02-14 07:42:17 INFO ComplexDataGson:27 - -------Round 5 -2016-02-14 07:42:23 INFO ComplexDataGson:54 - Json Generation Time(ms):: 2517693992 -2016-02-14 07:42:24 INFO ComplexDataGson:29 - Size of Complex content Jackson :: 250 MB -2016-02-14 07:42:24 INFO ComplexDataGson:30 - -------------------------------------------------------------------------- -2016-02-14 07:42:29 INFO ComplexDataGson:64 - Generating Map from json Time(ms):: 4962835649 -2016-02-14 07:42:29 INFO ComplexDataGson:65 - -------------------------------------------------------------------------- -2016-02-14 07:42:40 INFO ComplexDataGson:76 - Generating Actual Object from json Time(ms):: 2876976750 -2016-02-14 07:42:40 INFO ComplexDataGson:77 - -------------------------------------------------------------------------- -2016-02-14 07:42:44 INFO ComplexDataGson:27 - -------Round 6 -2016-02-14 07:42:50 INFO ComplexDataGson:54 - Json Generation Time(ms):: 2983421369 -2016-02-14 07:42:51 INFO ComplexDataGson:29 - Size of Complex content Jackson :: 250 MB -2016-02-14 07:42:51 INFO ComplexDataGson:30 - -------------------------------------------------------------------------- -2016-02-14 07:43:05 INFO ComplexDataGson:64 - Generating Map from json Time(ms):: 13683434909 -2016-02-14 07:43:05 INFO ComplexDataGson:65 - -------------------------------------------------------------------------- -2016-02-14 07:43:16 INFO ComplexDataGson:76 - Generating Actual Object from json Time(ms):: 2770234887 -2016-02-14 07:43:16 INFO ComplexDataGson:77 - -------------------------------------------------------------------------- -2016-02-14 07:43:20 INFO ComplexDataGson:27 - -------Round 7 -2016-02-14 07:43:25 INFO ComplexDataGson:54 - Json Generation Time(ms):: 2405473419 -2016-02-14 07:43:26 INFO ComplexDataGson:29 - Size of Complex content Jackson :: 250 MB -2016-02-14 07:43:26 INFO ComplexDataGson:30 - -------------------------------------------------------------------------- -2016-02-14 07:43:33 INFO ComplexDataGson:64 - Generating Map from json Time(ms):: 6810693016 -2016-02-14 07:43:33 INFO ComplexDataGson:65 - -------------------------------------------------------------------------- -2016-02-14 07:43:42 INFO ComplexDataGson:76 - Generating Actual Object from json Time(ms):: 2768497206 -2016-02-14 07:43:42 INFO ComplexDataGson:77 - -------------------------------------------------------------------------- -2016-02-14 07:43:45 INFO ComplexDataGson:27 - -------Round 8 -2016-02-14 07:43:50 INFO ComplexDataGson:54 - Json Generation Time(ms):: 2374051075 -2016-02-14 07:43:51 INFO ComplexDataGson:29 - Size of Complex content Jackson :: 250 MB -2016-02-14 07:43:51 INFO ComplexDataGson:30 - -------------------------------------------------------------------------- -2016-02-14 07:43:59 INFO ComplexDataGson:64 - Generating Map from json Time(ms):: 7719104349 -2016-02-14 07:43:59 INFO ComplexDataGson:65 - -------------------------------------------------------------------------- -2016-02-14 07:44:58 INFO ComplexDataGson:76 - Generating Actual Object from json Time(ms):: 20399180345 -2016-02-14 07:44:58 INFO ComplexDataGson:77 - -------------------------------------------------------------------------- -2016-02-14 07:45:02 INFO ComplexDataGson:27 - -------Round 9 -2016-02-14 07:45:07 INFO ComplexDataGson:54 - Json Generation Time(ms):: 2533230094 -2016-02-14 07:45:08 INFO ComplexDataGson:29 - Size of Complex content Jackson :: 250 MB -2016-02-14 07:45:08 INFO ComplexDataGson:30 - -------------------------------------------------------------------------- -2016-02-14 07:45:44 INFO ComplexDataGson:64 - Generating Map from json Time(ms):: 35641108832 -2016-02-14 07:45:44 INFO ComplexDataGson:65 - -------------------------------------------------------------------------- -2016-02-14 07:46:41 INFO ComplexDataGson:76 - Generating Actual Object from json Time(ms):: 4185201210 -2016-02-14 07:46:41 INFO ComplexDataGson:77 - -------------------------------------------------------------------------- -2016-02-14 07:46:45 INFO ComplexDataGson:27 - -------Round 10 -2016-02-14 07:46:51 INFO ComplexDataGson:54 - Json Generation Time(ms):: 2466678325 -2016-02-14 07:46:52 INFO ComplexDataGson:29 - Size of Complex content Jackson :: 250 MB -2016-02-14 07:46:52 INFO ComplexDataGson:30 - -------------------------------------------------------------------------- -2016-02-14 07:47:04 INFO ComplexDataGson:64 - Generating Map from json Time(ms):: 12154237562 -2016-02-14 07:47:04 INFO ComplexDataGson:65 - -------------------------------------------------------------------------- -2016-02-14 07:47:13 INFO ComplexDataGson:76 - Generating Actual Object from json Time(ms):: 2783741983 -2016-02-14 07:47:13 INFO ComplexDataGson:77 - -------------------------------------------------------------------------- -2016-02-14 07:47:17 INFO ComplexDataGson:27 - -------Round 11 -2016-02-14 07:47:22 INFO ComplexDataGson:54 - Json Generation Time(ms):: 2476994277 -2016-02-14 07:47:23 INFO ComplexDataGson:29 - Size of Complex content Jackson :: 250 MB -2016-02-14 07:47:23 INFO ComplexDataGson:30 - -------------------------------------------------------------------------- -2016-02-14 07:47:36 INFO ComplexDataGson:64 - Generating Map from json Time(ms):: 13312892750 -2016-02-14 07:47:36 INFO ComplexDataGson:65 - -------------------------------------------------------------------------- -2016-02-14 07:48:03 INFO ComplexDataGson:76 - Generating Actual Object from json Time(ms):: 3745747872 -2016-02-14 07:48:03 INFO ComplexDataGson:77 - -------------------------------------------------------------------------- -2016-02-14 07:48:08 INFO ComplexDataGson:27 - -------Round 12 -2016-02-14 07:48:14 INFO ComplexDataGson:54 - Json Generation Time(ms):: 2477815749 -2016-02-14 07:48:14 INFO ComplexDataGson:29 - Size of Complex content Jackson :: 250 MB -2016-02-14 07:48:14 INFO ComplexDataGson:30 - -------------------------------------------------------------------------- -2016-02-14 07:48:19 INFO ComplexDataGson:64 - Generating Map from json Time(ms):: 5183533399 -2016-02-14 07:48:19 INFO ComplexDataGson:65 - -------------------------------------------------------------------------- -2016-02-14 07:48:29 INFO ComplexDataGson:76 - Generating Actual Object from json Time(ms):: 2717330745 -2016-02-14 07:48:29 INFO ComplexDataGson:77 - -------------------------------------------------------------------------- -2016-02-14 07:48:33 INFO ComplexDataGson:27 - -------Round 13 -2016-02-14 07:48:38 INFO ComplexDataGson:54 - Json Generation Time(ms):: 2483506437 -2016-02-14 07:48:39 INFO ComplexDataGson:29 - Size of Complex content Jackson :: 250 MB -2016-02-14 07:48:39 INFO ComplexDataGson:30 - -------------------------------------------------------------------------- -2016-02-14 07:48:48 INFO ComplexDataGson:64 - Generating Map from json Time(ms):: 9145250726 -2016-02-14 07:48:48 INFO ComplexDataGson:65 - -------------------------------------------------------------------------- -2016-02-14 07:49:46 INFO ComplexDataGson:76 - Generating Actual Object from json Time(ms):: 5718372485 -2016-02-14 07:49:46 INFO ComplexDataGson:77 - -------------------------------------------------------------------------- -2016-02-14 07:49:51 INFO ComplexDataGson:27 - -------Round 14 -2016-02-14 07:49:56 INFO ComplexDataGson:54 - Json Generation Time(ms):: 2375017418 -2016-02-14 07:49:57 INFO ComplexDataGson:29 - Size of Complex content Jackson :: 250 MB -2016-02-14 07:49:57 INFO ComplexDataGson:30 - -------------------------------------------------------------------------- -2016-02-14 07:50:05 INFO ComplexDataGson:64 - Generating Map from json Time(ms):: 8356615446 -2016-02-14 07:50:05 INFO ComplexDataGson:65 - -------------------------------------------------------------------------- -2016-02-14 07:50:12 INFO ComplexDataGson:76 - Generating Actual Object from json Time(ms):: 2680602591 -2016-02-14 07:50:12 INFO ComplexDataGson:77 - -------------------------------------------------------------------------- -2016-02-14 07:50:15 INFO ComplexDataGson:27 - -------Round 15 -2016-02-14 07:50:20 INFO ComplexDataGson:54 - Json Generation Time(ms):: 2352459143 -2016-02-14 07:50:21 INFO ComplexDataGson:29 - Size of Complex content Jackson :: 250 MB -2016-02-14 07:50:21 INFO ComplexDataGson:30 - -------------------------------------------------------------------------- -2016-02-14 07:50:26 INFO ComplexDataGson:64 - Generating Map from json Time(ms):: 4920213117 -2016-02-14 07:50:26 INFO ComplexDataGson:65 - -------------------------------------------------------------------------- -2016-02-14 07:50:33 INFO ComplexDataGson:76 - Generating Actual Object from json Time(ms):: 2853892670 -2016-02-14 07:50:33 INFO ComplexDataGson:77 - -------------------------------------------------------------------------- -2016-02-14 07:50:36 INFO ComplexDataGson:27 - -------Round 16 -2016-02-14 07:50:41 INFO ComplexDataGson:54 - Json Generation Time(ms):: 2431161653 -2016-02-14 07:50:42 INFO ComplexDataGson:29 - Size of Complex content Jackson :: 250 MB -2016-02-14 07:50:42 INFO ComplexDataGson:30 - -------------------------------------------------------------------------- -2016-02-14 07:50:46 INFO ComplexDataGson:64 - Generating Map from json Time(ms):: 4680718647 -2016-02-14 07:50:46 INFO ComplexDataGson:65 - -------------------------------------------------------------------------- -2016-02-14 07:50:53 INFO ComplexDataGson:76 - Generating Actual Object from json Time(ms):: 3122951011 -2016-02-14 07:50:53 INFO ComplexDataGson:77 - -------------------------------------------------------------------------- -2016-02-14 07:50:57 INFO ComplexDataGson:27 - -------Round 17 -2016-02-14 07:51:02 INFO ComplexDataGson:54 - Json Generation Time(ms):: 2421268081 -2016-02-14 07:51:02 INFO ComplexDataGson:29 - Size of Complex content Jackson :: 250 MB -2016-02-14 07:51:02 INFO ComplexDataGson:30 - -------------------------------------------------------------------------- -2016-02-14 07:51:07 INFO ComplexDataGson:64 - Generating Map from json Time(ms):: 4890545033 -2016-02-14 07:51:07 INFO ComplexDataGson:65 - -------------------------------------------------------------------------- -2016-02-14 07:51:14 INFO ComplexDataGson:76 - Generating Actual Object from json Time(ms):: 3173707723 -2016-02-14 07:51:14 INFO ComplexDataGson:77 - -------------------------------------------------------------------------- -2016-02-14 07:51:18 INFO ComplexDataGson:27 - -------Round 18 -2016-02-14 07:51:24 INFO ComplexDataGson:54 - Json Generation Time(ms):: 3015968746 -2016-02-14 07:51:25 INFO ComplexDataGson:29 - Size of Complex content Jackson :: 250 MB -2016-02-14 07:51:25 INFO ComplexDataGson:30 - -------------------------------------------------------------------------- -2016-02-14 07:51:30 INFO ComplexDataGson:64 - Generating Map from json Time(ms):: 4825937003 -2016-02-14 07:51:30 INFO ComplexDataGson:65 - -------------------------------------------------------------------------- -2016-02-14 07:51:36 INFO ComplexDataGson:76 - Generating Actual Object from json Time(ms):: 2780808215 -2016-02-14 07:51:36 INFO ComplexDataGson:77 - -------------------------------------------------------------------------- -2016-02-14 07:51:40 INFO ComplexDataGson:27 - -------Round 19 -2016-02-14 07:51:45 INFO ComplexDataGson:54 - Json Generation Time(ms):: 2449963505 -2016-02-14 07:51:46 INFO ComplexDataGson:29 - Size of Complex content Jackson :: 250 MB -2016-02-14 07:51:46 INFO ComplexDataGson:30 - -------------------------------------------------------------------------- -2016-02-14 07:51:51 INFO ComplexDataGson:64 - Generating Map from json Time(ms):: 5297335332 -2016-02-14 07:51:51 INFO ComplexDataGson:65 - -------------------------------------------------------------------------- -2016-02-14 07:51:57 INFO ComplexDataGson:76 - Generating Actual Object from json Time(ms):: 2769354993 -2016-02-14 07:51:57 INFO ComplexDataGson:77 - -------------------------------------------------------------------------- -2016-02-14 07:52:01 INFO ComplexDataGson:27 - -------Round 20 -2016-02-14 07:52:07 INFO ComplexDataGson:54 - Json Generation Time(ms):: 2474888297 -2016-02-14 07:52:07 INFO ComplexDataGson:29 - Size of Complex content Jackson :: 250 MB -2016-02-14 07:52:07 INFO ComplexDataGson:30 - -------------------------------------------------------------------------- -2016-02-14 07:52:12 INFO ComplexDataGson:64 - Generating Map from json Time(ms):: 4832219815 -2016-02-14 07:52:12 INFO ComplexDataGson:65 - -------------------------------------------------------------------------- -2016-02-14 07:52:19 INFO ComplexDataGson:76 - Generating Actual Object from json Time(ms):: 2738290291 -2016-02-14 07:52:19 INFO ComplexDataGson:77 - -------------------------------------------------------------------------- -2016-02-14 07:52:22 INFO ComplexDataGson:27 - -------Round 21 -2016-02-14 07:52:28 INFO ComplexDataGson:54 - Json Generation Time(ms):: 2521485548 -2016-02-14 07:52:29 INFO ComplexDataGson:29 - Size of Complex content Jackson :: 250 MB -2016-02-14 07:52:29 INFO ComplexDataGson:30 - -------------------------------------------------------------------------- -2016-02-14 07:52:34 INFO ComplexDataGson:64 - Generating Map from json Time(ms):: 4986757780 -2016-02-14 07:52:34 INFO ComplexDataGson:65 - -------------------------------------------------------------------------- -2016-02-14 07:52:41 INFO ComplexDataGson:76 - Generating Actual Object from json Time(ms):: 2767275460 -2016-02-14 07:52:41 INFO ComplexDataGson:77 - -------------------------------------------------------------------------- -2016-02-14 07:52:45 INFO ComplexDataGson:27 - -------Round 22 -2016-02-14 07:52:51 INFO ComplexDataGson:54 - Json Generation Time(ms):: 2819066808 -2016-02-14 07:52:52 INFO ComplexDataGson:29 - Size of Complex content Jackson :: 250 MB -2016-02-14 07:52:52 INFO ComplexDataGson:30 - -------------------------------------------------------------------------- -2016-02-14 07:52:57 INFO ComplexDataGson:64 - Generating Map from json Time(ms):: 5448328064 -2016-02-14 07:52:57 INFO ComplexDataGson:65 - -------------------------------------------------------------------------- -2016-02-14 07:53:04 INFO ComplexDataGson:76 - Generating Actual Object from json Time(ms):: 2726202709 -2016-02-14 07:53:04 INFO ComplexDataGson:77 - -------------------------------------------------------------------------- -2016-02-14 07:53:08 INFO ComplexDataGson:27 - -------Round 23 -2016-02-14 07:53:13 INFO ComplexDataGson:54 - Json Generation Time(ms):: 2524093649 -2016-02-14 07:53:14 INFO ComplexDataGson:29 - Size of Complex content Jackson :: 250 MB -2016-02-14 07:53:14 INFO ComplexDataGson:30 - -------------------------------------------------------------------------- -2016-02-14 07:53:19 INFO ComplexDataGson:64 - Generating Map from json Time(ms):: 5153818734 -2016-02-14 07:53:19 INFO ComplexDataGson:65 - -------------------------------------------------------------------------- -2016-02-14 07:53:26 INFO ComplexDataGson:76 - Generating Actual Object from json Time(ms):: 3535297784 -2016-02-14 07:53:26 INFO ComplexDataGson:77 - -------------------------------------------------------------------------- -2016-02-14 07:53:30 INFO ComplexDataGson:27 - -------Round 24 -2016-02-14 07:53:36 INFO ComplexDataGson:54 - Json Generation Time(ms):: 2601603625 -2016-02-14 07:53:37 INFO ComplexDataGson:29 - Size of Complex content Jackson :: 250 MB -2016-02-14 07:53:37 INFO ComplexDataGson:30 - -------------------------------------------------------------------------- -2016-02-14 07:53:42 INFO ComplexDataGson:64 - Generating Map from json Time(ms):: 5013024319 -2016-02-14 07:53:42 INFO ComplexDataGson:65 - -------------------------------------------------------------------------- -2016-02-14 07:53:49 INFO ComplexDataGson:76 - Generating Actual Object from json Time(ms):: 2825129744 -2016-02-14 07:53:49 INFO ComplexDataGson:77 - -------------------------------------------------------------------------- -2016-02-14 07:53:53 INFO ComplexDataGson:27 - -------Round 25 -2016-02-14 07:53:58 INFO ComplexDataGson:54 - Json Generation Time(ms):: 2467801778 -2016-02-14 07:53:59 INFO ComplexDataGson:29 - Size of Complex content Jackson :: 250 MB -2016-02-14 07:53:59 INFO ComplexDataGson:30 - -------------------------------------------------------------------------- -2016-02-14 07:54:04 INFO ComplexDataGson:64 - Generating Map from json Time(ms):: 4986123024 -2016-02-14 07:54:04 INFO ComplexDataGson:65 - -------------------------------------------------------------------------- -2016-02-14 07:54:11 INFO ComplexDataGson:76 - Generating Actual Object from json Time(ms):: 2805291678 -2016-02-14 07:54:11 INFO ComplexDataGson:77 - -------------------------------------------------------------------------- -2016-02-14 07:54:14 INFO ComplexDataGson:27 - -------Round 26 -2016-02-14 07:54:19 INFO ComplexDataGson:54 - Json Generation Time(ms):: 2373800804 -2016-02-14 07:54:20 INFO ComplexDataGson:29 - Size of Complex content Jackson :: 250 MB -2016-02-14 07:54:20 INFO ComplexDataGson:30 - -------------------------------------------------------------------------- -2016-02-14 07:54:25 INFO ComplexDataGson:64 - Generating Map from json Time(ms):: 5206601294 -2016-02-14 07:54:25 INFO ComplexDataGson:65 - -------------------------------------------------------------------------- -2016-02-14 07:54:32 INFO ComplexDataGson:76 - Generating Actual Object from json Time(ms):: 2715289502 -2016-02-14 07:54:32 INFO ComplexDataGson:77 - -------------------------------------------------------------------------- -2016-02-14 07:54:35 INFO ComplexDataGson:27 - -------Round 27 -2016-02-14 07:54:41 INFO ComplexDataGson:54 - Json Generation Time(ms):: 2401132374 -2016-02-14 07:54:41 INFO ComplexDataGson:29 - Size of Complex content Jackson :: 250 MB -2016-02-14 07:54:41 INFO ComplexDataGson:30 - -------------------------------------------------------------------------- -2016-02-14 07:54:46 INFO ComplexDataGson:64 - Generating Map from json Time(ms):: 4847989607 -2016-02-14 07:54:46 INFO ComplexDataGson:65 - -------------------------------------------------------------------------- -2016-02-14 07:54:53 INFO ComplexDataGson:76 - Generating Actual Object from json Time(ms):: 2784961360 -2016-02-14 07:54:53 INFO ComplexDataGson:77 - -------------------------------------------------------------------------- -2016-02-14 07:54:57 INFO ComplexDataGson:27 - -------Round 28 -2016-02-14 07:55:02 INFO ComplexDataGson:54 - Json Generation Time(ms):: 2589043530 -2016-02-14 07:55:03 INFO ComplexDataGson:29 - Size of Complex content Jackson :: 250 MB -2016-02-14 07:55:03 INFO ComplexDataGson:30 - -------------------------------------------------------------------------- -2016-02-14 07:55:08 INFO ComplexDataGson:64 - Generating Map from json Time(ms):: 4939033522 -2016-02-14 07:55:08 INFO ComplexDataGson:65 - -------------------------------------------------------------------------- -2016-02-14 07:55:15 INFO ComplexDataGson:76 - Generating Actual Object from json Time(ms):: 2813883370 -2016-02-14 07:55:15 INFO ComplexDataGson:77 - -------------------------------------------------------------------------- -2016-02-14 07:55:18 INFO ComplexDataGson:27 - -------Round 29 -2016-02-14 07:55:24 INFO ComplexDataGson:54 - Json Generation Time(ms):: 2444364004 -2016-02-14 07:55:24 INFO ComplexDataGson:29 - Size of Complex content Jackson :: 250 MB -2016-02-14 07:55:24 INFO ComplexDataGson:30 - -------------------------------------------------------------------------- -2016-02-14 07:55:30 INFO ComplexDataGson:64 - Generating Map from json Time(ms):: 5366266642 -2016-02-14 07:55:30 INFO ComplexDataGson:65 - -------------------------------------------------------------------------- -2016-02-14 07:55:36 INFO ComplexDataGson:76 - Generating Actual Object from json Time(ms):: 2712294943 -2016-02-14 07:55:36 INFO ComplexDataGson:77 - -------------------------------------------------------------------------- -2016-02-14 07:55:40 INFO ComplexDataGson:27 - -------Round 30 -2016-02-14 07:55:45 INFO ComplexDataGson:54 - Json Generation Time(ms):: 2430504792 -2016-02-14 07:55:46 INFO ComplexDataGson:29 - Size of Complex content Jackson :: 250 MB -2016-02-14 07:55:46 INFO ComplexDataGson:30 - -------------------------------------------------------------------------- -2016-02-14 07:55:51 INFO ComplexDataGson:64 - Generating Map from json Time(ms):: 4817296757 -2016-02-14 07:55:51 INFO ComplexDataGson:65 - -------------------------------------------------------------------------- -2016-02-14 07:55:57 INFO ComplexDataGson:76 - Generating Actual Object from json Time(ms):: 2742085794 -2016-02-14 07:55:57 INFO ComplexDataGson:77 - -------------------------------------------------------------------------- -2016-02-14 07:56:01 INFO ComplexDataGson:27 - -------Round 31 -2016-02-14 07:56:07 INFO ComplexDataGson:54 - Json Generation Time(ms):: 2737635009 -2016-02-14 07:56:08 INFO ComplexDataGson:29 - Size of Complex content Jackson :: 250 MB -2016-02-14 07:56:08 INFO ComplexDataGson:30 - -------------------------------------------------------------------------- -2016-02-14 07:56:13 INFO ComplexDataGson:64 - Generating Map from json Time(ms):: 5277481080 -2016-02-14 07:56:13 INFO ComplexDataGson:65 - -------------------------------------------------------------------------- -2016-02-14 07:56:20 INFO ComplexDataGson:76 - Generating Actual Object from json Time(ms):: 2757257938 -2016-02-14 07:56:20 INFO ComplexDataGson:77 - -------------------------------------------------------------------------- -2016-02-14 07:56:23 INFO ComplexDataGson:27 - -------Round 32 -2016-02-14 07:56:29 INFO ComplexDataGson:54 - Json Generation Time(ms):: 2423339719 -2016-02-14 07:56:29 INFO ComplexDataGson:29 - Size of Complex content Jackson :: 250 MB -2016-02-14 07:56:29 INFO ComplexDataGson:30 - -------------------------------------------------------------------------- -2016-02-14 07:56:34 INFO ComplexDataGson:64 - Generating Map from json Time(ms):: 4689185204 -2016-02-14 07:56:34 INFO ComplexDataGson:65 - -------------------------------------------------------------------------- -2016-02-14 07:56:41 INFO ComplexDataGson:76 - Generating Actual Object from json Time(ms):: 3093930314 -2016-02-14 07:56:41 INFO ComplexDataGson:77 - -------------------------------------------------------------------------- -2016-02-14 07:56:45 INFO ComplexDataGson:27 - -------Round 33 -2016-02-14 07:56:50 INFO ComplexDataGson:54 - Json Generation Time(ms):: 2399545487 -2016-02-14 07:56:51 INFO ComplexDataGson:29 - Size of Complex content Jackson :: 250 MB -2016-02-14 07:56:51 INFO ComplexDataGson:30 - -------------------------------------------------------------------------- -2016-02-14 07:56:55 INFO ComplexDataGson:64 - Generating Map from json Time(ms):: 4826696105 -2016-02-14 07:56:55 INFO ComplexDataGson:65 - -------------------------------------------------------------------------- -2016-02-14 07:57:02 INFO ComplexDataGson:76 - Generating Actual Object from json Time(ms):: 2978790184 -2016-02-14 07:57:02 INFO ComplexDataGson:77 - -------------------------------------------------------------------------- -2016-02-14 07:57:06 INFO ComplexDataGson:27 - -------Round 34 -2016-02-14 07:57:12 INFO ComplexDataGson:54 - Json Generation Time(ms):: 2718127741 -2016-02-14 07:57:13 INFO ComplexDataGson:29 - Size of Complex content Jackson :: 250 MB -2016-02-14 07:57:13 INFO ComplexDataGson:30 - -------------------------------------------------------------------------- -2016-02-14 07:57:17 INFO ComplexDataGson:64 - Generating Map from json Time(ms):: 4706243059 -2016-02-14 07:57:17 INFO ComplexDataGson:65 - -------------------------------------------------------------------------- -2016-02-14 07:57:25 INFO ComplexDataGson:76 - Generating Actual Object from json Time(ms):: 3105616831 -2016-02-14 07:57:25 INFO ComplexDataGson:77 - -------------------------------------------------------------------------- -2016-02-14 07:57:28 INFO ComplexDataGson:27 - -------Round 35 -2016-02-14 07:57:34 INFO ComplexDataGson:54 - Json Generation Time(ms):: 2631047886 -2016-02-14 07:57:35 INFO ComplexDataGson:29 - Size of Complex content Jackson :: 250 MB -2016-02-14 07:57:35 INFO ComplexDataGson:30 - -------------------------------------------------------------------------- -2016-02-14 07:57:39 INFO ComplexDataGson:64 - Generating Map from json Time(ms):: 4823275612 -2016-02-14 07:57:39 INFO ComplexDataGson:65 - -------------------------------------------------------------------------- -2016-02-14 07:57:48 INFO ComplexDataGson:76 - Generating Actual Object from json Time(ms):: 3703097312 -2016-02-14 07:57:48 INFO ComplexDataGson:77 - -------------------------------------------------------------------------- -2016-02-14 07:57:51 INFO ComplexDataGson:27 - -------Round 36 -2016-02-14 07:57:57 INFO ComplexDataGson:54 - Json Generation Time(ms):: 2436002054 -2016-02-14 07:57:58 INFO ComplexDataGson:29 - Size of Complex content Jackson :: 250 MB -2016-02-14 07:57:58 INFO ComplexDataGson:30 - -------------------------------------------------------------------------- -2016-02-14 07:58:02 INFO ComplexDataGson:64 - Generating Map from json Time(ms):: 4684077163 -2016-02-14 07:58:02 INFO ComplexDataGson:65 - -------------------------------------------------------------------------- -2016-02-14 07:58:09 INFO ComplexDataGson:76 - Generating Actual Object from json Time(ms):: 2743737815 -2016-02-14 07:58:09 INFO ComplexDataGson:77 - -------------------------------------------------------------------------- -2016-02-14 07:58:13 INFO ComplexDataGson:27 - -------Round 37 -2016-02-14 07:58:18 INFO ComplexDataGson:54 - Json Generation Time(ms):: 2464042197 -2016-02-14 07:58:19 INFO ComplexDataGson:29 - Size of Complex content Jackson :: 250 MB -2016-02-14 07:58:19 INFO ComplexDataGson:30 - -------------------------------------------------------------------------- -2016-02-14 07:58:23 INFO ComplexDataGson:64 - Generating Map from json Time(ms):: 4845604539 -2016-02-14 07:58:23 INFO ComplexDataGson:65 - -------------------------------------------------------------------------- -2016-02-14 07:58:30 INFO ComplexDataGson:76 - Generating Actual Object from json Time(ms):: 2730389802 -2016-02-14 07:58:30 INFO ComplexDataGson:77 - -------------------------------------------------------------------------- -2016-02-14 07:58:34 INFO ComplexDataGson:27 - -------Round 38 -2016-02-14 07:58:39 INFO ComplexDataGson:54 - Json Generation Time(ms):: 2450035744 -2016-02-14 07:58:40 INFO ComplexDataGson:29 - Size of Complex content Jackson :: 250 MB -2016-02-14 07:58:40 INFO ComplexDataGson:30 - -------------------------------------------------------------------------- -2016-02-14 07:58:45 INFO ComplexDataGson:64 - Generating Map from json Time(ms):: 4703580879 -2016-02-14 07:58:45 INFO ComplexDataGson:65 - -------------------------------------------------------------------------- -2016-02-14 07:58:51 INFO ComplexDataGson:76 - Generating Actual Object from json Time(ms):: 2761148969 -2016-02-14 07:58:51 INFO ComplexDataGson:77 - -------------------------------------------------------------------------- -2016-02-14 07:58:55 INFO ComplexDataGson:27 - -------Round 39 -2016-02-14 07:59:01 INFO ComplexDataGson:54 - Json Generation Time(ms):: 2461427780 -2016-02-14 07:59:01 INFO ComplexDataGson:29 - Size of Complex content Jackson :: 250 MB -2016-02-14 07:59:01 INFO ComplexDataGson:30 - -------------------------------------------------------------------------- -2016-02-14 07:59:06 INFO ComplexDataGson:64 - Generating Map from json Time(ms):: 4850024928 -2016-02-14 07:59:06 INFO ComplexDataGson:65 - -------------------------------------------------------------------------- -2016-02-14 07:59:13 INFO ComplexDataGson:76 - Generating Actual Object from json Time(ms):: 2769605659 -2016-02-14 07:59:13 INFO ComplexDataGson:77 - -------------------------------------------------------------------------- -2016-02-14 07:59:16 INFO ComplexDataGson:27 - -------Round 40 -2016-02-14 07:59:22 INFO ComplexDataGson:54 - Json Generation Time(ms):: 2419508689 -2016-02-14 07:59:22 INFO ComplexDataGson:29 - Size of Complex content Jackson :: 250 MB -2016-02-14 07:59:22 INFO ComplexDataGson:30 - -------------------------------------------------------------------------- -2016-02-14 07:59:27 INFO ComplexDataGson:64 - Generating Map from json Time(ms):: 4708503388 -2016-02-14 07:59:27 INFO ComplexDataGson:65 - -------------------------------------------------------------------------- -2016-02-14 07:59:34 INFO ComplexDataGson:76 - Generating Actual Object from json Time(ms):: 2737963439 -2016-02-14 07:59:34 INFO ComplexDataGson:77 - -------------------------------------------------------------------------- -2016-02-14 07:59:37 INFO ComplexDataGson:27 - -------Round 41 -2016-02-14 07:59:43 INFO ComplexDataGson:54 - Json Generation Time(ms):: 2796656957 -2016-02-14 07:59:44 INFO ComplexDataGson:29 - Size of Complex content Jackson :: 250 MB -2016-02-14 07:59:44 INFO ComplexDataGson:30 - -------------------------------------------------------------------------- -2016-02-14 07:59:49 INFO ComplexDataGson:64 - Generating Map from json Time(ms):: 5214122035 -2016-02-14 07:59:49 INFO ComplexDataGson:65 - -------------------------------------------------------------------------- -2016-02-14 07:59:56 INFO ComplexDataGson:76 - Generating Actual Object from json Time(ms):: 2818194809 -2016-02-14 07:59:56 INFO ComplexDataGson:77 - -------------------------------------------------------------------------- -2016-02-14 07:59:59 INFO ComplexDataGson:27 - -------Round 42 -2016-02-14 08:00:05 INFO ComplexDataGson:54 - Json Generation Time(ms):: 2467121627 -2016-02-14 08:00:05 INFO ComplexDataGson:29 - Size of Complex content Jackson :: 250 MB -2016-02-14 08:00:05 INFO ComplexDataGson:30 - -------------------------------------------------------------------------- -2016-02-14 08:00:10 INFO ComplexDataGson:64 - Generating Map from json Time(ms):: 4789276352 -2016-02-14 08:00:10 INFO ComplexDataGson:65 - -------------------------------------------------------------------------- -2016-02-14 08:00:19 INFO ComplexDataGson:76 - Generating Actual Object from json Time(ms):: 3489966490 -2016-02-14 08:00:19 INFO ComplexDataGson:77 - -------------------------------------------------------------------------- -2016-02-14 08:00:22 INFO ComplexDataGson:27 - -------Round 43 -2016-02-14 08:00:28 INFO ComplexDataGson:54 - Json Generation Time(ms):: 2483219849 -2016-02-14 08:00:29 INFO ComplexDataGson:29 - Size of Complex content Jackson :: 250 MB -2016-02-14 08:00:29 INFO ComplexDataGson:30 - -------------------------------------------------------------------------- -2016-02-14 08:00:34 INFO ComplexDataGson:64 - Generating Map from json Time(ms):: 5075942431 -2016-02-14 08:00:34 INFO ComplexDataGson:65 - -------------------------------------------------------------------------- -2016-02-14 08:00:41 INFO ComplexDataGson:76 - Generating Actual Object from json Time(ms):: 2818891934 -2016-02-14 08:00:41 INFO ComplexDataGson:77 - -------------------------------------------------------------------------- -2016-02-14 08:00:44 INFO ComplexDataGson:27 - -------Round 44 -2016-02-14 08:00:50 INFO ComplexDataGson:54 - Json Generation Time(ms):: 2487425891 -2016-02-14 08:00:50 INFO ComplexDataGson:29 - Size of Complex content Jackson :: 250 MB -2016-02-14 08:00:50 INFO ComplexDataGson:30 - -------------------------------------------------------------------------- -2016-02-14 08:00:55 INFO ComplexDataGson:64 - Generating Map from json Time(ms):: 4765529489 -2016-02-14 08:00:55 INFO ComplexDataGson:65 - -------------------------------------------------------------------------- -2016-02-14 08:01:03 INFO ComplexDataGson:76 - Generating Actual Object from json Time(ms):: 2788979501 -2016-02-14 08:01:03 INFO ComplexDataGson:77 - -------------------------------------------------------------------------- -2016-02-14 08:01:07 INFO ComplexDataGson:27 - -------Round 45 -2016-02-14 08:01:13 INFO ComplexDataGson:54 - Json Generation Time(ms):: 2601907186 -2016-02-14 08:01:14 INFO ComplexDataGson:29 - Size of Complex content Jackson :: 250 MB -2016-02-14 08:01:14 INFO ComplexDataGson:30 - -------------------------------------------------------------------------- -2016-02-14 08:01:19 INFO ComplexDataGson:64 - Generating Map from json Time(ms):: 5569084670 -2016-02-14 08:01:19 INFO ComplexDataGson:65 - -------------------------------------------------------------------------- -2016-02-14 08:01:26 INFO ComplexDataGson:76 - Generating Actual Object from json Time(ms):: 2955014505 -2016-02-14 08:01:26 INFO ComplexDataGson:77 - -------------------------------------------------------------------------- -2016-02-14 08:01:30 INFO ComplexDataGson:27 - -------Round 46 -2016-02-14 08:01:36 INFO ComplexDataGson:54 - Json Generation Time(ms):: 2449779158 -2016-02-14 08:01:36 INFO ComplexDataGson:29 - Size of Complex content Jackson :: 250 MB -2016-02-14 08:01:36 INFO ComplexDataGson:30 - -------------------------------------------------------------------------- -2016-02-14 08:01:41 INFO ComplexDataGson:64 - Generating Map from json Time(ms):: 4740324033 -2016-02-14 08:01:41 INFO ComplexDataGson:65 - -------------------------------------------------------------------------- -2016-02-14 08:01:48 INFO ComplexDataGson:76 - Generating Actual Object from json Time(ms):: 2783091438 -2016-02-14 08:01:48 INFO ComplexDataGson:77 - -------------------------------------------------------------------------- -2016-02-14 08:01:51 INFO ComplexDataGson:27 - -------Round 47 -2016-02-14 08:01:57 INFO ComplexDataGson:54 - Json Generation Time(ms):: 2465765273 -2016-02-14 08:01:57 INFO ComplexDataGson:29 - Size of Complex content Jackson :: 250 MB -2016-02-14 08:01:57 INFO ComplexDataGson:30 - -------------------------------------------------------------------------- -2016-02-14 08:02:02 INFO ComplexDataGson:64 - Generating Map from json Time(ms):: 4886437678 -2016-02-14 08:02:02 INFO ComplexDataGson:65 - -------------------------------------------------------------------------- -2016-02-14 08:02:10 INFO ComplexDataGson:76 - Generating Actual Object from json Time(ms):: 3316012444 -2016-02-14 08:02:10 INFO ComplexDataGson:77 - -------------------------------------------------------------------------- -2016-02-14 08:02:13 INFO ComplexDataGson:27 - -------Round 48 -2016-02-14 08:02:20 INFO ComplexDataGson:54 - Json Generation Time(ms):: 3236147401 -2016-02-14 08:02:21 INFO ComplexDataGson:29 - Size of Complex content Jackson :: 250 MB -2016-02-14 08:02:21 INFO ComplexDataGson:30 - -------------------------------------------------------------------------- -2016-02-14 08:02:26 INFO ComplexDataGson:64 - Generating Map from json Time(ms):: 5479380529 -2016-02-14 08:02:26 INFO ComplexDataGson:65 - -------------------------------------------------------------------------- -2016-02-14 08:02:33 INFO ComplexDataGson:76 - Generating Actual Object from json Time(ms):: 2714805541 -2016-02-14 08:02:33 INFO ComplexDataGson:77 - -------------------------------------------------------------------------- -2016-02-14 08:02:36 INFO ComplexDataGson:27 - -------Round 49 -2016-02-14 08:02:42 INFO ComplexDataGson:54 - Json Generation Time(ms):: 2405275256 -2016-02-14 08:02:42 INFO ComplexDataGson:29 - Size of Complex content Jackson :: 250 MB -2016-02-14 08:02:42 INFO ComplexDataGson:30 - -------------------------------------------------------------------------- -2016-02-14 08:02:47 INFO ComplexDataGson:64 - Generating Map from json Time(ms):: 4832263632 -2016-02-14 08:02:47 INFO ComplexDataGson:65 - -------------------------------------------------------------------------- -2016-02-14 08:02:54 INFO ComplexDataGson:76 - Generating Actual Object from json Time(ms):: 2773142206 -2016-02-14 08:02:54 INFO ComplexDataGson:77 - -------------------------------------------------------------------------- -2016-02-14 08:02:57 INFO ComplexDataGson:27 - -------Round 50 -2016-02-14 08:03:03 INFO ComplexDataGson:54 - Json Generation Time(ms):: 2341883841 -2016-02-14 08:03:03 INFO ComplexDataGson:29 - Size of Complex content Jackson :: 250 MB -2016-02-14 08:03:03 INFO ComplexDataGson:30 - -------------------------------------------------------------------------- -2016-02-14 08:03:08 INFO ComplexDataGson:64 - Generating Map from json Time(ms):: 4684440727 -2016-02-14 08:03:08 INFO ComplexDataGson:65 - -------------------------------------------------------------------------- -2016-02-14 08:03:15 INFO ComplexDataGson:76 - Generating Actual Object from json Time(ms):: 2707959030 -2016-02-14 08:03:15 INFO ComplexDataGson:77 - -------------------------------------------------------------------------- -2016-02-14 08:03:18 INFO ComplexDataGson:40 - -------------------------------------------------------------------------- -2016-02-14 08:03:18 INFO ComplexDataGson:41 - Average Time to Generate JSON : 2549404565 -2016-02-14 08:03:18 INFO ComplexDataGson:42 - Average Time to Parse JSON To Map : 6783408594 -2016-02-14 08:03:18 INFO ComplexDataGson:43 - Average Time to Parse JSON To Actual Object : 3441125908 -2016-02-14 08:03:18 INFO ComplexDataGson:44 - -------------------------------------------------------------------------- -2016-02-14 08:12:17 INFO ComplexDataJackson:31 - -------Round 1 -2016-02-14 08:12:24 INFO ComplexDataJackson:59 - Json Generation Time(ms):: 2440775348 -2016-02-14 08:12:24 INFO ComplexDataJackson:33 - Size of Complex content Jackson :: 250 MB -2016-02-14 08:12:24 INFO ComplexDataJackson:34 - -------------------------------------------------------------------------- -2016-02-14 08:12:27 INFO ComplexDataJackson:69 - Generating Map from json Time(ms):: 2956427703 -2016-02-14 08:12:32 INFO ComplexDataJackson:82 - Generating Actual Object from json Time(ms):: 1768665369 -2016-02-14 08:12:36 INFO ComplexDataJackson:31 - -------Round 2 -2016-02-14 08:12:40 INFO ComplexDataJackson:59 - Json Generation Time(ms):: 1076246782 -2016-02-14 08:12:40 INFO ComplexDataJackson:33 - Size of Complex content Jackson :: 250 MB -2016-02-14 08:12:40 INFO ComplexDataJackson:34 - -------------------------------------------------------------------------- -2016-02-14 08:12:42 INFO ComplexDataJackson:69 - Generating Map from json Time(ms):: 1699796428 -2016-02-14 08:12:46 INFO ComplexDataJackson:82 - Generating Actual Object from json Time(ms):: 1435017947 -2016-02-14 08:12:49 INFO ComplexDataJackson:31 - -------Round 3 -2016-02-14 08:12:53 INFO ComplexDataJackson:59 - Json Generation Time(ms):: 1085262040 -2016-02-14 08:12:53 INFO ComplexDataJackson:33 - Size of Complex content Jackson :: 250 MB -2016-02-14 08:12:53 INFO ComplexDataJackson:34 - -------------------------------------------------------------------------- -2016-02-14 08:12:55 INFO ComplexDataJackson:69 - Generating Map from json Time(ms):: 1698377309 -2016-02-14 08:12:59 INFO ComplexDataJackson:82 - Generating Actual Object from json Time(ms):: 1442987517 -2016-02-14 08:13:01 INFO ComplexDataJackson:31 - -------Round 4 -2016-02-14 08:13:05 INFO ComplexDataJackson:59 - Json Generation Time(ms):: 1040101277 -2016-02-14 08:13:06 INFO ComplexDataJackson:33 - Size of Complex content Jackson :: 250 MB -2016-02-14 08:13:06 INFO ComplexDataJackson:34 - -------------------------------------------------------------------------- -2016-02-14 08:13:07 INFO ComplexDataJackson:69 - Generating Map from json Time(ms):: 1670708624 -2016-02-14 08:13:12 INFO ComplexDataJackson:82 - Generating Actual Object from json Time(ms):: 1441443262 -2016-02-14 08:13:14 INFO ComplexDataJackson:31 - -------Round 5 -2016-02-14 08:13:19 INFO ComplexDataJackson:59 - Json Generation Time(ms):: 1341135004 -2016-02-14 08:13:20 INFO ComplexDataJackson:33 - Size of Complex content Jackson :: 250 MB -2016-02-14 08:13:20 INFO ComplexDataJackson:34 - -------------------------------------------------------------------------- -2016-02-14 08:13:22 INFO ComplexDataJackson:69 - Generating Map from json Time(ms):: 1978411620 -2016-02-14 08:13:26 INFO ComplexDataJackson:82 - Generating Actual Object from json Time(ms):: 1450048771 -2016-02-14 08:13:29 INFO ComplexDataJackson:31 - -------Round 6 -2016-02-14 08:13:32 INFO ComplexDataJackson:59 - Json Generation Time(ms):: 1071070845 -2016-02-14 08:13:33 INFO ComplexDataJackson:33 - Size of Complex content Jackson :: 250 MB -2016-02-14 08:13:33 INFO ComplexDataJackson:34 - -------------------------------------------------------------------------- -2016-02-14 08:13:35 INFO ComplexDataJackson:69 - Generating Map from json Time(ms):: 2355220405 -2016-02-14 08:13:41 INFO ComplexDataJackson:82 - Generating Actual Object from json Time(ms):: 1639170619 -2016-02-14 08:13:43 INFO ComplexDataJackson:31 - -------Round 7 -2016-02-14 08:13:47 INFO ComplexDataJackson:59 - Json Generation Time(ms):: 1191407439 -2016-02-14 08:13:48 INFO ComplexDataJackson:33 - Size of Complex content Jackson :: 250 MB -2016-02-14 08:13:48 INFO ComplexDataJackson:34 - -------------------------------------------------------------------------- -2016-02-14 08:13:50 INFO ComplexDataJackson:69 - Generating Map from json Time(ms):: 1984646667 -2016-02-14 08:13:55 INFO ComplexDataJackson:82 - Generating Actual Object from json Time(ms):: 1957293386 -2016-02-14 08:13:57 INFO ComplexDataJackson:31 - -------Round 8 -2016-02-14 08:14:01 INFO ComplexDataJackson:59 - Json Generation Time(ms):: 1035984844 -2016-02-14 08:14:01 INFO ComplexDataJackson:33 - Size of Complex content Jackson :: 250 MB -2016-02-14 08:14:01 INFO ComplexDataJackson:34 - -------------------------------------------------------------------------- -2016-02-14 08:14:04 INFO ComplexDataJackson:69 - Generating Map from json Time(ms):: 2125148573 -2016-02-14 08:14:08 INFO ComplexDataJackson:82 - Generating Actual Object from json Time(ms):: 1951296372 -2016-02-14 08:14:11 INFO ComplexDataJackson:31 - -------Round 9 -2016-02-14 08:14:15 INFO ComplexDataJackson:59 - Json Generation Time(ms):: 1037756473 -2016-02-14 08:14:15 INFO ComplexDataJackson:33 - Size of Complex content Jackson :: 250 MB -2016-02-14 08:14:15 INFO ComplexDataJackson:34 - -------------------------------------------------------------------------- -2016-02-14 08:14:17 INFO ComplexDataJackson:69 - Generating Map from json Time(ms):: 2125514505 -2016-02-14 08:14:22 INFO ComplexDataJackson:82 - Generating Actual Object from json Time(ms):: 1948151809 -2016-02-14 08:14:25 INFO ComplexDataJackson:31 - -------Round 10 -2016-02-14 08:14:28 INFO ComplexDataJackson:59 - Json Generation Time(ms):: 1032009335 -2016-02-14 08:14:29 INFO ComplexDataJackson:33 - Size of Complex content Jackson :: 250 MB -2016-02-14 08:14:29 INFO ComplexDataJackson:34 - -------------------------------------------------------------------------- -2016-02-14 08:14:31 INFO ComplexDataJackson:69 - Generating Map from json Time(ms):: 2120127773 -2016-02-14 08:14:36 INFO ComplexDataJackson:82 - Generating Actual Object from json Time(ms):: 1954880686 -2016-02-14 08:14:38 INFO ComplexDataJackson:31 - -------Round 11 -2016-02-14 08:14:42 INFO ComplexDataJackson:59 - Json Generation Time(ms):: 1012279825 -2016-02-14 08:14:43 INFO ComplexDataJackson:33 - Size of Complex content Jackson :: 250 MB -2016-02-14 08:14:43 INFO ComplexDataJackson:34 - -------------------------------------------------------------------------- -2016-02-14 08:14:45 INFO ComplexDataJackson:69 - Generating Map from json Time(ms):: 2114519980 -2016-02-14 08:14:49 INFO ComplexDataJackson:82 - Generating Actual Object from json Time(ms):: 1956102826 -2016-02-14 08:14:52 INFO ComplexDataJackson:31 - -------Round 12 -2016-02-14 08:14:56 INFO ComplexDataJackson:59 - Json Generation Time(ms):: 1019135415 -2016-02-14 08:14:56 INFO ComplexDataJackson:33 - Size of Complex content Jackson :: 250 MB -2016-02-14 08:14:56 INFO ComplexDataJackson:34 - -------------------------------------------------------------------------- -2016-02-14 08:14:58 INFO ComplexDataJackson:69 - Generating Map from json Time(ms):: 2116012128 -2016-02-14 08:15:03 INFO ComplexDataJackson:82 - Generating Actual Object from json Time(ms):: 2005033828 -2016-02-14 08:15:06 INFO ComplexDataJackson:31 - -------Round 13 -2016-02-14 08:15:09 INFO ComplexDataJackson:59 - Json Generation Time(ms):: 1030257443 -2016-02-14 08:15:10 INFO ComplexDataJackson:33 - Size of Complex content Jackson :: 250 MB -2016-02-14 08:15:10 INFO ComplexDataJackson:34 - -------------------------------------------------------------------------- -2016-02-14 08:15:12 INFO ComplexDataJackson:69 - Generating Map from json Time(ms):: 2146258913 -2016-02-14 08:15:17 INFO ComplexDataJackson:82 - Generating Actual Object from json Time(ms):: 1975422588 -2016-02-14 08:15:19 INFO ComplexDataJackson:31 - -------Round 14 -2016-02-14 08:15:23 INFO ComplexDataJackson:59 - Json Generation Time(ms):: 1031869989 -2016-02-14 08:15:24 INFO ComplexDataJackson:33 - Size of Complex content Jackson :: 250 MB -2016-02-14 08:15:24 INFO ComplexDataJackson:34 - -------------------------------------------------------------------------- -2016-02-14 08:15:26 INFO ComplexDataJackson:69 - Generating Map from json Time(ms):: 2132500362 -2016-02-14 08:15:30 INFO ComplexDataJackson:82 - Generating Actual Object from json Time(ms):: 1958415260 -2016-02-14 08:15:33 INFO ComplexDataJackson:31 - -------Round 15 -2016-02-14 08:15:37 INFO ComplexDataJackson:59 - Json Generation Time(ms):: 1032830806 -2016-02-14 08:15:37 INFO ComplexDataJackson:33 - Size of Complex content Jackson :: 250 MB -2016-02-14 08:15:37 INFO ComplexDataJackson:34 - -------------------------------------------------------------------------- -2016-02-14 08:15:40 INFO ComplexDataJackson:69 - Generating Map from json Time(ms):: 2184912648 -2016-02-14 08:15:44 INFO ComplexDataJackson:82 - Generating Actual Object from json Time(ms):: 1979574943 -2016-02-14 08:15:46 INFO ComplexDataJackson:31 - -------Round 16 -2016-02-14 08:15:50 INFO ComplexDataJackson:59 - Json Generation Time(ms):: 1035782337 -2016-02-14 08:15:51 INFO ComplexDataJackson:33 - Size of Complex content Jackson :: 250 MB -2016-02-14 08:15:51 INFO ComplexDataJackson:34 - -------------------------------------------------------------------------- -2016-02-14 08:15:53 INFO ComplexDataJackson:69 - Generating Map from json Time(ms):: 2126135444 -2016-02-14 08:15:58 INFO ComplexDataJackson:82 - Generating Actual Object from json Time(ms):: 1957399178 -2016-02-14 08:16:00 INFO ComplexDataJackson:31 - -------Round 17 -2016-02-14 08:16:04 INFO ComplexDataJackson:59 - Json Generation Time(ms):: 1042031595 -2016-02-14 08:16:05 INFO ComplexDataJackson:33 - Size of Complex content Jackson :: 250 MB -2016-02-14 08:16:05 INFO ComplexDataJackson:34 - -------------------------------------------------------------------------- -2016-02-14 08:16:07 INFO ComplexDataJackson:69 - Generating Map from json Time(ms):: 2127070207 -2016-02-14 08:16:12 INFO ComplexDataJackson:82 - Generating Actual Object from json Time(ms):: 2462038061 -2016-02-14 08:16:15 INFO ComplexDataJackson:31 - -------Round 18 -2016-02-14 08:16:19 INFO ComplexDataJackson:59 - Json Generation Time(ms):: 1195357288 -2016-02-14 08:16:20 INFO ComplexDataJackson:33 - Size of Complex content Jackson :: 250 MB -2016-02-14 08:16:20 INFO ComplexDataJackson:34 - -------------------------------------------------------------------------- -2016-02-14 08:16:22 INFO ComplexDataJackson:69 - Generating Map from json Time(ms):: 2348974306 -2016-02-14 08:16:27 INFO ComplexDataJackson:82 - Generating Actual Object from json Time(ms):: 1949930939 -2016-02-14 08:16:30 INFO ComplexDataJackson:31 - -------Round 19 -2016-02-14 08:16:34 INFO ComplexDataJackson:59 - Json Generation Time(ms):: 1050152353 -2016-02-14 08:16:34 INFO ComplexDataJackson:33 - Size of Complex content Jackson :: 250 MB -2016-02-14 08:16:34 INFO ComplexDataJackson:34 - -------------------------------------------------------------------------- -2016-02-14 08:16:36 INFO ComplexDataJackson:69 - Generating Map from json Time(ms):: 2125778986 -2016-02-14 08:16:41 INFO ComplexDataJackson:82 - Generating Actual Object from json Time(ms):: 1942497437 -2016-02-14 08:16:43 INFO ComplexDataJackson:31 - -------Round 20 -2016-02-14 08:16:47 INFO ComplexDataJackson:59 - Json Generation Time(ms):: 1030772194 -2016-02-14 08:16:48 INFO ComplexDataJackson:33 - Size of Complex content Jackson :: 250 MB -2016-02-14 08:16:48 INFO ComplexDataJackson:34 - -------------------------------------------------------------------------- -2016-02-14 08:16:50 INFO ComplexDataJackson:69 - Generating Map from json Time(ms):: 2126496243 -2016-02-14 08:16:55 INFO ComplexDataJackson:82 - Generating Actual Object from json Time(ms):: 1947109675 -2016-02-14 08:16:57 INFO ComplexDataJackson:31 - -------Round 21 -2016-02-14 08:17:01 INFO ComplexDataJackson:59 - Json Generation Time(ms):: 1028750295 -2016-02-14 08:17:02 INFO ComplexDataJackson:33 - Size of Complex content Jackson :: 250 MB -2016-02-14 08:17:02 INFO ComplexDataJackson:34 - -------------------------------------------------------------------------- -2016-02-14 08:17:04 INFO ComplexDataJackson:69 - Generating Map from json Time(ms):: 2124714745 -2016-02-14 08:17:08 INFO ComplexDataJackson:82 - Generating Actual Object from json Time(ms):: 1955796501 -2016-02-14 08:17:11 INFO ComplexDataJackson:31 - -------Round 22 -2016-02-14 08:17:15 INFO ComplexDataJackson:59 - Json Generation Time(ms):: 1062502837 -2016-02-14 08:17:16 INFO ComplexDataJackson:33 - Size of Complex content Jackson :: 250 MB -2016-02-14 08:17:16 INFO ComplexDataJackson:34 - -------------------------------------------------------------------------- -2016-02-14 08:17:18 INFO ComplexDataJackson:69 - Generating Map from json Time(ms):: 2125079493 -2016-02-14 08:17:22 INFO ComplexDataJackson:82 - Generating Actual Object from json Time(ms):: 1971739193 -2016-02-14 08:17:25 INFO ComplexDataJackson:31 - -------Round 23 -2016-02-14 08:17:29 INFO ComplexDataJackson:59 - Json Generation Time(ms):: 1059218533 -2016-02-14 08:17:29 INFO ComplexDataJackson:33 - Size of Complex content Jackson :: 250 MB -2016-02-14 08:17:29 INFO ComplexDataJackson:34 - -------------------------------------------------------------------------- -2016-02-14 08:17:32 INFO ComplexDataJackson:69 - Generating Map from json Time(ms):: 2168292568 -2016-02-14 08:17:36 INFO ComplexDataJackson:82 - Generating Actual Object from json Time(ms):: 2030034016 -2016-02-14 08:17:39 INFO ComplexDataJackson:31 - -------Round 24 -2016-02-14 08:17:44 INFO ComplexDataJackson:59 - Json Generation Time(ms):: 1350753436 -2016-02-14 08:17:44 INFO ComplexDataJackson:33 - Size of Complex content Jackson :: 250 MB -2016-02-14 08:17:44 INFO ComplexDataJackson:34 - -------------------------------------------------------------------------- -2016-02-14 08:17:47 INFO ComplexDataJackson:69 - Generating Map from json Time(ms):: 2723882380 -2016-02-14 08:17:52 INFO ComplexDataJackson:82 - Generating Actual Object from json Time(ms):: 2221258291 -2016-02-14 08:17:55 INFO ComplexDataJackson:31 - -------Round 25 -2016-02-14 08:17:59 INFO ComplexDataJackson:59 - Json Generation Time(ms):: 1023832128 -2016-02-14 08:18:00 INFO ComplexDataJackson:33 - Size of Complex content Jackson :: 250 MB -2016-02-14 08:18:00 INFO ComplexDataJackson:34 - -------------------------------------------------------------------------- -2016-02-14 08:18:02 INFO ComplexDataJackson:69 - Generating Map from json Time(ms):: 2157595684 -2016-02-14 08:18:06 INFO ComplexDataJackson:82 - Generating Actual Object from json Time(ms):: 1956225592 -2016-02-14 08:18:09 INFO ComplexDataJackson:31 - -------Round 26 -2016-02-14 08:18:12 INFO ComplexDataJackson:59 - Json Generation Time(ms):: 1023012236 -2016-02-14 08:18:13 INFO ComplexDataJackson:33 - Size of Complex content Jackson :: 250 MB -2016-02-14 08:18:13 INFO ComplexDataJackson:34 - -------------------------------------------------------------------------- -2016-02-14 08:18:15 INFO ComplexDataJackson:69 - Generating Map from json Time(ms):: 2125057782 -2016-02-14 08:18:20 INFO ComplexDataJackson:82 - Generating Actual Object from json Time(ms):: 1935725534 -2016-02-14 08:18:22 INFO ComplexDataJackson:31 - -------Round 27 -2016-02-14 08:18:26 INFO ComplexDataJackson:59 - Json Generation Time(ms):: 1012124294 -2016-02-14 08:18:26 INFO ComplexDataJackson:33 - Size of Complex content Jackson :: 250 MB -2016-02-14 08:18:26 INFO ComplexDataJackson:34 - -------------------------------------------------------------------------- -2016-02-14 08:18:29 INFO ComplexDataJackson:69 - Generating Map from json Time(ms):: 2109949982 -2016-02-14 08:18:33 INFO ComplexDataJackson:82 - Generating Actual Object from json Time(ms):: 1985652090 -2016-02-14 08:18:36 INFO ComplexDataJackson:31 - -------Round 28 -2016-02-14 08:18:40 INFO ComplexDataJackson:59 - Json Generation Time(ms):: 1030921014 -2016-02-14 08:18:40 INFO ComplexDataJackson:33 - Size of Complex content Jackson :: 250 MB -2016-02-14 08:18:40 INFO ComplexDataJackson:34 - -------------------------------------------------------------------------- -2016-02-14 08:18:42 INFO ComplexDataJackson:69 - Generating Map from json Time(ms):: 2122576789 -2016-02-14 08:18:47 INFO ComplexDataJackson:82 - Generating Actual Object from json Time(ms):: 1932141615 -2016-02-14 08:18:50 INFO ComplexDataJackson:31 - -------Round 29 -2016-02-14 08:18:53 INFO ComplexDataJackson:59 - Json Generation Time(ms):: 1021380348 -2016-02-14 08:18:54 INFO ComplexDataJackson:33 - Size of Complex content Jackson :: 250 MB -2016-02-14 08:18:54 INFO ComplexDataJackson:34 - -------------------------------------------------------------------------- -2016-02-14 08:18:56 INFO ComplexDataJackson:69 - Generating Map from json Time(ms):: 2144563470 -2016-02-14 08:19:01 INFO ComplexDataJackson:82 - Generating Actual Object from json Time(ms):: 1958701453 -2016-02-14 08:19:03 INFO ComplexDataJackson:31 - -------Round 30 -2016-02-14 08:19:07 INFO ComplexDataJackson:59 - Json Generation Time(ms):: 1019731484 -2016-02-14 08:19:08 INFO ComplexDataJackson:33 - Size of Complex content Jackson :: 250 MB -2016-02-14 08:19:08 INFO ComplexDataJackson:34 - -------------------------------------------------------------------------- -2016-02-14 08:19:10 INFO ComplexDataJackson:69 - Generating Map from json Time(ms):: 2240348705 -2016-02-14 08:19:16 INFO ComplexDataJackson:82 - Generating Actual Object from json Time(ms):: 2485404386 -2016-02-14 08:19:19 INFO ComplexDataJackson:31 - -------Round 31 -2016-02-14 08:19:22 INFO ComplexDataJackson:59 - Json Generation Time(ms):: 1042472529 -2016-02-14 08:19:23 INFO ComplexDataJackson:33 - Size of Complex content Jackson :: 250 MB -2016-02-14 08:19:23 INFO ComplexDataJackson:34 - -------------------------------------------------------------------------- -2016-02-14 08:19:25 INFO ComplexDataJackson:69 - Generating Map from json Time(ms):: 2124567109 -2016-02-14 08:19:30 INFO ComplexDataJackson:82 - Generating Actual Object from json Time(ms):: 2000236849 -2016-02-14 08:19:32 INFO ComplexDataJackson:31 - -------Round 32 -2016-02-14 08:19:36 INFO ComplexDataJackson:59 - Json Generation Time(ms):: 1019639508 -2016-02-14 08:19:37 INFO ComplexDataJackson:33 - Size of Complex content Jackson :: 250 MB -2016-02-14 08:19:37 INFO ComplexDataJackson:34 - -------------------------------------------------------------------------- -2016-02-14 08:19:39 INFO ComplexDataJackson:69 - Generating Map from json Time(ms):: 2165450777 -2016-02-14 08:19:44 INFO ComplexDataJackson:82 - Generating Actual Object from json Time(ms):: 1950601221 -2016-02-14 08:19:47 INFO ComplexDataJackson:31 - -------Round 33 -2016-02-14 08:19:50 INFO ComplexDataJackson:59 - Json Generation Time(ms):: 1016860876 -2016-02-14 08:19:51 INFO ComplexDataJackson:33 - Size of Complex content Jackson :: 250 MB -2016-02-14 08:19:51 INFO ComplexDataJackson:34 - -------------------------------------------------------------------------- -2016-02-14 08:19:53 INFO ComplexDataJackson:69 - Generating Map from json Time(ms):: 2119094717 -2016-02-14 08:19:57 INFO ComplexDataJackson:82 - Generating Actual Object from json Time(ms):: 1948888804 -2016-02-14 08:20:00 INFO ComplexDataJackson:31 - -------Round 34 -2016-02-14 08:20:04 INFO ComplexDataJackson:59 - Json Generation Time(ms):: 1036841447 -2016-02-14 08:20:04 INFO ComplexDataJackson:33 - Size of Complex content Jackson :: 250 MB -2016-02-14 08:20:04 INFO ComplexDataJackson:34 - -------------------------------------------------------------------------- -2016-02-14 08:20:07 INFO ComplexDataJackson:69 - Generating Map from json Time(ms):: 2110651055 -2016-02-14 08:20:11 INFO ComplexDataJackson:82 - Generating Actual Object from json Time(ms):: 1937063730 -2016-02-14 08:20:14 INFO ComplexDataJackson:31 - -------Round 35 -2016-02-14 08:20:18 INFO ComplexDataJackson:59 - Json Generation Time(ms):: 1290871331 -2016-02-14 08:20:19 INFO ComplexDataJackson:33 - Size of Complex content Jackson :: 250 MB -2016-02-14 08:20:19 INFO ComplexDataJackson:34 - -------------------------------------------------------------------------- -2016-02-14 08:20:22 INFO ComplexDataJackson:69 - Generating Map from json Time(ms):: 2592745083 -2016-02-14 08:20:27 INFO ComplexDataJackson:82 - Generating Actual Object from json Time(ms):: 1944194064 -2016-02-14 08:20:29 INFO ComplexDataJackson:31 - -------Round 36 -2016-02-14 08:20:33 INFO ComplexDataJackson:59 - Json Generation Time(ms):: 1010976761 -2016-02-14 08:20:33 INFO ComplexDataJackson:33 - Size of Complex content Jackson :: 250 MB -2016-02-14 08:20:33 INFO ComplexDataJackson:34 - -------------------------------------------------------------------------- -2016-02-14 08:20:36 INFO ComplexDataJackson:69 - Generating Map from json Time(ms):: 2119356830 -2016-02-14 08:20:40 INFO ComplexDataJackson:82 - Generating Actual Object from json Time(ms):: 1946314257 -2016-02-14 08:20:43 INFO ComplexDataJackson:31 - -------Round 37 -2016-02-14 08:20:46 INFO ComplexDataJackson:59 - Json Generation Time(ms):: 1030989306 -2016-02-14 08:20:47 INFO ComplexDataJackson:33 - Size of Complex content Jackson :: 250 MB -2016-02-14 08:20:47 INFO ComplexDataJackson:34 - -------------------------------------------------------------------------- -2016-02-14 08:20:49 INFO ComplexDataJackson:69 - Generating Map from json Time(ms):: 2116773203 -2016-02-14 08:20:54 INFO ComplexDataJackson:82 - Generating Actual Object from json Time(ms):: 1950905572 -2016-02-14 08:20:56 INFO ComplexDataJackson:31 - -------Round 38 -2016-02-14 08:21:00 INFO ComplexDataJackson:59 - Json Generation Time(ms):: 1017828404 -2016-02-14 08:21:01 INFO ComplexDataJackson:33 - Size of Complex content Jackson :: 250 MB -2016-02-14 08:21:01 INFO ComplexDataJackson:34 - -------------------------------------------------------------------------- -2016-02-14 08:21:03 INFO ComplexDataJackson:69 - Generating Map from json Time(ms):: 2115104602 -2016-02-14 08:21:08 INFO ComplexDataJackson:82 - Generating Actual Object from json Time(ms):: 1937908885 -2016-02-14 08:21:10 INFO ComplexDataJackson:31 - -------Round 39 -2016-02-14 08:21:14 INFO ComplexDataJackson:59 - Json Generation Time(ms):: 1035317324 -2016-02-14 08:21:15 INFO ComplexDataJackson:33 - Size of Complex content Jackson :: 250 MB -2016-02-14 08:21:15 INFO ComplexDataJackson:34 - -------------------------------------------------------------------------- -2016-02-14 08:21:17 INFO ComplexDataJackson:69 - Generating Map from json Time(ms):: 2116247398 -2016-02-14 08:21:21 INFO ComplexDataJackson:82 - Generating Actual Object from json Time(ms):: 1968002902 -2016-02-14 08:21:24 INFO ComplexDataJackson:31 - -------Round 40 -2016-02-14 08:21:28 INFO ComplexDataJackson:59 - Json Generation Time(ms):: 1079234236 -2016-02-14 08:21:28 INFO ComplexDataJackson:33 - Size of Complex content Jackson :: 250 MB -2016-02-14 08:21:29 INFO ComplexDataJackson:34 - -------------------------------------------------------------------------- -2016-02-14 08:21:31 INFO ComplexDataJackson:69 - Generating Map from json Time(ms):: 2150258895 -2016-02-14 08:21:36 INFO ComplexDataJackson:82 - Generating Actual Object from json Time(ms):: 1981606712 -2016-02-14 08:21:38 INFO ComplexDataJackson:31 - -------Round 41 -2016-02-14 08:21:42 INFO ComplexDataJackson:59 - Json Generation Time(ms):: 1024907027 -2016-02-14 08:21:43 INFO ComplexDataJackson:33 - Size of Complex content Jackson :: 250 MB -2016-02-14 08:21:43 INFO ComplexDataJackson:34 - -------------------------------------------------------------------------- -2016-02-14 08:21:45 INFO ComplexDataJackson:69 - Generating Map from json Time(ms):: 2132610102 -2016-02-14 08:21:49 INFO ComplexDataJackson:82 - Generating Actual Object from json Time(ms):: 1951541511 -2016-02-14 08:21:52 INFO ComplexDataJackson:31 - -------Round 42 -2016-02-14 08:21:56 INFO ComplexDataJackson:59 - Json Generation Time(ms):: 1026086139 -2016-02-14 08:21:56 INFO ComplexDataJackson:33 - Size of Complex content Jackson :: 250 MB -2016-02-14 08:21:56 INFO ComplexDataJackson:34 - -------------------------------------------------------------------------- -2016-02-14 08:21:58 INFO ComplexDataJackson:69 - Generating Map from json Time(ms):: 2130974266 -2016-02-14 08:22:03 INFO ComplexDataJackson:82 - Generating Actual Object from json Time(ms):: 1942215193 -2016-02-14 08:22:06 INFO ComplexDataJackson:31 - -------Round 43 -2016-02-14 08:22:09 INFO ComplexDataJackson:59 - Json Generation Time(ms):: 1012376932 -2016-02-14 08:22:10 INFO ComplexDataJackson:33 - Size of Complex content Jackson :: 250 MB -2016-02-14 08:22:10 INFO ComplexDataJackson:34 - -------------------------------------------------------------------------- -2016-02-14 08:22:12 INFO ComplexDataJackson:69 - Generating Map from json Time(ms):: 2112633874 -2016-02-14 08:22:17 INFO ComplexDataJackson:82 - Generating Actual Object from json Time(ms):: 1950879123 -2016-02-14 08:22:19 INFO ComplexDataJackson:31 - -------Round 44 -2016-02-14 08:22:23 INFO ComplexDataJackson:59 - Json Generation Time(ms):: 1031510768 -2016-02-14 08:22:24 INFO ComplexDataJackson:33 - Size of Complex content Jackson :: 250 MB -2016-02-14 08:22:24 INFO ComplexDataJackson:34 - -------------------------------------------------------------------------- -2016-02-14 08:22:26 INFO ComplexDataJackson:69 - Generating Map from json Time(ms):: 2111779244 -2016-02-14 08:22:31 INFO ComplexDataJackson:82 - Generating Actual Object from json Time(ms):: 1954917791 -2016-02-14 08:22:33 INFO ComplexDataJackson:31 - -------Round 45 -2016-02-14 08:22:37 INFO ComplexDataJackson:59 - Json Generation Time(ms):: 1011530593 -2016-02-14 08:22:37 INFO ComplexDataJackson:33 - Size of Complex content Jackson :: 250 MB -2016-02-14 08:22:37 INFO ComplexDataJackson:34 - -------------------------------------------------------------------------- -2016-02-14 08:22:40 INFO ComplexDataJackson:69 - Generating Map from json Time(ms):: 2112648085 -2016-02-14 08:22:44 INFO ComplexDataJackson:82 - Generating Actual Object from json Time(ms):: 1950791884 -2016-02-14 08:22:47 INFO ComplexDataJackson:31 - -------Round 46 -2016-02-14 08:22:50 INFO ComplexDataJackson:59 - Json Generation Time(ms):: 1024148321 -2016-02-14 08:22:51 INFO ComplexDataJackson:33 - Size of Complex content Jackson :: 250 MB -2016-02-14 08:22:51 INFO ComplexDataJackson:34 - -------------------------------------------------------------------------- -2016-02-14 08:22:53 INFO ComplexDataJackson:69 - Generating Map from json Time(ms):: 2126121233 -2016-02-14 08:22:58 INFO ComplexDataJackson:82 - Generating Actual Object from json Time(ms):: 1985191814 -2016-02-14 08:23:01 INFO ComplexDataJackson:31 - -------Round 47 -2016-02-14 08:23:04 INFO ComplexDataJackson:59 - Json Generation Time(ms):: 1038904795 -2016-02-14 08:23:05 INFO ComplexDataJackson:33 - Size of Complex content Jackson :: 250 MB -2016-02-14 08:23:05 INFO ComplexDataJackson:34 - -------------------------------------------------------------------------- -2016-02-14 08:23:07 INFO ComplexDataJackson:69 - Generating Map from json Time(ms):: 2171032910 -2016-02-14 08:23:12 INFO ComplexDataJackson:82 - Generating Actual Object from json Time(ms):: 1942167823 -2016-02-14 08:23:15 INFO ComplexDataJackson:31 - -------Round 48 -2016-02-14 08:23:18 INFO ComplexDataJackson:59 - Json Generation Time(ms):: 1019919780 -2016-02-14 08:23:19 INFO ComplexDataJackson:33 - Size of Complex content Jackson :: 250 MB -2016-02-14 08:23:19 INFO ComplexDataJackson:34 - -------------------------------------------------------------------------- -2016-02-14 08:23:21 INFO ComplexDataJackson:69 - Generating Map from json Time(ms):: 2116935444 -2016-02-14 08:23:26 INFO ComplexDataJackson:82 - Generating Actual Object from json Time(ms):: 1966154692 -2016-02-14 08:23:28 INFO ComplexDataJackson:31 - -------Round 49 -2016-02-14 08:23:32 INFO ComplexDataJackson:59 - Json Generation Time(ms):: 1038407413 -2016-02-14 08:23:33 INFO ComplexDataJackson:33 - Size of Complex content Jackson :: 250 MB -2016-02-14 08:23:33 INFO ComplexDataJackson:34 - -------------------------------------------------------------------------- -2016-02-14 08:23:35 INFO ComplexDataJackson:69 - Generating Map from json Time(ms):: 2164705097 -2016-02-14 08:23:40 INFO ComplexDataJackson:82 - Generating Actual Object from json Time(ms):: 2018967252 -2016-02-14 08:23:42 INFO ComplexDataJackson:31 - -------Round 50 -2016-02-14 08:23:47 INFO ComplexDataJackson:59 - Json Generation Time(ms):: 1333104642 -2016-02-14 08:23:48 INFO ComplexDataJackson:33 - Size of Complex content Jackson :: 250 MB -2016-02-14 08:23:48 INFO ComplexDataJackson:34 - -------------------------------------------------------------------------- -2016-02-14 08:23:50 INFO ComplexDataJackson:69 - Generating Map from json Time(ms):: 2717974579 -2016-02-14 08:23:56 INFO ComplexDataJackson:82 - Generating Actual Object from json Time(ms):: 2187066394 -2016-02-14 08:23:59 INFO ComplexDataJackson:44 - -------------------------------------------------------------------------- -2016-02-14 08:23:59 INFO ComplexDataJackson:45 - Average Time to Generate JSON : 1092127467 -2016-02-14 08:23:59 INFO ComplexDataJackson:46 - Average Time to Parse JSON To Map : 2158655298 -2016-02-14 08:23:59 INFO ComplexDataJackson:47 - Average Time to Parse JSON To Actual Object : 1939415512 -2016-02-14 08:23:59 INFO ComplexDataJackson:48 - -------------------------------------------------------------------------- diff --git a/gson-jackson-performance/logs_Performance/log4j-application simple Gson Jackson 100mb 10R.log b/gson-jackson-performance/logs_Performance/log4j-application simple Gson Jackson 100mb 10R.log deleted file mode 100644 index 6d66c79825..0000000000 --- a/gson-jackson-performance/logs_Performance/log4j-application simple Gson Jackson 100mb 10R.log +++ /dev/null @@ -1,160 +0,0 @@ -2016-02-13 22:32:02 INFO SimpleDataGson:25 - -------Round 1 -2016-02-13 22:32:07 INFO SimpleDataGson:50 - Json Generation Time(ms):: 1802698961 -2016-02-13 22:32:08 INFO SimpleDataGson:27 - Size of Simple content Gson :: 101 MB -2016-02-13 22:32:08 INFO SimpleDataGson:28 - -------------------------------------------------------------------------- -2016-02-13 22:32:10 INFO SimpleDataGson:60 - Generating Map from json Time(ms):: 2003962071 -2016-02-13 22:32:10 INFO SimpleDataGson:61 - -------------------------------------------------------------------------- -2016-02-13 22:32:12 INFO SimpleDataGson:73 - Generating Actual Object from json Time(ms):: 1005873828 -2016-02-13 22:32:12 INFO SimpleDataGson:74 - -------------------------------------------------------------------------- -2016-02-13 22:32:14 INFO SimpleDataGson:25 - -------Round 2 -2016-02-13 22:32:16 INFO SimpleDataGson:50 - Json Generation Time(ms):: 1222128229 -2016-02-13 22:32:16 INFO SimpleDataGson:27 - Size of Simple content Gson :: 101 MB -2016-02-13 22:32:16 INFO SimpleDataGson:28 - -------------------------------------------------------------------------- -2016-02-13 22:32:18 INFO SimpleDataGson:60 - Generating Map from json Time(ms):: 1672580233 -2016-02-13 22:32:18 INFO SimpleDataGson:61 - -------------------------------------------------------------------------- -2016-02-13 22:32:20 INFO SimpleDataGson:73 - Generating Actual Object from json Time(ms):: 914391709 -2016-02-13 22:32:20 INFO SimpleDataGson:74 - -------------------------------------------------------------------------- -2016-02-13 22:32:21 INFO SimpleDataGson:25 - -------Round 3 -2016-02-13 22:32:23 INFO SimpleDataGson:50 - Json Generation Time(ms):: 1232757569 -2016-02-13 22:32:24 INFO SimpleDataGson:27 - Size of Simple content Gson :: 101 MB -2016-02-13 22:32:24 INFO SimpleDataGson:28 - -------------------------------------------------------------------------- -2016-02-13 22:32:25 INFO SimpleDataGson:60 - Generating Map from json Time(ms):: 1761755454 -2016-02-13 22:32:25 INFO SimpleDataGson:61 - -------------------------------------------------------------------------- -2016-02-13 22:32:28 INFO SimpleDataGson:73 - Generating Actual Object from json Time(ms):: 1042478282 -2016-02-13 22:32:28 INFO SimpleDataGson:74 - -------------------------------------------------------------------------- -2016-02-13 22:32:29 INFO SimpleDataGson:25 - -------Round 4 -2016-02-13 22:32:31 INFO SimpleDataGson:50 - Json Generation Time(ms):: 1350677839 -2016-02-13 22:32:31 INFO SimpleDataGson:27 - Size of Simple content Gson :: 101 MB -2016-02-13 22:32:31 INFO SimpleDataGson:28 - -------------------------------------------------------------------------- -2016-02-13 22:32:33 INFO SimpleDataGson:60 - Generating Map from json Time(ms):: 1997474806 -2016-02-13 22:32:33 INFO SimpleDataGson:61 - -------------------------------------------------------------------------- -2016-02-13 22:32:35 INFO SimpleDataGson:73 - Generating Actual Object from json Time(ms):: 999789995 -2016-02-13 22:32:35 INFO SimpleDataGson:74 - -------------------------------------------------------------------------- -2016-02-13 22:32:36 INFO SimpleDataGson:25 - -------Round 5 -2016-02-13 22:32:39 INFO SimpleDataGson:50 - Json Generation Time(ms):: 1269646240 -2016-02-13 22:32:39 INFO SimpleDataGson:27 - Size of Simple content Gson :: 101 MB -2016-02-13 22:32:39 INFO SimpleDataGson:28 - -------------------------------------------------------------------------- -2016-02-13 22:32:41 INFO SimpleDataGson:60 - Generating Map from json Time(ms):: 2061314403 -2016-02-13 22:32:41 INFO SimpleDataGson:61 - -------------------------------------------------------------------------- -2016-02-13 22:32:44 INFO SimpleDataGson:73 - Generating Actual Object from json Time(ms):: 1455524498 -2016-02-13 22:32:44 INFO SimpleDataGson:74 - -------------------------------------------------------------------------- -2016-02-13 22:32:45 INFO SimpleDataGson:25 - -------Round 6 -2016-02-13 22:32:47 INFO SimpleDataGson:50 - Json Generation Time(ms):: 1304567889 -2016-02-13 22:32:47 INFO SimpleDataGson:27 - Size of Simple content Gson :: 101 MB -2016-02-13 22:32:47 INFO SimpleDataGson:28 - -------------------------------------------------------------------------- -2016-02-13 22:32:49 INFO SimpleDataGson:60 - Generating Map from json Time(ms):: 1370549381 -2016-02-13 22:32:49 INFO SimpleDataGson:61 - -------------------------------------------------------------------------- -2016-02-13 22:32:51 INFO SimpleDataGson:73 - Generating Actual Object from json Time(ms):: 1153593911 -2016-02-13 22:32:51 INFO SimpleDataGson:74 - -------------------------------------------------------------------------- -2016-02-13 22:32:52 INFO SimpleDataGson:25 - -------Round 7 -2016-02-13 22:32:54 INFO SimpleDataGson:50 - Json Generation Time(ms):: 1258311882 -2016-02-13 22:32:55 INFO SimpleDataGson:27 - Size of Simple content Gson :: 101 MB -2016-02-13 22:32:55 INFO SimpleDataGson:28 - -------------------------------------------------------------------------- -2016-02-13 22:32:56 INFO SimpleDataGson:60 - Generating Map from json Time(ms):: 1423511342 -2016-02-13 22:32:56 INFO SimpleDataGson:61 - -------------------------------------------------------------------------- -2016-02-13 22:32:58 INFO SimpleDataGson:73 - Generating Actual Object from json Time(ms):: 1174751932 -2016-02-13 22:32:58 INFO SimpleDataGson:74 - -------------------------------------------------------------------------- -2016-02-13 22:32:59 INFO SimpleDataGson:25 - -------Round 8 -2016-02-13 22:33:02 INFO SimpleDataGson:50 - Json Generation Time(ms):: 1233054419 -2016-02-13 22:33:02 INFO SimpleDataGson:27 - Size of Simple content Gson :: 101 MB -2016-02-13 22:33:02 INFO SimpleDataGson:28 - -------------------------------------------------------------------------- -2016-02-13 22:33:03 INFO SimpleDataGson:60 - Generating Map from json Time(ms):: 1644931000 -2016-02-13 22:33:03 INFO SimpleDataGson:61 - -------------------------------------------------------------------------- -2016-02-13 22:33:06 INFO SimpleDataGson:73 - Generating Actual Object from json Time(ms):: 1299340655 -2016-02-13 22:33:06 INFO SimpleDataGson:74 - -------------------------------------------------------------------------- -2016-02-13 22:33:07 INFO SimpleDataGson:25 - -------Round 9 -2016-02-13 22:33:09 INFO SimpleDataGson:50 - Json Generation Time(ms):: 1250320633 -2016-02-13 22:33:09 INFO SimpleDataGson:27 - Size of Simple content Gson :: 101 MB -2016-02-13 22:33:09 INFO SimpleDataGson:28 - -------------------------------------------------------------------------- -2016-02-13 22:33:11 INFO SimpleDataGson:60 - Generating Map from json Time(ms):: 1876958683 -2016-02-13 22:33:11 INFO SimpleDataGson:61 - -------------------------------------------------------------------------- -2016-02-13 22:33:14 INFO SimpleDataGson:73 - Generating Actual Object from json Time(ms):: 1180127985 -2016-02-13 22:33:14 INFO SimpleDataGson:74 - -------------------------------------------------------------------------- -2016-02-13 22:33:15 INFO SimpleDataGson:25 - -------Round 10 -2016-02-13 22:33:18 INFO SimpleDataGson:50 - Json Generation Time(ms):: 1314250627 -2016-02-13 22:33:18 INFO SimpleDataGson:27 - Size of Simple content Gson :: 101 MB -2016-02-13 22:33:18 INFO SimpleDataGson:28 - -------------------------------------------------------------------------- -2016-02-13 22:33:20 INFO SimpleDataGson:60 - Generating Map from json Time(ms):: 1483840853 -2016-02-13 22:33:20 INFO SimpleDataGson:61 - -------------------------------------------------------------------------- -2016-02-13 22:33:22 INFO SimpleDataGson:73 - Generating Actual Object from json Time(ms):: 1179707185 -2016-02-13 22:33:22 INFO SimpleDataGson:74 - -------------------------------------------------------------------------- -2016-02-13 22:33:23 INFO SimpleDataGson:36 - -------------------------------------------------------------------------- -2016-02-13 22:33:23 INFO SimpleDataGson:37 - Average Time to Generate JSON : 1323841428 -2016-02-13 22:33:23 INFO SimpleDataGson:38 - Average Time to Parse JSON To Map : 1729687822 -2016-02-13 22:33:23 INFO SimpleDataGson:39 - Average Time to Parse JSON To Actual Object : 1140557998 -2016-02-13 22:33:23 INFO SimpleDataGson:40 - -------------------------------------------------------------------------- -2016-02-13 22:34:23 INFO SimpleDataJackson:28 - -------Round 1 -2016-02-13 22:34:28 INFO SimpleDataJackson:55 - Json Generation Time(ms):: 3749361201 -2016-02-13 22:34:29 INFO SimpleDataJackson:30 - Size of Simple content Jackson :: 101 MB -2016-02-13 22:34:29 INFO SimpleDataJackson:31 - -------------------------------------------------------------------------- -2016-02-13 22:34:34 INFO SimpleDataJackson:65 - Generating Map from json Time(ms):: 5117887111 -2016-02-13 22:34:34 INFO SimpleDataJackson:66 - -------------------------------------------------------------------------- -2016-02-13 22:34:36 INFO SimpleDataJackson:78 - Generating Actual Object from json Time(ms):: 1086143172 -2016-02-13 22:34:38 INFO SimpleDataJackson:28 - -------Round 2 -2016-02-13 22:34:39 INFO SimpleDataJackson:55 - Json Generation Time(ms):: 434662538 -2016-02-13 22:34:39 INFO SimpleDataJackson:30 - Size of Simple content Jackson :: 101 MB -2016-02-13 22:34:39 INFO SimpleDataJackson:31 - -------------------------------------------------------------------------- -2016-02-13 22:34:41 INFO SimpleDataJackson:65 - Generating Map from json Time(ms):: 1334135590 -2016-02-13 22:34:41 INFO SimpleDataJackson:66 - -------------------------------------------------------------------------- -2016-02-13 22:34:43 INFO SimpleDataJackson:78 - Generating Actual Object from json Time(ms):: 771198580 -2016-02-13 22:34:44 INFO SimpleDataJackson:28 - -------Round 3 -2016-02-13 22:34:45 INFO SimpleDataJackson:55 - Json Generation Time(ms):: 448593143 -2016-02-13 22:34:45 INFO SimpleDataJackson:30 - Size of Simple content Jackson :: 101 MB -2016-02-13 22:34:45 INFO SimpleDataJackson:31 - -------------------------------------------------------------------------- -2016-02-13 22:34:50 INFO SimpleDataJackson:65 - Generating Map from json Time(ms):: 4189457425 -2016-02-13 22:34:50 INFO SimpleDataJackson:66 - -------------------------------------------------------------------------- -2016-02-13 22:34:52 INFO SimpleDataJackson:78 - Generating Actual Object from json Time(ms):: 887058668 -2016-02-13 22:34:53 INFO SimpleDataJackson:28 - -------Round 4 -2016-02-13 22:34:54 INFO SimpleDataJackson:55 - Json Generation Time(ms):: 465465795 -2016-02-13 22:34:54 INFO SimpleDataJackson:30 - Size of Simple content Jackson :: 101 MB -2016-02-13 22:34:54 INFO SimpleDataJackson:31 - -------------------------------------------------------------------------- -2016-02-13 22:34:56 INFO SimpleDataJackson:65 - Generating Map from json Time(ms):: 1384778810 -2016-02-13 22:34:56 INFO SimpleDataJackson:66 - -------------------------------------------------------------------------- -2016-02-13 22:34:58 INFO SimpleDataJackson:78 - Generating Actual Object from json Time(ms):: 772597563 -2016-02-13 22:34:59 INFO SimpleDataJackson:28 - -------Round 5 -2016-02-13 22:35:01 INFO SimpleDataJackson:55 - Json Generation Time(ms):: 431909574 -2016-02-13 22:35:01 INFO SimpleDataJackson:30 - Size of Simple content Jackson :: 101 MB -2016-02-13 22:35:01 INFO SimpleDataJackson:31 - -------------------------------------------------------------------------- -2016-02-13 22:35:02 INFO SimpleDataJackson:65 - Generating Map from json Time(ms):: 1414299931 -2016-02-13 22:35:02 INFO SimpleDataJackson:66 - -------------------------------------------------------------------------- -2016-02-13 22:35:04 INFO SimpleDataJackson:78 - Generating Actual Object from json Time(ms):: 758118259 -2016-02-13 22:35:05 INFO SimpleDataJackson:28 - -------Round 6 -2016-02-13 22:35:07 INFO SimpleDataJackson:55 - Json Generation Time(ms):: 420912330 -2016-02-13 22:35:07 INFO SimpleDataJackson:30 - Size of Simple content Jackson :: 101 MB -2016-02-13 22:35:07 INFO SimpleDataJackson:31 - -------------------------------------------------------------------------- -2016-02-13 22:35:08 INFO SimpleDataJackson:65 - Generating Map from json Time(ms):: 1330342865 -2016-02-13 22:35:08 INFO SimpleDataJackson:66 - -------------------------------------------------------------------------- -2016-02-13 22:35:11 INFO SimpleDataJackson:78 - Generating Actual Object from json Time(ms):: 1147846006 -2016-02-13 22:35:12 INFO SimpleDataJackson:28 - -------Round 7 -2016-02-13 22:35:14 INFO SimpleDataJackson:55 - Json Generation Time(ms):: 637133177 -2016-02-13 22:35:14 INFO SimpleDataJackson:30 - Size of Simple content Jackson :: 101 MB -2016-02-13 22:35:14 INFO SimpleDataJackson:31 - -------------------------------------------------------------------------- -2016-02-13 22:35:16 INFO SimpleDataJackson:65 - Generating Map from json Time(ms):: 1710650775 -2016-02-13 22:35:16 INFO SimpleDataJackson:66 - -------------------------------------------------------------------------- -2016-02-13 22:35:18 INFO SimpleDataJackson:78 - Generating Actual Object from json Time(ms):: 1022232915 -2016-02-13 22:35:20 INFO SimpleDataJackson:28 - -------Round 8 -2016-02-13 22:35:21 INFO SimpleDataJackson:55 - Json Generation Time(ms):: 469254572 -2016-02-13 22:35:22 INFO SimpleDataJackson:30 - Size of Simple content Jackson :: 101 MB -2016-02-13 22:35:22 INFO SimpleDataJackson:31 - -------------------------------------------------------------------------- -2016-02-13 22:35:23 INFO SimpleDataJackson:65 - Generating Map from json Time(ms):: 1375411079 -2016-02-13 22:35:23 INFO SimpleDataJackson:66 - -------------------------------------------------------------------------- -2016-02-13 22:35:25 INFO SimpleDataJackson:78 - Generating Actual Object from json Time(ms):: 774870908 -2016-02-13 22:35:26 INFO SimpleDataJackson:28 - -------Round 9 -2016-02-13 22:35:28 INFO SimpleDataJackson:55 - Json Generation Time(ms):: 451041361 -2016-02-13 22:35:28 INFO SimpleDataJackson:30 - Size of Simple content Jackson :: 101 MB -2016-02-13 22:35:28 INFO SimpleDataJackson:31 - -------------------------------------------------------------------------- -2016-02-13 22:35:29 INFO SimpleDataJackson:65 - Generating Map from json Time(ms):: 1419613220 -2016-02-13 22:35:29 INFO SimpleDataJackson:66 - -------------------------------------------------------------------------- -2016-02-13 22:35:31 INFO SimpleDataJackson:78 - Generating Actual Object from json Time(ms):: 772284924 -2016-02-13 22:35:32 INFO SimpleDataJackson:28 - -------Round 10 -2016-02-13 22:35:34 INFO SimpleDataJackson:55 - Json Generation Time(ms):: 422704085 -2016-02-13 22:35:34 INFO SimpleDataJackson:30 - Size of Simple content Jackson :: 101 MB -2016-02-13 22:35:34 INFO SimpleDataJackson:31 - -------------------------------------------------------------------------- -2016-02-13 22:35:35 INFO SimpleDataJackson:65 - Generating Map from json Time(ms):: 1396597916 -2016-02-13 22:35:35 INFO SimpleDataJackson:66 - -------------------------------------------------------------------------- -2016-02-13 22:35:38 INFO SimpleDataJackson:78 - Generating Actual Object from json Time(ms):: 794414020 -2016-02-13 22:35:39 INFO SimpleDataJackson:41 - -------------------------------------------------------------------------- -2016-02-13 22:35:39 INFO SimpleDataJackson:42 - Average Time to Generate JSON : 793103777 -2016-02-13 22:35:39 INFO SimpleDataJackson:43 - Average Time to Parse JSON To Map : 2067317472 -2016-02-13 22:35:39 INFO SimpleDataJackson:44 - Average Time to Parse JSON To Actual Object : 878676501 -2016-02-13 22:35:39 INFO SimpleDataJackson:45 - -------------------------------------------------------------------------- diff --git a/gson-jackson-performance/logs_Performance/log4j-application simple Gson Jackson 100mb 50R.log b/gson-jackson-performance/logs_Performance/log4j-application simple Gson Jackson 100mb 50R.log deleted file mode 100644 index 76e666651b..0000000000 --- a/gson-jackson-performance/logs_Performance/log4j-application simple Gson Jackson 100mb 50R.log +++ /dev/null @@ -1,760 +0,0 @@ -2016-02-13 22:52:31 INFO SimpleDataGson:28 - -------Round 1 -2016-02-13 22:52:36 INFO SimpleDataGson:53 - Json Generation Time(ms):: 1585839020 -2016-02-13 22:52:36 INFO SimpleDataGson:30 - Size of Simple content Gson :: 101 MB -2016-02-13 22:52:36 INFO SimpleDataGson:31 - -------------------------------------------------------------------------- -2016-02-13 22:52:38 INFO SimpleDataGson:63 - Generating Map from json Time(ms):: 1861804362 -2016-02-13 22:52:38 INFO SimpleDataGson:64 - -------------------------------------------------------------------------- -2016-02-13 22:52:40 INFO SimpleDataGson:76 - Generating Actual Object from json Time(ms):: 1055169779 -2016-02-13 22:52:40 INFO SimpleDataGson:77 - -------------------------------------------------------------------------- -2016-02-13 22:52:42 INFO SimpleDataGson:28 - -------Round 2 -2016-02-13 22:52:44 INFO SimpleDataGson:53 - Json Generation Time(ms):: 1490347460 -2016-02-13 22:52:45 INFO SimpleDataGson:30 - Size of Simple content Gson :: 101 MB -2016-02-13 22:52:45 INFO SimpleDataGson:31 - -------------------------------------------------------------------------- -2016-02-13 22:52:47 INFO SimpleDataGson:63 - Generating Map from json Time(ms):: 1916539920 -2016-02-13 22:52:47 INFO SimpleDataGson:64 - -------------------------------------------------------------------------- -2016-02-13 22:52:49 INFO SimpleDataGson:76 - Generating Actual Object from json Time(ms):: 1129162257 -2016-02-13 22:52:49 INFO SimpleDataGson:77 - -------------------------------------------------------------------------- -2016-02-13 22:52:50 INFO SimpleDataGson:28 - -------Round 3 -2016-02-13 22:52:53 INFO SimpleDataGson:53 - Json Generation Time(ms):: 1305021058 -2016-02-13 22:52:53 INFO SimpleDataGson:30 - Size of Simple content Gson :: 101 MB -2016-02-13 22:52:53 INFO SimpleDataGson:31 - -------------------------------------------------------------------------- -2016-02-13 22:52:55 INFO SimpleDataGson:63 - Generating Map from json Time(ms):: 1462674147 -2016-02-13 22:52:55 INFO SimpleDataGson:64 - -------------------------------------------------------------------------- -2016-02-13 22:52:57 INFO SimpleDataGson:76 - Generating Actual Object from json Time(ms):: 887290384 -2016-02-13 22:52:57 INFO SimpleDataGson:77 - -------------------------------------------------------------------------- -2016-02-13 22:52:57 INFO SimpleDataGson:28 - -------Round 4 -2016-02-13 22:53:00 INFO SimpleDataGson:53 - Json Generation Time(ms):: 1203500534 -2016-02-13 22:53:00 INFO SimpleDataGson:30 - Size of Simple content Gson :: 101 MB -2016-02-13 22:53:00 INFO SimpleDataGson:31 - -------------------------------------------------------------------------- -2016-02-13 22:53:01 INFO SimpleDataGson:63 - Generating Map from json Time(ms):: 1451261630 -2016-02-13 22:53:01 INFO SimpleDataGson:64 - -------------------------------------------------------------------------- -2016-02-13 22:53:03 INFO SimpleDataGson:76 - Generating Actual Object from json Time(ms):: 879235582 -2016-02-13 22:53:03 INFO SimpleDataGson:77 - -------------------------------------------------------------------------- -2016-02-13 22:53:04 INFO SimpleDataGson:28 - -------Round 5 -2016-02-13 22:53:06 INFO SimpleDataGson:53 - Json Generation Time(ms):: 1230461723 -2016-02-13 22:53:07 INFO SimpleDataGson:30 - Size of Simple content Gson :: 101 MB -2016-02-13 22:53:07 INFO SimpleDataGson:31 - -------------------------------------------------------------------------- -2016-02-13 22:53:08 INFO SimpleDataGson:63 - Generating Map from json Time(ms):: 1412145404 -2016-02-13 22:53:08 INFO SimpleDataGson:64 - -------------------------------------------------------------------------- -2016-02-13 22:53:10 INFO SimpleDataGson:76 - Generating Actual Object from json Time(ms):: 1140904783 -2016-02-13 22:53:10 INFO SimpleDataGson:77 - -------------------------------------------------------------------------- -2016-02-13 22:53:11 INFO SimpleDataGson:28 - -------Round 6 -2016-02-13 22:53:13 INFO SimpleDataGson:53 - Json Generation Time(ms):: 1228443779 -2016-02-13 22:53:14 INFO SimpleDataGson:30 - Size of Simple content Gson :: 101 MB -2016-02-13 22:53:14 INFO SimpleDataGson:31 - -------------------------------------------------------------------------- -2016-02-13 22:53:15 INFO SimpleDataGson:63 - Generating Map from json Time(ms):: 1289356331 -2016-02-13 22:53:15 INFO SimpleDataGson:64 - -------------------------------------------------------------------------- -2016-02-13 22:53:17 INFO SimpleDataGson:76 - Generating Actual Object from json Time(ms):: 1152567569 -2016-02-13 22:53:17 INFO SimpleDataGson:77 - -------------------------------------------------------------------------- -2016-02-13 22:53:18 INFO SimpleDataGson:28 - -------Round 7 -2016-02-13 22:53:20 INFO SimpleDataGson:53 - Json Generation Time(ms):: 1209992931 -2016-02-13 22:53:21 INFO SimpleDataGson:30 - Size of Simple content Gson :: 101 MB -2016-02-13 22:53:21 INFO SimpleDataGson:31 - -------------------------------------------------------------------------- -2016-02-13 22:53:22 INFO SimpleDataGson:63 - Generating Map from json Time(ms):: 1286039275 -2016-02-13 22:53:22 INFO SimpleDataGson:64 - -------------------------------------------------------------------------- -2016-02-13 22:53:24 INFO SimpleDataGson:76 - Generating Actual Object from json Time(ms):: 1170658409 -2016-02-13 22:53:24 INFO SimpleDataGson:77 - -------------------------------------------------------------------------- -2016-02-13 22:53:25 INFO SimpleDataGson:28 - -------Round 8 -2016-02-13 22:53:27 INFO SimpleDataGson:53 - Json Generation Time(ms):: 1196618916 -2016-02-13 22:53:28 INFO SimpleDataGson:30 - Size of Simple content Gson :: 101 MB -2016-02-13 22:53:28 INFO SimpleDataGson:31 - -------------------------------------------------------------------------- -2016-02-13 22:53:29 INFO SimpleDataGson:63 - Generating Map from json Time(ms):: 1466708852 -2016-02-13 22:53:29 INFO SimpleDataGson:64 - -------------------------------------------------------------------------- -2016-02-13 22:53:31 INFO SimpleDataGson:76 - Generating Actual Object from json Time(ms):: 1168917972 -2016-02-13 22:53:31 INFO SimpleDataGson:77 - -------------------------------------------------------------------------- -2016-02-13 22:53:32 INFO SimpleDataGson:28 - -------Round 9 -2016-02-13 22:53:34 INFO SimpleDataGson:53 - Json Generation Time(ms):: 1221654533 -2016-02-13 22:53:35 INFO SimpleDataGson:30 - Size of Simple content Gson :: 101 MB -2016-02-13 22:53:35 INFO SimpleDataGson:31 - -------------------------------------------------------------------------- -2016-02-13 22:53:36 INFO SimpleDataGson:63 - Generating Map from json Time(ms):: 1618379162 -2016-02-13 22:53:36 INFO SimpleDataGson:64 - -------------------------------------------------------------------------- -2016-02-13 22:53:38 INFO SimpleDataGson:76 - Generating Actual Object from json Time(ms):: 1154904864 -2016-02-13 22:53:38 INFO SimpleDataGson:77 - -------------------------------------------------------------------------- -2016-02-13 22:53:39 INFO SimpleDataGson:28 - -------Round 10 -2016-02-13 22:53:42 INFO SimpleDataGson:53 - Json Generation Time(ms):: 1195265726 -2016-02-13 22:53:42 INFO SimpleDataGson:30 - Size of Simple content Gson :: 101 MB -2016-02-13 22:53:42 INFO SimpleDataGson:31 - -------------------------------------------------------------------------- -2016-02-13 22:53:43 INFO SimpleDataGson:63 - Generating Map from json Time(ms):: 1436078099 -2016-02-13 22:53:43 INFO SimpleDataGson:64 - -------------------------------------------------------------------------- -2016-02-13 22:53:45 INFO SimpleDataGson:76 - Generating Actual Object from json Time(ms):: 1167637809 -2016-02-13 22:53:45 INFO SimpleDataGson:77 - -------------------------------------------------------------------------- -2016-02-13 22:53:46 INFO SimpleDataGson:28 - -------Round 11 -2016-02-13 22:53:49 INFO SimpleDataGson:53 - Json Generation Time(ms):: 1185569172 -2016-02-13 22:53:49 INFO SimpleDataGson:30 - Size of Simple content Gson :: 101 MB -2016-02-13 22:53:49 INFO SimpleDataGson:31 - -------------------------------------------------------------------------- -2016-02-13 22:53:50 INFO SimpleDataGson:63 - Generating Map from json Time(ms):: 1516646659 -2016-02-13 22:53:50 INFO SimpleDataGson:64 - -------------------------------------------------------------------------- -2016-02-13 22:53:52 INFO SimpleDataGson:76 - Generating Actual Object from json Time(ms):: 1148949718 -2016-02-13 22:53:52 INFO SimpleDataGson:77 - -------------------------------------------------------------------------- -2016-02-13 22:53:53 INFO SimpleDataGson:28 - -------Round 12 -2016-02-13 22:53:56 INFO SimpleDataGson:53 - Json Generation Time(ms):: 1187248028 -2016-02-13 22:53:56 INFO SimpleDataGson:30 - Size of Simple content Gson :: 101 MB -2016-02-13 22:53:56 INFO SimpleDataGson:31 - -------------------------------------------------------------------------- -2016-02-13 22:53:57 INFO SimpleDataGson:63 - Generating Map from json Time(ms):: 1448880519 -2016-02-13 22:53:57 INFO SimpleDataGson:64 - -------------------------------------------------------------------------- -2016-02-13 22:54:00 INFO SimpleDataGson:76 - Generating Actual Object from json Time(ms):: 1176675926 -2016-02-13 22:54:00 INFO SimpleDataGson:77 - -------------------------------------------------------------------------- -2016-02-13 22:54:01 INFO SimpleDataGson:28 - -------Round 13 -2016-02-13 22:54:03 INFO SimpleDataGson:53 - Json Generation Time(ms):: 1443600783 -2016-02-13 22:54:03 INFO SimpleDataGson:30 - Size of Simple content Gson :: 101 MB -2016-02-13 22:54:03 INFO SimpleDataGson:31 - -------------------------------------------------------------------------- -2016-02-13 22:54:06 INFO SimpleDataGson:63 - Generating Map from json Time(ms):: 2164118644 -2016-02-13 22:54:06 INFO SimpleDataGson:64 - -------------------------------------------------------------------------- -2016-02-13 22:54:08 INFO SimpleDataGson:76 - Generating Actual Object from json Time(ms):: 1488725447 -2016-02-13 22:54:08 INFO SimpleDataGson:77 - -------------------------------------------------------------------------- -2016-02-13 22:54:09 INFO SimpleDataGson:28 - -------Round 14 -2016-02-13 22:54:12 INFO SimpleDataGson:53 - Json Generation Time(ms):: 1435152023 -2016-02-13 22:54:12 INFO SimpleDataGson:30 - Size of Simple content Gson :: 101 MB -2016-02-13 22:54:12 INFO SimpleDataGson:31 - -------------------------------------------------------------------------- -2016-02-13 22:54:14 INFO SimpleDataGson:63 - Generating Map from json Time(ms):: 1460023030 -2016-02-13 22:54:14 INFO SimpleDataGson:64 - -------------------------------------------------------------------------- -2016-02-13 22:54:16 INFO SimpleDataGson:76 - Generating Actual Object from json Time(ms):: 1178285702 -2016-02-13 22:54:16 INFO SimpleDataGson:77 - -------------------------------------------------------------------------- -2016-02-13 22:54:17 INFO SimpleDataGson:28 - -------Round 15 -2016-02-13 22:54:19 INFO SimpleDataGson:53 - Json Generation Time(ms):: 1180117721 -2016-02-13 22:54:19 INFO SimpleDataGson:30 - Size of Simple content Gson :: 101 MB -2016-02-13 22:54:19 INFO SimpleDataGson:31 - -------------------------------------------------------------------------- -2016-02-13 22:54:21 INFO SimpleDataGson:63 - Generating Map from json Time(ms):: 1515058200 -2016-02-13 22:54:21 INFO SimpleDataGson:64 - -------------------------------------------------------------------------- -2016-02-13 22:54:23 INFO SimpleDataGson:76 - Generating Actual Object from json Time(ms):: 1144468160 -2016-02-13 22:54:23 INFO SimpleDataGson:77 - -------------------------------------------------------------------------- -2016-02-13 22:54:24 INFO SimpleDataGson:28 - -------Round 16 -2016-02-13 22:54:26 INFO SimpleDataGson:53 - Json Generation Time(ms):: 1192200519 -2016-02-13 22:54:26 INFO SimpleDataGson:30 - Size of Simple content Gson :: 101 MB -2016-02-13 22:54:26 INFO SimpleDataGson:31 - -------------------------------------------------------------------------- -2016-02-13 22:54:28 INFO SimpleDataGson:63 - Generating Map from json Time(ms):: 1461303587 -2016-02-13 22:54:28 INFO SimpleDataGson:64 - -------------------------------------------------------------------------- -2016-02-13 22:54:30 INFO SimpleDataGson:76 - Generating Actual Object from json Time(ms):: 1144667902 -2016-02-13 22:54:30 INFO SimpleDataGson:77 - -------------------------------------------------------------------------- -2016-02-13 22:54:31 INFO SimpleDataGson:28 - -------Round 17 -2016-02-13 22:54:33 INFO SimpleDataGson:53 - Json Generation Time(ms):: 1189731774 -2016-02-13 22:54:33 INFO SimpleDataGson:30 - Size of Simple content Gson :: 101 MB -2016-02-13 22:54:33 INFO SimpleDataGson:31 - -------------------------------------------------------------------------- -2016-02-13 22:54:35 INFO SimpleDataGson:63 - Generating Map from json Time(ms):: 1517573920 -2016-02-13 22:54:35 INFO SimpleDataGson:64 - -------------------------------------------------------------------------- -2016-02-13 22:54:37 INFO SimpleDataGson:76 - Generating Actual Object from json Time(ms):: 1155008682 -2016-02-13 22:54:37 INFO SimpleDataGson:77 - -------------------------------------------------------------------------- -2016-02-13 22:54:38 INFO SimpleDataGson:28 - -------Round 18 -2016-02-13 22:54:40 INFO SimpleDataGson:53 - Json Generation Time(ms):: 1193380811 -2016-02-13 22:54:40 INFO SimpleDataGson:30 - Size of Simple content Gson :: 101 MB -2016-02-13 22:54:40 INFO SimpleDataGson:31 - -------------------------------------------------------------------------- -2016-02-13 22:54:42 INFO SimpleDataGson:63 - Generating Map from json Time(ms):: 1445793205 -2016-02-13 22:54:42 INFO SimpleDataGson:64 - -------------------------------------------------------------------------- -2016-02-13 22:54:44 INFO SimpleDataGson:76 - Generating Actual Object from json Time(ms):: 1166141325 -2016-02-13 22:54:44 INFO SimpleDataGson:77 - -------------------------------------------------------------------------- -2016-02-13 22:54:45 INFO SimpleDataGson:28 - -------Round 19 -2016-02-13 22:54:47 INFO SimpleDataGson:53 - Json Generation Time(ms):: 1205077151 -2016-02-13 22:54:47 INFO SimpleDataGson:30 - Size of Simple content Gson :: 101 MB -2016-02-13 22:54:47 INFO SimpleDataGson:31 - -------------------------------------------------------------------------- -2016-02-13 22:54:49 INFO SimpleDataGson:63 - Generating Map from json Time(ms):: 1513504082 -2016-02-13 22:54:49 INFO SimpleDataGson:64 - -------------------------------------------------------------------------- -2016-02-13 22:54:51 INFO SimpleDataGson:76 - Generating Actual Object from json Time(ms):: 1147742582 -2016-02-13 22:54:51 INFO SimpleDataGson:77 - -------------------------------------------------------------------------- -2016-02-13 22:54:52 INFO SimpleDataGson:28 - -------Round 20 -2016-02-13 22:54:54 INFO SimpleDataGson:53 - Json Generation Time(ms):: 1198880420 -2016-02-13 22:54:55 INFO SimpleDataGson:30 - Size of Simple content Gson :: 101 MB -2016-02-13 22:54:55 INFO SimpleDataGson:31 - -------------------------------------------------------------------------- -2016-02-13 22:54:56 INFO SimpleDataGson:63 - Generating Map from json Time(ms):: 1448043261 -2016-02-13 22:54:56 INFO SimpleDataGson:64 - -------------------------------------------------------------------------- -2016-02-13 22:54:58 INFO SimpleDataGson:76 - Generating Actual Object from json Time(ms):: 1173471373 -2016-02-13 22:54:58 INFO SimpleDataGson:77 - -------------------------------------------------------------------------- -2016-02-13 22:54:59 INFO SimpleDataGson:28 - -------Round 21 -2016-02-13 22:55:01 INFO SimpleDataGson:53 - Json Generation Time(ms):: 1217035603 -2016-02-13 22:55:02 INFO SimpleDataGson:30 - Size of Simple content Gson :: 101 MB -2016-02-13 22:55:02 INFO SimpleDataGson:31 - -------------------------------------------------------------------------- -2016-02-13 22:55:03 INFO SimpleDataGson:63 - Generating Map from json Time(ms):: 1510510720 -2016-02-13 22:55:03 INFO SimpleDataGson:64 - -------------------------------------------------------------------------- -2016-02-13 22:55:05 INFO SimpleDataGson:76 - Generating Actual Object from json Time(ms):: 1155864098 -2016-02-13 22:55:05 INFO SimpleDataGson:77 - -------------------------------------------------------------------------- -2016-02-13 22:55:06 INFO SimpleDataGson:28 - -------Round 22 -2016-02-13 22:55:08 INFO SimpleDataGson:53 - Json Generation Time(ms):: 1187136316 -2016-02-13 22:55:09 INFO SimpleDataGson:30 - Size of Simple content Gson :: 101 MB -2016-02-13 22:55:09 INFO SimpleDataGson:31 - -------------------------------------------------------------------------- -2016-02-13 22:55:10 INFO SimpleDataGson:63 - Generating Map from json Time(ms):: 1444711995 -2016-02-13 22:55:10 INFO SimpleDataGson:64 - -------------------------------------------------------------------------- -2016-02-13 22:55:13 INFO SimpleDataGson:76 - Generating Actual Object from json Time(ms):: 1458993925 -2016-02-13 22:55:13 INFO SimpleDataGson:77 - -------------------------------------------------------------------------- -2016-02-13 22:55:14 INFO SimpleDataGson:28 - -------Round 23 -2016-02-13 22:55:16 INFO SimpleDataGson:53 - Json Generation Time(ms):: 1526195184 -2016-02-13 22:55:17 INFO SimpleDataGson:30 - Size of Simple content Gson :: 101 MB -2016-02-13 22:55:17 INFO SimpleDataGson:31 - -------------------------------------------------------------------------- -2016-02-13 22:55:19 INFO SimpleDataGson:63 - Generating Map from json Time(ms):: 2012367410 -2016-02-13 22:55:19 INFO SimpleDataGson:64 - -------------------------------------------------------------------------- -2016-02-13 22:55:21 INFO SimpleDataGson:76 - Generating Actual Object from json Time(ms):: 1515431630 -2016-02-13 22:55:21 INFO SimpleDataGson:77 - -------------------------------------------------------------------------- -2016-02-13 22:55:22 INFO SimpleDataGson:28 - -------Round 24 -2016-02-13 22:55:25 INFO SimpleDataGson:53 - Json Generation Time(ms):: 1193182253 -2016-02-13 22:55:25 INFO SimpleDataGson:30 - Size of Simple content Gson :: 101 MB -2016-02-13 22:55:25 INFO SimpleDataGson:31 - -------------------------------------------------------------------------- -2016-02-13 22:55:26 INFO SimpleDataGson:63 - Generating Map from json Time(ms):: 1438591450 -2016-02-13 22:55:26 INFO SimpleDataGson:64 - -------------------------------------------------------------------------- -2016-02-13 22:55:29 INFO SimpleDataGson:76 - Generating Actual Object from json Time(ms):: 1192834482 -2016-02-13 22:55:29 INFO SimpleDataGson:77 - -------------------------------------------------------------------------- -2016-02-13 22:55:30 INFO SimpleDataGson:28 - -------Round 25 -2016-02-13 22:55:32 INFO SimpleDataGson:53 - Json Generation Time(ms):: 1253599398 -2016-02-13 22:55:32 INFO SimpleDataGson:30 - Size of Simple content Gson :: 101 MB -2016-02-13 22:55:32 INFO SimpleDataGson:31 - -------------------------------------------------------------------------- -2016-02-13 22:55:34 INFO SimpleDataGson:63 - Generating Map from json Time(ms):: 1629483384 -2016-02-13 22:55:34 INFO SimpleDataGson:64 - -------------------------------------------------------------------------- -2016-02-13 22:55:36 INFO SimpleDataGson:76 - Generating Actual Object from json Time(ms):: 1333719528 -2016-02-13 22:55:36 INFO SimpleDataGson:77 - -------------------------------------------------------------------------- -2016-02-13 22:55:37 INFO SimpleDataGson:28 - -------Round 26 -2016-02-13 22:55:40 INFO SimpleDataGson:53 - Json Generation Time(ms):: 1230578174 -2016-02-13 22:55:40 INFO SimpleDataGson:30 - Size of Simple content Gson :: 101 MB -2016-02-13 22:55:40 INFO SimpleDataGson:31 - -------------------------------------------------------------------------- -2016-02-13 22:55:41 INFO SimpleDataGson:63 - Generating Map from json Time(ms):: 1600000552 -2016-02-13 22:55:41 INFO SimpleDataGson:64 - -------------------------------------------------------------------------- -2016-02-13 22:55:44 INFO SimpleDataGson:76 - Generating Actual Object from json Time(ms):: 1209411074 -2016-02-13 22:55:44 INFO SimpleDataGson:77 - -------------------------------------------------------------------------- -2016-02-13 22:55:45 INFO SimpleDataGson:28 - -------Round 27 -2016-02-13 22:55:47 INFO SimpleDataGson:53 - Json Generation Time(ms):: 1204880173 -2016-02-13 22:55:47 INFO SimpleDataGson:30 - Size of Simple content Gson :: 101 MB -2016-02-13 22:55:47 INFO SimpleDataGson:31 - -------------------------------------------------------------------------- -2016-02-13 22:55:49 INFO SimpleDataGson:63 - Generating Map from json Time(ms):: 1511346398 -2016-02-13 22:55:49 INFO SimpleDataGson:64 - -------------------------------------------------------------------------- -2016-02-13 22:55:51 INFO SimpleDataGson:76 - Generating Actual Object from json Time(ms):: 1148985640 -2016-02-13 22:55:51 INFO SimpleDataGson:77 - -------------------------------------------------------------------------- -2016-02-13 22:55:52 INFO SimpleDataGson:28 - -------Round 28 -2016-02-13 22:55:54 INFO SimpleDataGson:53 - Json Generation Time(ms):: 1587746830 -2016-02-13 22:55:55 INFO SimpleDataGson:30 - Size of Simple content Gson :: 101 MB -2016-02-13 22:55:55 INFO SimpleDataGson:31 - -------------------------------------------------------------------------- -2016-02-13 22:55:56 INFO SimpleDataGson:63 - Generating Map from json Time(ms):: 1689343146 -2016-02-13 22:55:56 INFO SimpleDataGson:64 - -------------------------------------------------------------------------- -2016-02-13 22:55:59 INFO SimpleDataGson:76 - Generating Actual Object from json Time(ms):: 1498482397 -2016-02-13 22:55:59 INFO SimpleDataGson:77 - -------------------------------------------------------------------------- -2016-02-13 22:56:00 INFO SimpleDataGson:28 - -------Round 29 -2016-02-13 22:56:03 INFO SimpleDataGson:53 - Json Generation Time(ms):: 1663758832 -2016-02-13 22:56:03 INFO SimpleDataGson:30 - Size of Simple content Gson :: 101 MB -2016-02-13 22:56:03 INFO SimpleDataGson:31 - -------------------------------------------------------------------------- -2016-02-13 22:56:05 INFO SimpleDataGson:63 - Generating Map from json Time(ms):: 1872788185 -2016-02-13 22:56:06 INFO SimpleDataGson:64 - -------------------------------------------------------------------------- -2016-02-13 22:56:08 INFO SimpleDataGson:76 - Generating Actual Object from json Time(ms):: 1250957359 -2016-02-13 22:56:08 INFO SimpleDataGson:77 - -------------------------------------------------------------------------- -2016-02-13 22:56:09 INFO SimpleDataGson:28 - -------Round 30 -2016-02-13 22:56:11 INFO SimpleDataGson:53 - Json Generation Time(ms):: 1188576745 -2016-02-13 22:56:11 INFO SimpleDataGson:30 - Size of Simple content Gson :: 101 MB -2016-02-13 22:56:11 INFO SimpleDataGson:31 - -------------------------------------------------------------------------- -2016-02-13 22:56:13 INFO SimpleDataGson:63 - Generating Map from json Time(ms):: 1449096050 -2016-02-13 22:56:13 INFO SimpleDataGson:64 - -------------------------------------------------------------------------- -2016-02-13 22:56:15 INFO SimpleDataGson:76 - Generating Actual Object from json Time(ms):: 1179020720 -2016-02-13 22:56:15 INFO SimpleDataGson:77 - -------------------------------------------------------------------------- -2016-02-13 22:56:16 INFO SimpleDataGson:28 - -------Round 31 -2016-02-13 22:56:18 INFO SimpleDataGson:53 - Json Generation Time(ms):: 1453226678 -2016-02-13 22:56:19 INFO SimpleDataGson:30 - Size of Simple content Gson :: 101 MB -2016-02-13 22:56:19 INFO SimpleDataGson:31 - -------------------------------------------------------------------------- -2016-02-13 22:56:20 INFO SimpleDataGson:63 - Generating Map from json Time(ms):: 1506877077 -2016-02-13 22:56:20 INFO SimpleDataGson:64 - -------------------------------------------------------------------------- -2016-02-13 22:56:22 INFO SimpleDataGson:76 - Generating Actual Object from json Time(ms):: 1145879774 -2016-02-13 22:56:22 INFO SimpleDataGson:77 - -------------------------------------------------------------------------- -2016-02-13 22:56:23 INFO SimpleDataGson:28 - -------Round 32 -2016-02-13 22:56:25 INFO SimpleDataGson:53 - Json Generation Time(ms):: 1190798379 -2016-02-13 22:56:26 INFO SimpleDataGson:30 - Size of Simple content Gson :: 101 MB -2016-02-13 22:56:26 INFO SimpleDataGson:31 - -------------------------------------------------------------------------- -2016-02-13 22:56:27 INFO SimpleDataGson:63 - Generating Map from json Time(ms):: 1434053443 -2016-02-13 22:56:27 INFO SimpleDataGson:64 - -------------------------------------------------------------------------- -2016-02-13 22:56:29 INFO SimpleDataGson:76 - Generating Actual Object from json Time(ms):: 1177356075 -2016-02-13 22:56:29 INFO SimpleDataGson:77 - -------------------------------------------------------------------------- -2016-02-13 22:56:30 INFO SimpleDataGson:28 - -------Round 33 -2016-02-13 22:56:33 INFO SimpleDataGson:53 - Json Generation Time(ms):: 1191705111 -2016-02-13 22:56:33 INFO SimpleDataGson:30 - Size of Simple content Gson :: 101 MB -2016-02-13 22:56:33 INFO SimpleDataGson:31 - -------------------------------------------------------------------------- -2016-02-13 22:56:34 INFO SimpleDataGson:63 - Generating Map from json Time(ms):: 1502436968 -2016-02-13 22:56:34 INFO SimpleDataGson:64 - -------------------------------------------------------------------------- -2016-02-13 22:56:36 INFO SimpleDataGson:76 - Generating Actual Object from json Time(ms):: 1153789705 -2016-02-13 22:56:36 INFO SimpleDataGson:77 - -------------------------------------------------------------------------- -2016-02-13 22:56:37 INFO SimpleDataGson:28 - -------Round 34 -2016-02-13 22:56:40 INFO SimpleDataGson:53 - Json Generation Time(ms):: 1194646368 -2016-02-13 22:56:40 INFO SimpleDataGson:30 - Size of Simple content Gson :: 101 MB -2016-02-13 22:56:40 INFO SimpleDataGson:31 - -------------------------------------------------------------------------- -2016-02-13 22:56:41 INFO SimpleDataGson:63 - Generating Map from json Time(ms):: 1437310102 -2016-02-13 22:56:41 INFO SimpleDataGson:64 - -------------------------------------------------------------------------- -2016-02-13 22:56:43 INFO SimpleDataGson:76 - Generating Actual Object from json Time(ms):: 1185691542 -2016-02-13 22:56:43 INFO SimpleDataGson:77 - -------------------------------------------------------------------------- -2016-02-13 22:56:44 INFO SimpleDataGson:28 - -------Round 35 -2016-02-13 22:56:47 INFO SimpleDataGson:53 - Json Generation Time(ms):: 1189237551 -2016-02-13 22:56:47 INFO SimpleDataGson:30 - Size of Simple content Gson :: 101 MB -2016-02-13 22:56:47 INFO SimpleDataGson:31 - -------------------------------------------------------------------------- -2016-02-13 22:56:48 INFO SimpleDataGson:63 - Generating Map from json Time(ms):: 1490416540 -2016-02-13 22:56:48 INFO SimpleDataGson:64 - -------------------------------------------------------------------------- -2016-02-13 22:56:50 INFO SimpleDataGson:76 - Generating Actual Object from json Time(ms):: 1143874066 -2016-02-13 22:56:50 INFO SimpleDataGson:77 - -------------------------------------------------------------------------- -2016-02-13 22:56:51 INFO SimpleDataGson:28 - -------Round 36 -2016-02-13 22:56:54 INFO SimpleDataGson:53 - Json Generation Time(ms):: 1188084496 -2016-02-13 22:56:54 INFO SimpleDataGson:30 - Size of Simple content Gson :: 101 MB -2016-02-13 22:56:54 INFO SimpleDataGson:31 - -------------------------------------------------------------------------- -2016-02-13 22:56:55 INFO SimpleDataGson:63 - Generating Map from json Time(ms):: 1448132868 -2016-02-13 22:56:55 INFO SimpleDataGson:64 - -------------------------------------------------------------------------- -2016-02-13 22:56:57 INFO SimpleDataGson:76 - Generating Actual Object from json Time(ms):: 1162009908 -2016-02-13 22:56:57 INFO SimpleDataGson:77 - -------------------------------------------------------------------------- -2016-02-13 22:56:58 INFO SimpleDataGson:28 - -------Round 37 -2016-02-13 22:57:01 INFO SimpleDataGson:53 - Json Generation Time(ms):: 1197328276 -2016-02-13 22:57:01 INFO SimpleDataGson:30 - Size of Simple content Gson :: 101 MB -2016-02-13 22:57:01 INFO SimpleDataGson:31 - -------------------------------------------------------------------------- -2016-02-13 22:57:02 INFO SimpleDataGson:63 - Generating Map from json Time(ms):: 1498333577 -2016-02-13 22:57:02 INFO SimpleDataGson:64 - -------------------------------------------------------------------------- -2016-02-13 22:57:04 INFO SimpleDataGson:76 - Generating Actual Object from json Time(ms):: 1158750879 -2016-02-13 22:57:04 INFO SimpleDataGson:77 - -------------------------------------------------------------------------- -2016-02-13 22:57:05 INFO SimpleDataGson:28 - -------Round 38 -2016-02-13 22:57:08 INFO SimpleDataGson:53 - Json Generation Time(ms):: 1171911335 -2016-02-13 22:57:08 INFO SimpleDataGson:30 - Size of Simple content Gson :: 101 MB -2016-02-13 22:57:08 INFO SimpleDataGson:31 - -------------------------------------------------------------------------- -2016-02-13 22:57:09 INFO SimpleDataGson:63 - Generating Map from json Time(ms):: 1439759504 -2016-02-13 22:57:09 INFO SimpleDataGson:64 - -------------------------------------------------------------------------- -2016-02-13 22:57:11 INFO SimpleDataGson:76 - Generating Actual Object from json Time(ms):: 1174249814 -2016-02-13 22:57:11 INFO SimpleDataGson:77 - -------------------------------------------------------------------------- -2016-02-13 22:57:12 INFO SimpleDataGson:28 - -------Round 39 -2016-02-13 22:57:15 INFO SimpleDataGson:53 - Json Generation Time(ms):: 1193157384 -2016-02-13 22:57:15 INFO SimpleDataGson:30 - Size of Simple content Gson :: 101 MB -2016-02-13 22:57:15 INFO SimpleDataGson:31 - -------------------------------------------------------------------------- -2016-02-13 22:57:16 INFO SimpleDataGson:63 - Generating Map from json Time(ms):: 1524814361 -2016-02-13 22:57:16 INFO SimpleDataGson:64 - -------------------------------------------------------------------------- -2016-02-13 22:57:19 INFO SimpleDataGson:76 - Generating Actual Object from json Time(ms):: 1160014858 -2016-02-13 22:57:19 INFO SimpleDataGson:77 - -------------------------------------------------------------------------- -2016-02-13 22:57:20 INFO SimpleDataGson:28 - -------Round 40 -2016-02-13 22:57:22 INFO SimpleDataGson:53 - Json Generation Time(ms):: 1246414616 -2016-02-13 22:57:22 INFO SimpleDataGson:30 - Size of Simple content Gson :: 101 MB -2016-02-13 22:57:22 INFO SimpleDataGson:31 - -------------------------------------------------------------------------- -2016-02-13 22:57:24 INFO SimpleDataGson:63 - Generating Map from json Time(ms):: 1537631387 -2016-02-13 22:57:24 INFO SimpleDataGson:64 - -------------------------------------------------------------------------- -2016-02-13 22:57:26 INFO SimpleDataGson:76 - Generating Actual Object from json Time(ms):: 1195739421 -2016-02-13 22:57:26 INFO SimpleDataGson:77 - -------------------------------------------------------------------------- -2016-02-13 22:57:27 INFO SimpleDataGson:28 - -------Round 41 -2016-02-13 22:57:29 INFO SimpleDataGson:53 - Json Generation Time(ms):: 1177802928 -2016-02-13 22:57:29 INFO SimpleDataGson:30 - Size of Simple content Gson :: 101 MB -2016-02-13 22:57:29 INFO SimpleDataGson:31 - -------------------------------------------------------------------------- -2016-02-13 22:57:31 INFO SimpleDataGson:63 - Generating Map from json Time(ms):: 1622097675 -2016-02-13 22:57:31 INFO SimpleDataGson:64 - -------------------------------------------------------------------------- -2016-02-13 22:57:34 INFO SimpleDataGson:76 - Generating Actual Object from json Time(ms):: 1579197410 -2016-02-13 22:57:34 INFO SimpleDataGson:77 - -------------------------------------------------------------------------- -2016-02-13 22:57:35 INFO SimpleDataGson:28 - -------Round 42 -2016-02-13 22:57:38 INFO SimpleDataGson:53 - Json Generation Time(ms):: 1561412498 -2016-02-13 22:57:38 INFO SimpleDataGson:30 - Size of Simple content Gson :: 101 MB -2016-02-13 22:57:38 INFO SimpleDataGson:31 - -------------------------------------------------------------------------- -2016-02-13 22:57:40 INFO SimpleDataGson:63 - Generating Map from json Time(ms):: 2263416744 -2016-02-13 22:57:40 INFO SimpleDataGson:64 - -------------------------------------------------------------------------- -2016-02-13 22:57:43 INFO SimpleDataGson:76 - Generating Actual Object from json Time(ms):: 1524538828 -2016-02-13 22:57:43 INFO SimpleDataGson:77 - -------------------------------------------------------------------------- -2016-02-13 22:57:44 INFO SimpleDataGson:28 - -------Round 43 -2016-02-13 22:57:46 INFO SimpleDataGson:53 - Json Generation Time(ms):: 1210692026 -2016-02-13 22:57:46 INFO SimpleDataGson:30 - Size of Simple content Gson :: 101 MB -2016-02-13 22:57:46 INFO SimpleDataGson:31 - -------------------------------------------------------------------------- -2016-02-13 22:57:48 INFO SimpleDataGson:63 - Generating Map from json Time(ms):: 1532155857 -2016-02-13 22:57:48 INFO SimpleDataGson:64 - -------------------------------------------------------------------------- -2016-02-13 22:57:50 INFO SimpleDataGson:76 - Generating Actual Object from json Time(ms):: 1145853325 -2016-02-13 22:57:50 INFO SimpleDataGson:77 - -------------------------------------------------------------------------- -2016-02-13 22:57:51 INFO SimpleDataGson:28 - -------Round 44 -2016-02-13 22:57:53 INFO SimpleDataGson:53 - Json Generation Time(ms):: 1238135991 -2016-02-13 22:57:54 INFO SimpleDataGson:30 - Size of Simple content Gson :: 101 MB -2016-02-13 22:57:54 INFO SimpleDataGson:31 - -------------------------------------------------------------------------- -2016-02-13 22:57:55 INFO SimpleDataGson:63 - Generating Map from json Time(ms):: 1515745453 -2016-02-13 22:57:55 INFO SimpleDataGson:64 - -------------------------------------------------------------------------- -2016-02-13 22:57:57 INFO SimpleDataGson:76 - Generating Actual Object from json Time(ms):: 1289585678 -2016-02-13 22:57:57 INFO SimpleDataGson:77 - -------------------------------------------------------------------------- -2016-02-13 22:57:58 INFO SimpleDataGson:28 - -------Round 45 -2016-02-13 22:58:01 INFO SimpleDataGson:53 - Json Generation Time(ms):: 1255531683 -2016-02-13 22:58:01 INFO SimpleDataGson:30 - Size of Simple content Gson :: 101 MB -2016-02-13 22:58:01 INFO SimpleDataGson:31 - -------------------------------------------------------------------------- -2016-02-13 22:58:03 INFO SimpleDataGson:63 - Generating Map from json Time(ms):: 1723848336 -2016-02-13 22:58:03 INFO SimpleDataGson:64 - -------------------------------------------------------------------------- -2016-02-13 22:58:05 INFO SimpleDataGson:76 - Generating Actual Object from json Time(ms):: 1152875078 -2016-02-13 22:58:05 INFO SimpleDataGson:77 - -------------------------------------------------------------------------- -2016-02-13 22:58:06 INFO SimpleDataGson:28 - -------Round 46 -2016-02-13 22:58:08 INFO SimpleDataGson:53 - Json Generation Time(ms):: 1184311903 -2016-02-13 22:58:08 INFO SimpleDataGson:30 - Size of Simple content Gson :: 101 MB -2016-02-13 22:58:08 INFO SimpleDataGson:31 - -------------------------------------------------------------------------- -2016-02-13 22:58:10 INFO SimpleDataGson:63 - Generating Map from json Time(ms):: 1442687734 -2016-02-13 22:58:10 INFO SimpleDataGson:64 - -------------------------------------------------------------------------- -2016-02-13 22:58:12 INFO SimpleDataGson:76 - Generating Actual Object from json Time(ms):: 1166037112 -2016-02-13 22:58:12 INFO SimpleDataGson:77 - -------------------------------------------------------------------------- -2016-02-13 22:58:13 INFO SimpleDataGson:28 - -------Round 47 -2016-02-13 22:58:15 INFO SimpleDataGson:53 - Json Generation Time(ms):: 1182361066 -2016-02-13 22:58:15 INFO SimpleDataGson:30 - Size of Simple content Gson :: 101 MB -2016-02-13 22:58:15 INFO SimpleDataGson:31 - -------------------------------------------------------------------------- -2016-02-13 22:58:17 INFO SimpleDataGson:63 - Generating Map from json Time(ms):: 1538499040 -2016-02-13 22:58:17 INFO SimpleDataGson:64 - -------------------------------------------------------------------------- -2016-02-13 22:58:19 INFO SimpleDataGson:76 - Generating Actual Object from json Time(ms):: 1152594808 -2016-02-13 22:58:19 INFO SimpleDataGson:77 - -------------------------------------------------------------------------- -2016-02-13 22:58:20 INFO SimpleDataGson:28 - -------Round 48 -2016-02-13 22:58:22 INFO SimpleDataGson:53 - Json Generation Time(ms):: 1189790196 -2016-02-13 22:58:22 INFO SimpleDataGson:30 - Size of Simple content Gson :: 101 MB -2016-02-13 22:58:22 INFO SimpleDataGson:31 - -------------------------------------------------------------------------- -2016-02-13 22:58:24 INFO SimpleDataGson:63 - Generating Map from json Time(ms):: 1436873118 -2016-02-13 22:58:24 INFO SimpleDataGson:64 - -------------------------------------------------------------------------- -2016-02-13 22:58:26 INFO SimpleDataGson:76 - Generating Actual Object from json Time(ms):: 1165948689 -2016-02-13 22:58:26 INFO SimpleDataGson:77 - -------------------------------------------------------------------------- -2016-02-13 22:58:27 INFO SimpleDataGson:28 - -------Round 49 -2016-02-13 22:58:29 INFO SimpleDataGson:53 - Json Generation Time(ms):: 1187428428 -2016-02-13 22:58:29 INFO SimpleDataGson:30 - Size of Simple content Gson :: 101 MB -2016-02-13 22:58:29 INFO SimpleDataGson:31 - -------------------------------------------------------------------------- -2016-02-13 22:58:31 INFO SimpleDataGson:63 - Generating Map from json Time(ms):: 1504368068 -2016-02-13 22:58:31 INFO SimpleDataGson:64 - -------------------------------------------------------------------------- -2016-02-13 22:58:33 INFO SimpleDataGson:76 - Generating Actual Object from json Time(ms):: 1247714122 -2016-02-13 22:58:33 INFO SimpleDataGson:77 - -------------------------------------------------------------------------- -2016-02-13 22:58:34 INFO SimpleDataGson:28 - -------Round 50 -2016-02-13 22:58:36 INFO SimpleDataGson:53 - Json Generation Time(ms):: 1186676830 -2016-02-13 22:58:37 INFO SimpleDataGson:30 - Size of Simple content Gson :: 101 MB -2016-02-13 22:58:37 INFO SimpleDataGson:31 - -------------------------------------------------------------------------- -2016-02-13 22:58:38 INFO SimpleDataGson:63 - Generating Map from json Time(ms):: 1520818736 -2016-02-13 22:58:38 INFO SimpleDataGson:64 - -------------------------------------------------------------------------- -2016-02-13 22:58:40 INFO SimpleDataGson:76 - Generating Actual Object from json Time(ms):: 1243656521 -2016-02-13 22:58:40 INFO SimpleDataGson:77 - -------------------------------------------------------------------------- -2016-02-13 22:58:41 INFO SimpleDataGson:39 - -------------------------------------------------------------------------- -2016-02-13 22:58:41 INFO SimpleDataGson:40 - Average Time to Generate JSON : 1262428946 -2016-02-13 22:58:41 INFO SimpleDataGson:41 - Average Time to Parse JSON To Map : 1555408963 -2016-02-13 22:58:41 INFO SimpleDataGson:42 - Average Time to Parse JSON To Actual Object : 1201992893 -2016-02-13 22:58:41 INFO SimpleDataGson:43 - -------------------------------------------------------------------------- -2016-02-13 22:59:20 INFO SimpleDataJackson:31 - -------Round 1 -2016-02-13 22:59:23 INFO SimpleDataJackson:58 - Json Generation Time(ms):: 1994045248 -2016-02-13 22:59:23 INFO SimpleDataJackson:33 - Size of Simple content Jackson :: 101 MB -2016-02-13 22:59:23 INFO SimpleDataJackson:34 - -------------------------------------------------------------------------- -2016-02-13 22:59:28 INFO SimpleDataJackson:68 - Generating Map from json Time(ms):: 4419702826 -2016-02-13 22:59:28 INFO SimpleDataJackson:69 - -------------------------------------------------------------------------- -2016-02-13 22:59:30 INFO SimpleDataJackson:81 - Generating Actual Object from json Time(ms):: 871548287 -2016-02-13 22:59:31 INFO SimpleDataJackson:31 - -------Round 2 -2016-02-13 22:59:33 INFO SimpleDataJackson:58 - Json Generation Time(ms):: 450226605 -2016-02-13 22:59:33 INFO SimpleDataJackson:33 - Size of Simple content Jackson :: 101 MB -2016-02-13 22:59:33 INFO SimpleDataJackson:34 - -------------------------------------------------------------------------- -2016-02-13 22:59:37 INFO SimpleDataJackson:68 - Generating Map from json Time(ms):: 4073340752 -2016-02-13 22:59:37 INFO SimpleDataJackson:69 - -------------------------------------------------------------------------- -2016-02-13 22:59:39 INFO SimpleDataJackson:81 - Generating Actual Object from json Time(ms):: 807173018 -2016-02-13 22:59:40 INFO SimpleDataJackson:31 - -------Round 3 -2016-02-13 22:59:42 INFO SimpleDataJackson:58 - Json Generation Time(ms):: 441634946 -2016-02-13 22:59:42 INFO SimpleDataJackson:33 - Size of Simple content Jackson :: 101 MB -2016-02-13 22:59:42 INFO SimpleDataJackson:34 - -------------------------------------------------------------------------- -2016-02-13 22:59:43 INFO SimpleDataJackson:68 - Generating Map from json Time(ms):: 1366655996 -2016-02-13 22:59:43 INFO SimpleDataJackson:69 - -------------------------------------------------------------------------- -2016-02-13 22:59:46 INFO SimpleDataJackson:81 - Generating Actual Object from json Time(ms):: 994427363 -2016-02-13 22:59:47 INFO SimpleDataJackson:31 - -------Round 4 -2016-02-13 22:59:48 INFO SimpleDataJackson:58 - Json Generation Time(ms):: 513586979 -2016-02-13 22:59:49 INFO SimpleDataJackson:33 - Size of Simple content Jackson :: 101 MB -2016-02-13 22:59:49 INFO SimpleDataJackson:34 - -------------------------------------------------------------------------- -2016-02-13 22:59:50 INFO SimpleDataJackson:68 - Generating Map from json Time(ms):: 1715857087 -2016-02-13 22:59:50 INFO SimpleDataJackson:69 - -------------------------------------------------------------------------- -2016-02-13 22:59:53 INFO SimpleDataJackson:81 - Generating Actual Object from json Time(ms):: 952180402 -2016-02-13 22:59:54 INFO SimpleDataJackson:31 - -------Round 5 -2016-02-13 22:59:56 INFO SimpleDataJackson:58 - Json Generation Time(ms):: 532706528 -2016-02-13 22:59:56 INFO SimpleDataJackson:33 - Size of Simple content Jackson :: 101 MB -2016-02-13 22:59:56 INFO SimpleDataJackson:34 - -------------------------------------------------------------------------- -2016-02-13 22:59:57 INFO SimpleDataJackson:68 - Generating Map from json Time(ms):: 1361951011 -2016-02-13 22:59:57 INFO SimpleDataJackson:69 - -------------------------------------------------------------------------- -2016-02-13 23:00:00 INFO SimpleDataJackson:81 - Generating Actual Object from json Time(ms):: 814924656 -2016-02-13 23:00:01 INFO SimpleDataJackson:31 - -------Round 6 -2016-02-13 23:00:02 INFO SimpleDataJackson:58 - Json Generation Time(ms):: 438322627 -2016-02-13 23:00:02 INFO SimpleDataJackson:33 - Size of Simple content Jackson :: 101 MB -2016-02-13 23:00:02 INFO SimpleDataJackson:34 - -------------------------------------------------------------------------- -2016-02-13 23:00:04 INFO SimpleDataJackson:68 - Generating Map from json Time(ms):: 1357691696 -2016-02-13 23:00:04 INFO SimpleDataJackson:69 - -------------------------------------------------------------------------- -2016-02-13 23:00:06 INFO SimpleDataJackson:81 - Generating Actual Object from json Time(ms):: 787639774 -2016-02-13 23:00:07 INFO SimpleDataJackson:31 - -------Round 7 -2016-02-13 23:00:08 INFO SimpleDataJackson:58 - Json Generation Time(ms):: 438668425 -2016-02-13 23:00:08 INFO SimpleDataJackson:33 - Size of Simple content Jackson :: 101 MB -2016-02-13 23:00:08 INFO SimpleDataJackson:34 - -------------------------------------------------------------------------- -2016-02-13 23:00:10 INFO SimpleDataJackson:68 - Generating Map from json Time(ms):: 1374237103 -2016-02-13 23:00:10 INFO SimpleDataJackson:69 - -------------------------------------------------------------------------- -2016-02-13 23:00:12 INFO SimpleDataJackson:81 - Generating Actual Object from json Time(ms):: 807600529 -2016-02-13 23:00:13 INFO SimpleDataJackson:31 - -------Round 8 -2016-02-13 23:00:14 INFO SimpleDataJackson:58 - Json Generation Time(ms):: 457305594 -2016-02-13 23:00:14 INFO SimpleDataJackson:33 - Size of Simple content Jackson :: 101 MB -2016-02-13 23:00:14 INFO SimpleDataJackson:34 - -------------------------------------------------------------------------- -2016-02-13 23:00:16 INFO SimpleDataJackson:68 - Generating Map from json Time(ms):: 1384583805 -2016-02-13 23:00:16 INFO SimpleDataJackson:69 - -------------------------------------------------------------------------- -2016-02-13 23:00:18 INFO SimpleDataJackson:81 - Generating Actual Object from json Time(ms):: 810993376 -2016-02-13 23:00:19 INFO SimpleDataJackson:31 - -------Round 9 -2016-02-13 23:00:20 INFO SimpleDataJackson:58 - Json Generation Time(ms):: 440303465 -2016-02-13 23:00:21 INFO SimpleDataJackson:33 - Size of Simple content Jackson :: 101 MB -2016-02-13 23:00:21 INFO SimpleDataJackson:34 - -------------------------------------------------------------------------- -2016-02-13 23:00:22 INFO SimpleDataJackson:68 - Generating Map from json Time(ms):: 1378739583 -2016-02-13 23:00:22 INFO SimpleDataJackson:69 - -------------------------------------------------------------------------- -2016-02-13 23:00:24 INFO SimpleDataJackson:81 - Generating Actual Object from json Time(ms):: 785994471 -2016-02-13 23:00:25 INFO SimpleDataJackson:31 - -------Round 10 -2016-02-13 23:00:26 INFO SimpleDataJackson:58 - Json Generation Time(ms):: 442248382 -2016-02-13 23:00:27 INFO SimpleDataJackson:33 - Size of Simple content Jackson :: 101 MB -2016-02-13 23:00:27 INFO SimpleDataJackson:34 - -------------------------------------------------------------------------- -2016-02-13 23:00:28 INFO SimpleDataJackson:68 - Generating Map from json Time(ms):: 1338413458 -2016-02-13 23:00:28 INFO SimpleDataJackson:69 - -------------------------------------------------------------------------- -2016-02-13 23:00:30 INFO SimpleDataJackson:81 - Generating Actual Object from json Time(ms):: 783347301 -2016-02-13 23:00:31 INFO SimpleDataJackson:31 - -------Round 11 -2016-02-13 23:00:33 INFO SimpleDataJackson:58 - Json Generation Time(ms):: 444837129 -2016-02-13 23:00:33 INFO SimpleDataJackson:33 - Size of Simple content Jackson :: 101 MB -2016-02-13 23:00:33 INFO SimpleDataJackson:34 - -------------------------------------------------------------------------- -2016-02-13 23:00:34 INFO SimpleDataJackson:68 - Generating Map from json Time(ms):: 1337033424 -2016-02-13 23:00:34 INFO SimpleDataJackson:69 - -------------------------------------------------------------------------- -2016-02-13 23:00:36 INFO SimpleDataJackson:81 - Generating Actual Object from json Time(ms):: 779409704 -2016-02-13 23:00:37 INFO SimpleDataJackson:31 - -------Round 12 -2016-02-13 23:00:39 INFO SimpleDataJackson:58 - Json Generation Time(ms):: 444052373 -2016-02-13 23:00:39 INFO SimpleDataJackson:33 - Size of Simple content Jackson :: 101 MB -2016-02-13 23:00:39 INFO SimpleDataJackson:34 - -------------------------------------------------------------------------- -2016-02-13 23:00:40 INFO SimpleDataJackson:68 - Generating Map from json Time(ms):: 1352965001 -2016-02-13 23:00:40 INFO SimpleDataJackson:69 - -------------------------------------------------------------------------- -2016-02-13 23:00:42 INFO SimpleDataJackson:81 - Generating Actual Object from json Time(ms):: 781962924 -2016-02-13 23:00:43 INFO SimpleDataJackson:31 - -------Round 13 -2016-02-13 23:00:45 INFO SimpleDataJackson:58 - Json Generation Time(ms):: 440353993 -2016-02-13 23:00:45 INFO SimpleDataJackson:33 - Size of Simple content Jackson :: 101 MB -2016-02-13 23:00:45 INFO SimpleDataJackson:34 - -------------------------------------------------------------------------- -2016-02-13 23:00:46 INFO SimpleDataJackson:68 - Generating Map from json Time(ms):: 1368178532 -2016-02-13 23:00:46 INFO SimpleDataJackson:69 - -------------------------------------------------------------------------- -2016-02-13 23:00:49 INFO SimpleDataJackson:81 - Generating Actual Object from json Time(ms):: 1065239369 -2016-02-13 23:00:50 INFO SimpleDataJackson:31 - -------Round 14 -2016-02-13 23:00:52 INFO SimpleDataJackson:58 - Json Generation Time(ms):: 615157241 -2016-02-13 23:00:52 INFO SimpleDataJackson:33 - Size of Simple content Jackson :: 101 MB -2016-02-13 23:00:52 INFO SimpleDataJackson:34 - -------------------------------------------------------------------------- -2016-02-13 23:00:54 INFO SimpleDataJackson:68 - Generating Map from json Time(ms):: 1728276604 -2016-02-13 23:00:54 INFO SimpleDataJackson:69 - -------------------------------------------------------------------------- -2016-02-13 23:00:56 INFO SimpleDataJackson:81 - Generating Actual Object from json Time(ms):: 998166402 -2016-02-13 23:00:57 INFO SimpleDataJackson:31 - -------Round 15 -2016-02-13 23:00:59 INFO SimpleDataJackson:58 - Json Generation Time(ms):: 539145239 -2016-02-13 23:00:59 INFO SimpleDataJackson:33 - Size of Simple content Jackson :: 101 MB -2016-02-13 23:00:59 INFO SimpleDataJackson:34 - -------------------------------------------------------------------------- -2016-02-13 23:01:01 INFO SimpleDataJackson:68 - Generating Map from json Time(ms):: 1374288420 -2016-02-13 23:01:01 INFO SimpleDataJackson:69 - -------------------------------------------------------------------------- -2016-02-13 23:01:03 INFO SimpleDataJackson:81 - Generating Actual Object from json Time(ms):: 780897109 -2016-02-13 23:01:04 INFO SimpleDataJackson:31 - -------Round 16 -2016-02-13 23:01:05 INFO SimpleDataJackson:58 - Json Generation Time(ms):: 435791118 -2016-02-13 23:01:06 INFO SimpleDataJackson:33 - Size of Simple content Jackson :: 101 MB -2016-02-13 23:01:06 INFO SimpleDataJackson:34 - -------------------------------------------------------------------------- -2016-02-13 23:01:07 INFO SimpleDataJackson:68 - Generating Map from json Time(ms):: 1343672272 -2016-02-13 23:01:07 INFO SimpleDataJackson:69 - -------------------------------------------------------------------------- -2016-02-13 23:01:09 INFO SimpleDataJackson:81 - Generating Actual Object from json Time(ms):: 792992933 -2016-02-13 23:01:10 INFO SimpleDataJackson:31 - -------Round 17 -2016-02-13 23:01:11 INFO SimpleDataJackson:58 - Json Generation Time(ms):: 438859483 -2016-02-13 23:01:12 INFO SimpleDataJackson:33 - Size of Simple content Jackson :: 101 MB -2016-02-13 23:01:12 INFO SimpleDataJackson:34 - -------------------------------------------------------------------------- -2016-02-13 23:01:13 INFO SimpleDataJackson:68 - Generating Map from json Time(ms):: 1382370461 -2016-02-13 23:01:13 INFO SimpleDataJackson:69 - -------------------------------------------------------------------------- -2016-02-13 23:01:16 INFO SimpleDataJackson:81 - Generating Actual Object from json Time(ms):: 951572098 -2016-02-13 23:01:16 INFO SimpleDataJackson:31 - -------Round 18 -2016-02-13 23:01:18 INFO SimpleDataJackson:58 - Json Generation Time(ms):: 433854491 -2016-02-13 23:01:18 INFO SimpleDataJackson:33 - Size of Simple content Jackson :: 101 MB -2016-02-13 23:01:18 INFO SimpleDataJackson:34 - -------------------------------------------------------------------------- -2016-02-13 23:01:19 INFO SimpleDataJackson:68 - Generating Map from json Time(ms):: 1358839224 -2016-02-13 23:01:19 INFO SimpleDataJackson:69 - -------------------------------------------------------------------------- -2016-02-13 23:01:22 INFO SimpleDataJackson:81 - Generating Actual Object from json Time(ms):: 782784392 -2016-02-13 23:01:23 INFO SimpleDataJackson:31 - -------Round 19 -2016-02-13 23:01:24 INFO SimpleDataJackson:58 - Json Generation Time(ms):: 435710984 -2016-02-13 23:01:24 INFO SimpleDataJackson:33 - Size of Simple content Jackson :: 101 MB -2016-02-13 23:01:24 INFO SimpleDataJackson:34 - -------------------------------------------------------------------------- -2016-02-13 23:01:26 INFO SimpleDataJackson:68 - Generating Map from json Time(ms):: 1349415440 -2016-02-13 23:01:26 INFO SimpleDataJackson:69 - -------------------------------------------------------------------------- -2016-02-13 23:01:28 INFO SimpleDataJackson:81 - Generating Actual Object from json Time(ms):: 982777208 -2016-02-13 23:01:29 INFO SimpleDataJackson:31 - -------Round 20 -2016-02-13 23:01:31 INFO SimpleDataJackson:58 - Json Generation Time(ms):: 505858237 -2016-02-13 23:01:31 INFO SimpleDataJackson:33 - Size of Simple content Jackson :: 101 MB -2016-02-13 23:01:31 INFO SimpleDataJackson:34 - -------------------------------------------------------------------------- -2016-02-13 23:01:33 INFO SimpleDataJackson:68 - Generating Map from json Time(ms):: 1726464717 -2016-02-13 23:01:33 INFO SimpleDataJackson:69 - -------------------------------------------------------------------------- -2016-02-13 23:01:35 INFO SimpleDataJackson:81 - Generating Actual Object from json Time(ms):: 984660544 -2016-02-13 23:01:37 INFO SimpleDataJackson:31 - -------Round 21 -2016-02-13 23:01:38 INFO SimpleDataJackson:58 - Json Generation Time(ms):: 614672493 -2016-02-13 23:01:39 INFO SimpleDataJackson:33 - Size of Simple content Jackson :: 101 MB -2016-02-13 23:01:39 INFO SimpleDataJackson:34 - -------------------------------------------------------------------------- -2016-02-13 23:01:41 INFO SimpleDataJackson:68 - Generating Map from json Time(ms):: 1369641858 -2016-02-13 23:01:41 INFO SimpleDataJackson:69 - -------------------------------------------------------------------------- -2016-02-13 23:01:43 INFO SimpleDataJackson:81 - Generating Actual Object from json Time(ms):: 787754251 -2016-02-13 23:01:44 INFO SimpleDataJackson:31 - -------Round 22 -2016-02-13 23:01:45 INFO SimpleDataJackson:58 - Json Generation Time(ms):: 433494877 -2016-02-13 23:01:46 INFO SimpleDataJackson:33 - Size of Simple content Jackson :: 101 MB -2016-02-13 23:01:46 INFO SimpleDataJackson:34 - -------------------------------------------------------------------------- -2016-02-13 23:01:47 INFO SimpleDataJackson:68 - Generating Map from json Time(ms):: 1349406755 -2016-02-13 23:01:47 INFO SimpleDataJackson:69 - -------------------------------------------------------------------------- -2016-02-13 23:01:49 INFO SimpleDataJackson:81 - Generating Actual Object from json Time(ms):: 797948581 -2016-02-13 23:01:50 INFO SimpleDataJackson:31 - -------Round 23 -2016-02-13 23:01:51 INFO SimpleDataJackson:58 - Json Generation Time(ms):: 432709726 -2016-02-13 23:01:52 INFO SimpleDataJackson:33 - Size of Simple content Jackson :: 101 MB -2016-02-13 23:01:52 INFO SimpleDataJackson:34 - -------------------------------------------------------------------------- -2016-02-13 23:01:53 INFO SimpleDataJackson:68 - Generating Map from json Time(ms):: 1356035734 -2016-02-13 23:01:53 INFO SimpleDataJackson:69 - -------------------------------------------------------------------------- -2016-02-13 23:01:55 INFO SimpleDataJackson:81 - Generating Actual Object from json Time(ms):: 808091594 -2016-02-13 23:01:56 INFO SimpleDataJackson:31 - -------Round 24 -2016-02-13 23:01:58 INFO SimpleDataJackson:58 - Json Generation Time(ms):: 435182418 -2016-02-13 23:01:58 INFO SimpleDataJackson:33 - Size of Simple content Jackson :: 101 MB -2016-02-13 23:01:58 INFO SimpleDataJackson:34 - -------------------------------------------------------------------------- -2016-02-13 23:01:59 INFO SimpleDataJackson:68 - Generating Map from json Time(ms):: 1364351859 -2016-02-13 23:01:59 INFO SimpleDataJackson:69 - -------------------------------------------------------------------------- -2016-02-13 23:02:01 INFO SimpleDataJackson:81 - Generating Actual Object from json Time(ms):: 788939675 -2016-02-13 23:02:02 INFO SimpleDataJackson:31 - -------Round 25 -2016-02-13 23:02:04 INFO SimpleDataJackson:58 - Json Generation Time(ms):: 439961220 -2016-02-13 23:02:04 INFO SimpleDataJackson:33 - Size of Simple content Jackson :: 101 MB -2016-02-13 23:02:04 INFO SimpleDataJackson:34 - -------------------------------------------------------------------------- -2016-02-13 23:02:05 INFO SimpleDataJackson:68 - Generating Map from json Time(ms):: 1352715915 -2016-02-13 23:02:06 INFO SimpleDataJackson:69 - -------------------------------------------------------------------------- -2016-02-13 23:02:08 INFO SimpleDataJackson:81 - Generating Actual Object from json Time(ms):: 792822008 -2016-02-13 23:02:09 INFO SimpleDataJackson:31 - -------Round 26 -2016-02-13 23:02:10 INFO SimpleDataJackson:58 - Json Generation Time(ms):: 443481964 -2016-02-13 23:02:10 INFO SimpleDataJackson:33 - Size of Simple content Jackson :: 101 MB -2016-02-13 23:02:10 INFO SimpleDataJackson:34 - -------------------------------------------------------------------------- -2016-02-13 23:02:12 INFO SimpleDataJackson:68 - Generating Map from json Time(ms):: 1324584302 -2016-02-13 23:02:12 INFO SimpleDataJackson:69 - -------------------------------------------------------------------------- -2016-02-13 23:02:14 INFO SimpleDataJackson:81 - Generating Actual Object from json Time(ms):: 779368255 -2016-02-13 23:02:15 INFO SimpleDataJackson:31 - -------Round 27 -2016-02-13 23:02:16 INFO SimpleDataJackson:58 - Json Generation Time(ms):: 470963035 -2016-02-13 23:02:17 INFO SimpleDataJackson:33 - Size of Simple content Jackson :: 101 MB -2016-02-13 23:02:17 INFO SimpleDataJackson:34 - -------------------------------------------------------------------------- -2016-02-13 23:02:18 INFO SimpleDataJackson:68 - Generating Map from json Time(ms):: 1342280001 -2016-02-13 23:02:18 INFO SimpleDataJackson:69 - -------------------------------------------------------------------------- -2016-02-13 23:02:20 INFO SimpleDataJackson:81 - Generating Actual Object from json Time(ms):: 831557303 -2016-02-13 23:02:21 INFO SimpleDataJackson:31 - -------Round 28 -2016-02-13 23:02:22 INFO SimpleDataJackson:58 - Json Generation Time(ms):: 439997932 -2016-02-13 23:02:23 INFO SimpleDataJackson:33 - Size of Simple content Jackson :: 101 MB -2016-02-13 23:02:23 INFO SimpleDataJackson:34 - -------------------------------------------------------------------------- -2016-02-13 23:02:24 INFO SimpleDataJackson:68 - Generating Map from json Time(ms):: 1353183690 -2016-02-13 23:02:24 INFO SimpleDataJackson:69 - -------------------------------------------------------------------------- -2016-02-13 23:02:26 INFO SimpleDataJackson:81 - Generating Actual Object from json Time(ms):: 807440262 -2016-02-13 23:02:27 INFO SimpleDataJackson:31 - -------Round 29 -2016-02-13 23:02:29 INFO SimpleDataJackson:58 - Json Generation Time(ms):: 442765105 -2016-02-13 23:02:29 INFO SimpleDataJackson:33 - Size of Simple content Jackson :: 101 MB -2016-02-13 23:02:29 INFO SimpleDataJackson:34 - -------------------------------------------------------------------------- -2016-02-13 23:02:30 INFO SimpleDataJackson:68 - Generating Map from json Time(ms):: 1384797757 -2016-02-13 23:02:30 INFO SimpleDataJackson:69 - -------------------------------------------------------------------------- -2016-02-13 23:02:32 INFO SimpleDataJackson:81 - Generating Actual Object from json Time(ms):: 796111036 -2016-02-13 23:02:33 INFO SimpleDataJackson:31 - -------Round 30 -2016-02-13 23:02:35 INFO SimpleDataJackson:58 - Json Generation Time(ms):: 446163873 -2016-02-13 23:02:35 INFO SimpleDataJackson:33 - Size of Simple content Jackson :: 101 MB -2016-02-13 23:02:35 INFO SimpleDataJackson:34 - -------------------------------------------------------------------------- -2016-02-13 23:02:36 INFO SimpleDataJackson:68 - Generating Map from json Time(ms):: 1362167727 -2016-02-13 23:02:36 INFO SimpleDataJackson:69 - -------------------------------------------------------------------------- -2016-02-13 23:02:38 INFO SimpleDataJackson:81 - Generating Actual Object from json Time(ms):: 774013124 -2016-02-13 23:02:39 INFO SimpleDataJackson:31 - -------Round 31 -2016-02-13 23:02:41 INFO SimpleDataJackson:58 - Json Generation Time(ms):: 438451709 -2016-02-13 23:02:41 INFO SimpleDataJackson:33 - Size of Simple content Jackson :: 101 MB -2016-02-13 23:02:41 INFO SimpleDataJackson:34 - -------------------------------------------------------------------------- -2016-02-13 23:02:42 INFO SimpleDataJackson:68 - Generating Map from json Time(ms):: 1366723892 -2016-02-13 23:02:42 INFO SimpleDataJackson:69 - -------------------------------------------------------------------------- -2016-02-13 23:02:45 INFO SimpleDataJackson:81 - Generating Actual Object from json Time(ms):: 785803808 -2016-02-13 23:02:46 INFO SimpleDataJackson:31 - -------Round 32 -2016-02-13 23:02:47 INFO SimpleDataJackson:58 - Json Generation Time(ms):: 432899599 -2016-02-13 23:02:47 INFO SimpleDataJackson:33 - Size of Simple content Jackson :: 101 MB -2016-02-13 23:02:47 INFO SimpleDataJackson:34 - -------------------------------------------------------------------------- -2016-02-13 23:02:48 INFO SimpleDataJackson:68 - Generating Map from json Time(ms):: 1352116295 -2016-02-13 23:02:48 INFO SimpleDataJackson:69 - -------------------------------------------------------------------------- -2016-02-13 23:02:51 INFO SimpleDataJackson:81 - Generating Actual Object from json Time(ms):: 802779884 -2016-02-13 23:02:52 INFO SimpleDataJackson:31 - -------Round 33 -2016-02-13 23:02:53 INFO SimpleDataJackson:58 - Json Generation Time(ms):: 435379397 -2016-02-13 23:02:53 INFO SimpleDataJackson:33 - Size of Simple content Jackson :: 101 MB -2016-02-13 23:02:53 INFO SimpleDataJackson:34 - -------------------------------------------------------------------------- -2016-02-13 23:02:55 INFO SimpleDataJackson:68 - Generating Map from json Time(ms):: 1359177127 -2016-02-13 23:02:55 INFO SimpleDataJackson:69 - -------------------------------------------------------------------------- -2016-02-13 23:02:57 INFO SimpleDataJackson:81 - Generating Actual Object from json Time(ms):: 774916304 -2016-02-13 23:02:58 INFO SimpleDataJackson:31 - -------Round 34 -2016-02-13 23:02:59 INFO SimpleDataJackson:58 - Json Generation Time(ms):: 437675243 -2016-02-13 23:02:59 INFO SimpleDataJackson:33 - Size of Simple content Jackson :: 101 MB -2016-02-13 23:02:59 INFO SimpleDataJackson:34 - -------------------------------------------------------------------------- -2016-02-13 23:03:01 INFO SimpleDataJackson:68 - Generating Map from json Time(ms):: 1358610665 -2016-02-13 23:03:01 INFO SimpleDataJackson:69 - -------------------------------------------------------------------------- -2016-02-13 23:03:03 INFO SimpleDataJackson:81 - Generating Actual Object from json Time(ms):: 784634964 -2016-02-13 23:03:04 INFO SimpleDataJackson:31 - -------Round 35 -2016-02-13 23:03:05 INFO SimpleDataJackson:58 - Json Generation Time(ms):: 436069019 -2016-02-13 23:03:05 INFO SimpleDataJackson:33 - Size of Simple content Jackson :: 101 MB -2016-02-13 23:03:05 INFO SimpleDataJackson:34 - -------------------------------------------------------------------------- -2016-02-13 23:03:07 INFO SimpleDataJackson:68 - Generating Map from json Time(ms):: 1388644958 -2016-02-13 23:03:07 INFO SimpleDataJackson:69 - -------------------------------------------------------------------------- -2016-02-13 23:03:09 INFO SimpleDataJackson:81 - Generating Actual Object from json Time(ms):: 781348304 -2016-02-13 23:03:10 INFO SimpleDataJackson:31 - -------Round 36 -2016-02-13 23:03:11 INFO SimpleDataJackson:58 - Json Generation Time(ms):: 436565216 -2016-02-13 23:03:11 INFO SimpleDataJackson:33 - Size of Simple content Jackson :: 101 MB -2016-02-13 23:03:11 INFO SimpleDataJackson:34 - -------------------------------------------------------------------------- -2016-02-13 23:03:13 INFO SimpleDataJackson:68 - Generating Map from json Time(ms):: 1373221420 -2016-02-13 23:03:13 INFO SimpleDataJackson:69 - -------------------------------------------------------------------------- -2016-02-13 23:03:15 INFO SimpleDataJackson:81 - Generating Actual Object from json Time(ms):: 778034801 -2016-02-13 23:03:16 INFO SimpleDataJackson:31 - -------Round 37 -2016-02-13 23:03:17 INFO SimpleDataJackson:58 - Json Generation Time(ms):: 437646426 -2016-02-13 23:03:18 INFO SimpleDataJackson:33 - Size of Simple content Jackson :: 101 MB -2016-02-13 23:03:18 INFO SimpleDataJackson:34 - -------------------------------------------------------------------------- -2016-02-13 23:03:19 INFO SimpleDataJackson:68 - Generating Map from json Time(ms):: 1371113868 -2016-02-13 23:03:19 INFO SimpleDataJackson:69 - -------------------------------------------------------------------------- -2016-02-13 23:03:21 INFO SimpleDataJackson:81 - Generating Actual Object from json Time(ms):: 773487322 -2016-02-13 23:03:22 INFO SimpleDataJackson:31 - -------Round 38 -2016-02-13 23:03:23 INFO SimpleDataJackson:58 - Json Generation Time(ms):: 428990029 -2016-02-13 23:03:24 INFO SimpleDataJackson:33 - Size of Simple content Jackson :: 101 MB -2016-02-13 23:03:24 INFO SimpleDataJackson:34 - -------------------------------------------------------------------------- -2016-02-13 23:03:25 INFO SimpleDataJackson:68 - Generating Map from json Time(ms):: 1372305608 -2016-02-13 23:03:25 INFO SimpleDataJackson:69 - -------------------------------------------------------------------------- -2016-02-13 23:03:27 INFO SimpleDataJackson:81 - Generating Actual Object from json Time(ms):: 787641353 -2016-02-13 23:03:28 INFO SimpleDataJackson:31 - -------Round 39 -2016-02-13 23:03:29 INFO SimpleDataJackson:58 - Json Generation Time(ms):: 435520716 -2016-02-13 23:03:30 INFO SimpleDataJackson:33 - Size of Simple content Jackson :: 101 MB -2016-02-13 23:03:30 INFO SimpleDataJackson:34 - -------------------------------------------------------------------------- -2016-02-13 23:03:31 INFO SimpleDataJackson:68 - Generating Map from json Time(ms):: 1344215838 -2016-02-13 23:03:31 INFO SimpleDataJackson:69 - -------------------------------------------------------------------------- -2016-02-13 23:03:33 INFO SimpleDataJackson:81 - Generating Actual Object from json Time(ms):: 780171564 -2016-02-13 23:03:34 INFO SimpleDataJackson:31 - -------Round 40 -2016-02-13 23:03:36 INFO SimpleDataJackson:58 - Json Generation Time(ms):: 431967602 -2016-02-13 23:03:36 INFO SimpleDataJackson:33 - Size of Simple content Jackson :: 101 MB -2016-02-13 23:03:36 INFO SimpleDataJackson:34 - -------------------------------------------------------------------------- -2016-02-13 23:03:37 INFO SimpleDataJackson:68 - Generating Map from json Time(ms):: 1342673957 -2016-02-13 23:03:37 INFO SimpleDataJackson:69 - -------------------------------------------------------------------------- -2016-02-13 23:03:39 INFO SimpleDataJackson:81 - Generating Actual Object from json Time(ms):: 830946630 -2016-02-13 23:03:40 INFO SimpleDataJackson:31 - -------Round 41 -2016-02-13 23:03:42 INFO SimpleDataJackson:58 - Json Generation Time(ms):: 439787136 -2016-02-13 23:03:42 INFO SimpleDataJackson:33 - Size of Simple content Jackson :: 101 MB -2016-02-13 23:03:42 INFO SimpleDataJackson:34 - -------------------------------------------------------------------------- -2016-02-13 23:03:43 INFO SimpleDataJackson:68 - Generating Map from json Time(ms):: 1336626046 -2016-02-13 23:03:43 INFO SimpleDataJackson:69 - -------------------------------------------------------------------------- -2016-02-13 23:03:46 INFO SimpleDataJackson:81 - Generating Actual Object from json Time(ms):: 966202984 -2016-02-13 23:03:47 INFO SimpleDataJackson:31 - -------Round 42 -2016-02-13 23:03:48 INFO SimpleDataJackson:58 - Json Generation Time(ms):: 558927568 -2016-02-13 23:03:49 INFO SimpleDataJackson:33 - Size of Simple content Jackson :: 101 MB -2016-02-13 23:03:49 INFO SimpleDataJackson:34 - -------------------------------------------------------------------------- -2016-02-13 23:03:50 INFO SimpleDataJackson:68 - Generating Map from json Time(ms):: 1730400735 -2016-02-13 23:03:50 INFO SimpleDataJackson:69 - -------------------------------------------------------------------------- -2016-02-13 23:03:53 INFO SimpleDataJackson:81 - Generating Actual Object from json Time(ms):: 1018089261 -2016-02-13 23:03:54 INFO SimpleDataJackson:31 - -------Round 43 -2016-02-13 23:03:56 INFO SimpleDataJackson:58 - Json Generation Time(ms):: 553832969 -2016-02-13 23:03:56 INFO SimpleDataJackson:33 - Size of Simple content Jackson :: 101 MB -2016-02-13 23:03:56 INFO SimpleDataJackson:34 - -------------------------------------------------------------------------- -2016-02-13 23:03:58 INFO SimpleDataJackson:68 - Generating Map from json Time(ms):: 1374591980 -2016-02-13 23:03:58 INFO SimpleDataJackson:69 - -------------------------------------------------------------------------- -2016-02-13 23:04:00 INFO SimpleDataJackson:81 - Generating Actual Object from json Time(ms):: 791875011 -2016-02-13 23:04:01 INFO SimpleDataJackson:31 - -------Round 44 -2016-02-13 23:04:02 INFO SimpleDataJackson:58 - Json Generation Time(ms):: 435538085 -2016-02-13 23:04:02 INFO SimpleDataJackson:33 - Size of Simple content Jackson :: 101 MB -2016-02-13 23:04:02 INFO SimpleDataJackson:34 - -------------------------------------------------------------------------- -2016-02-13 23:04:04 INFO SimpleDataJackson:68 - Generating Map from json Time(ms):: 1347747635 -2016-02-13 23:04:04 INFO SimpleDataJackson:69 - -------------------------------------------------------------------------- -2016-02-13 23:04:06 INFO SimpleDataJackson:81 - Generating Actual Object from json Time(ms):: 781452122 -2016-02-13 23:04:07 INFO SimpleDataJackson:31 - -------Round 45 -2016-02-13 23:04:08 INFO SimpleDataJackson:58 - Json Generation Time(ms):: 430329799 -2016-02-13 23:04:08 INFO SimpleDataJackson:33 - Size of Simple content Jackson :: 101 MB -2016-02-13 23:04:08 INFO SimpleDataJackson:34 - -------------------------------------------------------------------------- -2016-02-13 23:04:10 INFO SimpleDataJackson:68 - Generating Map from json Time(ms):: 1355000709 -2016-02-13 23:04:10 INFO SimpleDataJackson:69 - -------------------------------------------------------------------------- -2016-02-13 23:04:12 INFO SimpleDataJackson:81 - Generating Actual Object from json Time(ms):: 783088347 -2016-02-13 23:04:13 INFO SimpleDataJackson:31 - -------Round 46 -2016-02-13 23:04:14 INFO SimpleDataJackson:58 - Json Generation Time(ms):: 434882016 -2016-02-13 23:04:14 INFO SimpleDataJackson:33 - Size of Simple content Jackson :: 101 MB -2016-02-13 23:04:14 INFO SimpleDataJackson:34 - -------------------------------------------------------------------------- -2016-02-13 23:04:16 INFO SimpleDataJackson:68 - Generating Map from json Time(ms):: 1345464421 -2016-02-13 23:04:16 INFO SimpleDataJackson:69 - -------------------------------------------------------------------------- -2016-02-13 23:04:18 INFO SimpleDataJackson:81 - Generating Actual Object from json Time(ms):: 828007347 -2016-02-13 23:04:19 INFO SimpleDataJackson:31 - -------Round 47 -2016-02-13 23:04:21 INFO SimpleDataJackson:58 - Json Generation Time(ms):: 488757026 -2016-02-13 23:04:21 INFO SimpleDataJackson:33 - Size of Simple content Jackson :: 101 MB -2016-02-13 23:04:21 INFO SimpleDataJackson:34 - -------------------------------------------------------------------------- -2016-02-13 23:04:22 INFO SimpleDataJackson:68 - Generating Map from json Time(ms):: 1430288745 -2016-02-13 23:04:22 INFO SimpleDataJackson:69 - -------------------------------------------------------------------------- -2016-02-13 23:04:24 INFO SimpleDataJackson:81 - Generating Actual Object from json Time(ms):: 821152573 -2016-02-13 23:04:27 INFO SimpleDataJackson:31 - -------Round 48 -2016-02-13 23:04:34 INFO SimpleDataJackson:58 - Json Generation Time(ms):: 1746328759 -2016-02-13 23:04:35 INFO SimpleDataJackson:33 - Size of Simple content Jackson :: 101 MB -2016-02-13 23:04:35 INFO SimpleDataJackson:34 - -------------------------------------------------------------------------- -2016-02-13 23:04:39 INFO SimpleDataJackson:68 - Generating Map from json Time(ms):: 3671360072 -2016-02-13 23:04:39 INFO SimpleDataJackson:69 - -------------------------------------------------------------------------- -2016-02-13 23:04:43 INFO SimpleDataJackson:81 - Generating Actual Object from json Time(ms):: 1560371551 -2016-02-13 23:04:45 INFO SimpleDataJackson:31 - -------Round 49 -2016-02-13 23:04:47 INFO SimpleDataJackson:58 - Json Generation Time(ms):: 690772918 -2016-02-13 23:04:48 INFO SimpleDataJackson:33 - Size of Simple content Jackson :: 101 MB -2016-02-13 23:04:48 INFO SimpleDataJackson:34 - -------------------------------------------------------------------------- -2016-02-13 23:04:50 INFO SimpleDataJackson:68 - Generating Map from json Time(ms):: 2070935956 -2016-02-13 23:04:50 INFO SimpleDataJackson:69 - -------------------------------------------------------------------------- -2016-02-13 23:04:53 INFO SimpleDataJackson:81 - Generating Actual Object from json Time(ms):: 1102717396 -2016-02-13 23:04:54 INFO SimpleDataJackson:31 - -------Round 50 -2016-02-13 23:04:56 INFO SimpleDataJackson:58 - Json Generation Time(ms):: 521889684 -2016-02-13 23:04:56 INFO SimpleDataJackson:33 - Size of Simple content Jackson :: 101 MB -2016-02-13 23:04:56 INFO SimpleDataJackson:34 - -------------------------------------------------------------------------- -2016-02-13 23:04:58 INFO SimpleDataJackson:68 - Generating Map from json Time(ms):: 1620059599 -2016-02-13 23:04:58 INFO SimpleDataJackson:69 - -------------------------------------------------------------------------- -2016-02-13 23:05:00 INFO SimpleDataJackson:81 - Generating Actual Object from json Time(ms):: 813171982 -2016-02-13 23:05:01 INFO SimpleDataJackson:44 - -------------------------------------------------------------------------- -2016-02-13 23:05:01 INFO SimpleDataJackson:45 - Average Time to Generate JSON : 522685452 -2016-02-13 23:05:01 INFO SimpleDataJackson:46 - Average Time to Parse JSON To Map : 1571262450 -2016-02-13 23:05:01 INFO SimpleDataJackson:47 - Average Time to Parse JSON To Actual Object : 852524629 -2016-02-13 23:05:01 INFO SimpleDataJackson:48 - -------------------------------------------------------------------------- diff --git a/gson-jackson-performance/logs_Performance/log4j-application simple Gson Jackson 250mb 10R.log b/gson-jackson-performance/logs_Performance/log4j-application simple Gson Jackson 250mb 10R.log deleted file mode 100644 index 3926f450b9..0000000000 --- a/gson-jackson-performance/logs_Performance/log4j-application simple Gson Jackson 250mb 10R.log +++ /dev/null @@ -1,160 +0,0 @@ -2016-02-13 23:46:10 INFO SimpleDataGson:28 - -------Round 1 -2016-02-13 23:46:17 INFO SimpleDataGson:54 - Json Generation Time(ms):: 4115421919 -2016-02-13 23:46:18 INFO SimpleDataGson:30 - Size of Simple content Gson :: 251 MB -2016-02-13 23:46:18 INFO SimpleDataGson:31 - -------------------------------------------------------------------------- -2016-02-13 23:46:24 INFO SimpleDataGson:64 - Generating Map from json Time(ms):: 5979578577 -2016-02-13 23:46:24 INFO SimpleDataGson:65 - -------------------------------------------------------------------------- -2016-02-13 23:46:37 INFO SimpleDataGson:77 - Generating Actual Object from json Time(ms):: 8799068872 -2016-02-13 23:46:37 INFO SimpleDataGson:78 - -------------------------------------------------------------------------- -2016-02-13 23:46:41 INFO SimpleDataGson:28 - -------Round 2 -2016-02-13 23:46:46 INFO SimpleDataGson:54 - Json Generation Time(ms):: 3215032264 -2016-02-13 23:46:47 INFO SimpleDataGson:30 - Size of Simple content Gson :: 251 MB -2016-02-13 23:46:47 INFO SimpleDataGson:31 - -------------------------------------------------------------------------- -2016-02-13 23:46:52 INFO SimpleDataGson:64 - Generating Map from json Time(ms):: 5430384274 -2016-02-13 23:46:52 INFO SimpleDataGson:65 - -------------------------------------------------------------------------- -2016-02-13 23:46:58 INFO SimpleDataGson:77 - Generating Actual Object from json Time(ms):: 3081980964 -2016-02-13 23:46:58 INFO SimpleDataGson:78 - -------------------------------------------------------------------------- -2016-02-13 23:47:02 INFO SimpleDataGson:28 - -------Round 3 -2016-02-13 23:47:08 INFO SimpleDataGson:54 - Json Generation Time(ms):: 3074217879 -2016-02-13 23:47:08 INFO SimpleDataGson:30 - Size of Simple content Gson :: 251 MB -2016-02-13 23:47:08 INFO SimpleDataGson:31 - -------------------------------------------------------------------------- -2016-02-13 23:47:14 INFO SimpleDataGson:64 - Generating Map from json Time(ms):: 6177310679 -2016-02-13 23:47:14 INFO SimpleDataGson:65 - -------------------------------------------------------------------------- -2016-02-13 23:47:21 INFO SimpleDataGson:77 - Generating Actual Object from json Time(ms):: 3172692933 -2016-02-13 23:47:21 INFO SimpleDataGson:78 - -------------------------------------------------------------------------- -2016-02-13 23:47:24 INFO SimpleDataGson:28 - -------Round 4 -2016-02-13 23:47:31 INFO SimpleDataGson:54 - Json Generation Time(ms):: 4090244194 -2016-02-13 23:47:32 INFO SimpleDataGson:30 - Size of Simple content Gson :: 251 MB -2016-02-13 23:47:32 INFO SimpleDataGson:31 - -------------------------------------------------------------------------- -2016-02-13 23:47:39 INFO SimpleDataGson:64 - Generating Map from json Time(ms):: 7408656634 -2016-02-13 23:47:39 INFO SimpleDataGson:65 - -------------------------------------------------------------------------- -2016-02-13 23:47:45 INFO SimpleDataGson:77 - Generating Actual Object from json Time(ms):: 3023505579 -2016-02-13 23:47:45 INFO SimpleDataGson:78 - -------------------------------------------------------------------------- -2016-02-13 23:47:48 INFO SimpleDataGson:28 - -------Round 5 -2016-02-13 23:47:54 INFO SimpleDataGson:54 - Json Generation Time(ms):: 3196609048 -2016-02-13 23:47:55 INFO SimpleDataGson:30 - Size of Simple content Gson :: 251 MB -2016-02-13 23:47:55 INFO SimpleDataGson:31 - -------------------------------------------------------------------------- -2016-02-13 23:48:31 INFO SimpleDataGson:64 - Generating Map from json Time(ms):: 36806648005 -2016-02-13 23:48:31 INFO SimpleDataGson:65 - -------------------------------------------------------------------------- -2016-02-13 23:48:38 INFO SimpleDataGson:77 - Generating Actual Object from json Time(ms):: 3057928662 -2016-02-13 23:48:38 INFO SimpleDataGson:78 - -------------------------------------------------------------------------- -2016-02-13 23:48:41 INFO SimpleDataGson:28 - -------Round 6 -2016-02-13 23:48:46 INFO SimpleDataGson:54 - Json Generation Time(ms):: 3116500761 -2016-02-13 23:48:47 INFO SimpleDataGson:30 - Size of Simple content Gson :: 251 MB -2016-02-13 23:48:47 INFO SimpleDataGson:31 - -------------------------------------------------------------------------- -2016-02-13 23:48:53 INFO SimpleDataGson:64 - Generating Map from json Time(ms):: 5492820152 -2016-02-13 23:48:53 INFO SimpleDataGson:65 - -------------------------------------------------------------------------- -2016-02-13 23:48:59 INFO SimpleDataGson:77 - Generating Actual Object from json Time(ms):: 3008170464 -2016-02-13 23:48:59 INFO SimpleDataGson:78 - -------------------------------------------------------------------------- -2016-02-13 23:49:02 INFO SimpleDataGson:28 - -------Round 7 -2016-02-13 23:49:08 INFO SimpleDataGson:54 - Json Generation Time(ms):: 3101777899 -2016-02-13 23:49:09 INFO SimpleDataGson:30 - Size of Simple content Gson :: 251 MB -2016-02-13 23:49:09 INFO SimpleDataGson:31 - -------------------------------------------------------------------------- -2016-02-13 23:49:31 INFO SimpleDataGson:64 - Generating Map from json Time(ms):: 22060865577 -2016-02-13 23:49:31 INFO SimpleDataGson:65 - -------------------------------------------------------------------------- -2016-02-13 23:49:37 INFO SimpleDataGson:77 - Generating Actual Object from json Time(ms):: 3004783539 -2016-02-13 23:49:37 INFO SimpleDataGson:78 - -------------------------------------------------------------------------- -2016-02-13 23:49:40 INFO SimpleDataGson:28 - -------Round 8 -2016-02-13 23:49:45 INFO SimpleDataGson:54 - Json Generation Time(ms):: 3105519701 -2016-02-13 23:49:46 INFO SimpleDataGson:30 - Size of Simple content Gson :: 251 MB -2016-02-13 23:49:46 INFO SimpleDataGson:31 - -------------------------------------------------------------------------- -2016-02-13 23:50:08 INFO SimpleDataGson:64 - Generating Map from json Time(ms):: 22301662159 -2016-02-13 23:50:08 INFO SimpleDataGson:65 - -------------------------------------------------------------------------- -2016-02-13 23:50:14 INFO SimpleDataGson:77 - Generating Actual Object from json Time(ms):: 2975667427 -2016-02-13 23:50:14 INFO SimpleDataGson:78 - -------------------------------------------------------------------------- -2016-02-13 23:50:17 INFO SimpleDataGson:28 - -------Round 9 -2016-02-13 23:50:23 INFO SimpleDataGson:54 - Json Generation Time(ms):: 3198289879 -2016-02-13 23:50:23 INFO SimpleDataGson:30 - Size of Simple content Gson :: 251 MB -2016-02-13 23:50:23 INFO SimpleDataGson:31 - -------------------------------------------------------------------------- -2016-02-13 23:50:44 INFO SimpleDataGson:64 - Generating Map from json Time(ms):: 20094735621 -2016-02-13 23:50:44 INFO SimpleDataGson:65 - -------------------------------------------------------------------------- -2016-02-13 23:50:50 INFO SimpleDataGson:77 - Generating Actual Object from json Time(ms):: 2982894448 -2016-02-13 23:50:50 INFO SimpleDataGson:78 - -------------------------------------------------------------------------- -2016-02-13 23:50:53 INFO SimpleDataGson:28 - -------Round 10 -2016-02-13 23:50:58 INFO SimpleDataGson:54 - Json Generation Time(ms):: 3078554959 -2016-02-13 23:50:59 INFO SimpleDataGson:30 - Size of Simple content Gson :: 251 MB -2016-02-13 23:50:59 INFO SimpleDataGson:31 - -------------------------------------------------------------------------- -2016-02-13 23:51:21 INFO SimpleDataGson:64 - Generating Map from json Time(ms):: 21830630833 -2016-02-13 23:51:21 INFO SimpleDataGson:65 - -------------------------------------------------------------------------- -2016-02-13 23:51:27 INFO SimpleDataGson:77 - Generating Actual Object from json Time(ms):: 3010499469 -2016-02-13 23:51:27 INFO SimpleDataGson:78 - -------------------------------------------------------------------------- -2016-02-13 23:51:30 INFO SimpleDataGson:40 - -------------------------------------------------------------------------- -2016-02-13 23:51:30 INFO SimpleDataGson:41 - Average Time to Generate JSON : 3329216850 -2016-02-13 23:51:30 INFO SimpleDataGson:42 - Average Time to Parse JSON To Map : 15358329251 -2016-02-13 23:51:30 INFO SimpleDataGson:43 - Average Time to Parse JSON To Actual Object : 3611719235 -2016-02-13 23:51:30 INFO SimpleDataGson:44 - -------------------------------------------------------------------------- -2016-02-14 00:02:42 INFO SimpleDataJackson:31 - -------Round 1 -2016-02-14 00:02:47 INFO SimpleDataJackson:58 - Json Generation Time(ms):: 1640080750 -2016-02-14 00:02:48 INFO SimpleDataJackson:33 - Size of Simple content Jackson :: 251 MB -2016-02-14 00:02:48 INFO SimpleDataJackson:34 - -------------------------------------------------------------------------- -2016-02-14 00:02:50 INFO SimpleDataJackson:68 - Generating Map from json Time(ms):: 2672981690 -2016-02-14 00:02:50 INFO SimpleDataJackson:69 - -------------------------------------------------------------------------- -2016-02-14 00:02:55 INFO SimpleDataJackson:81 - Generating Actual Object from json Time(ms):: 1793866507 -2016-02-14 00:02:59 INFO SimpleDataJackson:31 - -------Round 2 -2016-02-14 00:03:02 INFO SimpleDataJackson:58 - Json Generation Time(ms):: 1085543552 -2016-02-14 00:03:03 INFO SimpleDataJackson:33 - Size of Simple content Jackson :: 251 MB -2016-02-14 00:03:03 INFO SimpleDataJackson:34 - -------------------------------------------------------------------------- -2016-02-14 00:03:05 INFO SimpleDataJackson:68 - Generating Map from json Time(ms):: 1884080700 -2016-02-14 00:03:05 INFO SimpleDataJackson:69 - -------------------------------------------------------------------------- -2016-02-14 00:03:09 INFO SimpleDataJackson:81 - Generating Actual Object from json Time(ms):: 1622782955 -2016-02-14 00:03:11 INFO SimpleDataJackson:31 - -------Round 3 -2016-02-14 00:03:15 INFO SimpleDataJackson:58 - Json Generation Time(ms):: 1087769528 -2016-02-14 00:03:15 INFO SimpleDataJackson:33 - Size of Simple content Jackson :: 251 MB -2016-02-14 00:03:15 INFO SimpleDataJackson:34 - -------------------------------------------------------------------------- -2016-02-14 00:03:17 INFO SimpleDataJackson:68 - Generating Map from json Time(ms):: 1866192760 -2016-02-14 00:03:17 INFO SimpleDataJackson:69 - -------------------------------------------------------------------------- -2016-02-14 00:03:22 INFO SimpleDataJackson:81 - Generating Actual Object from json Time(ms):: 2164019167 -2016-02-14 00:03:25 INFO SimpleDataJackson:31 - -------Round 4 -2016-02-14 00:03:29 INFO SimpleDataJackson:58 - Json Generation Time(ms):: 1518929874 -2016-02-14 00:03:30 INFO SimpleDataJackson:33 - Size of Simple content Jackson :: 251 MB -2016-02-14 00:03:30 INFO SimpleDataJackson:34 - -------------------------------------------------------------------------- -2016-02-14 00:03:32 INFO SimpleDataJackson:68 - Generating Map from json Time(ms):: 1863419271 -2016-02-14 00:03:32 INFO SimpleDataJackson:69 - -------------------------------------------------------------------------- -2016-02-14 00:03:36 INFO SimpleDataJackson:81 - Generating Actual Object from json Time(ms):: 1623395996 -2016-02-14 00:03:39 INFO SimpleDataJackson:31 - -------Round 5 -2016-02-14 00:03:42 INFO SimpleDataJackson:58 - Json Generation Time(ms):: 1071791372 -2016-02-14 00:03:43 INFO SimpleDataJackson:33 - Size of Simple content Jackson :: 251 MB -2016-02-14 00:03:43 INFO SimpleDataJackson:34 - -------------------------------------------------------------------------- -2016-02-14 00:03:45 INFO SimpleDataJackson:68 - Generating Map from json Time(ms):: 1861038555 -2016-02-14 00:03:45 INFO SimpleDataJackson:69 - -------------------------------------------------------------------------- -2016-02-14 00:03:49 INFO SimpleDataJackson:81 - Generating Actual Object from json Time(ms):: 1679350531 -2016-02-14 00:03:51 INFO SimpleDataJackson:31 - -------Round 6 -2016-02-14 00:03:55 INFO SimpleDataJackson:58 - Json Generation Time(ms):: 1046878522 -2016-02-14 00:03:55 INFO SimpleDataJackson:33 - Size of Simple content Jackson :: 251 MB -2016-02-14 00:03:55 INFO SimpleDataJackson:34 - -------------------------------------------------------------------------- -2016-02-14 00:03:58 INFO SimpleDataJackson:68 - Generating Map from json Time(ms):: 3142311264 -2016-02-14 00:03:58 INFO SimpleDataJackson:69 - -------------------------------------------------------------------------- -2016-02-14 00:04:05 INFO SimpleDataJackson:81 - Generating Actual Object from json Time(ms):: 2276167059 -2016-02-14 00:04:07 INFO SimpleDataJackson:31 - -------Round 7 -2016-02-14 00:04:11 INFO SimpleDataJackson:58 - Json Generation Time(ms):: 1128271314 -2016-02-14 00:04:12 INFO SimpleDataJackson:33 - Size of Simple content Jackson :: 251 MB -2016-02-14 00:04:12 INFO SimpleDataJackson:34 - -------------------------------------------------------------------------- -2016-02-14 00:04:14 INFO SimpleDataJackson:68 - Generating Map from json Time(ms):: 2644174666 -2016-02-14 00:04:14 INFO SimpleDataJackson:69 - -------------------------------------------------------------------------- -2016-02-14 00:04:19 INFO SimpleDataJackson:81 - Generating Actual Object from json Time(ms):: 2244204035 -2016-02-14 00:04:22 INFO SimpleDataJackson:31 - -------Round 8 -2016-02-14 00:04:25 INFO SimpleDataJackson:58 - Json Generation Time(ms):: 1049764909 -2016-02-14 00:04:26 INFO SimpleDataJackson:33 - Size of Simple content Jackson :: 251 MB -2016-02-14 00:04:26 INFO SimpleDataJackson:34 - -------------------------------------------------------------------------- -2016-02-14 00:04:29 INFO SimpleDataJackson:68 - Generating Map from json Time(ms):: 3621206732 -2016-02-14 00:04:29 INFO SimpleDataJackson:69 - -------------------------------------------------------------------------- -2016-02-14 00:04:35 INFO SimpleDataJackson:81 - Generating Actual Object from json Time(ms):: 2355619671 -2016-02-14 00:04:38 INFO SimpleDataJackson:31 - -------Round 9 -2016-02-14 00:04:42 INFO SimpleDataJackson:58 - Json Generation Time(ms):: 1104708497 -2016-02-14 00:04:42 INFO SimpleDataJackson:33 - Size of Simple content Jackson :: 251 MB -2016-02-14 00:04:42 INFO SimpleDataJackson:34 - -------------------------------------------------------------------------- -2016-02-14 00:04:47 INFO SimpleDataJackson:68 - Generating Map from json Time(ms):: 5293797624 -2016-02-14 00:04:47 INFO SimpleDataJackson:69 - -------------------------------------------------------------------------- -2016-02-14 00:04:53 INFO SimpleDataJackson:81 - Generating Actual Object from json Time(ms):: 2276509304 -2016-02-14 00:04:57 INFO SimpleDataJackson:31 - -------Round 10 -2016-02-14 00:05:01 INFO SimpleDataJackson:58 - Json Generation Time(ms):: 1187760804 -2016-02-14 00:05:01 INFO SimpleDataJackson:33 - Size of Simple content Jackson :: 251 MB -2016-02-14 00:05:01 INFO SimpleDataJackson:34 - -------------------------------------------------------------------------- -2016-02-14 00:05:05 INFO SimpleDataJackson:68 - Generating Map from json Time(ms):: 3760862932 -2016-02-14 00:05:05 INFO SimpleDataJackson:69 - -------------------------------------------------------------------------- -2016-02-14 00:05:11 INFO SimpleDataJackson:81 - Generating Actual Object from json Time(ms):: 2363176304 -2016-02-14 00:05:13 INFO SimpleDataJackson:44 - -------------------------------------------------------------------------- -2016-02-14 00:05:13 INFO SimpleDataJackson:45 - Average Time to Generate JSON : 1192149912 -2016-02-14 00:05:13 INFO SimpleDataJackson:46 - Average Time to Parse JSON To Map : 2861006619 -2016-02-14 00:05:13 INFO SimpleDataJackson:47 - Average Time to Parse JSON To Actual Object : 2039909152 -2016-02-14 00:05:13 INFO SimpleDataJackson:48 - -------------------------------------------------------------------------- diff --git a/gson-jackson-performance/logs_Performance/log4j-application simple Gson Jackson 250mb 50R.log b/gson-jackson-performance/logs_Performance/log4j-application simple Gson Jackson 250mb 50R.log deleted file mode 100644 index c15b4155fd..0000000000 --- a/gson-jackson-performance/logs_Performance/log4j-application simple Gson Jackson 250mb 50R.log +++ /dev/null @@ -1,760 +0,0 @@ -2016-02-14 00:11:43 INFO SimpleDataGson:28 - -------Round 1 -2016-02-14 00:11:50 INFO SimpleDataGson:54 - Json Generation Time(ms):: 4340606275 -2016-02-14 00:11:51 INFO SimpleDataGson:30 - Size of Simple content Gson :: 251 MB -2016-02-14 00:11:51 INFO SimpleDataGson:31 - -------------------------------------------------------------------------- -2016-02-14 00:12:03 INFO SimpleDataGson:64 - Generating Map from json Time(ms):: 12287382597 -2016-02-14 00:12:04 INFO SimpleDataGson:65 - -------------------------------------------------------------------------- -2016-02-14 00:12:17 INFO SimpleDataGson:77 - Generating Actual Object from json Time(ms):: 6381797289 -2016-02-14 00:12:17 INFO SimpleDataGson:78 - -------------------------------------------------------------------------- -2016-02-14 00:12:20 INFO SimpleDataGson:28 - -------Round 2 -2016-02-14 00:12:26 INFO SimpleDataGson:54 - Json Generation Time(ms):: 3447057973 -2016-02-14 00:12:27 INFO SimpleDataGson:30 - Size of Simple content Gson :: 251 MB -2016-02-14 00:12:27 INFO SimpleDataGson:31 - -------------------------------------------------------------------------- -2016-02-14 00:12:34 INFO SimpleDataGson:64 - Generating Map from json Time(ms):: 6964375308 -2016-02-14 00:12:34 INFO SimpleDataGson:65 - -------------------------------------------------------------------------- -2016-02-14 00:12:40 INFO SimpleDataGson:77 - Generating Actual Object from json Time(ms):: 3299282232 -2016-02-14 00:12:40 INFO SimpleDataGson:78 - -------------------------------------------------------------------------- -2016-02-14 00:12:44 INFO SimpleDataGson:28 - -------Round 3 -2016-02-14 00:12:49 INFO SimpleDataGson:54 - Json Generation Time(ms):: 3187362899 -2016-02-14 00:12:50 INFO SimpleDataGson:30 - Size of Simple content Gson :: 251 MB -2016-02-14 00:12:50 INFO SimpleDataGson:31 - -------------------------------------------------------------------------- -2016-02-14 00:12:56 INFO SimpleDataGson:64 - Generating Map from json Time(ms):: 5988912359 -2016-02-14 00:12:56 INFO SimpleDataGson:65 - -------------------------------------------------------------------------- -2016-02-14 00:13:02 INFO SimpleDataGson:77 - Generating Actual Object from json Time(ms):: 3037755534 -2016-02-14 00:13:02 INFO SimpleDataGson:78 - -------------------------------------------------------------------------- -2016-02-14 00:13:05 INFO SimpleDataGson:28 - -------Round 4 -2016-02-14 00:13:11 INFO SimpleDataGson:54 - Json Generation Time(ms):: 3119391095 -2016-02-14 00:13:11 INFO SimpleDataGson:30 - Size of Simple content Gson :: 251 MB -2016-02-14 00:13:11 INFO SimpleDataGson:31 - -------------------------------------------------------------------------- -2016-02-14 00:13:17 INFO SimpleDataGson:64 - Generating Map from json Time(ms):: 5743481451 -2016-02-14 00:13:17 INFO SimpleDataGson:65 - -------------------------------------------------------------------------- -2016-02-14 00:13:24 INFO SimpleDataGson:77 - Generating Actual Object from json Time(ms):: 3686319782 -2016-02-14 00:13:24 INFO SimpleDataGson:78 - -------------------------------------------------------------------------- -2016-02-14 00:13:28 INFO SimpleDataGson:28 - -------Round 5 -2016-02-14 00:13:34 INFO SimpleDataGson:54 - Json Generation Time(ms):: 3934239566 -2016-02-14 00:13:35 INFO SimpleDataGson:30 - Size of Simple content Gson :: 251 MB -2016-02-14 00:13:35 INFO SimpleDataGson:31 - -------------------------------------------------------------------------- -2016-02-14 00:14:09 INFO SimpleDataGson:64 - Generating Map from json Time(ms):: 33567932922 -2016-02-14 00:14:09 INFO SimpleDataGson:65 - -------------------------------------------------------------------------- -2016-02-14 00:14:15 INFO SimpleDataGson:77 - Generating Actual Object from json Time(ms):: 3086910165 -2016-02-14 00:14:15 INFO SimpleDataGson:78 - -------------------------------------------------------------------------- -2016-02-14 00:14:18 INFO SimpleDataGson:28 - -------Round 6 -2016-02-14 00:14:24 INFO SimpleDataGson:54 - Json Generation Time(ms):: 3234168394 -2016-02-14 00:14:24 INFO SimpleDataGson:30 - Size of Simple content Gson :: 251 MB -2016-02-14 00:14:24 INFO SimpleDataGson:31 - -------------------------------------------------------------------------- -2016-02-14 00:14:45 INFO SimpleDataGson:64 - Generating Map from json Time(ms):: 20216556381 -2016-02-14 00:14:45 INFO SimpleDataGson:65 - -------------------------------------------------------------------------- -2016-02-14 00:14:51 INFO SimpleDataGson:77 - Generating Actual Object from json Time(ms):: 3030008238 -2016-02-14 00:14:51 INFO SimpleDataGson:78 - -------------------------------------------------------------------------- -2016-02-14 00:14:54 INFO SimpleDataGson:28 - -------Round 7 -2016-02-14 00:15:00 INFO SimpleDataGson:54 - Json Generation Time(ms):: 3455602658 -2016-02-14 00:15:00 INFO SimpleDataGson:30 - Size of Simple content Gson :: 251 MB -2016-02-14 00:15:00 INFO SimpleDataGson:31 - -------------------------------------------------------------------------- -2016-02-14 00:15:20 INFO SimpleDataGson:64 - Generating Map from json Time(ms):: 19443209589 -2016-02-14 00:15:20 INFO SimpleDataGson:65 - -------------------------------------------------------------------------- -2016-02-14 00:15:26 INFO SimpleDataGson:77 - Generating Actual Object from json Time(ms):: 2945137729 -2016-02-14 00:15:26 INFO SimpleDataGson:78 - -------------------------------------------------------------------------- -2016-02-14 00:15:29 INFO SimpleDataGson:28 - -------Round 8 -2016-02-14 00:15:34 INFO SimpleDataGson:54 - Json Generation Time(ms):: 3152326775 -2016-02-14 00:15:35 INFO SimpleDataGson:30 - Size of Simple content Gson :: 251 MB -2016-02-14 00:15:35 INFO SimpleDataGson:31 - -------------------------------------------------------------------------- -2016-02-14 00:15:40 INFO SimpleDataGson:64 - Generating Map from json Time(ms):: 5166017769 -2016-02-14 00:15:40 INFO SimpleDataGson:65 - -------------------------------------------------------------------------- -2016-02-14 00:15:47 INFO SimpleDataGson:77 - Generating Actual Object from json Time(ms):: 2933530996 -2016-02-14 00:15:47 INFO SimpleDataGson:78 - -------------------------------------------------------------------------- -2016-02-14 00:15:49 INFO SimpleDataGson:28 - -------Round 9 -2016-02-14 00:15:55 INFO SimpleDataGson:54 - Json Generation Time(ms):: 3271454180 -2016-02-14 00:15:56 INFO SimpleDataGson:30 - Size of Simple content Gson :: 251 MB -2016-02-14 00:15:56 INFO SimpleDataGson:31 - -------------------------------------------------------------------------- -2016-02-14 00:16:15 INFO SimpleDataGson:64 - Generating Map from json Time(ms):: 19051407844 -2016-02-14 00:16:15 INFO SimpleDataGson:65 - -------------------------------------------------------------------------- -2016-02-14 00:16:21 INFO SimpleDataGson:77 - Generating Actual Object from json Time(ms):: 2955690488 -2016-02-14 00:16:21 INFO SimpleDataGson:78 - -------------------------------------------------------------------------- -2016-02-14 00:16:24 INFO SimpleDataGson:28 - -------Round 10 -2016-02-14 00:16:29 INFO SimpleDataGson:54 - Json Generation Time(ms):: 3172185290 -2016-02-14 00:16:30 INFO SimpleDataGson:30 - Size of Simple content Gson :: 251 MB -2016-02-14 00:16:30 INFO SimpleDataGson:31 - -------------------------------------------------------------------------- -2016-02-14 00:16:35 INFO SimpleDataGson:64 - Generating Map from json Time(ms):: 5183987817 -2016-02-14 00:16:35 INFO SimpleDataGson:65 - -------------------------------------------------------------------------- -2016-02-14 00:16:42 INFO SimpleDataGson:77 - Generating Actual Object from json Time(ms):: 2976106781 -2016-02-14 00:16:42 INFO SimpleDataGson:78 - -------------------------------------------------------------------------- -2016-02-14 00:16:44 INFO SimpleDataGson:28 - -------Round 11 -2016-02-14 00:16:50 INFO SimpleDataGson:54 - Json Generation Time(ms):: 3160732507 -2016-02-14 00:16:51 INFO SimpleDataGson:30 - Size of Simple content Gson :: 251 MB -2016-02-14 00:16:51 INFO SimpleDataGson:31 - -------------------------------------------------------------------------- -2016-02-14 00:16:56 INFO SimpleDataGson:64 - Generating Map from json Time(ms):: 5154795125 -2016-02-14 00:16:56 INFO SimpleDataGson:65 - -------------------------------------------------------------------------- -2016-02-14 00:17:02 INFO SimpleDataGson:77 - Generating Actual Object from json Time(ms):: 2901304677 -2016-02-14 00:17:02 INFO SimpleDataGson:78 - -------------------------------------------------------------------------- -2016-02-14 00:17:05 INFO SimpleDataGson:28 - -------Round 12 -2016-02-14 00:17:11 INFO SimpleDataGson:54 - Json Generation Time(ms):: 3154345113 -2016-02-14 00:17:11 INFO SimpleDataGson:30 - Size of Simple content Gson :: 251 MB -2016-02-14 00:17:12 INFO SimpleDataGson:31 - -------------------------------------------------------------------------- -2016-02-14 00:17:32 INFO SimpleDataGson:64 - Generating Map from json Time(ms):: 19767182825 -2016-02-14 00:17:32 INFO SimpleDataGson:65 - -------------------------------------------------------------------------- -2016-02-14 00:17:38 INFO SimpleDataGson:77 - Generating Actual Object from json Time(ms):: 2936730417 -2016-02-14 00:17:38 INFO SimpleDataGson:78 - -------------------------------------------------------------------------- -2016-02-14 00:17:41 INFO SimpleDataGson:28 - -------Round 13 -2016-02-14 00:17:47 INFO SimpleDataGson:54 - Json Generation Time(ms):: 3175565109 -2016-02-14 00:17:48 INFO SimpleDataGson:30 - Size of Simple content Gson :: 251 MB -2016-02-14 00:17:48 INFO SimpleDataGson:31 - -------------------------------------------------------------------------- -2016-02-14 00:17:53 INFO SimpleDataGson:64 - Generating Map from json Time(ms):: 5111310238 -2016-02-14 00:17:53 INFO SimpleDataGson:65 - -------------------------------------------------------------------------- -2016-02-14 00:17:59 INFO SimpleDataGson:77 - Generating Actual Object from json Time(ms):: 2914264207 -2016-02-14 00:17:59 INFO SimpleDataGson:78 - -------------------------------------------------------------------------- -2016-02-14 00:18:02 INFO SimpleDataGson:28 - -------Round 14 -2016-02-14 00:18:08 INFO SimpleDataGson:54 - Json Generation Time(ms):: 3156483456 -2016-02-14 00:18:08 INFO SimpleDataGson:30 - Size of Simple content Gson :: 251 MB -2016-02-14 00:18:08 INFO SimpleDataGson:31 - -------------------------------------------------------------------------- -2016-02-14 00:18:27 INFO SimpleDataGson:64 - Generating Map from json Time(ms):: 19026387623 -2016-02-14 00:18:27 INFO SimpleDataGson:65 - -------------------------------------------------------------------------- -2016-02-14 00:18:33 INFO SimpleDataGson:77 - Generating Actual Object from json Time(ms):: 2898468817 -2016-02-14 00:18:33 INFO SimpleDataGson:78 - -------------------------------------------------------------------------- -2016-02-14 00:18:37 INFO SimpleDataGson:28 - -------Round 15 -2016-02-14 00:18:43 INFO SimpleDataGson:54 - Json Generation Time(ms):: 3176971986 -2016-02-14 00:18:44 INFO SimpleDataGson:30 - Size of Simple content Gson :: 251 MB -2016-02-14 00:18:44 INFO SimpleDataGson:31 - -------------------------------------------------------------------------- -2016-02-14 00:19:03 INFO SimpleDataGson:64 - Generating Map from json Time(ms):: 18819822277 -2016-02-14 00:19:03 INFO SimpleDataGson:65 - -------------------------------------------------------------------------- -2016-02-14 00:19:09 INFO SimpleDataGson:77 - Generating Actual Object from json Time(ms):: 2944195074 -2016-02-14 00:19:09 INFO SimpleDataGson:78 - -------------------------------------------------------------------------- -2016-02-14 00:19:13 INFO SimpleDataGson:28 - -------Round 16 -2016-02-14 00:19:19 INFO SimpleDataGson:54 - Json Generation Time(ms):: 3148834846 -2016-02-14 00:19:19 INFO SimpleDataGson:30 - Size of Simple content Gson :: 251 MB -2016-02-14 00:19:19 INFO SimpleDataGson:31 - -------------------------------------------------------------------------- -2016-02-14 00:19:38 INFO SimpleDataGson:64 - Generating Map from json Time(ms):: 19390679087 -2016-02-14 00:19:39 INFO SimpleDataGson:65 - -------------------------------------------------------------------------- -2016-02-14 00:19:45 INFO SimpleDataGson:77 - Generating Actual Object from json Time(ms):: 3183360565 -2016-02-14 00:19:45 INFO SimpleDataGson:78 - -------------------------------------------------------------------------- -2016-02-14 00:19:48 INFO SimpleDataGson:28 - -------Round 17 -2016-02-14 00:19:53 INFO SimpleDataGson:54 - Json Generation Time(ms):: 3150490019 -2016-02-14 00:19:54 INFO SimpleDataGson:30 - Size of Simple content Gson :: 251 MB -2016-02-14 00:19:54 INFO SimpleDataGson:31 - -------------------------------------------------------------------------- -2016-02-14 00:19:59 INFO SimpleDataGson:64 - Generating Map from json Time(ms):: 5132583526 -2016-02-14 00:19:59 INFO SimpleDataGson:65 - -------------------------------------------------------------------------- -2016-02-14 00:20:07 INFO SimpleDataGson:77 - Generating Actual Object from json Time(ms):: 2966433121 -2016-02-14 00:20:07 INFO SimpleDataGson:78 - -------------------------------------------------------------------------- -2016-02-14 00:20:10 INFO SimpleDataGson:28 - -------Round 18 -2016-02-14 00:20:17 INFO SimpleDataGson:54 - Json Generation Time(ms):: 3550768946 -2016-02-14 00:20:17 INFO SimpleDataGson:30 - Size of Simple content Gson :: 251 MB -2016-02-14 00:20:17 INFO SimpleDataGson:31 - -------------------------------------------------------------------------- -2016-02-14 00:20:38 INFO SimpleDataGson:64 - Generating Map from json Time(ms):: 20364043958 -2016-02-14 00:20:38 INFO SimpleDataGson:65 - -------------------------------------------------------------------------- -2016-02-14 00:20:44 INFO SimpleDataGson:77 - Generating Actual Object from json Time(ms):: 2927474400 -2016-02-14 00:20:44 INFO SimpleDataGson:78 - -------------------------------------------------------------------------- -2016-02-14 00:20:47 INFO SimpleDataGson:28 - -------Round 19 -2016-02-14 00:20:52 INFO SimpleDataGson:54 - Json Generation Time(ms):: 3118286199 -2016-02-14 00:20:53 INFO SimpleDataGson:30 - Size of Simple content Gson :: 251 MB -2016-02-14 00:20:53 INFO SimpleDataGson:31 - -------------------------------------------------------------------------- -2016-02-14 00:21:13 INFO SimpleDataGson:64 - Generating Map from json Time(ms):: 19960982856 -2016-02-14 00:21:13 INFO SimpleDataGson:65 - -------------------------------------------------------------------------- -2016-02-14 00:21:20 INFO SimpleDataGson:77 - Generating Actual Object from json Time(ms):: 3604365266 -2016-02-14 00:21:20 INFO SimpleDataGson:78 - -------------------------------------------------------------------------- -2016-02-14 00:21:25 INFO SimpleDataGson:28 - -------Round 20 -2016-02-14 00:21:31 INFO SimpleDataGson:54 - Json Generation Time(ms):: 3673000243 -2016-02-14 00:21:32 INFO SimpleDataGson:30 - Size of Simple content Gson :: 251 MB -2016-02-14 00:21:32 INFO SimpleDataGson:31 - -------------------------------------------------------------------------- -2016-02-14 00:21:37 INFO SimpleDataGson:64 - Generating Map from json Time(ms):: 5155220266 -2016-02-14 00:21:37 INFO SimpleDataGson:65 - -------------------------------------------------------------------------- -2016-02-14 00:21:43 INFO SimpleDataGson:77 - Generating Actual Object from json Time(ms):: 2926214763 -2016-02-14 00:21:43 INFO SimpleDataGson:78 - -------------------------------------------------------------------------- -2016-02-14 00:21:47 INFO SimpleDataGson:28 - -------Round 21 -2016-02-14 00:21:52 INFO SimpleDataGson:54 - Json Generation Time(ms):: 3158473373 -2016-02-14 00:21:53 INFO SimpleDataGson:30 - Size of Simple content Gson :: 251 MB -2016-02-14 00:21:53 INFO SimpleDataGson:31 - -------------------------------------------------------------------------- -2016-02-14 00:22:12 INFO SimpleDataGson:64 - Generating Map from json Time(ms):: 19593056961 -2016-02-14 00:22:12 INFO SimpleDataGson:65 - -------------------------------------------------------------------------- -2016-02-14 00:22:18 INFO SimpleDataGson:77 - Generating Actual Object from json Time(ms):: 2941365137 -2016-02-14 00:22:18 INFO SimpleDataGson:78 - -------------------------------------------------------------------------- -2016-02-14 00:22:21 INFO SimpleDataGson:28 - -------Round 22 -2016-02-14 00:22:27 INFO SimpleDataGson:54 - Json Generation Time(ms):: 3240733819 -2016-02-14 00:22:28 INFO SimpleDataGson:30 - Size of Simple content Gson :: 251 MB -2016-02-14 00:22:28 INFO SimpleDataGson:31 - -------------------------------------------------------------------------- -2016-02-14 00:22:33 INFO SimpleDataGson:64 - Generating Map from json Time(ms):: 5260135611 -2016-02-14 00:22:33 INFO SimpleDataGson:65 - -------------------------------------------------------------------------- -2016-02-14 00:22:41 INFO SimpleDataGson:77 - Generating Actual Object from json Time(ms):: 3164218514 -2016-02-14 00:22:41 INFO SimpleDataGson:78 - -------------------------------------------------------------------------- -2016-02-14 00:22:44 INFO SimpleDataGson:28 - -------Round 23 -2016-02-14 00:22:51 INFO SimpleDataGson:54 - Json Generation Time(ms):: 3950377990 -2016-02-14 00:22:52 INFO SimpleDataGson:30 - Size of Simple content Gson :: 251 MB -2016-02-14 00:22:52 INFO SimpleDataGson:31 - -------------------------------------------------------------------------- -2016-02-14 00:22:59 INFO SimpleDataGson:64 - Generating Map from json Time(ms):: 6942376082 -2016-02-14 00:22:59 INFO SimpleDataGson:65 - -------------------------------------------------------------------------- -2016-02-14 00:23:06 INFO SimpleDataGson:77 - Generating Actual Object from json Time(ms):: 2912013756 -2016-02-14 00:23:06 INFO SimpleDataGson:78 - -------------------------------------------------------------------------- -2016-02-14 00:23:09 INFO SimpleDataGson:28 - -------Round 24 -2016-02-14 00:23:14 INFO SimpleDataGson:54 - Json Generation Time(ms):: 3162496235 -2016-02-14 00:23:15 INFO SimpleDataGson:30 - Size of Simple content Gson :: 251 MB -2016-02-14 00:23:15 INFO SimpleDataGson:31 - -------------------------------------------------------------------------- -2016-02-14 00:23:34 INFO SimpleDataGson:64 - Generating Map from json Time(ms):: 18938874285 -2016-02-14 00:23:34 INFO SimpleDataGson:65 - -------------------------------------------------------------------------- -2016-02-14 00:23:40 INFO SimpleDataGson:77 - Generating Actual Object from json Time(ms):: 2913962225 -2016-02-14 00:23:40 INFO SimpleDataGson:78 - -------------------------------------------------------------------------- -2016-02-14 00:23:43 INFO SimpleDataGson:28 - -------Round 25 -2016-02-14 00:23:48 INFO SimpleDataGson:54 - Json Generation Time(ms):: 3180082589 -2016-02-14 00:23:49 INFO SimpleDataGson:30 - Size of Simple content Gson :: 251 MB -2016-02-14 00:23:49 INFO SimpleDataGson:31 - -------------------------------------------------------------------------- -2016-02-14 00:23:54 INFO SimpleDataGson:64 - Generating Map from json Time(ms):: 5144263286 -2016-02-14 00:23:54 INFO SimpleDataGson:65 - -------------------------------------------------------------------------- -2016-02-14 00:24:00 INFO SimpleDataGson:77 - Generating Actual Object from json Time(ms):: 2901693502 -2016-02-14 00:24:00 INFO SimpleDataGson:78 - -------------------------------------------------------------------------- -2016-02-14 00:24:03 INFO SimpleDataGson:28 - -------Round 26 -2016-02-14 00:24:09 INFO SimpleDataGson:54 - Json Generation Time(ms):: 3219238684 -2016-02-14 00:24:09 INFO SimpleDataGson:30 - Size of Simple content Gson :: 251 MB -2016-02-14 00:24:09 INFO SimpleDataGson:31 - -------------------------------------------------------------------------- -2016-02-14 00:24:28 INFO SimpleDataGson:64 - Generating Map from json Time(ms):: 18842977321 -2016-02-14 00:24:28 INFO SimpleDataGson:65 - -------------------------------------------------------------------------- -2016-02-14 00:24:34 INFO SimpleDataGson:77 - Generating Actual Object from json Time(ms):: 2952234483 -2016-02-14 00:24:34 INFO SimpleDataGson:78 - -------------------------------------------------------------------------- -2016-02-14 00:24:37 INFO SimpleDataGson:28 - -------Round 27 -2016-02-14 00:24:43 INFO SimpleDataGson:54 - Json Generation Time(ms):: 3272345911 -2016-02-14 00:24:43 INFO SimpleDataGson:30 - Size of Simple content Gson :: 251 MB -2016-02-14 00:24:43 INFO SimpleDataGson:31 - -------------------------------------------------------------------------- -2016-02-14 00:24:49 INFO SimpleDataGson:64 - Generating Map from json Time(ms):: 5632996628 -2016-02-14 00:24:49 INFO SimpleDataGson:65 - -------------------------------------------------------------------------- -2016-02-14 00:24:56 INFO SimpleDataGson:77 - Generating Actual Object from json Time(ms):: 3029633229 -2016-02-14 00:24:56 INFO SimpleDataGson:78 - -------------------------------------------------------------------------- -2016-02-14 00:24:59 INFO SimpleDataGson:28 - -------Round 28 -2016-02-14 00:25:04 INFO SimpleDataGson:54 - Json Generation Time(ms):: 3169683386 -2016-02-14 00:25:05 INFO SimpleDataGson:30 - Size of Simple content Gson :: 251 MB -2016-02-14 00:25:05 INFO SimpleDataGson:31 - -------------------------------------------------------------------------- -2016-02-14 00:25:23 INFO SimpleDataGson:64 - Generating Map from json Time(ms):: 18181483545 -2016-02-14 00:25:23 INFO SimpleDataGson:65 - -------------------------------------------------------------------------- -2016-02-14 00:25:29 INFO SimpleDataGson:77 - Generating Actual Object from json Time(ms):: 2923402589 -2016-02-14 00:25:29 INFO SimpleDataGson:78 - -------------------------------------------------------------------------- -2016-02-14 00:25:32 INFO SimpleDataGson:28 - -------Round 29 -2016-02-14 00:25:37 INFO SimpleDataGson:54 - Json Generation Time(ms):: 3212580494 -2016-02-14 00:25:38 INFO SimpleDataGson:30 - Size of Simple content Gson :: 251 MB -2016-02-14 00:25:38 INFO SimpleDataGson:31 - -------------------------------------------------------------------------- -2016-02-14 00:25:59 INFO SimpleDataGson:64 - Generating Map from json Time(ms):: 21118590549 -2016-02-14 00:25:59 INFO SimpleDataGson:65 - -------------------------------------------------------------------------- -2016-02-14 00:26:05 INFO SimpleDataGson:77 - Generating Actual Object from json Time(ms):: 2979127381 -2016-02-14 00:26:05 INFO SimpleDataGson:78 - -------------------------------------------------------------------------- -2016-02-14 00:26:08 INFO SimpleDataGson:28 - -------Round 30 -2016-02-14 00:26:13 INFO SimpleDataGson:54 - Json Generation Time(ms):: 3180047456 -2016-02-14 00:26:14 INFO SimpleDataGson:30 - Size of Simple content Gson :: 251 MB -2016-02-14 00:26:14 INFO SimpleDataGson:31 - -------------------------------------------------------------------------- -2016-02-14 00:26:32 INFO SimpleDataGson:64 - Generating Map from json Time(ms):: 18226907030 -2016-02-14 00:26:32 INFO SimpleDataGson:65 - -------------------------------------------------------------------------- -2016-02-14 00:26:38 INFO SimpleDataGson:77 - Generating Actual Object from json Time(ms):: 2914835010 -2016-02-14 00:26:38 INFO SimpleDataGson:78 - -------------------------------------------------------------------------- -2016-02-14 00:26:41 INFO SimpleDataGson:28 - -------Round 31 -2016-02-14 00:26:46 INFO SimpleDataGson:54 - Json Generation Time(ms):: 3184658097 -2016-02-14 00:26:47 INFO SimpleDataGson:30 - Size of Simple content Gson :: 251 MB -2016-02-14 00:26:47 INFO SimpleDataGson:31 - -------------------------------------------------------------------------- -2016-02-14 00:27:08 INFO SimpleDataGson:64 - Generating Map from json Time(ms):: 20737813285 -2016-02-14 00:27:08 INFO SimpleDataGson:65 - -------------------------------------------------------------------------- -2016-02-14 00:27:14 INFO SimpleDataGson:77 - Generating Actual Object from json Time(ms):: 2930900800 -2016-02-14 00:27:14 INFO SimpleDataGson:78 - -------------------------------------------------------------------------- -2016-02-14 00:27:17 INFO SimpleDataGson:28 - -------Round 32 -2016-02-14 00:27:22 INFO SimpleDataGson:54 - Json Generation Time(ms):: 3259012163 -2016-02-14 00:27:23 INFO SimpleDataGson:30 - Size of Simple content Gson :: 251 MB -2016-02-14 00:27:23 INFO SimpleDataGson:31 - -------------------------------------------------------------------------- -2016-02-14 00:27:44 INFO SimpleDataGson:64 - Generating Map from json Time(ms):: 21144334736 -2016-02-14 00:27:44 INFO SimpleDataGson:65 - -------------------------------------------------------------------------- -2016-02-14 00:27:50 INFO SimpleDataGson:77 - Generating Actual Object from json Time(ms):: 2934185091 -2016-02-14 00:27:50 INFO SimpleDataGson:78 - -------------------------------------------------------------------------- -2016-02-14 00:27:53 INFO SimpleDataGson:28 - -------Round 33 -2016-02-14 00:27:58 INFO SimpleDataGson:54 - Json Generation Time(ms):: 3177588580 -2016-02-14 00:27:59 INFO SimpleDataGson:30 - Size of Simple content Gson :: 251 MB -2016-02-14 00:27:59 INFO SimpleDataGson:31 - -------------------------------------------------------------------------- -2016-02-14 00:28:18 INFO SimpleDataGson:64 - Generating Map from json Time(ms):: 18644949554 -2016-02-14 00:28:18 INFO SimpleDataGson:65 - -------------------------------------------------------------------------- -2016-02-14 00:28:24 INFO SimpleDataGson:77 - Generating Actual Object from json Time(ms):: 2912270342 -2016-02-14 00:28:24 INFO SimpleDataGson:78 - -------------------------------------------------------------------------- -2016-02-14 00:28:27 INFO SimpleDataGson:28 - -------Round 34 -2016-02-14 00:28:32 INFO SimpleDataGson:54 - Json Generation Time(ms):: 3174772459 -2016-02-14 00:28:33 INFO SimpleDataGson:30 - Size of Simple content Gson :: 251 MB -2016-02-14 00:28:33 INFO SimpleDataGson:31 - -------------------------------------------------------------------------- -2016-02-14 00:28:52 INFO SimpleDataGson:64 - Generating Map from json Time(ms):: 18805845881 -2016-02-14 00:28:52 INFO SimpleDataGson:65 - -------------------------------------------------------------------------- -2016-02-14 00:28:57 INFO SimpleDataGson:77 - Generating Actual Object from json Time(ms):: 2899120150 -2016-02-14 00:28:57 INFO SimpleDataGson:78 - -------------------------------------------------------------------------- -2016-02-14 00:29:00 INFO SimpleDataGson:28 - -------Round 35 -2016-02-14 00:29:06 INFO SimpleDataGson:54 - Json Generation Time(ms):: 3385021974 -2016-02-14 00:29:07 INFO SimpleDataGson:30 - Size of Simple content Gson :: 251 MB -2016-02-14 00:29:07 INFO SimpleDataGson:31 - -------------------------------------------------------------------------- -2016-02-14 00:29:12 INFO SimpleDataGson:64 - Generating Map from json Time(ms):: 5143330105 -2016-02-14 00:29:12 INFO SimpleDataGson:65 - -------------------------------------------------------------------------- -2016-02-14 00:29:18 INFO SimpleDataGson:77 - Generating Actual Object from json Time(ms):: 2915072648 -2016-02-14 00:29:18 INFO SimpleDataGson:78 - -------------------------------------------------------------------------- -2016-02-14 00:29:21 INFO SimpleDataGson:28 - -------Round 36 -2016-02-14 00:29:27 INFO SimpleDataGson:54 - Json Generation Time(ms):: 3176665663 -2016-02-14 00:29:27 INFO SimpleDataGson:30 - Size of Simple content Gson :: 251 MB -2016-02-14 00:29:27 INFO SimpleDataGson:31 - -------------------------------------------------------------------------- -2016-02-14 00:29:33 INFO SimpleDataGson:64 - Generating Map from json Time(ms):: 5483340314 -2016-02-14 00:29:33 INFO SimpleDataGson:65 - -------------------------------------------------------------------------- -2016-02-14 00:29:39 INFO SimpleDataGson:77 - Generating Actual Object from json Time(ms):: 2939049553 -2016-02-14 00:29:39 INFO SimpleDataGson:78 - -------------------------------------------------------------------------- -2016-02-14 00:29:43 INFO SimpleDataGson:28 - -------Round 37 -2016-02-14 00:29:49 INFO SimpleDataGson:54 - Json Generation Time(ms):: 3838179966 -2016-02-14 00:29:50 INFO SimpleDataGson:30 - Size of Simple content Gson :: 251 MB -2016-02-14 00:29:50 INFO SimpleDataGson:31 - -------------------------------------------------------------------------- -2016-02-14 00:29:56 INFO SimpleDataGson:64 - Generating Map from json Time(ms):: 6331521578 -2016-02-14 00:29:56 INFO SimpleDataGson:65 - -------------------------------------------------------------------------- -2016-02-14 00:30:03 INFO SimpleDataGson:77 - Generating Actual Object from json Time(ms):: 2932029380 -2016-02-14 00:30:03 INFO SimpleDataGson:78 - -------------------------------------------------------------------------- -2016-02-14 00:30:06 INFO SimpleDataGson:28 - -------Round 38 -2016-02-14 00:30:11 INFO SimpleDataGson:54 - Json Generation Time(ms):: 3232773754 -2016-02-14 00:30:12 INFO SimpleDataGson:30 - Size of Simple content Gson :: 251 MB -2016-02-14 00:30:12 INFO SimpleDataGson:31 - -------------------------------------------------------------------------- -2016-02-14 00:30:17 INFO SimpleDataGson:64 - Generating Map from json Time(ms):: 5111574325 -2016-02-14 00:30:17 INFO SimpleDataGson:65 - -------------------------------------------------------------------------- -2016-02-14 00:30:24 INFO SimpleDataGson:77 - Generating Actual Object from json Time(ms):: 2937454777 -2016-02-14 00:30:24 INFO SimpleDataGson:78 - -------------------------------------------------------------------------- -2016-02-14 00:30:26 INFO SimpleDataGson:28 - -------Round 39 -2016-02-14 00:30:32 INFO SimpleDataGson:54 - Json Generation Time(ms):: 3155400666 -2016-02-14 00:30:33 INFO SimpleDataGson:30 - Size of Simple content Gson :: 251 MB -2016-02-14 00:30:33 INFO SimpleDataGson:31 - -------------------------------------------------------------------------- -2016-02-14 00:30:55 INFO SimpleDataGson:64 - Generating Map from json Time(ms):: 22127306948 -2016-02-14 00:30:55 INFO SimpleDataGson:65 - -------------------------------------------------------------------------- -2016-02-14 00:31:01 INFO SimpleDataGson:77 - Generating Actual Object from json Time(ms):: 2945046938 -2016-02-14 00:31:01 INFO SimpleDataGson:78 - -------------------------------------------------------------------------- -2016-02-14 00:31:04 INFO SimpleDataGson:28 - -------Round 40 -2016-02-14 00:31:09 INFO SimpleDataGson:54 - Json Generation Time(ms):: 3303421545 -2016-02-14 00:31:10 INFO SimpleDataGson:30 - Size of Simple content Gson :: 251 MB -2016-02-14 00:31:10 INFO SimpleDataGson:31 - -------------------------------------------------------------------------- -2016-02-14 00:31:29 INFO SimpleDataGson:64 - Generating Map from json Time(ms):: 19267411185 -2016-02-14 00:31:29 INFO SimpleDataGson:65 - -------------------------------------------------------------------------- -2016-02-14 00:31:35 INFO SimpleDataGson:77 - Generating Actual Object from json Time(ms):: 2978847900 -2016-02-14 00:31:35 INFO SimpleDataGson:78 - -------------------------------------------------------------------------- -2016-02-14 00:31:38 INFO SimpleDataGson:28 - -------Round 41 -2016-02-14 00:31:47 INFO SimpleDataGson:54 - Json Generation Time(ms):: 6197094586 -2016-02-14 00:31:51 INFO SimpleDataGson:30 - Size of Simple content Gson :: 251 MB -2016-02-14 00:31:51 INFO SimpleDataGson:31 - -------------------------------------------------------------------------- -2016-02-14 00:32:04 INFO SimpleDataGson:64 - Generating Map from json Time(ms):: 13564575996 -2016-02-14 00:32:04 INFO SimpleDataGson:65 - -------------------------------------------------------------------------- -2016-02-14 00:32:14 INFO SimpleDataGson:77 - Generating Actual Object from json Time(ms):: 4029021372 -2016-02-14 00:32:14 INFO SimpleDataGson:78 - -------------------------------------------------------------------------- -2016-02-14 00:32:18 INFO SimpleDataGson:28 - -------Round 42 -2016-02-14 00:32:25 INFO SimpleDataGson:54 - Json Generation Time(ms):: 4386850044 -2016-02-14 00:32:26 INFO SimpleDataGson:30 - Size of Simple content Gson :: 251 MB -2016-02-14 00:32:26 INFO SimpleDataGson:31 - -------------------------------------------------------------------------- -2016-02-14 00:32:32 INFO SimpleDataGson:64 - Generating Map from json Time(ms):: 6199628465 -2016-02-14 00:32:32 INFO SimpleDataGson:65 - -------------------------------------------------------------------------- -2016-02-14 00:32:39 INFO SimpleDataGson:77 - Generating Actual Object from json Time(ms):: 3232875598 -2016-02-14 00:32:39 INFO SimpleDataGson:78 - -------------------------------------------------------------------------- -2016-02-14 00:32:43 INFO SimpleDataGson:28 - -------Round 43 -2016-02-14 00:32:49 INFO SimpleDataGson:54 - Json Generation Time(ms):: 3261124847 -2016-02-14 00:32:50 INFO SimpleDataGson:30 - Size of Simple content Gson :: 251 MB -2016-02-14 00:32:50 INFO SimpleDataGson:31 - -------------------------------------------------------------------------- -2016-02-14 00:32:55 INFO SimpleDataGson:64 - Generating Map from json Time(ms):: 5414788232 -2016-02-14 00:32:55 INFO SimpleDataGson:65 - -------------------------------------------------------------------------- -2016-02-14 00:33:03 INFO SimpleDataGson:77 - Generating Actual Object from json Time(ms):: 3900553079 -2016-02-14 00:33:03 INFO SimpleDataGson:78 - -------------------------------------------------------------------------- -2016-02-14 00:33:06 INFO SimpleDataGson:28 - -------Round 44 -2016-02-14 00:33:13 INFO SimpleDataGson:54 - Json Generation Time(ms):: 3806054701 -2016-02-14 00:33:13 INFO SimpleDataGson:30 - Size of Simple content Gson :: 251 MB -2016-02-14 00:33:13 INFO SimpleDataGson:31 - -------------------------------------------------------------------------- -2016-02-14 00:33:33 INFO SimpleDataGson:64 - Generating Map from json Time(ms):: 19901549025 -2016-02-14 00:33:33 INFO SimpleDataGson:65 - -------------------------------------------------------------------------- -2016-02-14 00:33:40 INFO SimpleDataGson:77 - Generating Actual Object from json Time(ms):: 3087670842 -2016-02-14 00:33:40 INFO SimpleDataGson:78 - -------------------------------------------------------------------------- -2016-02-14 00:33:43 INFO SimpleDataGson:28 - -------Round 45 -2016-02-14 00:33:49 INFO SimpleDataGson:54 - Json Generation Time(ms):: 3496904200 -2016-02-14 00:33:50 INFO SimpleDataGson:30 - Size of Simple content Gson :: 251 MB -2016-02-14 00:33:50 INFO SimpleDataGson:31 - -------------------------------------------------------------------------- -2016-02-14 00:34:09 INFO SimpleDataGson:64 - Generating Map from json Time(ms):: 19760852273 -2016-02-14 00:34:09 INFO SimpleDataGson:65 - -------------------------------------------------------------------------- -2016-02-14 00:34:16 INFO SimpleDataGson:77 - Generating Actual Object from json Time(ms):: 3030993526 -2016-02-14 00:34:16 INFO SimpleDataGson:78 - -------------------------------------------------------------------------- -2016-02-14 00:34:18 INFO SimpleDataGson:28 - -------Round 46 -2016-02-14 00:34:24 INFO SimpleDataGson:54 - Json Generation Time(ms):: 3224896192 -2016-02-14 00:34:25 INFO SimpleDataGson:30 - Size of Simple content Gson :: 251 MB -2016-02-14 00:34:25 INFO SimpleDataGson:31 - -------------------------------------------------------------------------- -2016-02-14 00:34:46 INFO SimpleDataGson:64 - Generating Map from json Time(ms):: 21800935233 -2016-02-14 00:34:46 INFO SimpleDataGson:65 - -------------------------------------------------------------------------- -2016-02-14 00:34:53 INFO SimpleDataGson:77 - Generating Actual Object from json Time(ms):: 2988645905 -2016-02-14 00:34:53 INFO SimpleDataGson:78 - -------------------------------------------------------------------------- -2016-02-14 00:34:56 INFO SimpleDataGson:28 - -------Round 47 -2016-02-14 00:35:02 INFO SimpleDataGson:54 - Json Generation Time(ms):: 3325038261 -2016-02-14 00:35:02 INFO SimpleDataGson:30 - Size of Simple content Gson :: 251 MB -2016-02-14 00:35:02 INFO SimpleDataGson:31 - -------------------------------------------------------------------------- -2016-02-14 00:35:22 INFO SimpleDataGson:64 - Generating Map from json Time(ms):: 19895342820 -2016-02-14 00:35:22 INFO SimpleDataGson:65 - -------------------------------------------------------------------------- -2016-02-14 00:35:29 INFO SimpleDataGson:77 - Generating Actual Object from json Time(ms):: 3399804048 -2016-02-14 00:35:29 INFO SimpleDataGson:78 - -------------------------------------------------------------------------- -2016-02-14 00:35:32 INFO SimpleDataGson:28 - -------Round 48 -2016-02-14 00:35:38 INFO SimpleDataGson:54 - Json Generation Time(ms):: 3353567383 -2016-02-14 00:35:39 INFO SimpleDataGson:30 - Size of Simple content Gson :: 251 MB -2016-02-14 00:35:39 INFO SimpleDataGson:31 - -------------------------------------------------------------------------- -2016-02-14 00:36:02 INFO SimpleDataGson:64 - Generating Map from json Time(ms):: 23112502373 -2016-02-14 00:36:02 INFO SimpleDataGson:65 - -------------------------------------------------------------------------- -2016-02-14 00:36:08 INFO SimpleDataGson:77 - Generating Actual Object from json Time(ms):: 3315296705 -2016-02-14 00:36:08 INFO SimpleDataGson:78 - -------------------------------------------------------------------------- -2016-02-14 00:36:11 INFO SimpleDataGson:28 - -------Round 49 -2016-02-14 00:36:17 INFO SimpleDataGson:54 - Json Generation Time(ms):: 3274835184 -2016-02-14 00:36:18 INFO SimpleDataGson:30 - Size of Simple content Gson :: 251 MB -2016-02-14 00:36:18 INFO SimpleDataGson:31 - -------------------------------------------------------------------------- -2016-02-14 00:36:35 INFO SimpleDataGson:64 - Generating Map from json Time(ms):: 17724232426 -2016-02-14 00:36:35 INFO SimpleDataGson:65 - -------------------------------------------------------------------------- -2016-02-14 00:36:41 INFO SimpleDataGson:77 - Generating Actual Object from json Time(ms):: 3032271715 -2016-02-14 00:36:41 INFO SimpleDataGson:78 - -------------------------------------------------------------------------- -2016-02-14 00:36:45 INFO SimpleDataGson:28 - -------Round 50 -2016-02-14 00:36:50 INFO SimpleDataGson:54 - Json Generation Time(ms):: 3274908606 -2016-02-14 00:36:51 INFO SimpleDataGson:30 - Size of Simple content Gson :: 251 MB -2016-02-14 00:36:51 INFO SimpleDataGson:31 - -------------------------------------------------------------------------- -2016-02-14 00:37:10 INFO SimpleDataGson:64 - Generating Map from json Time(ms):: 19519852002 -2016-02-14 00:37:10 INFO SimpleDataGson:65 - -------------------------------------------------------------------------- -2016-02-14 00:37:17 INFO SimpleDataGson:77 - Generating Actual Object from json Time(ms):: 3261170242 -2016-02-14 00:37:17 INFO SimpleDataGson:78 - -------------------------------------------------------------------------- -2016-02-14 00:37:20 INFO SimpleDataGson:40 - -------------------------------------------------------------------------- -2016-02-14 00:37:20 INFO SimpleDataGson:41 - Average Time to Generate JSON : 3400294046 -2016-02-14 00:37:20 INFO SimpleDataGson:42 - Average Time to Parse JSON To Map : 14381392397 -2016-02-14 00:37:20 INFO SimpleDataGson:43 - Average Time to Parse JSON To Actual Object : 3135402339 -2016-02-14 00:37:20 INFO SimpleDataGson:44 - -------------------------------------------------------------------------- -2016-02-14 01:10:20 INFO SimpleDataJackson:31 - -------Round 1 -2016-02-14 01:10:26 INFO SimpleDataJackson:59 - Json Generation Time(ms):: 2029986528 -2016-02-14 01:10:27 INFO SimpleDataJackson:33 - Size of Simple content Jackson :: 251 MB -2016-02-14 01:10:27 INFO SimpleDataJackson:34 - -------------------------------------------------------------------------- -2016-02-14 01:10:32 INFO SimpleDataJackson:69 - Generating Map from json Time(ms):: 4698777983 -2016-02-14 01:10:32 INFO SimpleDataJackson:70 - -------------------------------------------------------------------------- -2016-02-14 01:10:37 INFO SimpleDataJackson:82 - Generating Actual Object from json Time(ms):: 1658963845 -2016-02-14 01:10:41 INFO SimpleDataJackson:31 - -------Round 2 -2016-02-14 01:10:44 INFO SimpleDataJackson:59 - Json Generation Time(ms):: 1031786966 -2016-02-14 01:10:45 INFO SimpleDataJackson:33 - Size of Simple content Jackson :: 251 MB -2016-02-14 01:10:45 INFO SimpleDataJackson:34 - -------------------------------------------------------------------------- -2016-02-14 01:10:47 INFO SimpleDataJackson:69 - Generating Map from json Time(ms):: 1817755779 -2016-02-14 01:10:47 INFO SimpleDataJackson:70 - -------------------------------------------------------------------------- -2016-02-14 01:10:51 INFO SimpleDataJackson:82 - Generating Actual Object from json Time(ms):: 1585730859 -2016-02-14 01:10:54 INFO SimpleDataJackson:31 - -------Round 3 -2016-02-14 01:10:57 INFO SimpleDataJackson:59 - Json Generation Time(ms):: 1055084513 -2016-02-14 01:10:58 INFO SimpleDataJackson:33 - Size of Simple content Jackson :: 251 MB -2016-02-14 01:10:58 INFO SimpleDataJackson:34 - -------------------------------------------------------------------------- -2016-02-14 01:11:00 INFO SimpleDataJackson:69 - Generating Map from json Time(ms):: 1829403961 -2016-02-14 01:11:00 INFO SimpleDataJackson:70 - -------------------------------------------------------------------------- -2016-02-14 01:11:04 INFO SimpleDataJackson:82 - Generating Actual Object from json Time(ms):: 1573906621 -2016-02-14 01:11:06 INFO SimpleDataJackson:31 - -------Round 4 -2016-02-14 01:11:10 INFO SimpleDataJackson:59 - Json Generation Time(ms):: 1023955984 -2016-02-14 01:11:10 INFO SimpleDataJackson:33 - Size of Simple content Jackson :: 251 MB -2016-02-14 01:11:10 INFO SimpleDataJackson:34 - -------------------------------------------------------------------------- -2016-02-14 01:11:12 INFO SimpleDataJackson:69 - Generating Map from json Time(ms):: 1797498570 -2016-02-14 01:11:12 INFO SimpleDataJackson:70 - -------------------------------------------------------------------------- -2016-02-14 01:11:16 INFO SimpleDataJackson:82 - Generating Actual Object from json Time(ms):: 1626333701 -2016-02-14 01:11:19 INFO SimpleDataJackson:31 - -------Round 5 -2016-02-14 01:11:22 INFO SimpleDataJackson:59 - Json Generation Time(ms):: 1006898985 -2016-02-14 01:11:23 INFO SimpleDataJackson:33 - Size of Simple content Jackson :: 251 MB -2016-02-14 01:11:23 INFO SimpleDataJackson:34 - -------------------------------------------------------------------------- -2016-02-14 01:11:25 INFO SimpleDataJackson:69 - Generating Map from json Time(ms):: 1798982027 -2016-02-14 01:11:25 INFO SimpleDataJackson:70 - -------------------------------------------------------------------------- -2016-02-14 01:11:29 INFO SimpleDataJackson:82 - Generating Actual Object from json Time(ms):: 1667870513 -2016-02-14 01:11:32 INFO SimpleDataJackson:31 - -------Round 6 -2016-02-14 01:11:35 INFO SimpleDataJackson:59 - Json Generation Time(ms):: 1002808227 -2016-02-14 01:11:36 INFO SimpleDataJackson:33 - Size of Simple content Jackson :: 251 MB -2016-02-14 01:11:36 INFO SimpleDataJackson:34 - -------------------------------------------------------------------------- -2016-02-14 01:11:38 INFO SimpleDataJackson:69 - Generating Map from json Time(ms):: 1998326275 -2016-02-14 01:11:38 INFO SimpleDataJackson:70 - -------------------------------------------------------------------------- -2016-02-14 01:11:42 INFO SimpleDataJackson:82 - Generating Actual Object from json Time(ms):: 1645837733 -2016-02-14 01:11:44 INFO SimpleDataJackson:31 - -------Round 7 -2016-02-14 01:11:48 INFO SimpleDataJackson:59 - Json Generation Time(ms):: 1003553509 -2016-02-14 01:11:48 INFO SimpleDataJackson:33 - Size of Simple content Jackson :: 251 MB -2016-02-14 01:11:48 INFO SimpleDataJackson:34 - -------------------------------------------------------------------------- -2016-02-14 01:11:50 INFO SimpleDataJackson:69 - Generating Map from json Time(ms):: 2018994020 -2016-02-14 01:11:50 INFO SimpleDataJackson:70 - -------------------------------------------------------------------------- -2016-02-14 01:11:55 INFO SimpleDataJackson:82 - Generating Actual Object from json Time(ms):: 1657835265 -2016-02-14 01:11:57 INFO SimpleDataJackson:31 - -------Round 8 -2016-02-14 01:12:01 INFO SimpleDataJackson:59 - Json Generation Time(ms):: 1005108020 -2016-02-14 01:12:01 INFO SimpleDataJackson:33 - Size of Simple content Jackson :: 251 MB -2016-02-14 01:12:01 INFO SimpleDataJackson:34 - -------------------------------------------------------------------------- -2016-02-14 01:12:03 INFO SimpleDataJackson:69 - Generating Map from json Time(ms):: 1996226617 -2016-02-14 01:12:03 INFO SimpleDataJackson:70 - -------------------------------------------------------------------------- -2016-02-14 01:12:07 INFO SimpleDataJackson:82 - Generating Actual Object from json Time(ms):: 1645807733 -2016-02-14 01:12:10 INFO SimpleDataJackson:31 - -------Round 9 -2016-02-14 01:12:13 INFO SimpleDataJackson:59 - Json Generation Time(ms):: 991788482 -2016-02-14 01:12:14 INFO SimpleDataJackson:33 - Size of Simple content Jackson :: 251 MB -2016-02-14 01:12:14 INFO SimpleDataJackson:34 - -------------------------------------------------------------------------- -2016-02-14 01:12:16 INFO SimpleDataJackson:69 - Generating Map from json Time(ms):: 1991979539 -2016-02-14 01:12:16 INFO SimpleDataJackson:70 - -------------------------------------------------------------------------- -2016-02-14 01:12:20 INFO SimpleDataJackson:82 - Generating Actual Object from json Time(ms):: 1657106958 -2016-02-14 01:12:22 INFO SimpleDataJackson:31 - -------Round 10 -2016-02-14 01:12:26 INFO SimpleDataJackson:59 - Json Generation Time(ms):: 1002594274 -2016-02-14 01:12:26 INFO SimpleDataJackson:33 - Size of Simple content Jackson :: 251 MB -2016-02-14 01:12:26 INFO SimpleDataJackson:34 - -------------------------------------------------------------------------- -2016-02-14 01:12:28 INFO SimpleDataJackson:69 - Generating Map from json Time(ms):: 2016278558 -2016-02-14 01:12:28 INFO SimpleDataJackson:70 - -------------------------------------------------------------------------- -2016-02-14 01:12:33 INFO SimpleDataJackson:82 - Generating Actual Object from json Time(ms):: 1661181926 -2016-02-14 01:12:35 INFO SimpleDataJackson:31 - -------Round 11 -2016-02-14 01:12:39 INFO SimpleDataJackson:59 - Json Generation Time(ms):: 1000298034 -2016-02-14 01:12:39 INFO SimpleDataJackson:33 - Size of Simple content Jackson :: 251 MB -2016-02-14 01:12:39 INFO SimpleDataJackson:34 - -------------------------------------------------------------------------- -2016-02-14 01:12:41 INFO SimpleDataJackson:69 - Generating Map from json Time(ms):: 1993129831 -2016-02-14 01:12:41 INFO SimpleDataJackson:70 - -------------------------------------------------------------------------- -2016-02-14 01:12:45 INFO SimpleDataJackson:82 - Generating Actual Object from json Time(ms):: 1664888991 -2016-02-14 01:12:48 INFO SimpleDataJackson:31 - -------Round 12 -2016-02-14 01:12:52 INFO SimpleDataJackson:59 - Json Generation Time(ms):: 1259261248 -2016-02-14 01:12:52 INFO SimpleDataJackson:33 - Size of Simple content Jackson :: 251 MB -2016-02-14 01:12:52 INFO SimpleDataJackson:34 - -------------------------------------------------------------------------- -2016-02-14 01:12:55 INFO SimpleDataJackson:69 - Generating Map from json Time(ms):: 2235383423 -2016-02-14 01:12:55 INFO SimpleDataJackson:70 - -------------------------------------------------------------------------- -2016-02-14 01:12:59 INFO SimpleDataJackson:82 - Generating Actual Object from json Time(ms):: 1690719232 -2016-02-14 01:13:01 INFO SimpleDataJackson:31 - -------Round 13 -2016-02-14 01:13:05 INFO SimpleDataJackson:59 - Json Generation Time(ms):: 1014408644 -2016-02-14 01:13:05 INFO SimpleDataJackson:33 - Size of Simple content Jackson :: 251 MB -2016-02-14 01:13:05 INFO SimpleDataJackson:34 - -------------------------------------------------------------------------- -2016-02-14 01:13:07 INFO SimpleDataJackson:69 - Generating Map from json Time(ms):: 2043347909 -2016-02-14 01:13:07 INFO SimpleDataJackson:70 - -------------------------------------------------------------------------- -2016-02-14 01:13:12 INFO SimpleDataJackson:82 - Generating Actual Object from json Time(ms):: 1663652250 -2016-02-14 01:13:14 INFO SimpleDataJackson:31 - -------Round 14 -2016-02-14 01:13:19 INFO SimpleDataJackson:59 - Json Generation Time(ms):: 1333126618 -2016-02-14 01:13:19 INFO SimpleDataJackson:33 - Size of Simple content Jackson :: 251 MB -2016-02-14 01:13:19 INFO SimpleDataJackson:34 - -------------------------------------------------------------------------- -2016-02-14 01:13:22 INFO SimpleDataJackson:69 - Generating Map from json Time(ms):: 2481588034 -2016-02-14 01:13:22 INFO SimpleDataJackson:70 - -------------------------------------------------------------------------- -2016-02-14 01:13:27 INFO SimpleDataJackson:82 - Generating Actual Object from json Time(ms):: 1933185198 -2016-02-14 01:13:29 INFO SimpleDataJackson:31 - -------Round 15 -2016-02-14 01:13:33 INFO SimpleDataJackson:59 - Json Generation Time(ms):: 1020516558 -2016-02-14 01:13:33 INFO SimpleDataJackson:33 - Size of Simple content Jackson :: 251 MB -2016-02-14 01:13:33 INFO SimpleDataJackson:34 - -------------------------------------------------------------------------- -2016-02-14 01:13:35 INFO SimpleDataJackson:69 - Generating Map from json Time(ms):: 1997307828 -2016-02-14 01:13:35 INFO SimpleDataJackson:70 - -------------------------------------------------------------------------- -2016-02-14 01:13:40 INFO SimpleDataJackson:82 - Generating Actual Object from json Time(ms):: 1665160971 -2016-02-14 01:13:42 INFO SimpleDataJackson:31 - -------Round 16 -2016-02-14 01:13:46 INFO SimpleDataJackson:59 - Json Generation Time(ms):: 1047870915 -2016-02-14 01:13:46 INFO SimpleDataJackson:33 - Size of Simple content Jackson :: 251 MB -2016-02-14 01:13:46 INFO SimpleDataJackson:34 - -------------------------------------------------------------------------- -2016-02-14 01:13:48 INFO SimpleDataJackson:69 - Generating Map from json Time(ms):: 2007945854 -2016-02-14 01:13:48 INFO SimpleDataJackson:70 - -------------------------------------------------------------------------- -2016-02-14 01:13:53 INFO SimpleDataJackson:82 - Generating Actual Object from json Time(ms):: 1713994673 -2016-02-14 01:13:55 INFO SimpleDataJackson:31 - -------Round 17 -2016-02-14 01:13:59 INFO SimpleDataJackson:59 - Json Generation Time(ms):: 1021864222 -2016-02-14 01:14:00 INFO SimpleDataJackson:33 - Size of Simple content Jackson :: 251 MB -2016-02-14 01:14:00 INFO SimpleDataJackson:34 - -------------------------------------------------------------------------- -2016-02-14 01:14:02 INFO SimpleDataJackson:69 - Generating Map from json Time(ms):: 2119751499 -2016-02-14 01:14:02 INFO SimpleDataJackson:70 - -------------------------------------------------------------------------- -2016-02-14 01:14:06 INFO SimpleDataJackson:82 - Generating Actual Object from json Time(ms):: 1819921754 -2016-02-14 01:14:09 INFO SimpleDataJackson:31 - -------Round 18 -2016-02-14 01:14:12 INFO SimpleDataJackson:59 - Json Generation Time(ms):: 1100389181 -2016-02-14 01:14:13 INFO SimpleDataJackson:33 - Size of Simple content Jackson :: 251 MB -2016-02-14 01:14:13 INFO SimpleDataJackson:34 - -------------------------------------------------------------------------- -2016-02-14 01:14:15 INFO SimpleDataJackson:69 - Generating Map from json Time(ms):: 2190647586 -2016-02-14 01:14:15 INFO SimpleDataJackson:70 - -------------------------------------------------------------------------- -2016-02-14 01:14:20 INFO SimpleDataJackson:82 - Generating Actual Object from json Time(ms):: 1918921820 -2016-02-14 01:14:23 INFO SimpleDataJackson:31 - -------Round 19 -2016-02-14 01:14:27 INFO SimpleDataJackson:59 - Json Generation Time(ms):: 1095955782 -2016-02-14 01:14:27 INFO SimpleDataJackson:33 - Size of Simple content Jackson :: 251 MB -2016-02-14 01:14:27 INFO SimpleDataJackson:34 - -------------------------------------------------------------------------- -2016-02-14 01:14:29 INFO SimpleDataJackson:69 - Generating Map from json Time(ms):: 2203353688 -2016-02-14 01:14:29 INFO SimpleDataJackson:70 - -------------------------------------------------------------------------- -2016-02-14 01:14:34 INFO SimpleDataJackson:82 - Generating Actual Object from json Time(ms):: 2183651493 -2016-02-14 01:14:37 INFO SimpleDataJackson:31 - -------Round 20 -2016-02-14 01:14:41 INFO SimpleDataJackson:59 - Json Generation Time(ms):: 1346518000 -2016-02-14 01:14:42 INFO SimpleDataJackson:33 - Size of Simple content Jackson :: 251 MB -2016-02-14 01:14:42 INFO SimpleDataJackson:34 - -------------------------------------------------------------------------- -2016-02-14 01:14:44 INFO SimpleDataJackson:69 - Generating Map from json Time(ms):: 2305701995 -2016-02-14 01:14:44 INFO SimpleDataJackson:70 - -------------------------------------------------------------------------- -2016-02-14 01:14:49 INFO SimpleDataJackson:82 - Generating Actual Object from json Time(ms):: 1834727512 -2016-02-14 01:14:52 INFO SimpleDataJackson:31 - -------Round 21 -2016-02-14 01:14:56 INFO SimpleDataJackson:59 - Json Generation Time(ms):: 1054845297 -2016-02-14 01:14:56 INFO SimpleDataJackson:33 - Size of Simple content Jackson :: 251 MB -2016-02-14 01:14:56 INFO SimpleDataJackson:34 - -------------------------------------------------------------------------- -2016-02-14 01:14:58 INFO SimpleDataJackson:69 - Generating Map from json Time(ms):: 2085967115 -2016-02-14 01:14:58 INFO SimpleDataJackson:70 - -------------------------------------------------------------------------- -2016-02-14 01:15:04 INFO SimpleDataJackson:82 - Generating Actual Object from json Time(ms):: 2635661561 -2016-02-14 01:15:07 INFO SimpleDataJackson:31 - -------Round 22 -2016-02-14 01:15:11 INFO SimpleDataJackson:59 - Json Generation Time(ms):: 1221064781 -2016-02-14 01:15:11 INFO SimpleDataJackson:33 - Size of Simple content Jackson :: 251 MB -2016-02-14 01:15:11 INFO SimpleDataJackson:34 - -------------------------------------------------------------------------- -2016-02-14 01:15:13 INFO SimpleDataJackson:69 - Generating Map from json Time(ms):: 2105141139 -2016-02-14 01:15:13 INFO SimpleDataJackson:70 - -------------------------------------------------------------------------- -2016-02-14 01:15:19 INFO SimpleDataJackson:82 - Generating Actual Object from json Time(ms):: 2733167908 -2016-02-14 01:15:22 INFO SimpleDataJackson:31 - -------Round 23 -2016-02-14 01:15:27 INFO SimpleDataJackson:59 - Json Generation Time(ms):: 1667984199 -2016-02-14 01:15:28 INFO SimpleDataJackson:33 - Size of Simple content Jackson :: 251 MB -2016-02-14 01:15:28 INFO SimpleDataJackson:34 - -------------------------------------------------------------------------- -2016-02-14 01:15:30 INFO SimpleDataJackson:69 - Generating Map from json Time(ms):: 2661075740 -2016-02-14 01:15:30 INFO SimpleDataJackson:70 - -------------------------------------------------------------------------- -2016-02-14 01:15:35 INFO SimpleDataJackson:82 - Generating Actual Object from json Time(ms):: 1807353417 -2016-02-14 01:15:38 INFO SimpleDataJackson:31 - -------Round 24 -2016-02-14 01:15:42 INFO SimpleDataJackson:59 - Json Generation Time(ms):: 1088799421 -2016-02-14 01:15:42 INFO SimpleDataJackson:33 - Size of Simple content Jackson :: 251 MB -2016-02-14 01:15:42 INFO SimpleDataJackson:34 - -------------------------------------------------------------------------- -2016-02-14 01:15:44 INFO SimpleDataJackson:69 - Generating Map from json Time(ms):: 2133273543 -2016-02-14 01:15:44 INFO SimpleDataJackson:70 - -------------------------------------------------------------------------- -2016-02-14 01:15:49 INFO SimpleDataJackson:82 - Generating Actual Object from json Time(ms):: 1796471834 -2016-02-14 01:15:52 INFO SimpleDataJackson:31 - -------Round 25 -2016-02-14 01:15:56 INFO SimpleDataJackson:59 - Json Generation Time(ms):: 1061435591 -2016-02-14 01:15:56 INFO SimpleDataJackson:33 - Size of Simple content Jackson :: 251 MB -2016-02-14 01:15:56 INFO SimpleDataJackson:34 - -------------------------------------------------------------------------- -2016-02-14 01:15:59 INFO SimpleDataJackson:69 - Generating Map from json Time(ms):: 2772566377 -2016-02-14 01:15:59 INFO SimpleDataJackson:70 - -------------------------------------------------------------------------- -2016-02-14 01:16:04 INFO SimpleDataJackson:82 - Generating Actual Object from json Time(ms):: 2127388266 -2016-02-14 01:16:07 INFO SimpleDataJackson:31 - -------Round 26 -2016-02-14 01:16:13 INFO SimpleDataJackson:59 - Json Generation Time(ms):: 1570076001 -2016-02-14 01:16:13 INFO SimpleDataJackson:33 - Size of Simple content Jackson :: 251 MB -2016-02-14 01:16:13 INFO SimpleDataJackson:34 - -------------------------------------------------------------------------- -2016-02-14 01:16:16 INFO SimpleDataJackson:69 - Generating Map from json Time(ms):: 3026015772 -2016-02-14 01:16:16 INFO SimpleDataJackson:70 - -------------------------------------------------------------------------- -2016-02-14 01:16:22 INFO SimpleDataJackson:82 - Generating Actual Object from json Time(ms):: 2328930067 -2016-02-14 01:16:25 INFO SimpleDataJackson:31 - -------Round 27 -2016-02-14 01:16:29 INFO SimpleDataJackson:59 - Json Generation Time(ms):: 1047895784 -2016-02-14 01:16:29 INFO SimpleDataJackson:33 - Size of Simple content Jackson :: 251 MB -2016-02-14 01:16:29 INFO SimpleDataJackson:34 - -------------------------------------------------------------------------- -2016-02-14 01:16:32 INFO SimpleDataJackson:69 - Generating Map from json Time(ms):: 2165248408 -2016-02-14 01:16:32 INFO SimpleDataJackson:70 - -------------------------------------------------------------------------- -2016-02-14 01:16:37 INFO SimpleDataJackson:82 - Generating Actual Object from json Time(ms):: 1919710920 -2016-02-14 01:16:40 INFO SimpleDataJackson:31 - -------Round 28 -2016-02-14 01:16:44 INFO SimpleDataJackson:59 - Json Generation Time(ms):: 1461024502 -2016-02-14 01:16:45 INFO SimpleDataJackson:33 - Size of Simple content Jackson :: 251 MB -2016-02-14 01:16:45 INFO SimpleDataJackson:34 - -------------------------------------------------------------------------- -2016-02-14 01:16:48 INFO SimpleDataJackson:69 - Generating Map from json Time(ms):: 2548823636 -2016-02-14 01:16:48 INFO SimpleDataJackson:70 - -------------------------------------------------------------------------- -2016-02-14 01:16:53 INFO SimpleDataJackson:82 - Generating Actual Object from json Time(ms):: 1884536633 -2016-02-14 01:16:56 INFO SimpleDataJackson:31 - -------Round 29 -2016-02-14 01:16:59 INFO SimpleDataJackson:59 - Json Generation Time(ms):: 1075140796 -2016-02-14 01:17:00 INFO SimpleDataJackson:33 - Size of Simple content Jackson :: 251 MB -2016-02-14 01:17:00 INFO SimpleDataJackson:34 - -------------------------------------------------------------------------- -2016-02-14 01:17:02 INFO SimpleDataJackson:69 - Generating Map from json Time(ms):: 2158603245 -2016-02-14 01:17:02 INFO SimpleDataJackson:70 - -------------------------------------------------------------------------- -2016-02-14 01:17:07 INFO SimpleDataJackson:82 - Generating Actual Object from json Time(ms):: 1728481872 -2016-02-14 01:17:09 INFO SimpleDataJackson:31 - -------Round 30 -2016-02-14 01:17:13 INFO SimpleDataJackson:59 - Json Generation Time(ms):: 1122247876 -2016-02-14 01:17:14 INFO SimpleDataJackson:33 - Size of Simple content Jackson :: 251 MB -2016-02-14 01:17:14 INFO SimpleDataJackson:34 - -------------------------------------------------------------------------- -2016-02-14 01:17:17 INFO SimpleDataJackson:69 - Generating Map from json Time(ms):: 2610826477 -2016-02-14 01:17:17 INFO SimpleDataJackson:70 - -------------------------------------------------------------------------- -2016-02-14 01:17:22 INFO SimpleDataJackson:82 - Generating Actual Object from json Time(ms):: 2207052069 -2016-02-14 01:17:25 INFO SimpleDataJackson:31 - -------Round 31 -2016-02-14 01:17:29 INFO SimpleDataJackson:59 - Json Generation Time(ms):: 1052980909 -2016-02-14 01:17:30 INFO SimpleDataJackson:33 - Size of Simple content Jackson :: 251 MB -2016-02-14 01:17:30 INFO SimpleDataJackson:34 - -------------------------------------------------------------------------- -2016-02-14 01:17:32 INFO SimpleDataJackson:69 - Generating Map from json Time(ms):: 2052367868 -2016-02-14 01:17:32 INFO SimpleDataJackson:70 - -------------------------------------------------------------------------- -2016-02-14 01:17:36 INFO SimpleDataJackson:82 - Generating Actual Object from json Time(ms):: 1718415440 -2016-02-14 01:17:39 INFO SimpleDataJackson:31 - -------Round 32 -2016-02-14 01:17:43 INFO SimpleDataJackson:59 - Json Generation Time(ms):: 1055489524 -2016-02-14 01:17:43 INFO SimpleDataJackson:33 - Size of Simple content Jackson :: 251 MB -2016-02-14 01:17:43 INFO SimpleDataJackson:34 - -------------------------------------------------------------------------- -2016-02-14 01:17:45 INFO SimpleDataJackson:69 - Generating Map from json Time(ms):: 2063065499 -2016-02-14 01:17:45 INFO SimpleDataJackson:70 - -------------------------------------------------------------------------- -2016-02-14 01:17:50 INFO SimpleDataJackson:82 - Generating Actual Object from json Time(ms):: 1710515377 -2016-02-14 01:17:53 INFO SimpleDataJackson:31 - -------Round 33 -2016-02-14 01:17:57 INFO SimpleDataJackson:59 - Json Generation Time(ms):: 1129909512 -2016-02-14 01:17:57 INFO SimpleDataJackson:33 - Size of Simple content Jackson :: 251 MB -2016-02-14 01:17:57 INFO SimpleDataJackson:34 - -------------------------------------------------------------------------- -2016-02-14 01:17:59 INFO SimpleDataJackson:69 - Generating Map from json Time(ms):: 2102819240 -2016-02-14 01:17:59 INFO SimpleDataJackson:70 - -------------------------------------------------------------------------- -2016-02-14 01:18:04 INFO SimpleDataJackson:82 - Generating Actual Object from json Time(ms):: 1730105070 -2016-02-14 01:18:07 INFO SimpleDataJackson:31 - -------Round 34 -2016-02-14 01:18:11 INFO SimpleDataJackson:59 - Json Generation Time(ms):: 1101129726 -2016-02-14 01:18:11 INFO SimpleDataJackson:33 - Size of Simple content Jackson :: 251 MB -2016-02-14 01:18:11 INFO SimpleDataJackson:34 - -------------------------------------------------------------------------- -2016-02-14 01:18:13 INFO SimpleDataJackson:69 - Generating Map from json Time(ms):: 2206549951 -2016-02-14 01:18:13 INFO SimpleDataJackson:70 - -------------------------------------------------------------------------- -2016-02-14 01:18:18 INFO SimpleDataJackson:82 - Generating Actual Object from json Time(ms):: 1903037219 -2016-02-14 01:18:21 INFO SimpleDataJackson:31 - -------Round 35 -2016-02-14 01:18:26 INFO SimpleDataJackson:59 - Json Generation Time(ms):: 1386136343 -2016-02-14 01:18:27 INFO SimpleDataJackson:33 - Size of Simple content Jackson :: 251 MB -2016-02-14 01:18:27 INFO SimpleDataJackson:34 - -------------------------------------------------------------------------- -2016-02-14 01:18:29 INFO SimpleDataJackson:69 - Generating Map from json Time(ms):: 2646813152 -2016-02-14 01:18:29 INFO SimpleDataJackson:70 - -------------------------------------------------------------------------- -2016-02-14 01:18:35 INFO SimpleDataJackson:82 - Generating Actual Object from json Time(ms):: 2271873400 -2016-02-14 01:18:38 INFO SimpleDataJackson:31 - -------Round 36 -2016-02-14 01:18:41 INFO SimpleDataJackson:59 - Json Generation Time(ms):: 1072219672 -2016-02-14 01:18:42 INFO SimpleDataJackson:33 - Size of Simple content Jackson :: 251 MB -2016-02-14 01:18:42 INFO SimpleDataJackson:34 - -------------------------------------------------------------------------- -2016-02-14 01:18:44 INFO SimpleDataJackson:69 - Generating Map from json Time(ms):: 2116882876 -2016-02-14 01:18:44 INFO SimpleDataJackson:70 - -------------------------------------------------------------------------- -2016-02-14 01:18:49 INFO SimpleDataJackson:82 - Generating Actual Object from json Time(ms):: 1785044316 -2016-02-14 01:18:52 INFO SimpleDataJackson:31 - -------Round 37 -2016-02-14 01:18:56 INFO SimpleDataJackson:59 - Json Generation Time(ms):: 1060936236 -2016-02-14 01:18:56 INFO SimpleDataJackson:33 - Size of Simple content Jackson :: 251 MB -2016-02-14 01:18:56 INFO SimpleDataJackson:34 - -------------------------------------------------------------------------- -2016-02-14 01:18:59 INFO SimpleDataJackson:69 - Generating Map from json Time(ms):: 2095196685 -2016-02-14 01:18:59 INFO SimpleDataJackson:70 - -------------------------------------------------------------------------- -2016-02-14 01:19:03 INFO SimpleDataJackson:82 - Generating Actual Object from json Time(ms):: 1748247622 -2016-02-14 01:19:06 INFO SimpleDataJackson:31 - -------Round 38 -2016-02-14 01:19:10 INFO SimpleDataJackson:59 - Json Generation Time(ms):: 1086578972 -2016-02-14 01:19:11 INFO SimpleDataJackson:33 - Size of Simple content Jackson :: 251 MB -2016-02-14 01:19:11 INFO SimpleDataJackson:34 - -------------------------------------------------------------------------- -2016-02-14 01:19:13 INFO SimpleDataJackson:69 - Generating Map from json Time(ms):: 2089427069 -2016-02-14 01:19:13 INFO SimpleDataJackson:70 - -------------------------------------------------------------------------- -2016-02-14 01:19:17 INFO SimpleDataJackson:82 - Generating Actual Object from json Time(ms):: 1754304218 -2016-02-14 01:19:20 INFO SimpleDataJackson:31 - -------Round 39 -2016-02-14 01:19:24 INFO SimpleDataJackson:59 - Json Generation Time(ms):: 1100743269 -2016-02-14 01:19:25 INFO SimpleDataJackson:33 - Size of Simple content Jackson :: 251 MB -2016-02-14 01:19:25 INFO SimpleDataJackson:34 - -------------------------------------------------------------------------- -2016-02-14 01:19:27 INFO SimpleDataJackson:69 - Generating Map from json Time(ms):: 2122292877 -2016-02-14 01:19:27 INFO SimpleDataJackson:70 - -------------------------------------------------------------------------- -2016-02-14 01:19:32 INFO SimpleDataJackson:82 - Generating Actual Object from json Time(ms):: 1843712339 -2016-02-14 01:19:35 INFO SimpleDataJackson:31 - -------Round 40 -2016-02-14 01:19:38 INFO SimpleDataJackson:59 - Json Generation Time(ms):: 1098107940 -2016-02-14 01:19:39 INFO SimpleDataJackson:33 - Size of Simple content Jackson :: 251 MB -2016-02-14 01:19:39 INFO SimpleDataJackson:34 - -------------------------------------------------------------------------- -2016-02-14 01:19:41 INFO SimpleDataJackson:69 - Generating Map from json Time(ms):: 2207965512 -2016-02-14 01:19:41 INFO SimpleDataJackson:70 - -------------------------------------------------------------------------- -2016-02-14 01:19:46 INFO SimpleDataJackson:82 - Generating Actual Object from json Time(ms):: 1741791936 -2016-02-14 01:19:48 INFO SimpleDataJackson:31 - -------Round 41 -2016-02-14 01:19:52 INFO SimpleDataJackson:59 - Json Generation Time(ms):: 1064537903 -2016-02-14 01:19:53 INFO SimpleDataJackson:33 - Size of Simple content Jackson :: 251 MB -2016-02-14 01:19:53 INFO SimpleDataJackson:34 - -------------------------------------------------------------------------- -2016-02-14 01:19:55 INFO SimpleDataJackson:69 - Generating Map from json Time(ms):: 2320554730 -2016-02-14 01:19:55 INFO SimpleDataJackson:70 - -------------------------------------------------------------------------- -2016-02-14 01:20:00 INFO SimpleDataJackson:82 - Generating Actual Object from json Time(ms):: 2170266821 -2016-02-14 01:20:03 INFO SimpleDataJackson:31 - -------Round 42 -2016-02-14 01:20:07 INFO SimpleDataJackson:59 - Json Generation Time(ms):: 1157553613 -2016-02-14 01:20:08 INFO SimpleDataJackson:33 - Size of Simple content Jackson :: 251 MB -2016-02-14 01:20:08 INFO SimpleDataJackson:34 - -------------------------------------------------------------------------- -2016-02-14 01:20:10 INFO SimpleDataJackson:69 - Generating Map from json Time(ms):: 2269739005 -2016-02-14 01:20:10 INFO SimpleDataJackson:70 - -------------------------------------------------------------------------- -2016-02-14 01:20:15 INFO SimpleDataJackson:82 - Generating Actual Object from json Time(ms):: 1772026365 -2016-02-14 01:20:18 INFO SimpleDataJackson:31 - -------Round 43 -2016-02-14 01:20:22 INFO SimpleDataJackson:59 - Json Generation Time(ms):: 1136483621 -2016-02-14 01:20:22 INFO SimpleDataJackson:33 - Size of Simple content Jackson :: 251 MB -2016-02-14 01:20:22 INFO SimpleDataJackson:34 - -------------------------------------------------------------------------- -2016-02-14 01:20:24 INFO SimpleDataJackson:69 - Generating Map from json Time(ms):: 2159793800 -2016-02-14 01:20:24 INFO SimpleDataJackson:70 - -------------------------------------------------------------------------- -2016-02-14 01:20:29 INFO SimpleDataJackson:82 - Generating Actual Object from json Time(ms):: 1784084293 -2016-02-14 01:20:32 INFO SimpleDataJackson:31 - -------Round 44 -2016-02-14 01:20:36 INFO SimpleDataJackson:59 - Json Generation Time(ms):: 1173644668 -2016-02-14 01:20:37 INFO SimpleDataJackson:33 - Size of Simple content Jackson :: 251 MB -2016-02-14 01:20:37 INFO SimpleDataJackson:34 - -------------------------------------------------------------------------- -2016-02-14 01:20:39 INFO SimpleDataJackson:69 - Generating Map from json Time(ms):: 2320150509 -2016-02-14 01:20:39 INFO SimpleDataJackson:70 - -------------------------------------------------------------------------- -2016-02-14 01:20:44 INFO SimpleDataJackson:82 - Generating Actual Object from json Time(ms):: 1940564196 -2016-02-14 01:20:47 INFO SimpleDataJackson:31 - -------Round 45 -2016-02-14 01:20:51 INFO SimpleDataJackson:59 - Json Generation Time(ms):: 1265839699 -2016-02-14 01:20:52 INFO SimpleDataJackson:33 - Size of Simple content Jackson :: 251 MB -2016-02-14 01:20:52 INFO SimpleDataJackson:34 - -------------------------------------------------------------------------- -2016-02-14 01:20:54 INFO SimpleDataJackson:69 - Generating Map from json Time(ms):: 2558040573 -2016-02-14 01:20:54 INFO SimpleDataJackson:70 - -------------------------------------------------------------------------- -2016-02-14 01:20:59 INFO SimpleDataJackson:82 - Generating Actual Object from json Time(ms):: 1758794065 -2016-02-14 01:21:02 INFO SimpleDataJackson:31 - -------Round 46 -2016-02-14 01:21:06 INFO SimpleDataJackson:59 - Json Generation Time(ms):: 1181087613 -2016-02-14 01:21:06 INFO SimpleDataJackson:33 - Size of Simple content Jackson :: 251 MB -2016-02-14 01:21:06 INFO SimpleDataJackson:34 - -------------------------------------------------------------------------- -2016-02-14 01:21:09 INFO SimpleDataJackson:69 - Generating Map from json Time(ms):: 2079106420 -2016-02-14 01:21:09 INFO SimpleDataJackson:70 - -------------------------------------------------------------------------- -2016-02-14 01:21:13 INFO SimpleDataJackson:82 - Generating Actual Object from json Time(ms):: 1790406553 -2016-02-14 01:21:16 INFO SimpleDataJackson:31 - -------Round 47 -2016-02-14 01:21:20 INFO SimpleDataJackson:59 - Json Generation Time(ms):: 1106377880 -2016-02-14 01:21:21 INFO SimpleDataJackson:33 - Size of Simple content Jackson :: 251 MB -2016-02-14 01:21:21 INFO SimpleDataJackson:34 - -------------------------------------------------------------------------- -2016-02-14 01:21:23 INFO SimpleDataJackson:69 - Generating Map from json Time(ms):: 2087174645 -2016-02-14 01:21:23 INFO SimpleDataJackson:70 - -------------------------------------------------------------------------- -2016-02-14 01:21:27 INFO SimpleDataJackson:82 - Generating Actual Object from json Time(ms):: 1880122182 -2016-02-14 01:21:30 INFO SimpleDataJackson:31 - -------Round 48 -2016-02-14 01:21:34 INFO SimpleDataJackson:59 - Json Generation Time(ms):: 1059543570 -2016-02-14 01:21:35 INFO SimpleDataJackson:33 - Size of Simple content Jackson :: 251 MB -2016-02-14 01:21:35 INFO SimpleDataJackson:34 - -------------------------------------------------------------------------- -2016-02-14 01:21:37 INFO SimpleDataJackson:69 - Generating Map from json Time(ms):: 2060372538 -2016-02-14 01:21:37 INFO SimpleDataJackson:70 - -------------------------------------------------------------------------- -2016-02-14 01:21:41 INFO SimpleDataJackson:82 - Generating Actual Object from json Time(ms):: 1789722458 -2016-02-14 01:21:44 INFO SimpleDataJackson:31 - -------Round 49 -2016-02-14 01:21:48 INFO SimpleDataJackson:59 - Json Generation Time(ms):: 1144693560 -2016-02-14 01:21:49 INFO SimpleDataJackson:33 - Size of Simple content Jackson :: 251 MB -2016-02-14 01:21:49 INFO SimpleDataJackson:34 - -------------------------------------------------------------------------- -2016-02-14 01:21:51 INFO SimpleDataJackson:69 - Generating Map from json Time(ms):: 2089575493 -2016-02-14 01:21:51 INFO SimpleDataJackson:70 - -------------------------------------------------------------------------- -2016-02-14 01:21:55 INFO SimpleDataJackson:82 - Generating Actual Object from json Time(ms):: 1759762378 -2016-02-14 01:21:58 INFO SimpleDataJackson:31 - -------Round 50 -2016-02-14 01:22:02 INFO SimpleDataJackson:59 - Json Generation Time(ms):: 1074021689 -2016-02-14 01:22:03 INFO SimpleDataJackson:33 - Size of Simple content Jackson :: 251 MB -2016-02-14 01:22:03 INFO SimpleDataJackson:34 - -------------------------------------------------------------------------- -2016-02-14 01:22:05 INFO SimpleDataJackson:69 - Generating Map from json Time(ms):: 2073524704 -2016-02-14 01:22:05 INFO SimpleDataJackson:70 - -------------------------------------------------------------------------- -2016-02-14 01:22:09 INFO SimpleDataJackson:82 - Generating Actual Object from json Time(ms):: 1845090005 -2016-02-14 01:22:12 INFO SimpleDataJackson:45 - -------------------------------------------------------------------------- -2016-02-14 01:22:12 INFO SimpleDataJackson:46 - Average Time to Generate JSON : 1145446097 -2016-02-14 01:22:12 INFO SimpleDataJackson:47 - Average Time to Parse JSON To Map : 2230626711 -2016-02-14 01:22:12 INFO SimpleDataJackson:48 - Average Time to Parse JSON To Actual Object : 1846720796 -2016-02-14 01:22:12 INFO SimpleDataJackson:49 - -------------------------------------------------------------------------- diff --git a/gson-jackson-performance/pom.xml b/gson-jackson-performance/pom.xml index 1a65ed54a0..1ea43bd7fa 100644 --- a/gson-jackson-performance/pom.xml +++ b/gson-jackson-performance/pom.xml @@ -2,7 +2,7 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 - org.baeldung + com.baeldung gson-jackson-performance 0.0.1-SNAPSHOT jar diff --git a/gson-jackson-performance/src/main/java/org/baeldung/data/complex/ComplexDataGeneration.java b/gson-jackson-performance/src/main/java/com/baeldung/data/complex/ComplexDataGeneration.java similarity index 86% rename from gson-jackson-performance/src/main/java/org/baeldung/data/complex/ComplexDataGeneration.java rename to gson-jackson-performance/src/main/java/com/baeldung/data/complex/ComplexDataGeneration.java index 1596c029b5..b69d306edf 100644 --- a/gson-jackson-performance/src/main/java/org/baeldung/data/complex/ComplexDataGeneration.java +++ b/gson-jackson-performance/src/main/java/com/baeldung/data/complex/ComplexDataGeneration.java @@ -1,13 +1,13 @@ -package org.baeldung.data.complex; +package com.baeldung.data.complex; import java.util.ArrayList; import java.util.List; -import org.baeldung.data.utility.Utility; -import org.baeldung.pojo.complex.AddressDetails; -import org.baeldung.pojo.complex.ContactDetails; -import org.baeldung.pojo.complex.CustomerAddressDetails; -import org.baeldung.pojo.complex.CustomerPortfolioComplex; +import com.baeldung.data.utility.Utility; +import com.baeldung.pojo.complex.AddressDetails; +import com.baeldung.pojo.complex.ContactDetails; +import com.baeldung.pojo.complex.CustomerAddressDetails; +import com.baeldung.pojo.complex.CustomerPortfolioComplex; /** * diff --git a/gson-jackson-performance/src/main/java/org/baeldung/data/complex/ComplexDataGson.java b/gson-jackson-performance/src/main/java/com/baeldung/data/complex/ComplexDataGson.java similarity index 96% rename from gson-jackson-performance/src/main/java/org/baeldung/data/complex/ComplexDataGson.java rename to gson-jackson-performance/src/main/java/com/baeldung/data/complex/ComplexDataGson.java index 23ce668d17..b97893e8f1 100644 --- a/gson-jackson-performance/src/main/java/org/baeldung/data/complex/ComplexDataGson.java +++ b/gson-jackson-performance/src/main/java/com/baeldung/data/complex/ComplexDataGson.java @@ -1,10 +1,10 @@ -package org.baeldung.data.complex; +package com.baeldung.data.complex; import java.util.Map; import org.apache.log4j.Logger; -import org.baeldung.data.utility.Utility; -import org.baeldung.pojo.complex.CustomerPortfolioComplex; +import com.baeldung.data.utility.Utility; +import com.baeldung.pojo.complex.CustomerPortfolioComplex; import com.google.gson.Gson; diff --git a/gson-jackson-performance/src/main/java/org/baeldung/data/complex/ComplexDataJackson.java b/gson-jackson-performance/src/main/java/com/baeldung/data/complex/ComplexDataJackson.java similarity index 96% rename from gson-jackson-performance/src/main/java/org/baeldung/data/complex/ComplexDataJackson.java rename to gson-jackson-performance/src/main/java/com/baeldung/data/complex/ComplexDataJackson.java index 6447060856..07a210fb37 100644 --- a/gson-jackson-performance/src/main/java/org/baeldung/data/complex/ComplexDataJackson.java +++ b/gson-jackson-performance/src/main/java/com/baeldung/data/complex/ComplexDataJackson.java @@ -1,11 +1,11 @@ -package org.baeldung.data.complex; +package com.baeldung.data.complex; import java.io.IOException; import java.util.Map; +import com.baeldung.data.utility.Utility; import org.apache.log4j.Logger; -import org.baeldung.data.utility.Utility; -import org.baeldung.pojo.complex.CustomerPortfolioComplex; +import com.baeldung.pojo.complex.CustomerPortfolioComplex; import com.fasterxml.jackson.core.JsonParseException; import com.fasterxml.jackson.core.JsonProcessingException; diff --git a/gson-jackson-performance/src/main/java/org/baeldung/data/simple/SimpleDataGeneration.java b/gson-jackson-performance/src/main/java/com/baeldung/data/simple/SimpleDataGeneration.java similarity index 81% rename from gson-jackson-performance/src/main/java/org/baeldung/data/simple/SimpleDataGeneration.java rename to gson-jackson-performance/src/main/java/com/baeldung/data/simple/SimpleDataGeneration.java index 69cf87e7b2..1e186adc72 100644 --- a/gson-jackson-performance/src/main/java/org/baeldung/data/simple/SimpleDataGeneration.java +++ b/gson-jackson-performance/src/main/java/com/baeldung/data/simple/SimpleDataGeneration.java @@ -1,11 +1,11 @@ -package org.baeldung.data.simple; +package com.baeldung.data.simple; import java.util.ArrayList; import java.util.List; -import org.baeldung.data.utility.Utility; -import org.baeldung.pojo.simple.Customer; -import org.baeldung.pojo.simple.CustomerPortfolioSimple; +import com.baeldung.data.utility.Utility; +import com.baeldung.pojo.simple.Customer; +import com.baeldung.pojo.simple.CustomerPortfolioSimple; /** * diff --git a/gson-jackson-performance/src/main/java/org/baeldung/data/simple/SimpleDataGson.java b/gson-jackson-performance/src/main/java/com/baeldung/data/simple/SimpleDataGson.java similarity index 96% rename from gson-jackson-performance/src/main/java/org/baeldung/data/simple/SimpleDataGson.java rename to gson-jackson-performance/src/main/java/com/baeldung/data/simple/SimpleDataGson.java index b41aab53e7..b190313462 100644 --- a/gson-jackson-performance/src/main/java/org/baeldung/data/simple/SimpleDataGson.java +++ b/gson-jackson-performance/src/main/java/com/baeldung/data/simple/SimpleDataGson.java @@ -1,10 +1,10 @@ -package org.baeldung.data.simple; +package com.baeldung.data.simple; import java.util.Map; import org.apache.log4j.Logger; -import org.baeldung.data.utility.Utility; -import org.baeldung.pojo.simple.CustomerPortfolioSimple; +import com.baeldung.data.utility.Utility; +import com.baeldung.pojo.simple.CustomerPortfolioSimple; import com.google.gson.Gson; diff --git a/gson-jackson-performance/src/main/java/org/baeldung/data/simple/SimpleDataJackson.java b/gson-jackson-performance/src/main/java/com/baeldung/data/simple/SimpleDataJackson.java similarity index 96% rename from gson-jackson-performance/src/main/java/org/baeldung/data/simple/SimpleDataJackson.java rename to gson-jackson-performance/src/main/java/com/baeldung/data/simple/SimpleDataJackson.java index 9280a2a6e9..9330333604 100644 --- a/gson-jackson-performance/src/main/java/org/baeldung/data/simple/SimpleDataJackson.java +++ b/gson-jackson-performance/src/main/java/com/baeldung/data/simple/SimpleDataJackson.java @@ -1,11 +1,11 @@ -package org.baeldung.data.simple; +package com.baeldung.data.simple; import java.io.IOException; import java.util.Map; +import com.baeldung.data.utility.Utility; import org.apache.log4j.Logger; -import org.baeldung.data.utility.Utility; -import org.baeldung.pojo.simple.CustomerPortfolioSimple; +import com.baeldung.pojo.simple.CustomerPortfolioSimple; import com.fasterxml.jackson.core.JsonParseException; import com.fasterxml.jackson.core.JsonProcessingException; @@ -15,7 +15,7 @@ import com.fasterxml.jackson.databind.ObjectMapper; /** * * This class is responsible for performing functions for Simple type - * GSON like + * Jackson like * Java to Json * Json to Map * Json to Java Object diff --git a/gson-jackson-performance/src/main/java/org/baeldung/data/utility/Utility.java b/gson-jackson-performance/src/main/java/com/baeldung/data/utility/Utility.java similarity index 98% rename from gson-jackson-performance/src/main/java/org/baeldung/data/utility/Utility.java rename to gson-jackson-performance/src/main/java/com/baeldung/data/utility/Utility.java index 852fc56929..8b0c402e47 100644 --- a/gson-jackson-performance/src/main/java/org/baeldung/data/utility/Utility.java +++ b/gson-jackson-performance/src/main/java/com/baeldung/data/utility/Utility.java @@ -1,4 +1,4 @@ -package org.baeldung.data.utility; +package com.baeldung.data.utility; import java.io.BufferedReader; import java.io.FileReader; diff --git a/gson-jackson-performance/src/main/java/org/baeldung/pojo/complex/AddressDetails.java b/gson-jackson-performance/src/main/java/com/baeldung/pojo/complex/AddressDetails.java similarity index 94% rename from gson-jackson-performance/src/main/java/org/baeldung/pojo/complex/AddressDetails.java rename to gson-jackson-performance/src/main/java/com/baeldung/pojo/complex/AddressDetails.java index 67908c599a..79725a97bd 100644 --- a/gson-jackson-performance/src/main/java/org/baeldung/pojo/complex/AddressDetails.java +++ b/gson-jackson-performance/src/main/java/com/baeldung/pojo/complex/AddressDetails.java @@ -1,4 +1,4 @@ -package org.baeldung.pojo.complex; +package com.baeldung.pojo.complex; import java.util.List; diff --git a/gson-jackson-performance/src/main/java/org/baeldung/pojo/complex/ContactDetails.java b/gson-jackson-performance/src/main/java/com/baeldung/pojo/complex/ContactDetails.java similarity index 90% rename from gson-jackson-performance/src/main/java/org/baeldung/pojo/complex/ContactDetails.java rename to gson-jackson-performance/src/main/java/com/baeldung/pojo/complex/ContactDetails.java index fa848c8d84..164fe3f470 100644 --- a/gson-jackson-performance/src/main/java/org/baeldung/pojo/complex/ContactDetails.java +++ b/gson-jackson-performance/src/main/java/com/baeldung/pojo/complex/ContactDetails.java @@ -1,4 +1,4 @@ -package org.baeldung.pojo.complex; +package com.baeldung.pojo.complex; public class ContactDetails { diff --git a/gson-jackson-performance/src/main/java/org/baeldung/pojo/complex/CustomerAddressDetails.java b/gson-jackson-performance/src/main/java/com/baeldung/pojo/complex/CustomerAddressDetails.java similarity index 80% rename from gson-jackson-performance/src/main/java/org/baeldung/pojo/complex/CustomerAddressDetails.java rename to gson-jackson-performance/src/main/java/com/baeldung/pojo/complex/CustomerAddressDetails.java index 921b7e126b..9bc5951716 100644 --- a/gson-jackson-performance/src/main/java/org/baeldung/pojo/complex/CustomerAddressDetails.java +++ b/gson-jackson-performance/src/main/java/com/baeldung/pojo/complex/CustomerAddressDetails.java @@ -1,8 +1,8 @@ -package org.baeldung.pojo.complex; +package com.baeldung.pojo.complex; import java.util.List; -import org.baeldung.pojo.simple.Customer; +import com.baeldung.pojo.simple.Customer; public class CustomerAddressDetails extends Customer { diff --git a/gson-jackson-performance/src/main/java/org/baeldung/pojo/complex/CustomerPortfolioComplex.java b/gson-jackson-performance/src/main/java/com/baeldung/pojo/complex/CustomerPortfolioComplex.java similarity index 92% rename from gson-jackson-performance/src/main/java/org/baeldung/pojo/complex/CustomerPortfolioComplex.java rename to gson-jackson-performance/src/main/java/com/baeldung/pojo/complex/CustomerPortfolioComplex.java index 407cc49bea..13f9d240b8 100644 --- a/gson-jackson-performance/src/main/java/org/baeldung/pojo/complex/CustomerPortfolioComplex.java +++ b/gson-jackson-performance/src/main/java/com/baeldung/pojo/complex/CustomerPortfolioComplex.java @@ -1,4 +1,4 @@ -package org.baeldung.pojo.complex; +package com.baeldung.pojo.complex; import java.util.List; diff --git a/gson-jackson-performance/src/main/java/org/baeldung/pojo/simple/Customer.java b/gson-jackson-performance/src/main/java/com/baeldung/pojo/simple/Customer.java similarity index 93% rename from gson-jackson-performance/src/main/java/org/baeldung/pojo/simple/Customer.java rename to gson-jackson-performance/src/main/java/com/baeldung/pojo/simple/Customer.java index bb88b55ef3..3d5668f85a 100644 --- a/gson-jackson-performance/src/main/java/org/baeldung/pojo/simple/Customer.java +++ b/gson-jackson-performance/src/main/java/com/baeldung/pojo/simple/Customer.java @@ -1,4 +1,4 @@ -package org.baeldung.pojo.simple; +package com.baeldung.pojo.simple; public class Customer { diff --git a/gson-jackson-performance/src/main/java/org/baeldung/pojo/simple/CustomerPortfolioSimple.java b/gson-jackson-performance/src/main/java/com/baeldung/pojo/simple/CustomerPortfolioSimple.java similarity index 89% rename from gson-jackson-performance/src/main/java/org/baeldung/pojo/simple/CustomerPortfolioSimple.java rename to gson-jackson-performance/src/main/java/com/baeldung/pojo/simple/CustomerPortfolioSimple.java index ccd17e1a56..7cb684813c 100644 --- a/gson-jackson-performance/src/main/java/org/baeldung/pojo/simple/CustomerPortfolioSimple.java +++ b/gson-jackson-performance/src/main/java/com/baeldung/pojo/simple/CustomerPortfolioSimple.java @@ -1,4 +1,4 @@ -package org.baeldung.pojo.simple; +package com.baeldung.pojo.simple; import java.util.List; diff --git a/gson/pom.xml b/gson/pom.xml index c0640abcbf..4f331f6fd9 100644 --- a/gson/pom.xml +++ b/gson/pom.xml @@ -1,6 +1,6 @@ 4.0.0 - org.baeldung + com.baeldung gson 0.1-SNAPSHOT @@ -112,13 +112,9 @@ - - 4.1.5.RELEASE - 3.2.5.RELEASE - - 4.3.10.Final - 5.1.35 + 4.3.11.Final + 5.1.38 2.3 @@ -142,14 +138,14 @@ 4.4.1 4.5 - 2.4.1 + 2.9.0 - 3.3 + 3.5.1 2.6 - 2.18.1 + 2.19.1 2.7 - 1.4.14 + 1.4.18 diff --git a/gson/src/main/webapp/WEB-INF/api-servlet.xml b/gson/src/main/webapp/WEB-INF/api-servlet.xml deleted file mode 100644 index 4c74be8912..0000000000 --- a/gson/src/main/webapp/WEB-INF/api-servlet.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - \ No newline at end of file diff --git a/gson/src/main/webapp/WEB-INF/web.xml b/gson/src/main/webapp/WEB-INF/web.xml deleted file mode 100644 index 935beae648..0000000000 --- a/gson/src/main/webapp/WEB-INF/web.xml +++ /dev/null @@ -1,41 +0,0 @@ - - - - Spring MVC Application - - - - contextClass - - org.springframework.web.context.support.AnnotationConfigWebApplicationContext - - - - contextConfigLocation - org.baeldung.config - - - - org.springframework.web.context.ContextLoaderListener - - - - - api - org.springframework.web.servlet.DispatcherServlet - 1 - - - api - / - - - - - - - \ No newline at end of file diff --git a/guava/pom.xml b/guava/pom.xml index 2b07be71bf..59ca3aa1bb 100644 --- a/guava/pom.xml +++ b/guava/pom.xml @@ -1,8 +1,8 @@ 4.0.0 - org.baeldung + com.baeldung guava - 0.1-SNAPSHOT + 0.1.0-SNAPSHOT guava @@ -93,13 +93,9 @@ - - 4.1.5.RELEASE - 3.2.5.RELEASE - - 4.3.10.Final - 5.1.35 + 4.3.11.Final + 5.1.38 1.7.13 @@ -120,14 +116,14 @@ 4.4.1 4.5 - 2.4.1 + 2.9.0 - 3.3 + 3.5.1 2.6 - 2.18.1 + 2.19.1 2.7 - 1.4.14 + 1.4.18 diff --git a/guava/src/main/webapp/WEB-INF/api-servlet.xml b/guava/src/main/webapp/WEB-INF/api-servlet.xml deleted file mode 100644 index 4c74be8912..0000000000 --- a/guava/src/main/webapp/WEB-INF/api-servlet.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - \ No newline at end of file diff --git a/guava/src/main/webapp/WEB-INF/web.xml b/guava/src/main/webapp/WEB-INF/web.xml deleted file mode 100644 index 935beae648..0000000000 --- a/guava/src/main/webapp/WEB-INF/web.xml +++ /dev/null @@ -1,41 +0,0 @@ - - - - Spring MVC Application - - - - contextClass - - org.springframework.web.context.support.AnnotationConfigWebApplicationContext - - - - contextConfigLocation - org.baeldung.config - - - - org.springframework.web.context.ContextLoaderListener - - - - - api - org.springframework.web.servlet.DispatcherServlet - 1 - - - api - / - - - - - - - \ No newline at end of file diff --git a/guava18/pom.xml b/guava18/pom.xml index 21f4697a73..6002b37d74 100644 --- a/guava18/pom.xml +++ b/guava18/pom.xml @@ -5,8 +5,8 @@ 4.0.0 com.baeldung - guava - 1.0-SNAPSHOT + guava18 + 0.1.0-SNAPSHOT diff --git a/guava19/README.md b/guava19/README.md new file mode 100644 index 0000000000..be9f2d72a4 --- /dev/null +++ b/guava19/README.md @@ -0,0 +1,7 @@ +========= + +## Guava 19 + + +### Relevant Articles: +- [Guava 19: What’s New?](http://www.baeldung.com/whats-new-in-guava-19) diff --git a/guava19/pom.xml b/guava19/pom.xml index 97c1b0ea4e..13f3b471f1 100644 --- a/guava19/pom.xml +++ b/guava19/pom.xml @@ -1,12 +1,10 @@ - + 4.0.0 com.baeldung - guava - 1.0-SNAPSHOT + guava19 + 0.1.0-SNAPSHOT @@ -25,6 +23,7 @@ 1.3 + diff --git a/handling-spring-static-resources/.classpath b/handling-spring-static-resources/.classpath index 71a1c1e0b5..613195248b 100644 --- a/handling-spring-static-resources/.classpath +++ b/handling-spring-static-resources/.classpath @@ -6,7 +6,11 @@ - + + + + + diff --git a/handling-spring-static-resources/.project b/handling-spring-static-resources/.project index a16def8042..ae47dfac0e 100644 --- a/handling-spring-static-resources/.project +++ b/handling-spring-static-resources/.project @@ -1,6 +1,6 @@ - handling-spring-static-resources + spring-static-resources diff --git a/handling-spring-static-resources/pom.xml b/handling-spring-static-resources/pom.xml index 8efacc4b28..f47d8a5592 100644 --- a/handling-spring-static-resources/pom.xml +++ b/handling-spring-static-resources/pom.xml @@ -1,12 +1,14 @@ 4.0.0 - org.baeldung - handling-spring-static-resources - handling-spring-static-resources - 0.1-SNAPSHOT + + com.baeldung + spring-static-resources + 0.1.0-SNAPSHOT war + spring-static-resources + @@ -161,7 +163,7 @@ - handling-spring-static-resources + spring-static-resources src/main/resources @@ -172,21 +174,22 @@ 1.8 + - 4.2.4.RELEASE - 4.0.3.RELEASE + 4.2.5.RELEASE + 4.0.4.RELEASE 1.8.1 2.3.2-b01 4.3.11.Final - 5.1.37 + 5.1.38 1.9.2.RELEASE - 2.6.4 + 2.7.2 1.7.13 @@ -207,13 +210,13 @@ 4.4.1 4.5 - 2.4.1 + 2.9.0 - 3.3 + 3.5.1 2.6 - 2.18.1 - 1.4.14 + 2.19.1 + 1.4.18 \ No newline at end of file diff --git a/httpclient/pom.xml b/httpclient/pom.xml index 0098c40d52..66b2076852 100644 --- a/httpclient/pom.xml +++ b/httpclient/pom.xml @@ -1,6 +1,6 @@ 4.0.0 - org.baeldung + com.baeldung httpclient 0.1-SNAPSHOT @@ -148,13 +148,9 @@ - - 4.1.5.RELEASE - 3.2.5.RELEASE - - 4.3.10.Final - 5.1.35 + 4.3.11.Final + 5.1.38 1.7.13 @@ -175,14 +171,14 @@ 4.4.1 4.5 - 2.4.1 + 2.9.0 - 3.3 + 3.5.1 2.6 - 2.18.1 + 2.19.1 2.7 - 1.4.14 + 1.4.18 diff --git a/jackson/pom.xml b/jackson/pom.xml index ed7a5944a5..f63ec08b48 100644 --- a/jackson/pom.xml +++ b/jackson/pom.xml @@ -1,6 +1,7 @@ - + 4.0.0 - org.baeldung + com.baeldung jackson 0.1-SNAPSHOT @@ -47,25 +48,31 @@ com.fasterxml.jackson.datatype jackson-datatype-jsr310 - 2.4.0 + ${jackson.version} com.fasterxml.jackson.datatype jackson-datatype-joda - 2.4.0 + ${jackson.version} + + + + com.fasterxml.jackson.module + jackson-module-jsonSchema + 2.7.2 joda-time joda-time - 2.6 + 2.9.2 com.google.code.gson gson - 2.3.1 + 2.6.2 @@ -131,16 +138,12 @@ - - 4.1.5.RELEASE - 3.2.5.RELEASE - - 4.3.10.Final - 5.1.35 + 4.3.11.Final + 5.1.38 - 2.7.1-1 + 2.7.2 1.7.13 @@ -161,15 +164,15 @@ 4.4.1 4.5 - 2.4.1 + 2.9.0 - 3.3 + 3.5.1 2.6 - 2.18.1 + 2.19.1 2.7 - 1.4.14 + 1.4.18 - \ No newline at end of file + diff --git a/jackson/src/test/java/org/baeldung/jackson/annotation/BeanWithCreator.java b/jackson/src/test/java/com/baeldung/jackson/annotation/BeanWithCreator.java similarity index 89% rename from jackson/src/test/java/org/baeldung/jackson/annotation/BeanWithCreator.java rename to jackson/src/test/java/com/baeldung/jackson/annotation/BeanWithCreator.java index 01507ab4d6..90a45efc96 100644 --- a/jackson/src/test/java/org/baeldung/jackson/annotation/BeanWithCreator.java +++ b/jackson/src/test/java/com/baeldung/jackson/annotation/BeanWithCreator.java @@ -1,4 +1,4 @@ -package org.baeldung.jackson.annotation; +package com.baeldung.jackson.annotation; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; diff --git a/jackson/src/test/java/org/baeldung/jackson/annotation/BeanWithCustomAnnotation.java b/jackson/src/test/java/com/baeldung/jackson/annotation/BeanWithCustomAnnotation.java similarity index 90% rename from jackson/src/test/java/org/baeldung/jackson/annotation/BeanWithCustomAnnotation.java rename to jackson/src/test/java/com/baeldung/jackson/annotation/BeanWithCustomAnnotation.java index 3b468f474f..65d64059c9 100644 --- a/jackson/src/test/java/org/baeldung/jackson/annotation/BeanWithCustomAnnotation.java +++ b/jackson/src/test/java/com/baeldung/jackson/annotation/BeanWithCustomAnnotation.java @@ -1,10 +1,10 @@ -package org.baeldung.jackson.annotation; +package com.baeldung.jackson.annotation; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.util.Date; -import org.baeldung.jackson.annotation.BeanWithCustomAnnotation.CustomAnnotation; +import com.baeldung.jackson.annotation.BeanWithCustomAnnotation.CustomAnnotation; import com.fasterxml.jackson.annotation.JacksonAnnotationsInside; import com.fasterxml.jackson.annotation.JsonInclude; diff --git a/jackson/src/test/java/org/baeldung/jackson/annotation/BeanWithFilter.java b/jackson/src/test/java/com/baeldung/jackson/annotation/BeanWithFilter.java similarity index 88% rename from jackson/src/test/java/org/baeldung/jackson/annotation/BeanWithFilter.java rename to jackson/src/test/java/com/baeldung/jackson/annotation/BeanWithFilter.java index a0627757b6..48fecf8c13 100644 --- a/jackson/src/test/java/org/baeldung/jackson/annotation/BeanWithFilter.java +++ b/jackson/src/test/java/com/baeldung/jackson/annotation/BeanWithFilter.java @@ -1,4 +1,4 @@ -package org.baeldung.jackson.annotation; +package com.baeldung.jackson.annotation; import com.fasterxml.jackson.annotation.JsonFilter; diff --git a/jackson/src/test/java/org/baeldung/jackson/annotation/BeanWithGetter.java b/jackson/src/test/java/com/baeldung/jackson/annotation/BeanWithGetter.java similarity index 93% rename from jackson/src/test/java/org/baeldung/jackson/annotation/BeanWithGetter.java rename to jackson/src/test/java/com/baeldung/jackson/annotation/BeanWithGetter.java index 6585018564..39db9f06b9 100644 --- a/jackson/src/test/java/org/baeldung/jackson/annotation/BeanWithGetter.java +++ b/jackson/src/test/java/com/baeldung/jackson/annotation/BeanWithGetter.java @@ -1,4 +1,4 @@ -package org.baeldung.jackson.annotation; +package com.baeldung.jackson.annotation; import com.fasterxml.jackson.annotation.JsonGetter; import com.fasterxml.jackson.annotation.JsonProperty; diff --git a/jackson/src/test/java/org/baeldung/jackson/annotation/BeanWithIgnore.java b/jackson/src/test/java/com/baeldung/jackson/annotation/BeanWithIgnore.java similarity index 90% rename from jackson/src/test/java/org/baeldung/jackson/annotation/BeanWithIgnore.java rename to jackson/src/test/java/com/baeldung/jackson/annotation/BeanWithIgnore.java index 4f0866bdc0..aa4e6b495d 100644 --- a/jackson/src/test/java/org/baeldung/jackson/annotation/BeanWithIgnore.java +++ b/jackson/src/test/java/com/baeldung/jackson/annotation/BeanWithIgnore.java @@ -1,4 +1,4 @@ -package org.baeldung.jackson.annotation; +package com.baeldung.jackson.annotation; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; diff --git a/jackson/src/test/java/org/baeldung/jackson/annotation/BeanWithInject.java b/jackson/src/test/java/com/baeldung/jackson/annotation/BeanWithInject.java similarity index 88% rename from jackson/src/test/java/org/baeldung/jackson/annotation/BeanWithInject.java rename to jackson/src/test/java/com/baeldung/jackson/annotation/BeanWithInject.java index aa8da1da4f..473058fd1c 100644 --- a/jackson/src/test/java/org/baeldung/jackson/annotation/BeanWithInject.java +++ b/jackson/src/test/java/com/baeldung/jackson/annotation/BeanWithInject.java @@ -1,4 +1,4 @@ -package org.baeldung.jackson.annotation; +package com.baeldung.jackson.annotation; import com.fasterxml.jackson.annotation.JacksonInject; diff --git a/jackson/src/test/java/org/baeldung/jackson/annotation/ExtendableBean.java b/jackson/src/test/java/com/baeldung/jackson/annotation/ExtendableBean.java similarity index 94% rename from jackson/src/test/java/org/baeldung/jackson/annotation/ExtendableBean.java rename to jackson/src/test/java/com/baeldung/jackson/annotation/ExtendableBean.java index c8e5f453ec..e03ffed613 100644 --- a/jackson/src/test/java/org/baeldung/jackson/annotation/ExtendableBean.java +++ b/jackson/src/test/java/com/baeldung/jackson/annotation/ExtendableBean.java @@ -1,4 +1,4 @@ -package org.baeldung.jackson.annotation; +package com.baeldung.jackson.annotation; import java.util.HashMap; import java.util.Map; diff --git a/jackson/src/test/java/org/baeldung/jackson/annotation/MyBean.java b/jackson/src/test/java/com/baeldung/jackson/annotation/MyBean.java similarity index 91% rename from jackson/src/test/java/org/baeldung/jackson/annotation/MyBean.java rename to jackson/src/test/java/com/baeldung/jackson/annotation/MyBean.java index 651d7c2da0..5d4ce4202c 100644 --- a/jackson/src/test/java/org/baeldung/jackson/annotation/MyBean.java +++ b/jackson/src/test/java/com/baeldung/jackson/annotation/MyBean.java @@ -1,4 +1,4 @@ -package org.baeldung.jackson.annotation; +package com.baeldung.jackson.annotation; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonInclude.Include; diff --git a/jackson/src/test/java/org/baeldung/jackson/annotation/PrivateBean.java b/jackson/src/test/java/com/baeldung/jackson/annotation/PrivateBean.java similarity index 90% rename from jackson/src/test/java/org/baeldung/jackson/annotation/PrivateBean.java rename to jackson/src/test/java/com/baeldung/jackson/annotation/PrivateBean.java index 472fa84a26..a49ce2e6d5 100644 --- a/jackson/src/test/java/org/baeldung/jackson/annotation/PrivateBean.java +++ b/jackson/src/test/java/com/baeldung/jackson/annotation/PrivateBean.java @@ -1,4 +1,4 @@ -package org.baeldung.jackson.annotation; +package com.baeldung.jackson.annotation; import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility; diff --git a/jackson/src/test/java/org/baeldung/jackson/annotation/RawBean.java b/jackson/src/test/java/com/baeldung/jackson/annotation/RawBean.java similarity index 87% rename from jackson/src/test/java/org/baeldung/jackson/annotation/RawBean.java rename to jackson/src/test/java/com/baeldung/jackson/annotation/RawBean.java index a481fbf02e..a0482ef5c1 100644 --- a/jackson/src/test/java/org/baeldung/jackson/annotation/RawBean.java +++ b/jackson/src/test/java/com/baeldung/jackson/annotation/RawBean.java @@ -1,4 +1,4 @@ -package org.baeldung.jackson.annotation; +package com.baeldung.jackson.annotation; import com.fasterxml.jackson.annotation.JsonRawValue; diff --git a/jackson/src/test/java/org/baeldung/jackson/annotation/UnwrappedUser.java b/jackson/src/test/java/com/baeldung/jackson/annotation/UnwrappedUser.java similarity index 93% rename from jackson/src/test/java/org/baeldung/jackson/annotation/UnwrappedUser.java rename to jackson/src/test/java/com/baeldung/jackson/annotation/UnwrappedUser.java index 4c761a57e0..d2b7522221 100644 --- a/jackson/src/test/java/org/baeldung/jackson/annotation/UnwrappedUser.java +++ b/jackson/src/test/java/com/baeldung/jackson/annotation/UnwrappedUser.java @@ -1,4 +1,4 @@ -package org.baeldung.jackson.annotation; +package com.baeldung.jackson.annotation; import com.fasterxml.jackson.annotation.JsonUnwrapped; diff --git a/jackson/src/test/java/org/baeldung/jackson/annotation/UserWithIgnoreType.java b/jackson/src/test/java/com/baeldung/jackson/annotation/UserWithIgnoreType.java similarity index 93% rename from jackson/src/test/java/org/baeldung/jackson/annotation/UserWithIgnoreType.java rename to jackson/src/test/java/com/baeldung/jackson/annotation/UserWithIgnoreType.java index eaf4cb7b74..36f383cf65 100644 --- a/jackson/src/test/java/org/baeldung/jackson/annotation/UserWithIgnoreType.java +++ b/jackson/src/test/java/com/baeldung/jackson/annotation/UserWithIgnoreType.java @@ -1,4 +1,4 @@ -package org.baeldung.jackson.annotation; +package com.baeldung.jackson.annotation; import com.fasterxml.jackson.annotation.JsonIgnoreType; diff --git a/jackson/src/test/java/org/baeldung/jackson/annotation/Zoo.java b/jackson/src/test/java/com/baeldung/jackson/annotation/Zoo.java similarity index 96% rename from jackson/src/test/java/org/baeldung/jackson/annotation/Zoo.java rename to jackson/src/test/java/com/baeldung/jackson/annotation/Zoo.java index d59be09f12..9c11ec0e36 100644 --- a/jackson/src/test/java/org/baeldung/jackson/annotation/Zoo.java +++ b/jackson/src/test/java/com/baeldung/jackson/annotation/Zoo.java @@ -1,4 +1,4 @@ -package org.baeldung.jackson.annotation; +package com.baeldung.jackson.annotation; import com.fasterxml.jackson.annotation.JsonSubTypes; import com.fasterxml.jackson.annotation.JsonTypeInfo; diff --git a/jackson/src/test/java/com/baeldung/jackson/annotation/extra/AppendBeans.java b/jackson/src/test/java/com/baeldung/jackson/annotation/extra/AppendBeans.java new file mode 100644 index 0000000000..7b75c205c9 --- /dev/null +++ b/jackson/src/test/java/com/baeldung/jackson/annotation/extra/AppendBeans.java @@ -0,0 +1,58 @@ +package com.baeldung.jackson.annotation.extra; + +import com.fasterxml.jackson.databind.annotation.JsonAppend; + +public class AppendBeans { + public static class BeanWithoutAppend { + private int id; + private String name; + + public BeanWithoutAppend(int id, String name) { + this.id = id; + this.name = name; + } + + public int getId() { + return id; + } + + public void setId(int id) { + this.id = id; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + } + + @JsonAppend(attrs = { @JsonAppend.Attr(value = "version") }) + public static class BeanWithAppend { + private int id; + private String name; + + public BeanWithAppend(int id, String name) { + this.id = id; + this.name = name; + } + + public int getId() { + return id; + } + + public void setId(int id) { + this.id = id; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + } +} \ No newline at end of file diff --git a/jackson/src/test/java/com/baeldung/jackson/annotation/extra/ExtraAnnotationTest.java b/jackson/src/test/java/com/baeldung/jackson/annotation/extra/ExtraAnnotationTest.java new file mode 100644 index 0000000000..79aae1dd04 --- /dev/null +++ b/jackson/src/test/java/com/baeldung/jackson/annotation/extra/ExtraAnnotationTest.java @@ -0,0 +1,131 @@ +package com.baeldung.jackson.annotation.extra; + +import static org.hamcrest.CoreMatchers.containsString; +import static org.hamcrest.CoreMatchers.instanceOf; +import static org.hamcrest.CoreMatchers.not; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertThat; + +import org.junit.Test; + +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; + +import com.baeldung.jackson.annotation.extra.AppendBeans.BeanWithAppend; +import com.baeldung.jackson.annotation.extra.AppendBeans.BeanWithoutAppend; +import com.baeldung.jackson.annotation.extra.IdentityReferenceBeans.BeanWithIdentityReference; +import com.baeldung.jackson.annotation.extra.IdentityReferenceBeans.BeanWithoutIdentityReference; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.fasterxml.jackson.databind.ObjectMapper.DefaultTyping; +import com.fasterxml.jackson.databind.ObjectWriter; +import com.fasterxml.jackson.module.jsonSchema.JsonSchema; +import com.fasterxml.jackson.module.jsonSchema.factories.SchemaFactoryWrapper; + +public class ExtraAnnotationTest { + @Test + public void whenNotUsingJsonIdentityReferenceAnnotation_thenCorrect() throws JsonProcessingException { + ObjectMapper mapper = new ObjectMapper(); + BeanWithoutIdentityReference bean = new BeanWithoutIdentityReference(1, "Bean Without Identity Reference Annotation"); + String jsonString = mapper.writeValueAsString(bean); + + assertThat(jsonString, containsString("Bean Without Identity Reference Annotation")); + } + + @Test + public void whenUsingJsonIdentityReferenceAnnotation_thenCorrect() throws JsonProcessingException { + ObjectMapper mapper = new ObjectMapper(); + BeanWithIdentityReference bean = new BeanWithIdentityReference(1, "Bean With Identity Reference Annotation"); + String jsonString = mapper.writeValueAsString(bean); + + assertEquals("1", jsonString); + } + + @Test + public void whenNotUsingJsonAppendAnnotation_thenCorrect() throws JsonProcessingException { + ObjectMapper mapper = new ObjectMapper(); + + BeanWithoutAppend bean = new BeanWithoutAppend(2, "Bean Without Append Annotation"); + ObjectWriter writer = mapper.writerFor(BeanWithoutAppend.class).withAttribute("version", "1.0"); + String jsonString = writer.writeValueAsString(bean); + + assertThat(jsonString, not(containsString("version"))); + assertThat(jsonString, not(containsString("1.0"))); + } + + @Test + public void whenUsingJsonAppendAnnotation_thenCorrect() throws JsonProcessingException { + ObjectMapper mapper = new ObjectMapper(); + + BeanWithAppend bean = new BeanWithAppend(2, "Bean With Append Annotation"); + ObjectWriter writer = mapper.writerFor(BeanWithAppend.class).withAttribute("version", "1.0"); + String jsonString = writer.writeValueAsString(bean); + + assertThat(jsonString, containsString("version")); + assertThat(jsonString, containsString("1.0")); + } + + @Test + public void whenUsingJsonNamingAnnotation_thenCorrect() throws JsonProcessingException { + ObjectMapper mapper = new ObjectMapper(); + NamingBean bean = new NamingBean(3, "Naming Bean"); + String jsonString = mapper.writeValueAsString(bean); + + assertThat(jsonString, containsString("bean_name")); + } + + @Test + public void whenUsingJsonPropertyDescriptionAnnotation_thenCorrect() throws JsonProcessingException { + ObjectMapper mapper = new ObjectMapper(); + SchemaFactoryWrapper wrapper = new SchemaFactoryWrapper(); + mapper.acceptJsonFormatVisitor(PropertyDescriptionBean.class, wrapper); + JsonSchema jsonSchema = wrapper.finalSchema(); + String jsonString = mapper.writeValueAsString(jsonSchema); + System.out.println(jsonString); + assertThat(jsonString, containsString("This is a description of the name property")); + } + + @Test + public void whenUsingJsonPOJOBuilderAnnotation_thenCorrect() throws IOException { + ObjectMapper mapper = new ObjectMapper(); + String jsonString = "{\"id\":5,\"name\":\"POJO Builder Bean\"}"; + POJOBuilderBean bean = mapper.readValue(jsonString, POJOBuilderBean.class); + + assertEquals(5, bean.getIdentity()); + assertEquals("POJO Builder Bean", bean.getBeanName()); + } + + @Test + public void whenUsingJsonTypeIdAnnotation_thenCorrect() throws JsonProcessingException { + ObjectMapper mapper = new ObjectMapper(); + mapper.enableDefaultTyping(DefaultTyping.NON_FINAL); + TypeIdBean bean = new TypeIdBean(6, "Type Id Bean"); + String jsonString = mapper.writeValueAsString(bean); + + assertThat(jsonString, containsString("Type Id Bean")); + } + + @Test + public void whenUsingJsonTypeIdResolverAnnotation_thenCorrect() throws IOException { + TypeIdResolverStructure.FirstBean bean1 = new TypeIdResolverStructure.FirstBean(1, "Bean 1"); + TypeIdResolverStructure.LastBean bean2 = new TypeIdResolverStructure.LastBean(2, "Bean 2"); + + List beans = new ArrayList<>(); + beans.add(bean1); + beans.add(bean2); + + TypeIdResolverStructure.BeanContainer serializedContainer = new TypeIdResolverStructure.BeanContainer(); + serializedContainer.setBeans(beans); + + ObjectMapper mapper = new ObjectMapper(); + String jsonString = mapper.writeValueAsString(serializedContainer); + assertThat(jsonString, containsString("bean1")); + assertThat(jsonString, containsString("bean2")); + + TypeIdResolverStructure.BeanContainer deserializedContainer = mapper.readValue(jsonString, TypeIdResolverStructure.BeanContainer.class); + List beanList = deserializedContainer.getBeans(); + assertThat(beanList.get(0), instanceOf(TypeIdResolverStructure.FirstBean.class)); + assertThat(beanList.get(1), instanceOf(TypeIdResolverStructure.LastBean.class)); + } +} \ No newline at end of file diff --git a/jackson/src/test/java/com/baeldung/jackson/annotation/extra/IdentityReferenceBeans.java b/jackson/src/test/java/com/baeldung/jackson/annotation/extra/IdentityReferenceBeans.java new file mode 100644 index 0000000000..495bb7de43 --- /dev/null +++ b/jackson/src/test/java/com/baeldung/jackson/annotation/extra/IdentityReferenceBeans.java @@ -0,0 +1,63 @@ +package com.baeldung.jackson.annotation.extra; + +import com.fasterxml.jackson.annotation.JsonIdentityInfo; +import com.fasterxml.jackson.annotation.JsonIdentityReference; +import com.fasterxml.jackson.annotation.ObjectIdGenerators; + + +public class IdentityReferenceBeans { + @JsonIdentityInfo(generator = ObjectIdGenerators.PropertyGenerator.class, property = "id") + public static class BeanWithoutIdentityReference { + private int id; + private String name; + + public BeanWithoutIdentityReference(int id, String name) { + this.id = id; + this.name = name; + } + + public int getId() { + return id; + } + + public void setId(int id) { + this.id = id; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + } + + @JsonIdentityInfo(generator = ObjectIdGenerators.PropertyGenerator.class, property = "id") + @JsonIdentityReference(alwaysAsId = true) + public static class BeanWithIdentityReference { + private int id; + private String name; + + public BeanWithIdentityReference(int id, String name) { + this.id = id; + this.name = name; + } + + public int getId() { + return id; + } + + public void setId(int id) { + this.id = id; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + } +} \ No newline at end of file diff --git a/jackson/src/test/java/com/baeldung/jackson/annotation/extra/NamingBean.java b/jackson/src/test/java/com/baeldung/jackson/annotation/extra/NamingBean.java new file mode 100644 index 0000000000..efd26ab9ae --- /dev/null +++ b/jackson/src/test/java/com/baeldung/jackson/annotation/extra/NamingBean.java @@ -0,0 +1,31 @@ +package com.baeldung.jackson.annotation.extra; + +import com.fasterxml.jackson.databind.PropertyNamingStrategy; +import com.fasterxml.jackson.databind.annotation.JsonNaming; + +@JsonNaming(PropertyNamingStrategy.SnakeCaseStrategy.class) +public class NamingBean { + private int id; + private String beanName; + + public NamingBean(int id, String beanName) { + this.id = id; + this.beanName = beanName; + } + + public int getId() { + return id; + } + + public void setId(int id) { + this.id = id; + } + + public String getBeanName() { + return beanName; + } + + public void setBeanName(String beanName) { + this.beanName = beanName; + } +} \ No newline at end of file diff --git a/jackson/src/test/java/com/baeldung/jackson/annotation/extra/POJOBuilderBean.java b/jackson/src/test/java/com/baeldung/jackson/annotation/extra/POJOBuilderBean.java new file mode 100644 index 0000000000..e0a89c6903 --- /dev/null +++ b/jackson/src/test/java/com/baeldung/jackson/annotation/extra/POJOBuilderBean.java @@ -0,0 +1,51 @@ +package com.baeldung.jackson.annotation.extra; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder; + +@JsonDeserialize(builder = POJOBuilderBean.BeanBuilder.class) +public class POJOBuilderBean { + private int identity; + private String beanName; + + @JsonPOJOBuilder(buildMethodName = "createBean", withPrefix = "construct") + public static class BeanBuilder { + private int idValue; + private String nameValue; + + public BeanBuilder constructId(int id) { + idValue = id; + return this; + } + + public BeanBuilder constructName(String name) { + nameValue = name; + return this; + } + + public POJOBuilderBean createBean() { + return new POJOBuilderBean(idValue, nameValue); + } + } + + public POJOBuilderBean(int identity, String beanName) { + this.identity = identity; + this.beanName = beanName; + } + + public int getIdentity() { + return identity; + } + + public void setIdentity(int identity) { + this.identity = identity; + } + + public String getBeanName() { + return beanName; + } + + public void setBeanName(String beanName) { + this.beanName = beanName; + } +} \ No newline at end of file diff --git a/jackson/src/test/java/com/baeldung/jackson/annotation/extra/PropertyDescriptionBean.java b/jackson/src/test/java/com/baeldung/jackson/annotation/extra/PropertyDescriptionBean.java new file mode 100644 index 0000000000..1563cddb83 --- /dev/null +++ b/jackson/src/test/java/com/baeldung/jackson/annotation/extra/PropertyDescriptionBean.java @@ -0,0 +1,25 @@ +package com.baeldung.jackson.annotation.extra; + +import com.fasterxml.jackson.annotation.JsonPropertyDescription; + +public class PropertyDescriptionBean { + private int id; + @JsonPropertyDescription("This is a description of the name property") + private String name; + + public int getId() { + return id; + } + + public void setId(int id) { + this.id = id; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } +} \ No newline at end of file diff --git a/jackson/src/test/java/com/baeldung/jackson/annotation/extra/TypeIdBean.java b/jackson/src/test/java/com/baeldung/jackson/annotation/extra/TypeIdBean.java new file mode 100644 index 0000000000..32a6d5a1d5 --- /dev/null +++ b/jackson/src/test/java/com/baeldung/jackson/annotation/extra/TypeIdBean.java @@ -0,0 +1,30 @@ +package com.baeldung.jackson.annotation.extra; + +import com.fasterxml.jackson.annotation.JsonTypeId; + +public class TypeIdBean { + private int id; + @JsonTypeId + private String name; + + public TypeIdBean(int id, String name) { + this.id = id; + this.name = name; + } + + public int getId() { + return id; + } + + public void setId(int id) { + this.id = id; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } +} \ No newline at end of file diff --git a/jackson/src/test/java/com/baeldung/jackson/annotation/extra/TypeIdResolverStructure.java b/jackson/src/test/java/com/baeldung/jackson/annotation/extra/TypeIdResolverStructure.java new file mode 100644 index 0000000000..9056023c69 --- /dev/null +++ b/jackson/src/test/java/com/baeldung/jackson/annotation/extra/TypeIdResolverStructure.java @@ -0,0 +1,130 @@ +package com.baeldung.jackson.annotation.extra; + +import java.util.List; + +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeInfo.Id; +import com.fasterxml.jackson.databind.DatabindContext; +import com.fasterxml.jackson.databind.JavaType; +import com.fasterxml.jackson.databind.annotation.JsonTypeIdResolver; +import com.fasterxml.jackson.databind.jsontype.impl.TypeIdResolverBase; + +public class TypeIdResolverStructure { + public static class BeanContainer { + private List beans; + + public List getBeans() { + return beans; + } + + public void setBeans(List beans) { + this.beans = beans; + } + } + + @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "@type") + @JsonTypeIdResolver(BeanIdResolver.class) + public static class AbstractBean { + private int id; + + protected AbstractBean() { + } + + protected AbstractBean(int id) { + this.id = id; + } + + public int getId() { + return id; + } + + public void setId(int id) { + this.id = id; + } + } + + public static class FirstBean extends AbstractBean { + String firstName; + + public FirstBean() { + } + + public FirstBean(int id, String name) { + super(id); + setFirstName(name); + } + + public String getFirstName() { + return firstName; + } + + public void setFirstName(String name) { + firstName = name; + } + } + + public static class LastBean extends AbstractBean { + String lastName; + + public LastBean() { + } + + public LastBean(int id, String name) { + super(id); + setLastName(name); + } + + public String getLastName() { + return lastName; + } + + public void setLastName(String name) { + lastName = name; + } + } + + public static class BeanIdResolver extends TypeIdResolverBase { + private JavaType superType; + + @Override + public void init(JavaType baseType) { + superType = baseType; + } + + @Override + public Id getMechanism() { + return Id.NAME; + } + + @Override + public String idFromValue(Object obj) { + return idFromValueAndType(obj, obj.getClass()); + } + + @Override + public String idFromValueAndType(Object obj, Class subType) { + String typeId = null; + switch (subType.getSimpleName()) { + case "FirstBean": + typeId = "bean1"; + break; + case "LastBean": + typeId = "bean2"; + } + return typeId; + } + + @Override + public JavaType typeFromId(DatabindContext context, String id) { + Class subType = null; + switch (id) { + case "bean1": + subType = FirstBean.class; + break; + case "bean2": + subType = LastBean.class; + } + return context.constructSpecializedType(superType, subType); + } + } +} \ No newline at end of file diff --git a/jackson/src/test/java/org/baeldung/jackson/bidirection/CustomListDeserializer.java b/jackson/src/test/java/com/baeldung/jackson/bidirection/CustomListDeserializer.java similarity index 93% rename from jackson/src/test/java/org/baeldung/jackson/bidirection/CustomListDeserializer.java rename to jackson/src/test/java/com/baeldung/jackson/bidirection/CustomListDeserializer.java index cc4e1d5589..5f1f1edf2b 100644 --- a/jackson/src/test/java/org/baeldung/jackson/bidirection/CustomListDeserializer.java +++ b/jackson/src/test/java/com/baeldung/jackson/bidirection/CustomListDeserializer.java @@ -1,4 +1,4 @@ -package org.baeldung.jackson.bidirection; +package com.baeldung.jackson.bidirection; import java.io.IOException; import java.util.ArrayList; diff --git a/jackson/src/test/java/org/baeldung/jackson/bidirection/CustomListSerializer.java b/jackson/src/test/java/com/baeldung/jackson/bidirection/CustomListSerializer.java similarity index 94% rename from jackson/src/test/java/org/baeldung/jackson/bidirection/CustomListSerializer.java rename to jackson/src/test/java/com/baeldung/jackson/bidirection/CustomListSerializer.java index 545f7e18c1..1d8ca011ea 100644 --- a/jackson/src/test/java/org/baeldung/jackson/bidirection/CustomListSerializer.java +++ b/jackson/src/test/java/com/baeldung/jackson/bidirection/CustomListSerializer.java @@ -1,4 +1,4 @@ -package org.baeldung.jackson.bidirection; +package com.baeldung.jackson.bidirection; import java.io.IOException; import java.util.ArrayList; diff --git a/jackson/src/test/java/org/baeldung/jackson/bidirection/Item.java b/jackson/src/test/java/com/baeldung/jackson/bidirection/Item.java similarity index 87% rename from jackson/src/test/java/org/baeldung/jackson/bidirection/Item.java rename to jackson/src/test/java/com/baeldung/jackson/bidirection/Item.java index 223721dc62..55b8632e42 100644 --- a/jackson/src/test/java/org/baeldung/jackson/bidirection/Item.java +++ b/jackson/src/test/java/com/baeldung/jackson/bidirection/Item.java @@ -1,4 +1,4 @@ -package org.baeldung.jackson.bidirection; +package com.baeldung.jackson.bidirection; public class Item { public int id; diff --git a/jackson/src/test/java/org/baeldung/jackson/bidirection/ItemWithIdentity.java b/jackson/src/test/java/com/baeldung/jackson/bidirection/ItemWithIdentity.java similarity index 93% rename from jackson/src/test/java/org/baeldung/jackson/bidirection/ItemWithIdentity.java rename to jackson/src/test/java/com/baeldung/jackson/bidirection/ItemWithIdentity.java index 2091ec6e40..25de4a8f7a 100644 --- a/jackson/src/test/java/org/baeldung/jackson/bidirection/ItemWithIdentity.java +++ b/jackson/src/test/java/com/baeldung/jackson/bidirection/ItemWithIdentity.java @@ -1,4 +1,4 @@ -package org.baeldung.jackson.bidirection; +package com.baeldung.jackson.bidirection; import com.fasterxml.jackson.annotation.JsonIdentityInfo; import com.fasterxml.jackson.annotation.ObjectIdGenerators; diff --git a/jackson/src/test/java/org/baeldung/jackson/bidirection/ItemWithIgnore.java b/jackson/src/test/java/com/baeldung/jackson/bidirection/ItemWithIgnore.java similarity index 89% rename from jackson/src/test/java/org/baeldung/jackson/bidirection/ItemWithIgnore.java rename to jackson/src/test/java/com/baeldung/jackson/bidirection/ItemWithIgnore.java index 8b6d623f18..910ccec174 100644 --- a/jackson/src/test/java/org/baeldung/jackson/bidirection/ItemWithIgnore.java +++ b/jackson/src/test/java/com/baeldung/jackson/bidirection/ItemWithIgnore.java @@ -1,4 +1,4 @@ -package org.baeldung.jackson.bidirection; +package com.baeldung.jackson.bidirection; public class ItemWithIgnore { public int id; diff --git a/jackson/src/test/java/org/baeldung/jackson/bidirection/ItemWithRef.java b/jackson/src/test/java/com/baeldung/jackson/bidirection/ItemWithRef.java similarity index 91% rename from jackson/src/test/java/org/baeldung/jackson/bidirection/ItemWithRef.java rename to jackson/src/test/java/com/baeldung/jackson/bidirection/ItemWithRef.java index 295ec9580d..0ca8d721e8 100644 --- a/jackson/src/test/java/org/baeldung/jackson/bidirection/ItemWithRef.java +++ b/jackson/src/test/java/com/baeldung/jackson/bidirection/ItemWithRef.java @@ -1,4 +1,4 @@ -package org.baeldung.jackson.bidirection; +package com.baeldung.jackson.bidirection; import com.fasterxml.jackson.annotation.JsonManagedReference; diff --git a/jackson/src/test/java/org/baeldung/jackson/bidirection/ItemWithSerializer.java b/jackson/src/test/java/com/baeldung/jackson/bidirection/ItemWithSerializer.java similarity index 89% rename from jackson/src/test/java/org/baeldung/jackson/bidirection/ItemWithSerializer.java rename to jackson/src/test/java/com/baeldung/jackson/bidirection/ItemWithSerializer.java index d9d9612677..a57ca89d2c 100644 --- a/jackson/src/test/java/org/baeldung/jackson/bidirection/ItemWithSerializer.java +++ b/jackson/src/test/java/com/baeldung/jackson/bidirection/ItemWithSerializer.java @@ -1,4 +1,4 @@ -package org.baeldung.jackson.bidirection; +package com.baeldung.jackson.bidirection; public class ItemWithSerializer { public int id; diff --git a/jackson/src/test/java/org/baeldung/jackson/bidirection/ItemWithView.java b/jackson/src/test/java/com/baeldung/jackson/bidirection/ItemWithView.java similarity index 85% rename from jackson/src/test/java/org/baeldung/jackson/bidirection/ItemWithView.java rename to jackson/src/test/java/com/baeldung/jackson/bidirection/ItemWithView.java index 65e0d08b4e..ffa19fbad2 100644 --- a/jackson/src/test/java/org/baeldung/jackson/bidirection/ItemWithView.java +++ b/jackson/src/test/java/com/baeldung/jackson/bidirection/ItemWithView.java @@ -1,6 +1,6 @@ -package org.baeldung.jackson.bidirection; +package com.baeldung.jackson.bidirection; -import org.baeldung.jackson.jsonview.Views; +import com.baeldung.jackson.jsonview.Views; import com.fasterxml.jackson.annotation.JsonView; diff --git a/jackson/src/test/java/org/baeldung/jackson/bidirection/User.java b/jackson/src/test/java/com/baeldung/jackson/bidirection/User.java similarity index 90% rename from jackson/src/test/java/org/baeldung/jackson/bidirection/User.java rename to jackson/src/test/java/com/baeldung/jackson/bidirection/User.java index a92dff4052..71c9ec6a68 100644 --- a/jackson/src/test/java/org/baeldung/jackson/bidirection/User.java +++ b/jackson/src/test/java/com/baeldung/jackson/bidirection/User.java @@ -1,4 +1,4 @@ -package org.baeldung.jackson.bidirection; +package com.baeldung.jackson.bidirection; import java.util.ArrayList; import java.util.List; diff --git a/jackson/src/test/java/org/baeldung/jackson/bidirection/UserWithIdentity.java b/jackson/src/test/java/com/baeldung/jackson/bidirection/UserWithIdentity.java similarity index 94% rename from jackson/src/test/java/org/baeldung/jackson/bidirection/UserWithIdentity.java rename to jackson/src/test/java/com/baeldung/jackson/bidirection/UserWithIdentity.java index 52fa22c32d..db83a09389 100644 --- a/jackson/src/test/java/org/baeldung/jackson/bidirection/UserWithIdentity.java +++ b/jackson/src/test/java/com/baeldung/jackson/bidirection/UserWithIdentity.java @@ -1,4 +1,4 @@ -package org.baeldung.jackson.bidirection; +package com.baeldung.jackson.bidirection; import java.util.ArrayList; import java.util.List; diff --git a/jackson/src/test/java/org/baeldung/jackson/bidirection/UserWithIgnore.java b/jackson/src/test/java/com/baeldung/jackson/bidirection/UserWithIgnore.java similarity index 92% rename from jackson/src/test/java/org/baeldung/jackson/bidirection/UserWithIgnore.java rename to jackson/src/test/java/com/baeldung/jackson/bidirection/UserWithIgnore.java index 7714487f76..857a373cc5 100644 --- a/jackson/src/test/java/org/baeldung/jackson/bidirection/UserWithIgnore.java +++ b/jackson/src/test/java/com/baeldung/jackson/bidirection/UserWithIgnore.java @@ -1,4 +1,4 @@ -package org.baeldung.jackson.bidirection; +package com.baeldung.jackson.bidirection; import java.util.ArrayList; import java.util.List; diff --git a/jackson/src/test/java/org/baeldung/jackson/bidirection/UserWithRef.java b/jackson/src/test/java/com/baeldung/jackson/bidirection/UserWithRef.java similarity index 92% rename from jackson/src/test/java/org/baeldung/jackson/bidirection/UserWithRef.java rename to jackson/src/test/java/com/baeldung/jackson/bidirection/UserWithRef.java index 406b87f78c..3de03fc651 100644 --- a/jackson/src/test/java/org/baeldung/jackson/bidirection/UserWithRef.java +++ b/jackson/src/test/java/com/baeldung/jackson/bidirection/UserWithRef.java @@ -1,4 +1,4 @@ -package org.baeldung.jackson.bidirection; +package com.baeldung.jackson.bidirection; import java.util.ArrayList; import java.util.List; diff --git a/jackson/src/test/java/org/baeldung/jackson/bidirection/UserWithSerializer.java b/jackson/src/test/java/com/baeldung/jackson/bidirection/UserWithSerializer.java similarity index 94% rename from jackson/src/test/java/org/baeldung/jackson/bidirection/UserWithSerializer.java rename to jackson/src/test/java/com/baeldung/jackson/bidirection/UserWithSerializer.java index 25c202a9d3..9fda969e41 100644 --- a/jackson/src/test/java/org/baeldung/jackson/bidirection/UserWithSerializer.java +++ b/jackson/src/test/java/com/baeldung/jackson/bidirection/UserWithSerializer.java @@ -1,4 +1,4 @@ -package org.baeldung.jackson.bidirection; +package com.baeldung.jackson.bidirection; import java.util.ArrayList; import java.util.List; diff --git a/jackson/src/test/java/org/baeldung/jackson/bidirection/UserWithView.java b/jackson/src/test/java/com/baeldung/jackson/bidirection/UserWithView.java similarity index 87% rename from jackson/src/test/java/org/baeldung/jackson/bidirection/UserWithView.java rename to jackson/src/test/java/com/baeldung/jackson/bidirection/UserWithView.java index e7043292a0..d92d67b3a1 100644 --- a/jackson/src/test/java/org/baeldung/jackson/bidirection/UserWithView.java +++ b/jackson/src/test/java/com/baeldung/jackson/bidirection/UserWithView.java @@ -1,9 +1,9 @@ -package org.baeldung.jackson.bidirection; +package com.baeldung.jackson.bidirection; import java.util.ArrayList; import java.util.List; -import org.baeldung.jackson.jsonview.Views; +import com.baeldung.jackson.jsonview.Views; import com.fasterxml.jackson.annotation.JsonView; diff --git a/jackson/src/test/java/org/baeldung/jackson/date/CustomDateDeserializer.java b/jackson/src/test/java/com/baeldung/jackson/date/CustomDateDeserializer.java similarity index 96% rename from jackson/src/test/java/org/baeldung/jackson/date/CustomDateDeserializer.java rename to jackson/src/test/java/com/baeldung/jackson/date/CustomDateDeserializer.java index eb1866026f..a63190c8f5 100644 --- a/jackson/src/test/java/org/baeldung/jackson/date/CustomDateDeserializer.java +++ b/jackson/src/test/java/com/baeldung/jackson/date/CustomDateDeserializer.java @@ -1,4 +1,4 @@ -package org.baeldung.jackson.date; +package com.baeldung.jackson.date; import java.io.IOException; import java.text.ParseException; diff --git a/jackson/src/test/java/org/baeldung/jackson/date/CustomDateSerializer.java b/jackson/src/test/java/com/baeldung/jackson/date/CustomDateSerializer.java similarity index 95% rename from jackson/src/test/java/org/baeldung/jackson/date/CustomDateSerializer.java rename to jackson/src/test/java/com/baeldung/jackson/date/CustomDateSerializer.java index 40aad21482..8d435b7b69 100644 --- a/jackson/src/test/java/org/baeldung/jackson/date/CustomDateSerializer.java +++ b/jackson/src/test/java/com/baeldung/jackson/date/CustomDateSerializer.java @@ -1,4 +1,4 @@ -package org.baeldung.jackson.date; +package com.baeldung.jackson.date; import java.io.IOException; import java.text.SimpleDateFormat; diff --git a/jackson/src/test/java/org/baeldung/jackson/date/CustomDateTimeSerializer.java b/jackson/src/test/java/com/baeldung/jackson/date/CustomDateTimeSerializer.java similarity index 95% rename from jackson/src/test/java/org/baeldung/jackson/date/CustomDateTimeSerializer.java rename to jackson/src/test/java/com/baeldung/jackson/date/CustomDateTimeSerializer.java index 9f2a290bc4..88c069419b 100644 --- a/jackson/src/test/java/org/baeldung/jackson/date/CustomDateTimeSerializer.java +++ b/jackson/src/test/java/com/baeldung/jackson/date/CustomDateTimeSerializer.java @@ -1,4 +1,4 @@ -package org.baeldung.jackson.date; +package com.baeldung.jackson.date; import java.io.IOException; diff --git a/jackson/src/test/java/org/baeldung/jackson/date/CustomLocalDateTimeSerializer.java b/jackson/src/test/java/com/baeldung/jackson/date/CustomLocalDateTimeSerializer.java similarity index 95% rename from jackson/src/test/java/org/baeldung/jackson/date/CustomLocalDateTimeSerializer.java rename to jackson/src/test/java/com/baeldung/jackson/date/CustomLocalDateTimeSerializer.java index b1e6a8ba86..3f8f5e098e 100644 --- a/jackson/src/test/java/org/baeldung/jackson/date/CustomLocalDateTimeSerializer.java +++ b/jackson/src/test/java/com/baeldung/jackson/date/CustomLocalDateTimeSerializer.java @@ -1,4 +1,4 @@ -package org.baeldung.jackson.date; +package com.baeldung.jackson.date; import java.io.IOException; import java.time.LocalDateTime; diff --git a/jackson/src/test/java/org/baeldung/jackson/date/Event.java b/jackson/src/test/java/com/baeldung/jackson/date/Event.java similarity index 91% rename from jackson/src/test/java/org/baeldung/jackson/date/Event.java rename to jackson/src/test/java/com/baeldung/jackson/date/Event.java index 783eee6af8..e20882abc1 100644 --- a/jackson/src/test/java/org/baeldung/jackson/date/Event.java +++ b/jackson/src/test/java/com/baeldung/jackson/date/Event.java @@ -1,4 +1,4 @@ -package org.baeldung.jackson.date; +package com.baeldung.jackson.date; import java.util.Date; diff --git a/jackson/src/test/java/org/baeldung/jackson/date/EventWithFormat.java b/jackson/src/test/java/com/baeldung/jackson/date/EventWithFormat.java similarity index 94% rename from jackson/src/test/java/org/baeldung/jackson/date/EventWithFormat.java rename to jackson/src/test/java/com/baeldung/jackson/date/EventWithFormat.java index 4b2053eb4b..607e694cef 100644 --- a/jackson/src/test/java/org/baeldung/jackson/date/EventWithFormat.java +++ b/jackson/src/test/java/com/baeldung/jackson/date/EventWithFormat.java @@ -1,4 +1,4 @@ -package org.baeldung.jackson.date; +package com.baeldung.jackson.date; import java.util.Date; diff --git a/jackson/src/test/java/org/baeldung/jackson/date/EventWithJodaTime.java b/jackson/src/test/java/com/baeldung/jackson/date/EventWithJodaTime.java similarity index 94% rename from jackson/src/test/java/org/baeldung/jackson/date/EventWithJodaTime.java rename to jackson/src/test/java/com/baeldung/jackson/date/EventWithJodaTime.java index 0c72030650..6abee344ef 100644 --- a/jackson/src/test/java/org/baeldung/jackson/date/EventWithJodaTime.java +++ b/jackson/src/test/java/com/baeldung/jackson/date/EventWithJodaTime.java @@ -1,4 +1,4 @@ -package org.baeldung.jackson.date; +package com.baeldung.jackson.date; import org.joda.time.DateTime; diff --git a/jackson/src/test/java/org/baeldung/jackson/date/EventWithLocalDateTime.java b/jackson/src/test/java/com/baeldung/jackson/date/EventWithLocalDateTime.java similarity index 94% rename from jackson/src/test/java/org/baeldung/jackson/date/EventWithLocalDateTime.java rename to jackson/src/test/java/com/baeldung/jackson/date/EventWithLocalDateTime.java index 6c48cf3f0e..16104222d4 100644 --- a/jackson/src/test/java/org/baeldung/jackson/date/EventWithLocalDateTime.java +++ b/jackson/src/test/java/com/baeldung/jackson/date/EventWithLocalDateTime.java @@ -1,4 +1,4 @@ -package org.baeldung.jackson.date; +package com.baeldung.jackson.date; import java.time.LocalDateTime; diff --git a/jackson/src/test/java/org/baeldung/jackson/date/EventWithSerializer.java b/jackson/src/test/java/com/baeldung/jackson/date/EventWithSerializer.java similarity index 95% rename from jackson/src/test/java/org/baeldung/jackson/date/EventWithSerializer.java rename to jackson/src/test/java/com/baeldung/jackson/date/EventWithSerializer.java index 9cdd6a0fab..c359b5c846 100644 --- a/jackson/src/test/java/org/baeldung/jackson/date/EventWithSerializer.java +++ b/jackson/src/test/java/com/baeldung/jackson/date/EventWithSerializer.java @@ -1,4 +1,4 @@ -package org.baeldung.jackson.date; +package com.baeldung.jackson.date; import java.util.Date; diff --git a/jackson/src/test/java/org/baeldung/jackson/deserialization/ItemDeserializer.java b/jackson/src/test/java/com/baeldung/jackson/deserialization/ItemDeserializer.java similarity index 88% rename from jackson/src/test/java/org/baeldung/jackson/deserialization/ItemDeserializer.java rename to jackson/src/test/java/com/baeldung/jackson/deserialization/ItemDeserializer.java index baf5b945e7..3be6685103 100644 --- a/jackson/src/test/java/org/baeldung/jackson/deserialization/ItemDeserializer.java +++ b/jackson/src/test/java/com/baeldung/jackson/deserialization/ItemDeserializer.java @@ -1,9 +1,9 @@ -package org.baeldung.jackson.deserialization; +package com.baeldung.jackson.deserialization; import java.io.IOException; -import org.baeldung.jackson.dtos.Item; -import org.baeldung.jackson.dtos.User; +import com.baeldung.jackson.dtos.User; +import com.baeldung.jackson.dtos.Item; import com.fasterxml.jackson.core.JsonParser; import com.fasterxml.jackson.core.JsonProcessingException; diff --git a/jackson/src/test/java/org/baeldung/jackson/deserialization/ItemDeserializerOnClass.java b/jackson/src/test/java/com/baeldung/jackson/deserialization/ItemDeserializerOnClass.java similarity index 88% rename from jackson/src/test/java/org/baeldung/jackson/deserialization/ItemDeserializerOnClass.java rename to jackson/src/test/java/com/baeldung/jackson/deserialization/ItemDeserializerOnClass.java index 346f75db07..169a5c1c50 100644 --- a/jackson/src/test/java/org/baeldung/jackson/deserialization/ItemDeserializerOnClass.java +++ b/jackson/src/test/java/com/baeldung/jackson/deserialization/ItemDeserializerOnClass.java @@ -1,9 +1,9 @@ -package org.baeldung.jackson.deserialization; +package com.baeldung.jackson.deserialization; import java.io.IOException; -import org.baeldung.jackson.dtos.ItemWithSerializer; -import org.baeldung.jackson.dtos.User; +import com.baeldung.jackson.dtos.ItemWithSerializer; +import com.baeldung.jackson.dtos.User; import com.fasterxml.jackson.core.JsonParser; import com.fasterxml.jackson.core.JsonProcessingException; diff --git a/jackson/src/test/java/org/baeldung/jackson/dtos/Item.java b/jackson/src/test/java/com/baeldung/jackson/dtos/Item.java similarity index 93% rename from jackson/src/test/java/org/baeldung/jackson/dtos/Item.java rename to jackson/src/test/java/com/baeldung/jackson/dtos/Item.java index 1dd840372a..6fce2bc88e 100644 --- a/jackson/src/test/java/org/baeldung/jackson/dtos/Item.java +++ b/jackson/src/test/java/com/baeldung/jackson/dtos/Item.java @@ -1,4 +1,4 @@ -package org.baeldung.jackson.dtos; +package com.baeldung.jackson.dtos; public class Item { public int id; diff --git a/jackson/src/test/java/org/baeldung/jackson/dtos/ItemWithSerializer.java b/jackson/src/test/java/com/baeldung/jackson/dtos/ItemWithSerializer.java similarity index 81% rename from jackson/src/test/java/org/baeldung/jackson/dtos/ItemWithSerializer.java rename to jackson/src/test/java/com/baeldung/jackson/dtos/ItemWithSerializer.java index 6dadfa4908..aea9aa770d 100644 --- a/jackson/src/test/java/org/baeldung/jackson/dtos/ItemWithSerializer.java +++ b/jackson/src/test/java/com/baeldung/jackson/dtos/ItemWithSerializer.java @@ -1,7 +1,7 @@ -package org.baeldung.jackson.dtos; +package com.baeldung.jackson.dtos; -import org.baeldung.jackson.deserialization.ItemDeserializerOnClass; -import org.baeldung.jackson.serialization.ItemSerializerOnClass; +import com.baeldung.jackson.deserialization.ItemDeserializerOnClass; +import com.baeldung.jackson.serialization.ItemSerializerOnClass; import com.fasterxml.jackson.databind.annotation.JsonDeserialize; import com.fasterxml.jackson.databind.annotation.JsonSerialize; diff --git a/jackson/src/test/java/org/baeldung/jackson/dtos/MyDto.java b/jackson/src/test/java/com/baeldung/jackson/dtos/MyDto.java similarity index 96% rename from jackson/src/test/java/org/baeldung/jackson/dtos/MyDto.java rename to jackson/src/test/java/com/baeldung/jackson/dtos/MyDto.java index 668eea3fcc..49cf07baea 100644 --- a/jackson/src/test/java/org/baeldung/jackson/dtos/MyDto.java +++ b/jackson/src/test/java/com/baeldung/jackson/dtos/MyDto.java @@ -1,4 +1,4 @@ -package org.baeldung.jackson.dtos; +package com.baeldung.jackson.dtos; public class MyDto { diff --git a/jackson/src/test/java/org/baeldung/jackson/dtos/MyDtoFieldNameChanged.java b/jackson/src/test/java/com/baeldung/jackson/dtos/MyDtoFieldNameChanged.java similarity index 96% rename from jackson/src/test/java/org/baeldung/jackson/dtos/MyDtoFieldNameChanged.java rename to jackson/src/test/java/com/baeldung/jackson/dtos/MyDtoFieldNameChanged.java index 9c4086a965..ce7086f1fe 100644 --- a/jackson/src/test/java/org/baeldung/jackson/dtos/MyDtoFieldNameChanged.java +++ b/jackson/src/test/java/com/baeldung/jackson/dtos/MyDtoFieldNameChanged.java @@ -1,4 +1,4 @@ -package org.baeldung.jackson.dtos; +package com.baeldung.jackson.dtos; import com.fasterxml.jackson.annotation.JsonProperty; diff --git a/jackson/src/test/java/org/baeldung/jackson/dtos/MyDtoIncludeNonDefault.java b/jackson/src/test/java/com/baeldung/jackson/dtos/MyDtoIncludeNonDefault.java similarity index 96% rename from jackson/src/test/java/org/baeldung/jackson/dtos/MyDtoIncludeNonDefault.java rename to jackson/src/test/java/com/baeldung/jackson/dtos/MyDtoIncludeNonDefault.java index b99d793363..ca03a8be62 100644 --- a/jackson/src/test/java/org/baeldung/jackson/dtos/MyDtoIncludeNonDefault.java +++ b/jackson/src/test/java/com/baeldung/jackson/dtos/MyDtoIncludeNonDefault.java @@ -1,4 +1,4 @@ -package org.baeldung.jackson.dtos; +package com.baeldung.jackson.dtos; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonInclude.Include; diff --git a/jackson/src/test/java/org/baeldung/jackson/dtos/MyDtoNoAccessors.java b/jackson/src/test/java/com/baeldung/jackson/dtos/MyDtoNoAccessors.java similarity index 92% rename from jackson/src/test/java/org/baeldung/jackson/dtos/MyDtoNoAccessors.java rename to jackson/src/test/java/com/baeldung/jackson/dtos/MyDtoNoAccessors.java index 6e88f5a2db..6e9abc90ae 100644 --- a/jackson/src/test/java/org/baeldung/jackson/dtos/MyDtoNoAccessors.java +++ b/jackson/src/test/java/com/baeldung/jackson/dtos/MyDtoNoAccessors.java @@ -1,4 +1,4 @@ -package org.baeldung.jackson.dtos; +package com.baeldung.jackson.dtos; public class MyDtoNoAccessors { diff --git a/jackson/src/test/java/org/baeldung/jackson/dtos/MyDtoNoAccessorsAndFieldVisibility.java b/jackson/src/test/java/com/baeldung/jackson/dtos/MyDtoNoAccessorsAndFieldVisibility.java similarity index 94% rename from jackson/src/test/java/org/baeldung/jackson/dtos/MyDtoNoAccessorsAndFieldVisibility.java rename to jackson/src/test/java/com/baeldung/jackson/dtos/MyDtoNoAccessorsAndFieldVisibility.java index 1723a71230..149969f769 100644 --- a/jackson/src/test/java/org/baeldung/jackson/dtos/MyDtoNoAccessorsAndFieldVisibility.java +++ b/jackson/src/test/java/com/baeldung/jackson/dtos/MyDtoNoAccessorsAndFieldVisibility.java @@ -1,4 +1,4 @@ -package org.baeldung.jackson.dtos; +package com.baeldung.jackson.dtos; import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility; diff --git a/jackson/src/test/java/org/baeldung/jackson/dtos/MyDtoWithFilter.java b/jackson/src/test/java/com/baeldung/jackson/dtos/MyDtoWithFilter.java similarity index 96% rename from jackson/src/test/java/org/baeldung/jackson/dtos/MyDtoWithFilter.java rename to jackson/src/test/java/com/baeldung/jackson/dtos/MyDtoWithFilter.java index 03d7edf985..91f5e148b2 100644 --- a/jackson/src/test/java/org/baeldung/jackson/dtos/MyDtoWithFilter.java +++ b/jackson/src/test/java/com/baeldung/jackson/dtos/MyDtoWithFilter.java @@ -1,4 +1,4 @@ -package org.baeldung.jackson.dtos; +package com.baeldung.jackson.dtos; import com.fasterxml.jackson.annotation.JsonFilter; diff --git a/jackson/src/test/java/org/baeldung/jackson/dtos/MyMixInForString.java b/jackson/src/test/java/com/baeldung/jackson/dtos/MyMixInForString.java similarity index 76% rename from jackson/src/test/java/org/baeldung/jackson/dtos/MyMixInForString.java rename to jackson/src/test/java/com/baeldung/jackson/dtos/MyMixInForString.java index 3d5228139e..b386541df6 100644 --- a/jackson/src/test/java/org/baeldung/jackson/dtos/MyMixInForString.java +++ b/jackson/src/test/java/com/baeldung/jackson/dtos/MyMixInForString.java @@ -1,4 +1,4 @@ -package org.baeldung.jackson.dtos; +package com.baeldung.jackson.dtos; import com.fasterxml.jackson.annotation.JsonIgnoreType; diff --git a/jackson/src/test/java/org/baeldung/jackson/dtos/User.java b/jackson/src/test/java/com/baeldung/jackson/dtos/User.java similarity index 90% rename from jackson/src/test/java/org/baeldung/jackson/dtos/User.java rename to jackson/src/test/java/com/baeldung/jackson/dtos/User.java index cef29f11b4..2418e8070d 100644 --- a/jackson/src/test/java/org/baeldung/jackson/dtos/User.java +++ b/jackson/src/test/java/com/baeldung/jackson/dtos/User.java @@ -1,4 +1,4 @@ -package org.baeldung.jackson.dtos; +package com.baeldung.jackson.dtos; public class User { public int id; diff --git a/jackson/src/test/java/org/baeldung/jackson/dtos/ignore/MyDtoIgnoreField.java b/jackson/src/test/java/com/baeldung/jackson/dtos/ignore/MyDtoIgnoreField.java similarity index 94% rename from jackson/src/test/java/org/baeldung/jackson/dtos/ignore/MyDtoIgnoreField.java rename to jackson/src/test/java/com/baeldung/jackson/dtos/ignore/MyDtoIgnoreField.java index 4e3aecd0d2..f573501e85 100644 --- a/jackson/src/test/java/org/baeldung/jackson/dtos/ignore/MyDtoIgnoreField.java +++ b/jackson/src/test/java/com/baeldung/jackson/dtos/ignore/MyDtoIgnoreField.java @@ -1,4 +1,4 @@ -package org.baeldung.jackson.dtos.ignore; +package com.baeldung.jackson.dtos.ignore; import com.fasterxml.jackson.annotation.JsonIgnore; diff --git a/jackson/src/test/java/org/baeldung/jackson/dtos/ignore/MyDtoIgnoreFieldByName.java b/jackson/src/test/java/com/baeldung/jackson/dtos/ignore/MyDtoIgnoreFieldByName.java similarity index 95% rename from jackson/src/test/java/org/baeldung/jackson/dtos/ignore/MyDtoIgnoreFieldByName.java rename to jackson/src/test/java/com/baeldung/jackson/dtos/ignore/MyDtoIgnoreFieldByName.java index d752e0576d..e7b8ea2a8e 100644 --- a/jackson/src/test/java/org/baeldung/jackson/dtos/ignore/MyDtoIgnoreFieldByName.java +++ b/jackson/src/test/java/com/baeldung/jackson/dtos/ignore/MyDtoIgnoreFieldByName.java @@ -1,4 +1,4 @@ -package org.baeldung.jackson.dtos.ignore; +package com.baeldung.jackson.dtos.ignore; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; diff --git a/jackson/src/test/java/org/baeldung/jackson/dtos/ignore/MyDtoIgnoreNull.java b/jackson/src/test/java/com/baeldung/jackson/dtos/ignore/MyDtoIgnoreNull.java similarity index 96% rename from jackson/src/test/java/org/baeldung/jackson/dtos/ignore/MyDtoIgnoreNull.java rename to jackson/src/test/java/com/baeldung/jackson/dtos/ignore/MyDtoIgnoreNull.java index 0e28e43024..bc443500a1 100644 --- a/jackson/src/test/java/org/baeldung/jackson/dtos/ignore/MyDtoIgnoreNull.java +++ b/jackson/src/test/java/com/baeldung/jackson/dtos/ignore/MyDtoIgnoreNull.java @@ -1,4 +1,4 @@ -package org.baeldung.jackson.dtos.ignore; +package com.baeldung.jackson.dtos.ignore; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonInclude.Include; diff --git a/jackson/src/test/java/org/baeldung/jackson/dtos/ignore/MyDtoIgnoreType.java b/jackson/src/test/java/com/baeldung/jackson/dtos/ignore/MyDtoIgnoreType.java similarity index 96% rename from jackson/src/test/java/org/baeldung/jackson/dtos/ignore/MyDtoIgnoreType.java rename to jackson/src/test/java/com/baeldung/jackson/dtos/ignore/MyDtoIgnoreType.java index 58876aec79..3c813145f6 100644 --- a/jackson/src/test/java/org/baeldung/jackson/dtos/ignore/MyDtoIgnoreType.java +++ b/jackson/src/test/java/com/baeldung/jackson/dtos/ignore/MyDtoIgnoreType.java @@ -1,4 +1,4 @@ -package org.baeldung.jackson.dtos.ignore; +package com.baeldung.jackson.dtos.ignore; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; diff --git a/jackson/src/test/java/org/baeldung/jackson/dtos/ignore/MyDtoIgnoreUnknown.java b/jackson/src/test/java/com/baeldung/jackson/dtos/ignore/MyDtoIgnoreUnknown.java similarity index 96% rename from jackson/src/test/java/org/baeldung/jackson/dtos/ignore/MyDtoIgnoreUnknown.java rename to jackson/src/test/java/com/baeldung/jackson/dtos/ignore/MyDtoIgnoreUnknown.java index ca702343eb..c1174a12f5 100644 --- a/jackson/src/test/java/org/baeldung/jackson/dtos/ignore/MyDtoIgnoreUnknown.java +++ b/jackson/src/test/java/com/baeldung/jackson/dtos/ignore/MyDtoIgnoreUnknown.java @@ -1,4 +1,4 @@ -package org.baeldung.jackson.dtos.ignore; +package com.baeldung.jackson.dtos.ignore; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; diff --git a/jackson/src/test/java/org/baeldung/jackson/dtos/withEnum/MyDtoWithEnum.java b/jackson/src/test/java/com/baeldung/jackson/dtos/withEnum/MyDtoWithEnum.java similarity index 96% rename from jackson/src/test/java/org/baeldung/jackson/dtos/withEnum/MyDtoWithEnum.java rename to jackson/src/test/java/com/baeldung/jackson/dtos/withEnum/MyDtoWithEnum.java index aa05539b89..258eb6febd 100644 --- a/jackson/src/test/java/org/baeldung/jackson/dtos/withEnum/MyDtoWithEnum.java +++ b/jackson/src/test/java/com/baeldung/jackson/dtos/withEnum/MyDtoWithEnum.java @@ -1,4 +1,4 @@ -package org.baeldung.jackson.dtos.withEnum; +package com.baeldung.jackson.dtos.withEnum; public class MyDtoWithEnum { diff --git a/jackson/src/test/java/org/baeldung/jackson/dtos/withEnum/MyDtoWithEnumCustom.java b/jackson/src/test/java/com/baeldung/jackson/dtos/withEnum/MyDtoWithEnumCustom.java similarity index 96% rename from jackson/src/test/java/org/baeldung/jackson/dtos/withEnum/MyDtoWithEnumCustom.java rename to jackson/src/test/java/com/baeldung/jackson/dtos/withEnum/MyDtoWithEnumCustom.java index b58ea4bd15..676e22686e 100644 --- a/jackson/src/test/java/org/baeldung/jackson/dtos/withEnum/MyDtoWithEnumCustom.java +++ b/jackson/src/test/java/com/baeldung/jackson/dtos/withEnum/MyDtoWithEnumCustom.java @@ -1,4 +1,4 @@ -package org.baeldung.jackson.dtos.withEnum; +package com.baeldung.jackson.dtos.withEnum; public class MyDtoWithEnumCustom { diff --git a/jackson/src/test/java/org/baeldung/jackson/dtos/withEnum/TypeEnum.java b/jackson/src/test/java/com/baeldung/jackson/dtos/withEnum/TypeEnum.java similarity index 93% rename from jackson/src/test/java/org/baeldung/jackson/dtos/withEnum/TypeEnum.java rename to jackson/src/test/java/com/baeldung/jackson/dtos/withEnum/TypeEnum.java index 316fdb12e7..e0c9718330 100644 --- a/jackson/src/test/java/org/baeldung/jackson/dtos/withEnum/TypeEnum.java +++ b/jackson/src/test/java/com/baeldung/jackson/dtos/withEnum/TypeEnum.java @@ -1,4 +1,4 @@ -package org.baeldung.jackson.dtos.withEnum; +package com.baeldung.jackson.dtos.withEnum; import com.fasterxml.jackson.annotation.JsonFormat; diff --git a/jackson/src/test/java/org/baeldung/jackson/dtos/withEnum/TypeEnumSimple.java b/jackson/src/test/java/com/baeldung/jackson/dtos/withEnum/TypeEnumSimple.java similarity index 92% rename from jackson/src/test/java/org/baeldung/jackson/dtos/withEnum/TypeEnumSimple.java rename to jackson/src/test/java/com/baeldung/jackson/dtos/withEnum/TypeEnumSimple.java index b76a5740ec..477db67069 100644 --- a/jackson/src/test/java/org/baeldung/jackson/dtos/withEnum/TypeEnumSimple.java +++ b/jackson/src/test/java/com/baeldung/jackson/dtos/withEnum/TypeEnumSimple.java @@ -1,4 +1,4 @@ -package org.baeldung.jackson.dtos.withEnum; +package com.baeldung.jackson.dtos.withEnum; public enum TypeEnumSimple { TYPE1(1, "Type A"), TYPE2(2, "Type 2"); diff --git a/jackson/src/test/java/org/baeldung/jackson/dtos/withEnum/TypeEnumWithCustomSerializer.java b/jackson/src/test/java/com/baeldung/jackson/dtos/withEnum/TypeEnumWithCustomSerializer.java similarity index 93% rename from jackson/src/test/java/org/baeldung/jackson/dtos/withEnum/TypeEnumWithCustomSerializer.java rename to jackson/src/test/java/com/baeldung/jackson/dtos/withEnum/TypeEnumWithCustomSerializer.java index 7e004d2d7d..e7c2859dd1 100644 --- a/jackson/src/test/java/org/baeldung/jackson/dtos/withEnum/TypeEnumWithCustomSerializer.java +++ b/jackson/src/test/java/com/baeldung/jackson/dtos/withEnum/TypeEnumWithCustomSerializer.java @@ -1,4 +1,4 @@ -package org.baeldung.jackson.dtos.withEnum; +package com.baeldung.jackson.dtos.withEnum; import com.fasterxml.jackson.databind.annotation.JsonSerialize; diff --git a/jackson/src/test/java/org/baeldung/jackson/dtos/withEnum/TypeEnumWithValue.java b/jackson/src/test/java/com/baeldung/jackson/dtos/withEnum/TypeEnumWithValue.java similarity index 93% rename from jackson/src/test/java/org/baeldung/jackson/dtos/withEnum/TypeEnumWithValue.java rename to jackson/src/test/java/com/baeldung/jackson/dtos/withEnum/TypeEnumWithValue.java index cf104df473..c5ddf222ff 100644 --- a/jackson/src/test/java/org/baeldung/jackson/dtos/withEnum/TypeEnumWithValue.java +++ b/jackson/src/test/java/com/baeldung/jackson/dtos/withEnum/TypeEnumWithValue.java @@ -1,4 +1,4 @@ -package org.baeldung.jackson.dtos.withEnum; +package com.baeldung.jackson.dtos.withEnum; import com.fasterxml.jackson.annotation.JsonValue; diff --git a/jackson/src/test/java/org/baeldung/jackson/dtos/withEnum/TypeSerializer.java b/jackson/src/test/java/com/baeldung/jackson/dtos/withEnum/TypeSerializer.java similarity index 94% rename from jackson/src/test/java/org/baeldung/jackson/dtos/withEnum/TypeSerializer.java rename to jackson/src/test/java/com/baeldung/jackson/dtos/withEnum/TypeSerializer.java index 8aa7e5c551..c5d5d7e0a8 100644 --- a/jackson/src/test/java/org/baeldung/jackson/dtos/withEnum/TypeSerializer.java +++ b/jackson/src/test/java/com/baeldung/jackson/dtos/withEnum/TypeSerializer.java @@ -1,4 +1,4 @@ -package org.baeldung.jackson.dtos.withEnum; +package com.baeldung.jackson.dtos.withEnum; import java.io.IOException; diff --git a/jackson/src/test/java/org/baeldung/jackson/dynamicIgnore/Address.java b/jackson/src/test/java/com/baeldung/jackson/dynamicIgnore/Address.java similarity index 94% rename from jackson/src/test/java/org/baeldung/jackson/dynamicIgnore/Address.java rename to jackson/src/test/java/com/baeldung/jackson/dynamicIgnore/Address.java index 41ea8e7be3..c2d2e84d45 100644 --- a/jackson/src/test/java/org/baeldung/jackson/dynamicIgnore/Address.java +++ b/jackson/src/test/java/com/baeldung/jackson/dynamicIgnore/Address.java @@ -1,4 +1,4 @@ -package org.baeldung.jackson.dynamicIgnore; +package com.baeldung.jackson.dynamicIgnore; public class Address implements Hidable { diff --git a/jackson/src/test/java/org/baeldung/jackson/dynamicIgnore/Hidable.java b/jackson/src/test/java/com/baeldung/jackson/dynamicIgnore/Hidable.java similarity index 77% rename from jackson/src/test/java/org/baeldung/jackson/dynamicIgnore/Hidable.java rename to jackson/src/test/java/com/baeldung/jackson/dynamicIgnore/Hidable.java index 9eaa0c9619..edca786432 100644 --- a/jackson/src/test/java/org/baeldung/jackson/dynamicIgnore/Hidable.java +++ b/jackson/src/test/java/com/baeldung/jackson/dynamicIgnore/Hidable.java @@ -1,4 +1,4 @@ -package org.baeldung.jackson.dynamicIgnore; +package com.baeldung.jackson.dynamicIgnore; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; diff --git a/jackson/src/test/java/org/baeldung/jackson/dynamicIgnore/HidableSerializer.java b/jackson/src/test/java/com/baeldung/jackson/dynamicIgnore/HidableSerializer.java similarity index 95% rename from jackson/src/test/java/org/baeldung/jackson/dynamicIgnore/HidableSerializer.java rename to jackson/src/test/java/com/baeldung/jackson/dynamicIgnore/HidableSerializer.java index 35bd8fd7f6..46396dae2a 100644 --- a/jackson/src/test/java/org/baeldung/jackson/dynamicIgnore/HidableSerializer.java +++ b/jackson/src/test/java/com/baeldung/jackson/dynamicIgnore/HidableSerializer.java @@ -1,4 +1,4 @@ -package org.baeldung.jackson.dynamicIgnore; +package com.baeldung.jackson.dynamicIgnore; import java.io.IOException; diff --git a/jackson/src/test/java/org/baeldung/jackson/dynamicIgnore/Person.java b/jackson/src/test/java/com/baeldung/jackson/dynamicIgnore/Person.java similarity index 94% rename from jackson/src/test/java/org/baeldung/jackson/dynamicIgnore/Person.java rename to jackson/src/test/java/com/baeldung/jackson/dynamicIgnore/Person.java index 5fe294a5e1..366f611edf 100644 --- a/jackson/src/test/java/org/baeldung/jackson/dynamicIgnore/Person.java +++ b/jackson/src/test/java/com/baeldung/jackson/dynamicIgnore/Person.java @@ -1,4 +1,4 @@ -package org.baeldung.jackson.dynamicIgnore; +package com.baeldung.jackson.dynamicIgnore; public class Person implements Hidable { diff --git a/jackson/src/test/java/org/baeldung/jackson/exception/User.java b/jackson/src/test/java/com/baeldung/jackson/exception/User.java similarity index 81% rename from jackson/src/test/java/org/baeldung/jackson/exception/User.java rename to jackson/src/test/java/com/baeldung/jackson/exception/User.java index 764d5872ad..1d78e82bec 100644 --- a/jackson/src/test/java/org/baeldung/jackson/exception/User.java +++ b/jackson/src/test/java/com/baeldung/jackson/exception/User.java @@ -1,4 +1,4 @@ -package org.baeldung.jackson.exception; +package com.baeldung.jackson.exception; public class User { public int id; diff --git a/jackson/src/test/java/org/baeldung/jackson/exception/UserWithConflict.java b/jackson/src/test/java/com/baeldung/jackson/exception/UserWithConflict.java similarity index 91% rename from jackson/src/test/java/org/baeldung/jackson/exception/UserWithConflict.java rename to jackson/src/test/java/com/baeldung/jackson/exception/UserWithConflict.java index 79d4199e91..01ff695475 100644 --- a/jackson/src/test/java/org/baeldung/jackson/exception/UserWithConflict.java +++ b/jackson/src/test/java/com/baeldung/jackson/exception/UserWithConflict.java @@ -1,4 +1,4 @@ -package org.baeldung.jackson.exception; +package com.baeldung.jackson.exception; public class UserWithConflict { public int id; diff --git a/jackson/src/test/java/org/baeldung/jackson/exception/UserWithPrivateFields.java b/jackson/src/test/java/com/baeldung/jackson/exception/UserWithPrivateFields.java similarity index 86% rename from jackson/src/test/java/org/baeldung/jackson/exception/UserWithPrivateFields.java rename to jackson/src/test/java/com/baeldung/jackson/exception/UserWithPrivateFields.java index 707623bbb2..f627975184 100644 --- a/jackson/src/test/java/org/baeldung/jackson/exception/UserWithPrivateFields.java +++ b/jackson/src/test/java/com/baeldung/jackson/exception/UserWithPrivateFields.java @@ -1,4 +1,4 @@ -package org.baeldung.jackson.exception; +package com.baeldung.jackson.exception; public class UserWithPrivateFields { int id; diff --git a/jackson/src/test/java/org/baeldung/jackson/exception/UserWithRoot.java b/jackson/src/test/java/com/baeldung/jackson/exception/UserWithRoot.java similarity index 89% rename from jackson/src/test/java/org/baeldung/jackson/exception/UserWithRoot.java rename to jackson/src/test/java/com/baeldung/jackson/exception/UserWithRoot.java index 2cf78e0365..d879c16e6a 100644 --- a/jackson/src/test/java/org/baeldung/jackson/exception/UserWithRoot.java +++ b/jackson/src/test/java/com/baeldung/jackson/exception/UserWithRoot.java @@ -1,4 +1,4 @@ -package org.baeldung.jackson.exception; +package com.baeldung.jackson.exception; import com.fasterxml.jackson.annotation.JsonRootName; diff --git a/jackson/src/test/java/org/baeldung/jackson/exception/Zoo.java b/jackson/src/test/java/com/baeldung/jackson/exception/Zoo.java similarity index 84% rename from jackson/src/test/java/org/baeldung/jackson/exception/Zoo.java rename to jackson/src/test/java/com/baeldung/jackson/exception/Zoo.java index 79c24569f2..647b5955c0 100644 --- a/jackson/src/test/java/org/baeldung/jackson/exception/Zoo.java +++ b/jackson/src/test/java/com/baeldung/jackson/exception/Zoo.java @@ -1,4 +1,4 @@ -package org.baeldung.jackson.exception; +package com.baeldung.jackson.exception; public class Zoo { public Animal animal; diff --git a/jackson/src/test/java/org/baeldung/jackson/exception/ZooConfigured.java b/jackson/src/test/java/com/baeldung/jackson/exception/ZooConfigured.java similarity index 91% rename from jackson/src/test/java/org/baeldung/jackson/exception/ZooConfigured.java rename to jackson/src/test/java/com/baeldung/jackson/exception/ZooConfigured.java index 776b702acb..f51b1e150a 100644 --- a/jackson/src/test/java/org/baeldung/jackson/exception/ZooConfigured.java +++ b/jackson/src/test/java/com/baeldung/jackson/exception/ZooConfigured.java @@ -1,4 +1,4 @@ -package org.baeldung.jackson.exception; +package com.baeldung.jackson.exception; import com.fasterxml.jackson.databind.annotation.JsonDeserialize; diff --git a/jackson/src/test/java/org/baeldung/jackson/field/MyDto.java b/jackson/src/test/java/com/baeldung/jackson/field/MyDto.java similarity index 96% rename from jackson/src/test/java/org/baeldung/jackson/field/MyDto.java rename to jackson/src/test/java/com/baeldung/jackson/field/MyDto.java index edfc9d2f91..f19371937d 100644 --- a/jackson/src/test/java/org/baeldung/jackson/field/MyDto.java +++ b/jackson/src/test/java/com/baeldung/jackson/field/MyDto.java @@ -1,4 +1,4 @@ -package org.baeldung.jackson.field; +package com.baeldung.jackson.field; public class MyDto { diff --git a/jackson/src/test/java/org/baeldung/jackson/field/MyDtoAccessLevel.java b/jackson/src/test/java/com/baeldung/jackson/field/MyDtoAccessLevel.java similarity index 93% rename from jackson/src/test/java/org/baeldung/jackson/field/MyDtoAccessLevel.java rename to jackson/src/test/java/com/baeldung/jackson/field/MyDtoAccessLevel.java index c164b00e4a..df16720038 100644 --- a/jackson/src/test/java/org/baeldung/jackson/field/MyDtoAccessLevel.java +++ b/jackson/src/test/java/com/baeldung/jackson/field/MyDtoAccessLevel.java @@ -1,4 +1,4 @@ -package org.baeldung.jackson.field; +package com.baeldung.jackson.field; public class MyDtoAccessLevel { diff --git a/jackson/src/test/java/org/baeldung/jackson/field/MyDtoWithGetter.java b/jackson/src/test/java/com/baeldung/jackson/field/MyDtoWithGetter.java similarity index 91% rename from jackson/src/test/java/org/baeldung/jackson/field/MyDtoWithGetter.java rename to jackson/src/test/java/com/baeldung/jackson/field/MyDtoWithGetter.java index 0f15b2fcc3..4ea20b93c1 100644 --- a/jackson/src/test/java/org/baeldung/jackson/field/MyDtoWithGetter.java +++ b/jackson/src/test/java/com/baeldung/jackson/field/MyDtoWithGetter.java @@ -1,4 +1,4 @@ -package org.baeldung.jackson.field; +package com.baeldung.jackson.field; public class MyDtoWithGetter { diff --git a/jackson/src/test/java/org/baeldung/jackson/field/MyDtoWithSetter.java b/jackson/src/test/java/com/baeldung/jackson/field/MyDtoWithSetter.java similarity index 93% rename from jackson/src/test/java/org/baeldung/jackson/field/MyDtoWithSetter.java rename to jackson/src/test/java/com/baeldung/jackson/field/MyDtoWithSetter.java index e37793492e..fd3f6790a3 100644 --- a/jackson/src/test/java/org/baeldung/jackson/field/MyDtoWithSetter.java +++ b/jackson/src/test/java/com/baeldung/jackson/field/MyDtoWithSetter.java @@ -1,4 +1,4 @@ -package org.baeldung.jackson.field; +package com.baeldung.jackson.field; public class MyDtoWithSetter { diff --git a/jackson/src/test/java/com/baeldung/jackson/inheritance/IgnoranceAnnotationStructure.java b/jackson/src/test/java/com/baeldung/jackson/inheritance/IgnoranceAnnotationStructure.java new file mode 100644 index 0000000000..520929463c --- /dev/null +++ b/jackson/src/test/java/com/baeldung/jackson/inheritance/IgnoranceAnnotationStructure.java @@ -0,0 +1,96 @@ +package com.baeldung.jackson.inheritance; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; + +public class IgnoranceAnnotationStructure { + public static abstract class Vehicle { + private String make; + private String model; + + protected Vehicle() { + } + + protected Vehicle(String make, String model) { + this.make = make; + this.model = model; + } + + public String getMake() { + return make; + } + + public void setMake(String make) { + this.make = make; + } + + public String getModel() { + return model; + } + + public void setModel(String model) { + this.model = model; + } + } + + @JsonIgnoreProperties({ "model", "seatingCapacity" }) + public static abstract class Car extends Vehicle { + private int seatingCapacity; + @JsonIgnore + private double topSpeed; + + protected Car() { + } + + protected Car(String make, String model, int seatingCapacity, double topSpeed) { + super(make, model); + this.seatingCapacity = seatingCapacity; + this.topSpeed = topSpeed; + } + + public int getSeatingCapacity() { + return seatingCapacity; + } + + public void setSeatingCapacity(int seatingCapacity) { + this.seatingCapacity = seatingCapacity; + } + + public double getTopSpeed() { + return topSpeed; + } + + public void setTopSpeed(double topSpeed) { + this.topSpeed = topSpeed; + } + } + + public static class Sedan extends Car { + public Sedan() { + } + + public Sedan(String make, String model, int seatingCapacity, double topSpeed) { + super(make, model, seatingCapacity, topSpeed); + } + } + + public static class Crossover extends Car { + private double towingCapacity; + + public Crossover() { + } + + public Crossover(String make, String model, int seatingCapacity, double topSpeed, double towingCapacity) { + super(make, model, seatingCapacity, topSpeed); + this.towingCapacity = towingCapacity; + } + + public double getTowingCapacity() { + return towingCapacity; + } + + public void setTowingCapacity(double towingCapacity) { + this.towingCapacity = towingCapacity; + } + } +} \ No newline at end of file diff --git a/jackson/src/test/java/com/baeldung/jackson/inheritance/IgnoranceMixinOrIntrospection.java b/jackson/src/test/java/com/baeldung/jackson/inheritance/IgnoranceMixinOrIntrospection.java new file mode 100644 index 0000000000..52c0bbea5e --- /dev/null +++ b/jackson/src/test/java/com/baeldung/jackson/inheritance/IgnoranceMixinOrIntrospection.java @@ -0,0 +1,91 @@ +package com.baeldung.jackson.inheritance; + +public class IgnoranceMixinOrIntrospection { + public static abstract class Vehicle { + private String make; + private String model; + + protected Vehicle() { + } + + protected Vehicle(String make, String model) { + this.make = make; + this.model = model; + } + + public String getMake() { + return make; + } + + public void setMake(String make) { + this.make = make; + } + + public String getModel() { + return model; + } + + public void setModel(String model) { + this.model = model; + } + } + + public static abstract class Car extends Vehicle { + private int seatingCapacity; + private double topSpeed; + + protected Car() { + } + + protected Car(String make, String model, int seatingCapacity, double topSpeed) { + super(make, model); + this.seatingCapacity = seatingCapacity; + this.topSpeed = topSpeed; + } + + public int getSeatingCapacity() { + return seatingCapacity; + } + + public void setSeatingCapacity(int seatingCapacity) { + this.seatingCapacity = seatingCapacity; + } + + public double getTopSpeed() { + return topSpeed; + } + + public void setTopSpeed(double topSpeed) { + this.topSpeed = topSpeed; + } + } + + public static class Sedan extends Car { + public Sedan() { + } + + public Sedan(String make, String model, int seatingCapacity, double topSpeed) { + super(make, model, seatingCapacity, topSpeed); + } + } + + public static class Crossover extends Car { + private double towingCapacity; + + public Crossover() { + } + + public Crossover(String make, String model, int seatingCapacity, double topSpeed, double towingCapacity) { + super(make, model, seatingCapacity, topSpeed); + this.towingCapacity = towingCapacity; + } + + public double getTowingCapacity() { + return towingCapacity; + } + + public void setTowingCapacity(double towingCapacity) { + this.towingCapacity = towingCapacity; + } + } +} \ No newline at end of file diff --git a/jackson/src/test/java/com/baeldung/jackson/inheritance/IgnoranceTest.java b/jackson/src/test/java/com/baeldung/jackson/inheritance/IgnoranceTest.java new file mode 100644 index 0000000000..8d22f471a6 --- /dev/null +++ b/jackson/src/test/java/com/baeldung/jackson/inheritance/IgnoranceTest.java @@ -0,0 +1,92 @@ +package com.baeldung.jackson.inheritance; + +import static org.junit.Assert.assertThat; +import static org.hamcrest.CoreMatchers.containsString; +import static org.hamcrest.CoreMatchers.not; + +import org.junit.Test; + +import java.util.List; +import java.util.ArrayList; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.fasterxml.jackson.databind.introspect.AnnotatedMember; +import com.fasterxml.jackson.databind.introspect.JacksonAnnotationIntrospector; + +public class IgnoranceTest { + private static abstract class CarMixIn { + @JsonIgnore + public String make; + @JsonIgnore + public String topSpeed; + } + + private static class IgnoranceIntrospector extends JacksonAnnotationIntrospector { + private static final long serialVersionUID = 1422295680188892323L; + + public boolean hasIgnoreMarker(AnnotatedMember m) { + return m.getDeclaringClass() == IgnoranceMixinOrIntrospection.Vehicle.class && m.getName() == "model" || m.getDeclaringClass() == IgnoranceMixinOrIntrospection.Car.class || m.getName() == "towingCapacity" || super.hasIgnoreMarker(m); + } + } + + @Test + public void givenAnnotations_whenIgnoringProperties_thenCorrect() throws JsonProcessingException { + ObjectMapper mapper = new ObjectMapper(); + + IgnoranceAnnotationStructure.Sedan sedan = new IgnoranceAnnotationStructure.Sedan("Mercedes-Benz", "S500", 5, 250.0); + IgnoranceAnnotationStructure.Crossover crossover = new IgnoranceAnnotationStructure.Crossover("BMW", "X6", 5, 250.0, 6000.0); + + List vehicles = new ArrayList<>(); + vehicles.add(sedan); + vehicles.add(crossover); + + String jsonDataString = mapper.writeValueAsString(vehicles); + + assertThat(jsonDataString, containsString("make")); + assertThat(jsonDataString, not(containsString("model"))); + assertThat(jsonDataString, not(containsString("seatingCapacity"))); + assertThat(jsonDataString, not(containsString("topSpeed"))); + assertThat(jsonDataString, containsString("towingCapacity")); + } + + @Test + public void givenMixIns_whenIgnoringProperties_thenCorrect() throws JsonProcessingException { + ObjectMapper mapper = new ObjectMapper(); + mapper.addMixIn(IgnoranceMixinOrIntrospection.Car.class, CarMixIn.class); + + String jsonDataString = instantiateAndSerializeObjects(mapper); + + assertThat(jsonDataString, not(containsString("make"))); + assertThat(jsonDataString, containsString("model")); + assertThat(jsonDataString, containsString("seatingCapacity")); + assertThat(jsonDataString, not(containsString("topSpeed"))); + assertThat(jsonDataString, containsString("towingCapacity")); + } + + @Test + public void givenIntrospection_whenIgnoringProperties_thenCorrect() throws JsonProcessingException { + ObjectMapper mapper = new ObjectMapper(); + mapper.setAnnotationIntrospector(new IgnoranceIntrospector()); + + String jsonDataString = instantiateAndSerializeObjects(mapper); + + assertThat(jsonDataString, containsString("make")); + assertThat(jsonDataString, not(containsString("model"))); + assertThat(jsonDataString, not(containsString("seatingCapacity"))); + assertThat(jsonDataString, not(containsString("topSpeed"))); + assertThat(jsonDataString, not(containsString("towingCapacity"))); + } + + private String instantiateAndSerializeObjects(ObjectMapper mapper) throws JsonProcessingException { + IgnoranceMixinOrIntrospection.Sedan sedan = new IgnoranceMixinOrIntrospection.Sedan("Mercedes-Benz", "S500", 5, 250.0); + IgnoranceMixinOrIntrospection.Crossover crossover = new IgnoranceMixinOrIntrospection.Crossover("BMW", "X6", 5, 250.0, 6000.0); + + List vehicles = new ArrayList<>(); + vehicles.add(sedan); + vehicles.add(crossover); + + return mapper.writeValueAsString(vehicles); + } +} \ No newline at end of file diff --git a/jackson/src/test/java/com/baeldung/jackson/inheritance/SubTypeConstructorStructure.java b/jackson/src/test/java/com/baeldung/jackson/inheritance/SubTypeConstructorStructure.java new file mode 100644 index 0000000000..8a8db8ae47 --- /dev/null +++ b/jackson/src/test/java/com/baeldung/jackson/inheritance/SubTypeConstructorStructure.java @@ -0,0 +1,92 @@ +package com.baeldung.jackson.inheritance; + +import java.util.List; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; + +public class SubTypeConstructorStructure { + public static class Fleet { + private List vehicles; + + public List getVehicles() { + return vehicles; + } + + public void setVehicles(List vehicles) { + this.vehicles = vehicles; + } + } + + public static abstract class Vehicle { + private String make; + private String model; + + protected Vehicle(String make, String model) { + this.make = make; + this.model = model; + } + + public String getMake() { + return make; + } + + public void setMake(String make) { + this.make = make; + } + + public String getModel() { + return model; + } + + public void setModel(String model) { + this.model = model; + } + } + + public static class Car extends Vehicle { + private int seatingCapacity; + private double topSpeed; + + @JsonCreator + public Car(@JsonProperty("make") String make, @JsonProperty("model") String model, @JsonProperty("seating") int seatingCapacity, @JsonProperty("topSpeed") double topSpeed) { + super(make, model); + this.seatingCapacity = seatingCapacity; + this.topSpeed = topSpeed; + } + + public int getSeatingCapacity() { + return seatingCapacity; + } + + public void setSeatingCapacity(int seatingCapacity) { + this.seatingCapacity = seatingCapacity; + } + + public double getTopSpeed() { + return topSpeed; + } + + public void setTopSpeed(double topSpeed) { + this.topSpeed = topSpeed; + } + } + + public static class Truck extends Vehicle { + private double payloadCapacity; + + @JsonCreator + public Truck(@JsonProperty("make") String make, @JsonProperty("model") String model, @JsonProperty("payload") double payloadCapacity) { + super(make, model); + this.payloadCapacity = payloadCapacity; + } + + public double getPayloadCapacity() { + return payloadCapacity; + } + + public void setPayloadCapacity(double payloadCapacity) { + this.payloadCapacity = payloadCapacity; + } + } +} \ No newline at end of file diff --git a/jackson/src/test/java/com/baeldung/jackson/inheritance/SubTypeConversionStructure.java b/jackson/src/test/java/com/baeldung/jackson/inheritance/SubTypeConversionStructure.java new file mode 100644 index 0000000000..346fd65eef --- /dev/null +++ b/jackson/src/test/java/com/baeldung/jackson/inheritance/SubTypeConversionStructure.java @@ -0,0 +1,87 @@ +package com.baeldung.jackson.inheritance; + +import com.fasterxml.jackson.annotation.JsonIgnore; + +public class SubTypeConversionStructure { + public static abstract class Vehicle { + private String make; + private String model; + + protected Vehicle() { + } + + protected Vehicle(String make, String model) { + this.make = make; + this.model = model; + } + + public String getMake() { + return make; + } + + public void setMake(String make) { + this.make = make; + } + + public String getModel() { + return model; + } + + public void setModel(String model) { + this.model = model; + } + } + + public static class Car extends Vehicle { + @JsonIgnore + private int seatingCapacity; + @JsonIgnore + private double topSpeed; + + public Car() { + } + + public Car(String make, String model, int seatingCapacity, double topSpeed) { + super(make, model); + this.seatingCapacity = seatingCapacity; + this.topSpeed = topSpeed; + } + + public int getSeatingCapacity() { + return seatingCapacity; + } + + public void setSeatingCapacity(int seatingCapacity) { + this.seatingCapacity = seatingCapacity; + } + + public double getTopSpeed() { + return topSpeed; + } + + public void setTopSpeed(double topSpeed) { + this.topSpeed = topSpeed; + } + } + + public static class Truck extends Vehicle { + @JsonIgnore + private double payloadCapacity; + + public Truck() { + } + + public Truck(String make, String model, double payloadCapacity) { + super(make, model); + this.payloadCapacity = payloadCapacity; + } + + public double getPayloadCapacity() { + return payloadCapacity; + } + + public void setPayloadCapacity(double payloadCapacity) { + this.payloadCapacity = payloadCapacity; + } + } +} \ No newline at end of file diff --git a/jackson/src/test/java/com/baeldung/jackson/inheritance/SubTypeHandlingTest.java b/jackson/src/test/java/com/baeldung/jackson/inheritance/SubTypeHandlingTest.java new file mode 100644 index 0000000000..2d4c8fe698 --- /dev/null +++ b/jackson/src/test/java/com/baeldung/jackson/inheritance/SubTypeHandlingTest.java @@ -0,0 +1,43 @@ +package com.baeldung.jackson.inheritance; + +import static org.junit.Assert.assertEquals; + +import org.junit.Test; + +import java.util.List; +import java.util.ArrayList; +import java.io.IOException; + +import com.fasterxml.jackson.databind.ObjectMapper; + +public class SubTypeHandlingTest { + @Test + public void givenSubTypes_whenConvertingObjects_thenDataValuesArePreserved() { + ObjectMapper mapper = new ObjectMapper(); + + SubTypeConversionStructure.Car car = new SubTypeConversionStructure.Car("Mercedes-Benz", "S500", 5, 250.0); + SubTypeConversionStructure.Truck truck = mapper.convertValue(car, SubTypeConversionStructure.Truck.class); + + assertEquals("Mercedes-Benz", truck.getMake()); + assertEquals("S500", truck.getModel()); + } + + @Test + public void givenSubType_whenNotUsingNoArgsConstructors_thenSucceed() throws IOException{ + ObjectMapper mapper = new ObjectMapper(); + mapper.enableDefaultTyping(); + + SubTypeConstructorStructure.Car car = new SubTypeConstructorStructure.Car("Mercedes-Benz", "S500", 5, 250.0); + SubTypeConstructorStructure.Truck truck = new SubTypeConstructorStructure.Truck("Isuzu", "NQR", 7500.0); + + List vehicles = new ArrayList<>(); + vehicles.add(car); + vehicles.add(truck); + + SubTypeConstructorStructure.Fleet serializedFleet = new SubTypeConstructorStructure.Fleet(); + serializedFleet.setVehicles(vehicles); + + String jsonDataString = mapper.writeValueAsString(serializedFleet); + mapper.readValue(jsonDataString, SubTypeConstructorStructure.Fleet.class); + } +} \ No newline at end of file diff --git a/jackson/src/test/java/com/baeldung/jackson/inheritance/TypeInfoAnnotatedStructure.java b/jackson/src/test/java/com/baeldung/jackson/inheritance/TypeInfoAnnotatedStructure.java new file mode 100644 index 0000000000..cb552a7b80 --- /dev/null +++ b/jackson/src/test/java/com/baeldung/jackson/inheritance/TypeInfoAnnotatedStructure.java @@ -0,0 +1,102 @@ +package com.baeldung.jackson.inheritance; + +import java.util.List; + +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonSubTypes.Type; + +public class TypeInfoAnnotatedStructure { + public static class Fleet { + private List vehicles; + + public List getVehicles() { + return vehicles; + } + + public void setVehicles(List vehicles) { + this.vehicles = vehicles; + } + } + + @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type") + @JsonSubTypes({ @Type(value = Car.class, name = "car"), @Type(value = Truck.class, name = "truck") }) + public static abstract class Vehicle { + private String make; + private String model; + + protected Vehicle() { + } + + protected Vehicle(String make, String model) { + this.make = make; + this.model = model; + } + + public String getMake() { + return make; + } + + public void setMake(String make) { + this.make = make; + } + + public String getModel() { + return model; + } + + public void setModel(String model) { + this.model = model; + } + } + + public static class Car extends Vehicle { + private int seatingCapacity; + private double topSpeed; + + public Car() { + } + + public Car(String make, String model, int seatingCapacity, double topSpeed) { + super(make, model); + this.seatingCapacity = seatingCapacity; + this.topSpeed = topSpeed; + } + + public int getSeatingCapacity() { + return seatingCapacity; + } + + public void setSeatingCapacity(int seatingCapacity) { + this.seatingCapacity = seatingCapacity; + } + + public double getTopSpeed() { + return topSpeed; + } + + public void setTopSpeed(double topSpeed) { + this.topSpeed = topSpeed; + } + } + + public static class Truck extends Vehicle { + private double payloadCapacity; + + public Truck() { + } + + public Truck(String make, String model, double payloadCapacity) { + super(make, model); + this.payloadCapacity = payloadCapacity; + } + + public double getPayloadCapacity() { + return payloadCapacity; + } + + public void setPayloadCapacity(double payloadCapacity) { + this.payloadCapacity = payloadCapacity; + } + } +} \ No newline at end of file diff --git a/jackson/src/test/java/com/baeldung/jackson/inheritance/TypeInfoInclusionTest.java b/jackson/src/test/java/com/baeldung/jackson/inheritance/TypeInfoInclusionTest.java new file mode 100644 index 0000000000..aefbc172d0 --- /dev/null +++ b/jackson/src/test/java/com/baeldung/jackson/inheritance/TypeInfoInclusionTest.java @@ -0,0 +1,57 @@ +package com.baeldung.jackson.inheritance; + +import static org.junit.Assert.assertThat; +import static org.hamcrest.CoreMatchers.instanceOf; + +import org.junit.Test; + +import java.util.List; +import java.util.ArrayList; +import java.io.IOException; + +import com.fasterxml.jackson.databind.ObjectMapper; + +public class TypeInfoInclusionTest { + @Test + public void givenTypeInfo_whenAnnotatingGlobally_thenTypesAreCorrectlyRecovered() throws IOException { + ObjectMapper mapper = new ObjectMapper(); + mapper.enableDefaultTyping(); + + TypeInfoStructure.Car car = new TypeInfoStructure.Car("Mercedes-Benz", "S500", 5, 250.0); + TypeInfoStructure.Truck truck = new TypeInfoStructure.Truck("Isuzu", "NQR", 7500.0); + + List vehicles = new ArrayList<>(); + vehicles.add(car); + vehicles.add(truck); + + TypeInfoStructure.Fleet serializedFleet = new TypeInfoStructure.Fleet(); + serializedFleet.setVehicles(vehicles); + + String jsonDataString = mapper.writeValueAsString(serializedFleet); + TypeInfoStructure.Fleet deserializedFleet = mapper.readValue(jsonDataString, TypeInfoStructure.Fleet.class); + + assertThat(deserializedFleet.getVehicles().get(0), instanceOf(TypeInfoStructure.Car.class)); + assertThat(deserializedFleet.getVehicles().get(1), instanceOf(TypeInfoStructure.Truck.class)); + } + + @Test + public void givenTypeInfo_whenAnnotatingPerClass_thenTypesAreCorrectlyRecovered() throws IOException { + ObjectMapper mapper = new ObjectMapper(); + + TypeInfoAnnotatedStructure.Car car = new TypeInfoAnnotatedStructure.Car("Mercedes-Benz", "S500", 5, 250.0); + TypeInfoAnnotatedStructure.Truck truck = new TypeInfoAnnotatedStructure.Truck("Isuzu", "NQR", 7500.0); + + List vehicles = new ArrayList<>(); + vehicles.add(car); + vehicles.add(truck); + + TypeInfoAnnotatedStructure.Fleet serializedFleet = new TypeInfoAnnotatedStructure.Fleet(); + serializedFleet.setVehicles(vehicles); + + String jsonDataString = mapper.writeValueAsString(serializedFleet); + TypeInfoAnnotatedStructure.Fleet deserializedFleet = mapper.readValue(jsonDataString, TypeInfoAnnotatedStructure.Fleet.class); + + assertThat(deserializedFleet.getVehicles().get(0), instanceOf(TypeInfoAnnotatedStructure.Car.class)); + assertThat(deserializedFleet.getVehicles().get(1), instanceOf(TypeInfoAnnotatedStructure.Truck.class)); + } +} \ No newline at end of file diff --git a/jackson/src/test/java/com/baeldung/jackson/inheritance/TypeInfoStructure.java b/jackson/src/test/java/com/baeldung/jackson/inheritance/TypeInfoStructure.java new file mode 100644 index 0000000000..5c5186dfcc --- /dev/null +++ b/jackson/src/test/java/com/baeldung/jackson/inheritance/TypeInfoStructure.java @@ -0,0 +1,96 @@ +package com.baeldung.jackson.inheritance; + +import java.util.List; + +public class TypeInfoStructure { + public static class Fleet { + private List vehicles; + + public List getVehicles() { + return vehicles; + } + + public void setVehicles(List vehicles) { + this.vehicles = vehicles; + } + } + + public static abstract class Vehicle { + private String make; + private String model; + + protected Vehicle() { + } + + protected Vehicle(String make, String model) { + this.make = make; + this.model = model; + } + + public String getMake() { + return make; + } + + public void setMake(String make) { + this.make = make; + } + + public String getModel() { + return model; + } + + public void setModel(String model) { + this.model = model; + } + } + + public static class Car extends Vehicle { + private int seatingCapacity; + private double topSpeed; + + public Car() { + } + + public Car(String make, String model, int seatingCapacity, double topSpeed) { + super(make, model); + this.seatingCapacity = seatingCapacity; + this.topSpeed = topSpeed; + } + + public int getSeatingCapacity() { + return seatingCapacity; + } + + public void setSeatingCapacity(int seatingCapacity) { + this.seatingCapacity = seatingCapacity; + } + + public double getTopSpeed() { + return topSpeed; + } + + public void setTopSpeed(double topSpeed) { + this.topSpeed = topSpeed; + } + } + + public static class Truck extends Vehicle { + private double payloadCapacity; + + public Truck() { + } + + public Truck(String make, String model, double payloadCapacity) { + super(make, model); + this.payloadCapacity = payloadCapacity; + } + + public double getPayloadCapacity() { + return payloadCapacity; + } + + public void setPayloadCapacity(double payloadCapacity) { + this.payloadCapacity = payloadCapacity; + } + } +} \ No newline at end of file diff --git a/jackson/src/test/java/org/baeldung/jackson/jsonview/Item.java b/jackson/src/test/java/com/baeldung/jackson/jsonview/Item.java similarity index 94% rename from jackson/src/test/java/org/baeldung/jackson/jsonview/Item.java rename to jackson/src/test/java/com/baeldung/jackson/jsonview/Item.java index 5705f810af..26d20d4847 100644 --- a/jackson/src/test/java/org/baeldung/jackson/jsonview/Item.java +++ b/jackson/src/test/java/com/baeldung/jackson/jsonview/Item.java @@ -1,4 +1,4 @@ -package org.baeldung.jackson.jsonview; +package com.baeldung.jackson.jsonview; import com.fasterxml.jackson.annotation.JsonView; diff --git a/jackson/src/test/java/org/baeldung/jackson/jsonview/MyBeanSerializerModifier.java b/jackson/src/test/java/com/baeldung/jackson/jsonview/MyBeanSerializerModifier.java similarity index 95% rename from jackson/src/test/java/org/baeldung/jackson/jsonview/MyBeanSerializerModifier.java rename to jackson/src/test/java/com/baeldung/jackson/jsonview/MyBeanSerializerModifier.java index 0986e5ea76..3b94c13d8b 100644 --- a/jackson/src/test/java/org/baeldung/jackson/jsonview/MyBeanSerializerModifier.java +++ b/jackson/src/test/java/com/baeldung/jackson/jsonview/MyBeanSerializerModifier.java @@ -1,4 +1,4 @@ -package org.baeldung.jackson.jsonview; +package com.baeldung.jackson.jsonview; import java.util.List; diff --git a/jackson/src/test/java/org/baeldung/jackson/jsonview/UpperCasingWriter.java b/jackson/src/test/java/com/baeldung/jackson/jsonview/UpperCasingWriter.java similarity index 94% rename from jackson/src/test/java/org/baeldung/jackson/jsonview/UpperCasingWriter.java rename to jackson/src/test/java/com/baeldung/jackson/jsonview/UpperCasingWriter.java index 948fb36cda..3a69d66a05 100644 --- a/jackson/src/test/java/org/baeldung/jackson/jsonview/UpperCasingWriter.java +++ b/jackson/src/test/java/com/baeldung/jackson/jsonview/UpperCasingWriter.java @@ -1,4 +1,4 @@ -package org.baeldung.jackson.jsonview; +package com.baeldung.jackson.jsonview; import com.fasterxml.jackson.core.JsonGenerator; import com.fasterxml.jackson.databind.SerializerProvider; diff --git a/jackson/src/test/java/org/baeldung/jackson/jsonview/User.java b/jackson/src/test/java/com/baeldung/jackson/jsonview/User.java similarity index 91% rename from jackson/src/test/java/org/baeldung/jackson/jsonview/User.java rename to jackson/src/test/java/com/baeldung/jackson/jsonview/User.java index 5850dcbe84..48353fe4e4 100644 --- a/jackson/src/test/java/org/baeldung/jackson/jsonview/User.java +++ b/jackson/src/test/java/com/baeldung/jackson/jsonview/User.java @@ -1,4 +1,4 @@ -package org.baeldung.jackson.jsonview; +package com.baeldung.jackson.jsonview; import com.fasterxml.jackson.annotation.JsonView; diff --git a/jackson/src/test/java/org/baeldung/jackson/jsonview/Views.java b/jackson/src/test/java/com/baeldung/jackson/jsonview/Views.java similarity index 75% rename from jackson/src/test/java/org/baeldung/jackson/jsonview/Views.java rename to jackson/src/test/java/com/baeldung/jackson/jsonview/Views.java index 0a430ad123..65950b7f9f 100644 --- a/jackson/src/test/java/org/baeldung/jackson/jsonview/Views.java +++ b/jackson/src/test/java/com/baeldung/jackson/jsonview/Views.java @@ -1,4 +1,4 @@ -package org.baeldung.jackson.jsonview; +package com.baeldung.jackson.jsonview; public class Views { public static class Public { diff --git a/jackson/src/test/java/org/baeldung/jackson/node/ExampleStructure.java b/jackson/src/test/java/com/baeldung/jackson/node/ExampleStructure.java similarity index 93% rename from jackson/src/test/java/org/baeldung/jackson/node/ExampleStructure.java rename to jackson/src/test/java/com/baeldung/jackson/node/ExampleStructure.java index 0eb15f3bb8..14f9024d0b 100644 --- a/jackson/src/test/java/org/baeldung/jackson/node/ExampleStructure.java +++ b/jackson/src/test/java/com/baeldung/jackson/node/ExampleStructure.java @@ -1,4 +1,4 @@ -package org.baeldung.jackson.node; +package com.baeldung.jackson.node; import java.io.IOException; import java.io.InputStream; diff --git a/jackson/src/test/java/org/baeldung/jackson/node/NodeBean.java b/jackson/src/test/java/com/baeldung/jackson/node/NodeBean.java similarity index 92% rename from jackson/src/test/java/org/baeldung/jackson/node/NodeBean.java rename to jackson/src/test/java/com/baeldung/jackson/node/NodeBean.java index 7d54a6140e..da5ffece51 100644 --- a/jackson/src/test/java/org/baeldung/jackson/node/NodeBean.java +++ b/jackson/src/test/java/com/baeldung/jackson/node/NodeBean.java @@ -1,4 +1,4 @@ -package org.baeldung.jackson.node; +package com.baeldung.jackson.node; public class NodeBean { private int id; diff --git a/jackson/src/test/java/org/baeldung/jackson/node/NodeOperationTest.java b/jackson/src/test/java/com/baeldung/jackson/node/NodeOperationTest.java similarity index 99% rename from jackson/src/test/java/org/baeldung/jackson/node/NodeOperationTest.java rename to jackson/src/test/java/com/baeldung/jackson/node/NodeOperationTest.java index c1398b2165..2fcb828613 100644 --- a/jackson/src/test/java/org/baeldung/jackson/node/NodeOperationTest.java +++ b/jackson/src/test/java/com/baeldung/jackson/node/NodeOperationTest.java @@ -1,4 +1,4 @@ -package org.baeldung.jackson.node; +package com.baeldung.jackson.node; import static org.hamcrest.CoreMatchers.containsString; import static org.junit.Assert.assertEquals; diff --git a/jackson/src/test/java/org/baeldung/jackson/sandbox/JacksonPrettyPrintUnitTest.java b/jackson/src/test/java/com/baeldung/jackson/sandbox/JacksonPrettyPrintUnitTest.java similarity index 97% rename from jackson/src/test/java/org/baeldung/jackson/sandbox/JacksonPrettyPrintUnitTest.java rename to jackson/src/test/java/com/baeldung/jackson/sandbox/JacksonPrettyPrintUnitTest.java index 58dcec51f6..a68af20f15 100644 --- a/jackson/src/test/java/org/baeldung/jackson/sandbox/JacksonPrettyPrintUnitTest.java +++ b/jackson/src/test/java/com/baeldung/jackson/sandbox/JacksonPrettyPrintUnitTest.java @@ -1,4 +1,4 @@ -package org.baeldung.jackson.sandbox; +package com.baeldung.jackson.sandbox; import java.io.File; import java.io.IOException; diff --git a/jackson/src/test/java/org/baeldung/jackson/sandbox/SandboxTest.java b/jackson/src/test/java/com/baeldung/jackson/sandbox/SandboxTest.java similarity index 96% rename from jackson/src/test/java/org/baeldung/jackson/sandbox/SandboxTest.java rename to jackson/src/test/java/com/baeldung/jackson/sandbox/SandboxTest.java index 19491377e8..958a7eec98 100644 --- a/jackson/src/test/java/org/baeldung/jackson/sandbox/SandboxTest.java +++ b/jackson/src/test/java/com/baeldung/jackson/sandbox/SandboxTest.java @@ -1,4 +1,4 @@ -package org.baeldung.jackson.sandbox; +package com.baeldung.jackson.sandbox; import java.io.IOException; diff --git a/jackson/src/test/java/org/baeldung/jackson/sandbox/TestElement.java b/jackson/src/test/java/com/baeldung/jackson/sandbox/TestElement.java similarity index 88% rename from jackson/src/test/java/org/baeldung/jackson/sandbox/TestElement.java rename to jackson/src/test/java/com/baeldung/jackson/sandbox/TestElement.java index 3b6a852b6b..82f53fcf4a 100644 --- a/jackson/src/test/java/org/baeldung/jackson/sandbox/TestElement.java +++ b/jackson/src/test/java/com/baeldung/jackson/sandbox/TestElement.java @@ -1,4 +1,4 @@ -package org.baeldung.jackson.sandbox; +package com.baeldung.jackson.sandbox; public class TestElement { diff --git a/jackson/src/test/java/org/baeldung/jackson/serialization/ItemSerializer.java b/jackson/src/test/java/com/baeldung/jackson/serialization/ItemSerializer.java similarity index 89% rename from jackson/src/test/java/org/baeldung/jackson/serialization/ItemSerializer.java rename to jackson/src/test/java/com/baeldung/jackson/serialization/ItemSerializer.java index 7a1362a416..cb93f9cb03 100644 --- a/jackson/src/test/java/org/baeldung/jackson/serialization/ItemSerializer.java +++ b/jackson/src/test/java/com/baeldung/jackson/serialization/ItemSerializer.java @@ -1,8 +1,8 @@ -package org.baeldung.jackson.serialization; +package com.baeldung.jackson.serialization; import java.io.IOException; -import org.baeldung.jackson.dtos.Item; +import com.baeldung.jackson.dtos.Item; import com.fasterxml.jackson.core.JsonGenerator; import com.fasterxml.jackson.core.JsonProcessingException; diff --git a/jackson/src/test/java/org/baeldung/jackson/serialization/ItemSerializerOnClass.java b/jackson/src/test/java/com/baeldung/jackson/serialization/ItemSerializerOnClass.java similarity index 88% rename from jackson/src/test/java/org/baeldung/jackson/serialization/ItemSerializerOnClass.java rename to jackson/src/test/java/com/baeldung/jackson/serialization/ItemSerializerOnClass.java index 44060cabb9..79b450d7f1 100644 --- a/jackson/src/test/java/org/baeldung/jackson/serialization/ItemSerializerOnClass.java +++ b/jackson/src/test/java/com/baeldung/jackson/serialization/ItemSerializerOnClass.java @@ -1,8 +1,8 @@ -package org.baeldung.jackson.serialization; +package com.baeldung.jackson.serialization; import java.io.IOException; -import org.baeldung.jackson.dtos.ItemWithSerializer; +import com.baeldung.jackson.dtos.ItemWithSerializer; import com.fasterxml.jackson.core.JsonGenerator; import com.fasterxml.jackson.core.JsonProcessingException; diff --git a/jackson/src/test/java/org/baeldung/jackson/serialization/MyDtoNullKeySerializer.java b/jackson/src/test/java/com/baeldung/jackson/serialization/MyDtoNullKeySerializer.java similarity index 89% rename from jackson/src/test/java/org/baeldung/jackson/serialization/MyDtoNullKeySerializer.java rename to jackson/src/test/java/com/baeldung/jackson/serialization/MyDtoNullKeySerializer.java index 8219abaddf..e915378498 100644 --- a/jackson/src/test/java/org/baeldung/jackson/serialization/MyDtoNullKeySerializer.java +++ b/jackson/src/test/java/com/baeldung/jackson/serialization/MyDtoNullKeySerializer.java @@ -1,4 +1,4 @@ -package org.baeldung.jackson.serialization; +package com.baeldung.jackson.serialization; import java.io.IOException; diff --git a/jackson/src/test/java/org/baeldung/jackson/test/JacksonAnnotationTest.java b/jackson/src/test/java/com/baeldung/jackson/test/JacksonAnnotationTest.java similarity index 90% rename from jackson/src/test/java/org/baeldung/jackson/test/JacksonAnnotationTest.java rename to jackson/src/test/java/com/baeldung/jackson/test/JacksonAnnotationTest.java index c188e9bce1..74fbd021a0 100644 --- a/jackson/src/test/java/org/baeldung/jackson/test/JacksonAnnotationTest.java +++ b/jackson/src/test/java/com/baeldung/jackson/test/JacksonAnnotationTest.java @@ -1,4 +1,4 @@ -package org.baeldung.jackson.test; +package com.baeldung.jackson.test; import static org.hamcrest.Matchers.containsString; import static org.hamcrest.Matchers.is; @@ -12,31 +12,32 @@ import java.text.SimpleDateFormat; import java.util.Date; import java.util.TimeZone; -import org.baeldung.jackson.annotation.BeanWithCreator; -import org.baeldung.jackson.annotation.BeanWithCustomAnnotation; -import org.baeldung.jackson.annotation.BeanWithFilter; -import org.baeldung.jackson.annotation.BeanWithGetter; -import org.baeldung.jackson.annotation.BeanWithIgnore; -import org.baeldung.jackson.annotation.BeanWithInject; -import org.baeldung.jackson.annotation.ExtendableBean; -import org.baeldung.jackson.annotation.MyBean; -import org.baeldung.jackson.annotation.PrivateBean; -import org.baeldung.jackson.annotation.RawBean; -import org.baeldung.jackson.annotation.UnwrappedUser; -import org.baeldung.jackson.annotation.UserWithIgnoreType; -import org.baeldung.jackson.annotation.Zoo; -import org.baeldung.jackson.bidirection.ItemWithIdentity; -import org.baeldung.jackson.bidirection.ItemWithRef; -import org.baeldung.jackson.bidirection.UserWithIdentity; -import org.baeldung.jackson.bidirection.UserWithRef; -import org.baeldung.jackson.date.EventWithFormat; -import org.baeldung.jackson.date.EventWithSerializer; -import org.baeldung.jackson.dtos.MyMixInForString; -import org.baeldung.jackson.dtos.User; -import org.baeldung.jackson.dtos.withEnum.TypeEnumWithValue; -import org.baeldung.jackson.exception.UserWithRoot; -import org.baeldung.jackson.jsonview.Item; -import org.baeldung.jackson.jsonview.Views; +import com.baeldung.jackson.bidirection.ItemWithIdentity; +import com.baeldung.jackson.bidirection.ItemWithRef; +import com.baeldung.jackson.bidirection.UserWithRef; +import com.baeldung.jackson.dtos.User; +import com.baeldung.jackson.dtos.withEnum.TypeEnumWithValue; +import com.baeldung.jackson.annotation.BeanWithCreator; +import com.baeldung.jackson.annotation.BeanWithCustomAnnotation; +import com.baeldung.jackson.annotation.BeanWithFilter; +import com.baeldung.jackson.annotation.BeanWithGetter; +import com.baeldung.jackson.annotation.BeanWithIgnore; +import com.baeldung.jackson.annotation.BeanWithInject; +import com.baeldung.jackson.annotation.ExtendableBean; +import com.baeldung.jackson.annotation.MyBean; +import com.baeldung.jackson.annotation.PrivateBean; +import com.baeldung.jackson.annotation.RawBean; +import com.baeldung.jackson.annotation.UnwrappedUser; +import com.baeldung.jackson.annotation.UserWithIgnoreType; +import com.baeldung.jackson.annotation.Zoo; +import com.baeldung.jackson.bidirection.UserWithIdentity; +import com.baeldung.jackson.date.EventWithFormat; +import com.baeldung.jackson.date.EventWithSerializer; +import com.baeldung.jackson.dtos.MyMixInForString; +import com.baeldung.jackson.exception.UserWithRoot; +import com.baeldung.jackson.jsonview.Item; +import com.baeldung.jackson.jsonview.Views; +import org.junit.Ignore; import org.junit.Test; import com.fasterxml.jackson.core.JsonParseException; @@ -337,6 +338,7 @@ public class JacksonAnnotationTest { assertThat(result, not(containsString("dateCreated"))); } + @Ignore("Jackson 2.7.1-1 seems to have changed the API regarding mixins") @Test public void whenSerializingUsingMixInAnnotation_thenCorrect() throws JsonProcessingException { final User user = new User(1, "John"); @@ -345,7 +347,7 @@ public class JacksonAnnotationTest { assertThat(result, containsString("John")); final ObjectMapper mapper = new ObjectMapper(); - mapper.addMixInAnnotations(String.class, MyMixInForString.class); + mapper.addMixIn(String.class, MyMixInForString.class); result = mapper.writeValueAsString(user); assertThat(result, not(containsString("John"))); diff --git a/jackson/src/test/java/org/baeldung/jackson/test/JacksonBidirectionRelationTest.java b/jackson/src/test/java/com/baeldung/jackson/test/JacksonBidirectionRelationTest.java similarity index 87% rename from jackson/src/test/java/org/baeldung/jackson/test/JacksonBidirectionRelationTest.java rename to jackson/src/test/java/com/baeldung/jackson/test/JacksonBidirectionRelationTest.java index f7f687da96..971b40406a 100644 --- a/jackson/src/test/java/org/baeldung/jackson/test/JacksonBidirectionRelationTest.java +++ b/jackson/src/test/java/com/baeldung/jackson/test/JacksonBidirectionRelationTest.java @@ -1,4 +1,4 @@ -package org.baeldung.jackson.test; +package com.baeldung.jackson.test; import static org.hamcrest.Matchers.containsString; import static org.hamcrest.Matchers.not; @@ -7,19 +7,19 @@ import static org.junit.Assert.assertThat; import java.io.IOException; -import org.baeldung.jackson.bidirection.Item; -import org.baeldung.jackson.bidirection.ItemWithIdentity; -import org.baeldung.jackson.bidirection.ItemWithIgnore; -import org.baeldung.jackson.bidirection.ItemWithRef; -import org.baeldung.jackson.bidirection.ItemWithSerializer; -import org.baeldung.jackson.bidirection.ItemWithView; -import org.baeldung.jackson.bidirection.User; -import org.baeldung.jackson.bidirection.UserWithIdentity; -import org.baeldung.jackson.bidirection.UserWithIgnore; -import org.baeldung.jackson.bidirection.UserWithRef; -import org.baeldung.jackson.bidirection.UserWithSerializer; -import org.baeldung.jackson.bidirection.UserWithView; -import org.baeldung.jackson.jsonview.Views; +import com.baeldung.jackson.bidirection.Item; +import com.baeldung.jackson.bidirection.ItemWithIdentity; +import com.baeldung.jackson.bidirection.ItemWithIgnore; +import com.baeldung.jackson.bidirection.ItemWithRef; +import com.baeldung.jackson.bidirection.ItemWithSerializer; +import com.baeldung.jackson.bidirection.ItemWithView; +import com.baeldung.jackson.bidirection.User; +import com.baeldung.jackson.bidirection.UserWithIdentity; +import com.baeldung.jackson.bidirection.UserWithIgnore; +import com.baeldung.jackson.bidirection.UserWithRef; +import com.baeldung.jackson.bidirection.UserWithSerializer; +import com.baeldung.jackson.bidirection.UserWithView; +import com.baeldung.jackson.jsonview.Views; import org.junit.Test; import com.fasterxml.jackson.core.JsonProcessingException; diff --git a/jackson/src/test/java/org/baeldung/jackson/test/JacksonCollectionDeserializationUnitTest.java b/jackson/src/test/java/com/baeldung/jackson/test/JacksonCollectionDeserializationUnitTest.java similarity index 97% rename from jackson/src/test/java/org/baeldung/jackson/test/JacksonCollectionDeserializationUnitTest.java rename to jackson/src/test/java/com/baeldung/jackson/test/JacksonCollectionDeserializationUnitTest.java index c3d8153546..cd166386e6 100644 --- a/jackson/src/test/java/org/baeldung/jackson/test/JacksonCollectionDeserializationUnitTest.java +++ b/jackson/src/test/java/com/baeldung/jackson/test/JacksonCollectionDeserializationUnitTest.java @@ -1,4 +1,4 @@ -package org.baeldung.jackson.test; +package com.baeldung.jackson.test; import static org.hamcrest.Matchers.instanceOf; import static org.junit.Assert.assertThat; @@ -7,7 +7,7 @@ import java.io.IOException; import java.util.LinkedHashMap; import java.util.List; -import org.baeldung.jackson.dtos.MyDto; +import com.baeldung.jackson.dtos.MyDto; import org.junit.Test; import com.fasterxml.jackson.core.JsonParseException; diff --git a/jackson/src/test/java/org/baeldung/jackson/test/JacksonDateTest.java b/jackson/src/test/java/com/baeldung/jackson/test/JacksonDateTest.java similarity index 95% rename from jackson/src/test/java/org/baeldung/jackson/test/JacksonDateTest.java rename to jackson/src/test/java/com/baeldung/jackson/test/JacksonDateTest.java index fc7f7730b8..50ec50b668 100644 --- a/jackson/src/test/java/org/baeldung/jackson/test/JacksonDateTest.java +++ b/jackson/src/test/java/com/baeldung/jackson/test/JacksonDateTest.java @@ -1,4 +1,4 @@ -package org.baeldung.jackson.test; +package com.baeldung.jackson.test; import static org.hamcrest.Matchers.containsString; import static org.junit.Assert.assertEquals; @@ -11,11 +11,11 @@ import java.time.LocalDateTime; import java.util.Date; import java.util.TimeZone; -import org.baeldung.jackson.date.Event; -import org.baeldung.jackson.date.EventWithFormat; -import org.baeldung.jackson.date.EventWithJodaTime; -import org.baeldung.jackson.date.EventWithLocalDateTime; -import org.baeldung.jackson.date.EventWithSerializer; +import com.baeldung.jackson.date.EventWithLocalDateTime; +import com.baeldung.jackson.date.Event; +import com.baeldung.jackson.date.EventWithFormat; +import com.baeldung.jackson.date.EventWithJodaTime; +import com.baeldung.jackson.date.EventWithSerializer; import org.joda.time.DateTime; import org.joda.time.DateTimeZone; import org.junit.Test; diff --git a/jackson/src/test/java/org/baeldung/jackson/test/JacksonDeserializationUnitTest.java b/jackson/src/test/java/com/baeldung/jackson/test/JacksonDeserializationUnitTest.java similarity index 96% rename from jackson/src/test/java/org/baeldung/jackson/test/JacksonDeserializationUnitTest.java rename to jackson/src/test/java/com/baeldung/jackson/test/JacksonDeserializationUnitTest.java index 2ecca664a4..45d957b90b 100644 --- a/jackson/src/test/java/org/baeldung/jackson/test/JacksonDeserializationUnitTest.java +++ b/jackson/src/test/java/com/baeldung/jackson/test/JacksonDeserializationUnitTest.java @@ -1,4 +1,4 @@ -package org.baeldung.jackson.test; +package com.baeldung.jackson.test; import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.notNullValue; @@ -7,11 +7,11 @@ import static org.junit.Assert.assertThat; import java.io.IOException; -import org.baeldung.jackson.deserialization.ItemDeserializer; -import org.baeldung.jackson.dtos.Item; -import org.baeldung.jackson.dtos.ItemWithSerializer; -import org.baeldung.jackson.dtos.MyDto; -import org.baeldung.jackson.dtos.ignore.MyDtoIgnoreUnknown; +import com.baeldung.jackson.deserialization.ItemDeserializer; +import com.baeldung.jackson.dtos.Item; +import com.baeldung.jackson.dtos.ItemWithSerializer; +import com.baeldung.jackson.dtos.MyDto; +import com.baeldung.jackson.dtos.ignore.MyDtoIgnoreUnknown; import org.junit.Test; import com.fasterxml.jackson.core.JsonFactory; diff --git a/jackson/src/test/java/org/baeldung/jackson/test/JacksonDynamicIgnoreTest.java b/jackson/src/test/java/com/baeldung/jackson/test/JacksonDynamicIgnoreTest.java similarity index 93% rename from jackson/src/test/java/org/baeldung/jackson/test/JacksonDynamicIgnoreTest.java rename to jackson/src/test/java/com/baeldung/jackson/test/JacksonDynamicIgnoreTest.java index d98f948dec..16a55f442a 100644 --- a/jackson/src/test/java/org/baeldung/jackson/test/JacksonDynamicIgnoreTest.java +++ b/jackson/src/test/java/com/baeldung/jackson/test/JacksonDynamicIgnoreTest.java @@ -1,14 +1,14 @@ -package org.baeldung.jackson.test; +package com.baeldung.jackson.test; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertTrue; import java.util.Arrays; -import org.baeldung.jackson.dynamicIgnore.Address; -import org.baeldung.jackson.dynamicIgnore.Hidable; -import org.baeldung.jackson.dynamicIgnore.HidableSerializer; -import org.baeldung.jackson.dynamicIgnore.Person; +import com.baeldung.jackson.dynamicIgnore.Address; +import com.baeldung.jackson.dynamicIgnore.HidableSerializer; +import com.baeldung.jackson.dynamicIgnore.Person; +import com.baeldung.jackson.dynamicIgnore.Hidable; import org.junit.Before; import org.junit.Test; diff --git a/jackson/src/test/java/org/baeldung/jackson/test/JacksonExceptionsTest.java b/jackson/src/test/java/com/baeldung/jackson/test/JacksonExceptionsTest.java similarity index 86% rename from jackson/src/test/java/org/baeldung/jackson/test/JacksonExceptionsTest.java rename to jackson/src/test/java/com/baeldung/jackson/test/JacksonExceptionsTest.java index aab7f9409d..90317848ce 100644 --- a/jackson/src/test/java/org/baeldung/jackson/test/JacksonExceptionsTest.java +++ b/jackson/src/test/java/com/baeldung/jackson/test/JacksonExceptionsTest.java @@ -1,4 +1,4 @@ -package org.baeldung.jackson.test; +package com.baeldung.jackson.test; import static org.hamcrest.Matchers.containsString; import static org.junit.Assert.assertEquals; @@ -7,11 +7,7 @@ import static org.junit.Assert.assertThat; import java.io.IOException; import java.util.List; -import org.baeldung.jackson.dtos.User; -import org.baeldung.jackson.exception.UserWithPrivateFields; -import org.baeldung.jackson.exception.UserWithRoot; -import org.baeldung.jackson.exception.Zoo; -import org.baeldung.jackson.exception.ZooConfigured; +import com.baeldung.jackson.exception.*; import org.junit.Test; import com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility; @@ -71,7 +67,7 @@ public class JacksonExceptionsTest { final String json = "{\"id\":1,\"name\":\"John\"}"; final ObjectMapper mapper = new ObjectMapper(); - mapper.reader().withType(org.baeldung.jackson.exception.User.class).readValue(json); + mapper.reader().withType(User.class).readValue(json); } @Test @@ -79,7 +75,7 @@ public class JacksonExceptionsTest { final String json = "{\"id\":1,\"name\":\"John\"}"; final ObjectMapper mapper = new ObjectMapper(); - final User user = mapper.reader().withType(User.class).readValue(json); + final com.baeldung.jackson.dtos.User user = mapper.reader().withType(com.baeldung.jackson.dtos.User.class).readValue(json); assertEquals("John", user.name); } @@ -91,7 +87,7 @@ public class JacksonExceptionsTest { final ObjectMapper mapper = new ObjectMapper(); mapper.enable(DeserializationFeature.UNWRAP_ROOT_VALUE); - mapper.reader().withType(User.class).readValue(json); + mapper.reader().withType(com.baeldung.jackson.dtos.User.class).readValue(json); } @Test @@ -111,7 +107,7 @@ public class JacksonExceptionsTest { final String json = "[{\"id\":1,\"name\":\"John\"},{\"id\":2,\"name\":\"Adam\"}]"; final ObjectMapper mapper = new ObjectMapper(); - mapper.reader().withType(User.class).readValue(json); + mapper.reader().withType(com.baeldung.jackson.dtos.User.class).readValue(json); } @Test @@ -119,7 +115,7 @@ public class JacksonExceptionsTest { final String json = "[{\"id\":1,\"name\":\"John\"},{\"id\":2,\"name\":\"Adam\"}]"; final ObjectMapper mapper = new ObjectMapper(); - final List users = mapper.reader().withType(new TypeReference>() { + final List users = mapper.reader().withType(new TypeReference>() { }).readValue(json); assertEquals(2, users.size()); @@ -131,7 +127,7 @@ public class JacksonExceptionsTest { final String json = "{\"id\":1,\"name\":\"John\", \"checked\":true}"; final ObjectMapper mapper = new ObjectMapper(); - mapper.reader().withType(User.class).readValue(json); + mapper.reader().withType(com.baeldung.jackson.dtos.User.class).readValue(json); } @Test @@ -141,7 +137,7 @@ public class JacksonExceptionsTest { final ObjectMapper mapper = new ObjectMapper(); mapper.disable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES); - final User user = mapper.reader().withType(User.class).readValue(json); + final com.baeldung.jackson.dtos.User user = mapper.reader().withType(com.baeldung.jackson.dtos.User.class).readValue(json); assertEquals("John", user.name); } @@ -151,7 +147,7 @@ public class JacksonExceptionsTest { final String json = "{'id':1,'name':'John'}"; final ObjectMapper mapper = new ObjectMapper(); - mapper.reader().withType(User.class).readValue(json); + mapper.reader().withType(com.baeldung.jackson.dtos.User.class).readValue(json); } @Test @@ -162,7 +158,7 @@ public class JacksonExceptionsTest { factory.enable(JsonParser.Feature.ALLOW_SINGLE_QUOTES); final ObjectMapper mapper = new ObjectMapper(factory); - final User user = mapper.reader().withType(User.class).readValue(json); + final com.baeldung.jackson.dtos.User user = mapper.reader().withType(com.baeldung.jackson.dtos.User.class).readValue(json); assertEquals("John", user.name); } diff --git a/jackson/src/test/java/org/baeldung/jackson/test/JacksonFieldUnitTest.java b/jackson/src/test/java/com/baeldung/jackson/test/JacksonFieldUnitTest.java similarity index 95% rename from jackson/src/test/java/org/baeldung/jackson/test/JacksonFieldUnitTest.java rename to jackson/src/test/java/com/baeldung/jackson/test/JacksonFieldUnitTest.java index 53933215f5..ccc5905e88 100644 --- a/jackson/src/test/java/org/baeldung/jackson/test/JacksonFieldUnitTest.java +++ b/jackson/src/test/java/com/baeldung/jackson/test/JacksonFieldUnitTest.java @@ -1,4 +1,4 @@ -package org.baeldung.jackson.test; +package com.baeldung.jackson.test; import static org.hamcrest.Matchers.containsString; import static org.hamcrest.Matchers.equalTo; @@ -8,9 +8,9 @@ import static org.junit.Assert.assertThat; import java.io.IOException; -import org.baeldung.jackson.field.MyDtoAccessLevel; -import org.baeldung.jackson.field.MyDtoWithSetter; -import org.baeldung.jackson.field.MyDtoWithGetter; +import com.baeldung.jackson.field.MyDtoAccessLevel; +import com.baeldung.jackson.field.MyDtoWithSetter; +import com.baeldung.jackson.field.MyDtoWithGetter; import org.junit.Test; import com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility; diff --git a/jackson/src/test/java/org/baeldung/jackson/test/JacksonJsonViewTest.java b/jackson/src/test/java/com/baeldung/jackson/test/JacksonJsonViewTest.java similarity index 92% rename from jackson/src/test/java/org/baeldung/jackson/test/JacksonJsonViewTest.java rename to jackson/src/test/java/com/baeldung/jackson/test/JacksonJsonViewTest.java index 276db9261c..61fa2919ac 100644 --- a/jackson/src/test/java/org/baeldung/jackson/test/JacksonJsonViewTest.java +++ b/jackson/src/test/java/com/baeldung/jackson/test/JacksonJsonViewTest.java @@ -1,4 +1,4 @@ -package org.baeldung.jackson.test; +package com.baeldung.jackson.test; import static org.hamcrest.Matchers.containsString; import static org.hamcrest.Matchers.not; @@ -7,10 +7,10 @@ import static org.junit.Assert.assertThat; import java.io.IOException; -import org.baeldung.jackson.jsonview.Item; -import org.baeldung.jackson.jsonview.MyBeanSerializerModifier; -import org.baeldung.jackson.jsonview.User; -import org.baeldung.jackson.jsonview.Views; +import com.baeldung.jackson.jsonview.Item; +import com.baeldung.jackson.jsonview.User; +import com.baeldung.jackson.jsonview.MyBeanSerializerModifier; +import com.baeldung.jackson.jsonview.Views; import org.junit.Test; import com.fasterxml.jackson.core.JsonProcessingException; diff --git a/jackson/src/test/java/org/baeldung/jackson/test/JacksonSerializationEnumsUnitTest.java b/jackson/src/test/java/com/baeldung/jackson/test/JacksonSerializationEnumsUnitTest.java similarity index 87% rename from jackson/src/test/java/org/baeldung/jackson/test/JacksonSerializationEnumsUnitTest.java rename to jackson/src/test/java/com/baeldung/jackson/test/JacksonSerializationEnumsUnitTest.java index d64834078a..78c6316aa6 100644 --- a/jackson/src/test/java/org/baeldung/jackson/test/JacksonSerializationEnumsUnitTest.java +++ b/jackson/src/test/java/com/baeldung/jackson/test/JacksonSerializationEnumsUnitTest.java @@ -1,4 +1,4 @@ -package org.baeldung.jackson.test; +package com.baeldung.jackson.test; import static org.hamcrest.Matchers.containsString; import static org.hamcrest.Matchers.is; @@ -6,12 +6,12 @@ import static org.junit.Assert.assertThat; import java.io.IOException; -import org.baeldung.jackson.dtos.withEnum.MyDtoWithEnum; -import org.baeldung.jackson.dtos.withEnum.MyDtoWithEnumCustom; -import org.baeldung.jackson.dtos.withEnum.TypeEnum; -import org.baeldung.jackson.dtos.withEnum.TypeEnumSimple; -import org.baeldung.jackson.dtos.withEnum.TypeEnumWithCustomSerializer; -import org.baeldung.jackson.dtos.withEnum.TypeEnumWithValue; +import com.baeldung.jackson.dtos.withEnum.MyDtoWithEnum; +import com.baeldung.jackson.dtos.withEnum.TypeEnum; +import com.baeldung.jackson.dtos.withEnum.TypeEnumSimple; +import com.baeldung.jackson.dtos.withEnum.TypeEnumWithValue; +import com.baeldung.jackson.dtos.withEnum.MyDtoWithEnumCustom; +import com.baeldung.jackson.dtos.withEnum.TypeEnumWithCustomSerializer; import org.junit.Test; import com.fasterxml.jackson.core.JsonParseException; diff --git a/jackson/src/test/java/org/baeldung/jackson/test/JacksonSerializationIgnoreUnitTest.java b/jackson/src/test/java/com/baeldung/jackson/test/JacksonSerializationIgnoreUnitTest.java similarity index 94% rename from jackson/src/test/java/org/baeldung/jackson/test/JacksonSerializationIgnoreUnitTest.java rename to jackson/src/test/java/com/baeldung/jackson/test/JacksonSerializationIgnoreUnitTest.java index 64614fb854..4c01ec9333 100644 --- a/jackson/src/test/java/org/baeldung/jackson/test/JacksonSerializationIgnoreUnitTest.java +++ b/jackson/src/test/java/com/baeldung/jackson/test/JacksonSerializationIgnoreUnitTest.java @@ -1,4 +1,4 @@ -package org.baeldung.jackson.test; +package com.baeldung.jackson.test; import static org.hamcrest.Matchers.containsString; import static org.hamcrest.Matchers.not; @@ -8,14 +8,15 @@ import java.io.IOException; import java.util.HashMap; import java.util.Map; -import org.baeldung.jackson.dtos.MyDto; -import org.baeldung.jackson.dtos.MyDtoIncludeNonDefault; -import org.baeldung.jackson.dtos.MyDtoWithFilter; -import org.baeldung.jackson.dtos.MyMixInForString; -import org.baeldung.jackson.dtos.ignore.MyDtoIgnoreField; -import org.baeldung.jackson.dtos.ignore.MyDtoIgnoreFieldByName; -import org.baeldung.jackson.dtos.ignore.MyDtoIgnoreNull; -import org.baeldung.jackson.serialization.MyDtoNullKeySerializer; +import com.baeldung.jackson.dtos.MyDtoIncludeNonDefault; +import com.baeldung.jackson.dtos.MyDtoWithFilter; +import com.baeldung.jackson.dtos.ignore.MyDtoIgnoreNull; +import com.baeldung.jackson.dtos.MyDto; +import com.baeldung.jackson.dtos.MyMixInForString; +import com.baeldung.jackson.dtos.ignore.MyDtoIgnoreField; +import com.baeldung.jackson.dtos.ignore.MyDtoIgnoreFieldByName; +import com.baeldung.jackson.serialization.MyDtoNullKeySerializer; +import org.junit.Ignore; import org.junit.Test; import com.fasterxml.jackson.annotation.JsonInclude.Include; @@ -84,10 +85,11 @@ public class JacksonSerializationIgnoreUnitTest { System.out.println(dtoAsString); } + @Ignore("Jackson 2.7.1-1 seems to have changed the API for this case") @Test public final void givenFieldTypeIsIgnored_whenDtoIsSerialized_thenCorrect() throws JsonParseException, IOException { final ObjectMapper mapper = new ObjectMapper(); - mapper.addMixInAnnotations(String.class, MyMixInForString.class); + mapper.addMixIn(String.class, MyMixInForString.class); final MyDto dtoObject = new MyDto(); dtoObject.setBooleanValue(true); diff --git a/jackson/src/test/java/org/baeldung/jackson/test/JacksonSerializationUnitTest.java b/jackson/src/test/java/com/baeldung/jackson/test/JacksonSerializationUnitTest.java similarity index 92% rename from jackson/src/test/java/org/baeldung/jackson/test/JacksonSerializationUnitTest.java rename to jackson/src/test/java/com/baeldung/jackson/test/JacksonSerializationUnitTest.java index 4a34f168c7..563dda9eb6 100644 --- a/jackson/src/test/java/org/baeldung/jackson/test/JacksonSerializationUnitTest.java +++ b/jackson/src/test/java/com/baeldung/jackson/test/JacksonSerializationUnitTest.java @@ -1,4 +1,4 @@ -package org.baeldung.jackson.test; +package com.baeldung.jackson.test; import static org.hamcrest.Matchers.containsString; import static org.hamcrest.Matchers.not; @@ -8,14 +8,14 @@ import static org.junit.Assert.assertThat; import java.io.IOException; import java.util.List; -import org.baeldung.jackson.dtos.Item; -import org.baeldung.jackson.dtos.ItemWithSerializer; -import org.baeldung.jackson.dtos.MyDto; -import org.baeldung.jackson.dtos.MyDtoFieldNameChanged; -import org.baeldung.jackson.dtos.MyDtoNoAccessors; -import org.baeldung.jackson.dtos.MyDtoNoAccessorsAndFieldVisibility; -import org.baeldung.jackson.dtos.User; -import org.baeldung.jackson.serialization.ItemSerializer; +import com.baeldung.jackson.dtos.MyDtoFieldNameChanged; +import com.baeldung.jackson.dtos.User; +import com.baeldung.jackson.dtos.Item; +import com.baeldung.jackson.dtos.ItemWithSerializer; +import com.baeldung.jackson.dtos.MyDto; +import com.baeldung.jackson.dtos.MyDtoNoAccessors; +import com.baeldung.jackson.dtos.MyDtoNoAccessorsAndFieldVisibility; +import com.baeldung.jackson.serialization.ItemSerializer; import org.junit.Test; import com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility; diff --git a/jackson/src/test/java/org/baeldung/jackson/test/UnitTestSuite.java b/jackson/src/test/java/com/baeldung/jackson/test/UnitTestSuite.java similarity index 78% rename from jackson/src/test/java/org/baeldung/jackson/test/UnitTestSuite.java rename to jackson/src/test/java/com/baeldung/jackson/test/UnitTestSuite.java index 3bc5715e2a..d47b6e217a 100644 --- a/jackson/src/test/java/org/baeldung/jackson/test/UnitTestSuite.java +++ b/jackson/src/test/java/com/baeldung/jackson/test/UnitTestSuite.java @@ -1,7 +1,7 @@ -package org.baeldung.jackson.test; +package com.baeldung.jackson.test; -import org.baeldung.jackson.sandbox.JacksonPrettyPrintUnitTest; -import org.baeldung.jackson.sandbox.SandboxTest; +import com.baeldung.jackson.sandbox.JacksonPrettyPrintUnitTest; +import com.baeldung.jackson.sandbox.SandboxTest; import org.junit.runner.RunWith; import org.junit.runners.Suite; diff --git a/jackson/src/test/java/org/baeldung/jackson/try1/IEntity.java b/jackson/src/test/java/com/baeldung/jackson/try1/IEntity.java similarity index 59% rename from jackson/src/test/java/org/baeldung/jackson/try1/IEntity.java rename to jackson/src/test/java/com/baeldung/jackson/try1/IEntity.java index ce4c83729a..27e0a71c9d 100644 --- a/jackson/src/test/java/org/baeldung/jackson/try1/IEntity.java +++ b/jackson/src/test/java/com/baeldung/jackson/try1/IEntity.java @@ -1,4 +1,4 @@ -package org.baeldung.jackson.try1; +package com.baeldung.jackson.try1; public interface IEntity { public int getId(); diff --git a/jackson/src/test/java/org/baeldung/jackson/try1/JacksonDeserializationUnitTest.java b/jackson/src/test/java/com/baeldung/jackson/try1/JacksonDeserializationUnitTest.java similarity index 89% rename from jackson/src/test/java/org/baeldung/jackson/try1/JacksonDeserializationUnitTest.java rename to jackson/src/test/java/com/baeldung/jackson/try1/JacksonDeserializationUnitTest.java index 673577cf6f..9fc195a8aa 100644 --- a/jackson/src/test/java/org/baeldung/jackson/try1/JacksonDeserializationUnitTest.java +++ b/jackson/src/test/java/com/baeldung/jackson/try1/JacksonDeserializationUnitTest.java @@ -1,11 +1,11 @@ -package org.baeldung.jackson.try1; +package com.baeldung.jackson.try1; import static org.hamcrest.Matchers.notNullValue; import static org.junit.Assert.assertThat; import java.io.IOException; -import org.baeldung.jackson.dtos.ItemWithSerializer; +import com.baeldung.jackson.dtos.ItemWithSerializer; import org.junit.Test; import com.fasterxml.jackson.core.JsonParseException; diff --git a/jackson/src/test/java/org/baeldung/jackson/try1/RestLoaderRequest.java b/jackson/src/test/java/com/baeldung/jackson/try1/RestLoaderRequest.java similarity index 96% rename from jackson/src/test/java/org/baeldung/jackson/try1/RestLoaderRequest.java rename to jackson/src/test/java/com/baeldung/jackson/try1/RestLoaderRequest.java index 171f4c1e14..7ef8864a63 100644 --- a/jackson/src/test/java/org/baeldung/jackson/try1/RestLoaderRequest.java +++ b/jackson/src/test/java/com/baeldung/jackson/try1/RestLoaderRequest.java @@ -1,4 +1,4 @@ -package org.baeldung.jackson.try1; +package com.baeldung.jackson.try1; import java.io.Serializable; diff --git a/jackson/src/test/java/org/baeldung/jackson/try1/RestLoaderRequestDeserializer.java b/jackson/src/test/java/com/baeldung/jackson/try1/RestLoaderRequestDeserializer.java similarity index 97% rename from jackson/src/test/java/org/baeldung/jackson/try1/RestLoaderRequestDeserializer.java rename to jackson/src/test/java/com/baeldung/jackson/try1/RestLoaderRequestDeserializer.java index 6110e8b0e0..849607586d 100644 --- a/jackson/src/test/java/org/baeldung/jackson/try1/RestLoaderRequestDeserializer.java +++ b/jackson/src/test/java/com/baeldung/jackson/try1/RestLoaderRequestDeserializer.java @@ -1,4 +1,4 @@ -package org.baeldung.jackson.try1; +package com.baeldung.jackson.try1; import java.io.IOException; diff --git a/javaxval/bin/pom.xml b/javaxval/bin/pom.xml index 592f3c3431..7606f0d072 100644 --- a/javaxval/bin/pom.xml +++ b/javaxval/bin/pom.xml @@ -1,7 +1,7 @@ 4.0.0 - org.baeldung + com.baeldung javaxval 0.1-SNAPSHOT diff --git a/javaxval/pom.xml b/javaxval/pom.xml index 592f3c3431..493119d92e 100644 --- a/javaxval/pom.xml +++ b/javaxval/pom.xml @@ -1,51 +1,47 @@ - - 4.0.0 - org.baeldung - javaxval - 0.1-SNAPSHOT + + 4.0.0 + com.baeldung + javaxval + 0.1-SNAPSHOT + - + + junit + junit + 4.12 + + + javax.validation + validation-api + 1.1.0.Final + - - junit - junit - 4.12 - + + org.hibernate + hibernate-validator + 5.2.1.Final + - - javax.validation - validation-api - 1.1.0.Final - + + org.hibernate + hibernate-validator-annotation-processor + 5.2.1.Final + - - org.hibernate - hibernate-validator - 5.2.1.Final - + + javax.el + javax.el-api + 2.2.4 + - - org.hibernate - hibernate-validator-annotation-processor - 5.2.1.Final - - - - javax.el - javax.el-api - 2.2.4 - - - - org.glassfish.web - javax.el - 2.2.4 - - - + + org.glassfish.web + javax.el + 2.2.4 + + \ No newline at end of file diff --git a/jooq-spring/.classpath b/jooq-spring/.classpath new file mode 100644 index 0000000000..e43402fa4f --- /dev/null +++ b/jooq-spring/.classpath @@ -0,0 +1,36 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/jooq-spring/.project b/jooq-spring/.project new file mode 100644 index 0000000000..3c3f3d602b --- /dev/null +++ b/jooq-spring/.project @@ -0,0 +1,23 @@ + + + jooq-spring + + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.m2e.core.maven2Builder + + + + + + org.eclipse.jdt.core.javanature + org.eclipse.m2e.core.maven2Nature + + diff --git a/jooq-spring/pom.xml b/jooq-spring/pom.xml new file mode 100644 index 0000000000..76198c4993 --- /dev/null +++ b/jooq-spring/pom.xml @@ -0,0 +1,153 @@ + + 4.0.0 + com.baeldung + jooq-spring + 0.0.1-SNAPSHOT + + + 3.7.3 + 1.4.191 + 4.2.5.RELEASE + 1.7.18 + 1.1.3 + 4.12 + + + + + + org.jooq + jooq + ${org.jooq.version} + + + + + com.h2database + h2 + ${com.h2database.version} + + + + + org.springframework + spring-context + ${org.springframework.version} + + + org.springframework + spring-jdbc + ${org.springframework.version} + + + + + org.slf4j + slf4j-api + ${org.slf4j.version} + runtime + + + ch.qos.logback + logback-classic + ${ch.qos.logback.version} + runtime + + + + + junit + junit + ${junit.version} + test + + + org.springframework + spring-test + ${org.springframework.version} + test + + + + + + + org.codehaus.mojo + properties-maven-plugin + 1.0.0 + + + initialize + + read-project-properties + + + + src/main/resources/intro_config.properties + + + + + + + + org.codehaus.mojo + sql-maven-plugin + 1.5 + + + initialize + + execute + + + ${db.driver} + ${db.url} + ${db.username} + ${db.password} + + src/main/resources/intro_schema.sql + + + + + + + com.h2database + h2 + ${com.h2database.version} + + + + + + org.jooq + jooq-codegen-maven + ${org.jooq.version} + + + generate-sources + + generate + + + + ${db.driver} + ${db.url} + ${db.username} + ${db.password} + + + + com.baeldung.jooq.introduction.db + src/main/java + + + + + + + + + \ No newline at end of file diff --git a/jooq-spring/src/main/resources/intro_config.properties b/jooq-spring/src/main/resources/intro_config.properties new file mode 100644 index 0000000000..3275089585 --- /dev/null +++ b/jooq-spring/src/main/resources/intro_config.properties @@ -0,0 +1,8 @@ +#Database Configuration +db.driver=org.h2.Driver +db.url=jdbc:h2:~/jooq +db.username=sa +db.password= + +#SQL Dialect +jooq.sql.dialect=H2 \ No newline at end of file diff --git a/jooq-spring/src/main/resources/intro_schema.sql b/jooq-spring/src/main/resources/intro_schema.sql new file mode 100644 index 0000000000..0d4bd26235 --- /dev/null +++ b/jooq-spring/src/main/resources/intro_schema.sql @@ -0,0 +1,34 @@ +DROP TABLE IF EXISTS author_book, author, book; + +CREATE TABLE author ( + id INT NOT NULL PRIMARY KEY, + first_name VARCHAR(50), + last_name VARCHAR(50) NOT NULL +); + +CREATE TABLE book ( + id INT NOT NULL PRIMARY KEY, + title VARCHAR(100) NOT NULL +); + +CREATE TABLE author_book ( + author_id INT NOT NULL, + book_id INT NOT NULL, + + PRIMARY KEY (author_id, book_id), + CONSTRAINT fk_ab_author FOREIGN KEY (author_id) REFERENCES author (id) + ON UPDATE CASCADE ON DELETE CASCADE, + CONSTRAINT fk_ab_book FOREIGN KEY (book_id) REFERENCES book (id) +); + +INSERT INTO author VALUES + (1, 'Kathy', 'Sierra'), + (2, 'Bert', 'Bates'), + (3, 'Bryan', 'Basham'); + +INSERT INTO book VALUES + (1, 'Head First Java'), + (2, 'Head First Servlets and JSP'), + (3, 'OCA/OCP Java SE 7 Programmer'); + +INSERT INTO author_book VALUES (1, 1), (1, 3), (2, 1); \ No newline at end of file diff --git a/jooq-spring/src/test/java/com/baeldung/jooq/introduction/ExceptionTranslator.java b/jooq-spring/src/test/java/com/baeldung/jooq/introduction/ExceptionTranslator.java new file mode 100644 index 0000000000..7bee21f077 --- /dev/null +++ b/jooq-spring/src/test/java/com/baeldung/jooq/introduction/ExceptionTranslator.java @@ -0,0 +1,19 @@ +package com.baeldung.jooq.introduction; + +import org.jooq.ExecuteContext; +import org.jooq.SQLDialect; +import org.jooq.impl.DefaultExecuteListener; + +import org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator; +import org.springframework.jdbc.support.SQLExceptionTranslator; + +public class ExceptionTranslator extends DefaultExecuteListener { + private static final long serialVersionUID = 649359748808106775L; + + @Override + public void exception(ExecuteContext context) { + SQLDialect dialect = context.configuration().dialect(); + SQLExceptionTranslator translator = new SQLErrorCodeSQLExceptionTranslator(dialect.name()); + context.exception(translator.translate("Access database using jOOQ", context.sql(), context.sqlException())); + } +} \ No newline at end of file diff --git a/jooq-spring/src/test/java/com/baeldung/jooq/introduction/PersistenceContext.java b/jooq-spring/src/test/java/com/baeldung/jooq/introduction/PersistenceContext.java new file mode 100644 index 0000000000..ee34c00679 --- /dev/null +++ b/jooq-spring/src/test/java/com/baeldung/jooq/introduction/PersistenceContext.java @@ -0,0 +1,76 @@ +package com.baeldung.jooq.introduction; + +import javax.sql.DataSource; +import org.h2.jdbcx.JdbcDataSource; +import org.jooq.SQLDialect; +import org.jooq.impl.DataSourceConnectionProvider; +import org.jooq.impl.DefaultConfiguration; +import org.jooq.impl.DefaultDSLContext; +import org.jooq.impl.DefaultExecuteListenerProvider; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.ComponentScan; +import org.springframework.context.annotation.Configuration; +import org.springframework.context.annotation.PropertySource; +import org.springframework.core.env.Environment; +import org.springframework.jdbc.datasource.DataSourceTransactionManager; +import org.springframework.jdbc.datasource.TransactionAwareDataSourceProxy; +import org.springframework.transaction.annotation.EnableTransactionManagement; + +@Configuration +@ComponentScan({ "com.baeldung.jooq.introduction.db.public_.tables" }) +@EnableTransactionManagement +@PropertySource("classpath:intro_config.properties") +public class PersistenceContext { + @Autowired + private Environment environment; + + @Bean + public DataSource dataSource() { + JdbcDataSource dataSource = new JdbcDataSource(); + + dataSource.setUrl(environment.getRequiredProperty("db.url")); + dataSource.setUser(environment.getRequiredProperty("db.username")); + dataSource.setPassword(environment.getRequiredProperty("db.password")); + + return dataSource; + } + + @Bean + public TransactionAwareDataSourceProxy transactionAwareDataSource() { + return new TransactionAwareDataSourceProxy(dataSource()); + } + + @Bean + public DataSourceTransactionManager transactionManager() { + return new DataSourceTransactionManager(dataSource()); + } + + @Bean + public DataSourceConnectionProvider connectionProvider() { + return new DataSourceConnectionProvider(transactionAwareDataSource()); + } + + @Bean + public ExceptionTranslator exceptionTransformer() { + return new ExceptionTranslator(); + } + + @Bean + public DefaultDSLContext dsl() { + return new DefaultDSLContext(configuration()); + } + + @Bean + public DefaultConfiguration configuration() { + DefaultConfiguration jooqConfiguration = new DefaultConfiguration(); + jooqConfiguration.set(connectionProvider()); + jooqConfiguration.set(new DefaultExecuteListenerProvider(exceptionTransformer())); + + String sqlDialectName = environment.getRequiredProperty("jooq.sql.dialect"); + SQLDialect dialect = SQLDialect.valueOf(sqlDialectName); + jooqConfiguration.set(dialect); + + return jooqConfiguration; + } +} \ No newline at end of file diff --git a/jooq-spring/src/test/java/com/baeldung/jooq/introduction/QueryTest.java b/jooq-spring/src/test/java/com/baeldung/jooq/introduction/QueryTest.java new file mode 100644 index 0000000000..bc12dff5a0 --- /dev/null +++ b/jooq-spring/src/test/java/com/baeldung/jooq/introduction/QueryTest.java @@ -0,0 +1,85 @@ +package com.baeldung.jooq.introduction; + +import com.baeldung.jooq.introduction.db.public_.tables.Author; +import com.baeldung.jooq.introduction.db.public_.tables.AuthorBook; +import com.baeldung.jooq.introduction.db.public_.tables.Book; +import org.jooq.DSLContext; +import org.jooq.Record3; +import org.jooq.Result; +import org.jooq.impl.DSL; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.dao.DataAccessException; +import org.springframework.test.context.ContextConfiguration; +import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; +import org.springframework.transaction.annotation.Transactional; + +import static org.junit.Assert.assertEquals; + +@ContextConfiguration(classes = PersistenceContext.class) +@Transactional(transactionManager = "transactionManager") +@RunWith(SpringJUnit4ClassRunner.class) +public class QueryTest { + + @Autowired + private DSLContext dsl; + + Author author = Author.AUTHOR; + Book book = Book.BOOK; + AuthorBook authorBook = AuthorBook.AUTHOR_BOOK; + + @Test + public void givenValidData_whenInserting_thenSucceed() { + dsl.insertInto(author).set(author.ID, 4).set(author.FIRST_NAME, "Herbert").set(author.LAST_NAME, "Schildt").execute(); + dsl.insertInto(book).set(book.ID, 4).set(book.TITLE, "A Beginner's Guide").execute(); + dsl.insertInto(authorBook).set(authorBook.AUTHOR_ID, 4).set(authorBook.BOOK_ID, 4).execute(); + Result> result = dsl.select(author.ID, author.LAST_NAME, DSL.count()).from(author).join(authorBook).on(author.ID.equal(authorBook.AUTHOR_ID)).join(book).on(authorBook.BOOK_ID.equal(book.ID)) + .groupBy(author.LAST_NAME).fetch(); + + assertEquals(3, result.size()); + assertEquals("Sierra", result.getValue(0, author.LAST_NAME)); + assertEquals(Integer.valueOf(2), result.getValue(0, DSL.count())); + assertEquals("Schildt", result.getValue(2, author.LAST_NAME)); + assertEquals(Integer.valueOf(1), result.getValue(2, DSL.count())); + } + + @Test(expected = DataAccessException.class) + public void givenInvalidData_whenInserting_thenFail() { + dsl.insertInto(authorBook).set(authorBook.AUTHOR_ID, 4).set(authorBook.BOOK_ID, 5).execute(); + } + + @Test + public void givenValidData_whenUpdating_thenSucceed() { + dsl.update(author).set(author.LAST_NAME, "Baeldung").where(author.ID.equal(3)).execute(); + dsl.update(book).set(book.TITLE, "Building your REST API with Spring").where(book.ID.equal(3)).execute(); + dsl.insertInto(authorBook).set(authorBook.AUTHOR_ID, 3).set(authorBook.BOOK_ID, 3).execute(); + Result> result = dsl.select(author.ID, author.LAST_NAME, book.TITLE).from(author).join(authorBook).on(author.ID.equal(authorBook.AUTHOR_ID)).join(book).on(authorBook.BOOK_ID.equal(book.ID)).where(author.ID.equal(3)) + .fetch(); + + assertEquals(1, result.size()); + assertEquals(Integer.valueOf(3), result.getValue(0, author.ID)); + assertEquals("Baeldung", result.getValue(0, author.LAST_NAME)); + assertEquals("Building your REST API with Spring", result.getValue(0, book.TITLE)); + } + + @Test(expected = DataAccessException.class) + public void givenInvalidData_whenUpdating_thenFail() { + dsl.update(authorBook).set(authorBook.AUTHOR_ID, 4).set(authorBook.BOOK_ID, 5).execute(); + } + + @Test + public void givenValidData_whenDeleting_thenSucceed() { + dsl.delete(author).where(author.ID.lt(3)).execute(); + Result> result = dsl.select(author.ID, author.FIRST_NAME, author.LAST_NAME).from(author).fetch(); + + assertEquals(1, result.size()); + assertEquals("Bryan", result.getValue(0, author.FIRST_NAME)); + assertEquals("Basham", result.getValue(0, author.LAST_NAME)); + } + + @Test(expected = DataAccessException.class) + public void givenInvalidData_whenDeleting_thenFail() { + dsl.delete(book).where(book.ID.equal(1)).execute(); + } +} \ No newline at end of file diff --git a/sandbox/.classpath b/jpa-storedprocedure/.classpath similarity index 95% rename from sandbox/.classpath rename to jpa-storedprocedure/.classpath index 8ebf6d9c31..fae1a2b37d 100644 --- a/sandbox/.classpath +++ b/jpa-storedprocedure/.classpath @@ -6,31 +6,31 @@ - - - - - - + + + + + + + + + + + - - - - - diff --git a/sandbox/.project b/jpa-storedprocedure/.project similarity index 84% rename from sandbox/.project rename to jpa-storedprocedure/.project index f039cd270e..b5ac58ebd1 100644 --- a/sandbox/.project +++ b/jpa-storedprocedure/.project @@ -1,22 +1,17 @@ - sandbox + jpa-storedprocedure - - org.eclipse.jdt.core.javabuilder - - - org.eclipse.wst.common.project.facet.core.builder - org.eclipse.wst.validation.validationbuilder + org.eclipse.jdt.core.javabuilder @@ -25,10 +20,13 @@ + + org.eclipse.wst.validation.validationbuilder + + + - org.eclipse.jem.workbench.JavaEMFNature - org.eclipse.wst.common.modulecore.ModuleCoreNature org.eclipse.jdt.core.javanature org.eclipse.m2e.core.maven2Nature org.eclipse.wst.common.project.facet.core.nature diff --git a/jpa-storedprocedure/pom.xml b/jpa-storedprocedure/pom.xml new file mode 100644 index 0000000000..b2ebaa32e2 --- /dev/null +++ b/jpa-storedprocedure/pom.xml @@ -0,0 +1,80 @@ + + + 4.0.0 + + com.baeldung + jpa-storedprocedure + 1.0 + jar + + + 7.0 + 5.1.0.Final + 5.1.38 + + + + JpaStoredProcedure + + + org.apache.maven.plugins + maven-compiler-plugin + + 1.8 + 1.8 + + + + maven-assembly-plugin + + + + jar-with-dependencies + + + + + + + + + + + + javax + javaee-api + ${jee.version} + provided + + + + org.hibernate + hibernate-entitymanager + ${hibernate.version} + + + + + + mysql + mysql-connector-java + 5.1.38 + + + + + + junit + junit + 4.4 + + + + commons-io + commons-io + 2.4 + + + + + \ No newline at end of file diff --git a/jpa-storedprocedure/src/main/java/com/baeldung/jpa/model/Car.java b/jpa-storedprocedure/src/main/java/com/baeldung/jpa/model/Car.java new file mode 100644 index 0000000000..676d76307e --- /dev/null +++ b/jpa-storedprocedure/src/main/java/com/baeldung/jpa/model/Car.java @@ -0,0 +1,60 @@ +package com.baeldung.jpa.model; + +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.GeneratedValue; +import javax.persistence.GenerationType; +import javax.persistence.Id; +import javax.persistence.NamedStoredProcedureQueries; +import javax.persistence.NamedStoredProcedureQuery; +import javax.persistence.ParameterMode; +import javax.persistence.StoredProcedureParameter; +import javax.persistence.Table; + +@Entity +@Table(name = "CAR") +@NamedStoredProcedureQueries({ + @NamedStoredProcedureQuery(name = "findByYearProcedure", procedureName = "FIND_CAR_BY_YEAR", resultClasses = { Car.class }, parameters = { @StoredProcedureParameter(name = "p_year", type = Integer.class, mode = ParameterMode.IN) }) }) +public class Car { + + private long id; + private String model; + private Integer year; + + public Car(final String model, final Integer year) { + this.model = model; + this.year = year; + } + + public Car() { + } + + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + @Column(name = "ID", unique = true, nullable = false, scale = 0) + public long getId() { + return id; + } + + public void setId(final long id) { + this.id = id; + } + + @Column(name = "MODEL") + public String getModel() { + return model; + } + + public void setModel(final String model) { + this.model = model; + } + + @Column(name = "YEAR") + public Integer getYear() { + return year; + } + + public void setYear(final Integer year) { + this.year = year; + } +} diff --git a/jpa-storedprocedure/src/main/java/com/baeldung/jpa/model/QueryParameter.java b/jpa-storedprocedure/src/main/java/com/baeldung/jpa/model/QueryParameter.java new file mode 100644 index 0000000000..0a15213f62 --- /dev/null +++ b/jpa-storedprocedure/src/main/java/com/baeldung/jpa/model/QueryParameter.java @@ -0,0 +1,28 @@ +package com.baeldung.jpa.model; + +import java.util.HashMap; +import java.util.Map; + +public class QueryParameter { + + private Map parameters = null; + + private QueryParameter(final String name, final Object value) { + this.parameters = new HashMap<>(); + this.parameters.put(name, value); + } + + public static QueryParameter with(final String name, final Object value) { + return new QueryParameter(name, value); + } + + public QueryParameter and(final String name, final Object value) { + this.parameters.put(name, value); + return this; + } + + public Map parameters() { + return this.parameters; + } + +} \ No newline at end of file diff --git a/jpa-storedprocedure/src/main/resources/META-INF/persistence.xml b/jpa-storedprocedure/src/main/resources/META-INF/persistence.xml new file mode 100644 index 0000000000..4c443cb7cf --- /dev/null +++ b/jpa-storedprocedure/src/main/resources/META-INF/persistence.xml @@ -0,0 +1,20 @@ + + + + + org.hibernate.jpa.HibernatePersistenceProvider + com.baeldung.jpa.model.Car + + + + + + + + + + \ No newline at end of file diff --git a/jpa-storedprocedure/src/main/resources/config/database/FindCarByYearProcedureMySQL.sql b/jpa-storedprocedure/src/main/resources/config/database/FindCarByYearProcedureMySQL.sql new file mode 100644 index 0000000000..0ef84fb7eb --- /dev/null +++ b/jpa-storedprocedure/src/main/resources/config/database/FindCarByYearProcedureMySQL.sql @@ -0,0 +1,8 @@ +DELIMITER $$ +CREATE DEFINER=`root`@`localhost` PROCEDURE `FIND_CAR_BY_YEAR`(in p_year int) +begin +SELECT ID, MODEL, YEAR + FROM CAR + WHERE YEAR = p_year; +end$$ +DELIMITER ; diff --git a/jpa-storedprocedure/src/main/resources/config/database/create_table_mysql.sql b/jpa-storedprocedure/src/main/resources/config/database/create_table_mysql.sql new file mode 100644 index 0000000000..4a4feebdea --- /dev/null +++ b/jpa-storedprocedure/src/main/resources/config/database/create_table_mysql.sql @@ -0,0 +1,6 @@ +CREATE TABLE `car` ( + `ID` int(10) NOT NULL AUTO_INCREMENT, + `MODEL` varchar(50) NOT NULL, + `YEAR` int(4) NOT NULL, + PRIMARY KEY (`ID`) +) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8; \ No newline at end of file diff --git a/jpa-storedprocedure/src/main/resources/config/database/insert_cars.sql b/jpa-storedprocedure/src/main/resources/config/database/insert_cars.sql new file mode 100644 index 0000000000..89f69ac1ee --- /dev/null +++ b/jpa-storedprocedure/src/main/resources/config/database/insert_cars.sql @@ -0,0 +1,5 @@ +INSERT INTO CAR (ID, MODEL, YEAR) VALUES ('123456', 'Camaro', '2012'); +INSERT INTO CAR (ID, MODEL, YEAR) VALUES ('12112', 'Fiat Panda', '2000'); +INSERT INTO CAR (ID, MODEL, YEAR) VALUES ('111000', 'Fiat Punto', '2007'); +INSERT INTO CAR (ID, MODEL, YEAR) VALUES ('3382', 'Citroen C3', '2009'); +commit; \ No newline at end of file diff --git a/jpa-storedprocedure/src/test/java/com/baeldung/jpa/storedprocedure/StoredProcedureTest.java b/jpa-storedprocedure/src/test/java/com/baeldung/jpa/storedprocedure/StoredProcedureTest.java new file mode 100644 index 0000000000..69351d9683 --- /dev/null +++ b/jpa-storedprocedure/src/test/java/com/baeldung/jpa/storedprocedure/StoredProcedureTest.java @@ -0,0 +1,72 @@ +package com.baeldung.jpa.storedprocedure; + +import javax.persistence.EntityManager; +import javax.persistence.EntityManagerFactory; +import javax.persistence.EntityTransaction; +import javax.persistence.ParameterMode; +import javax.persistence.Persistence; +import javax.persistence.StoredProcedureQuery; + +import org.junit.AfterClass; +import org.junit.Assert; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +import com.baeldung.jpa.model.Car; + +public class StoredProcedureTest { + + private static EntityManagerFactory factory = null; + private static EntityManager entityManager = null; + + @BeforeClass + public static void init() { + factory = Persistence.createEntityManagerFactory("jpa-db"); + entityManager = factory.createEntityManager(); + } + + @Before + public void setup() { + } + + @Test + public void createCarTest() { + final EntityTransaction transaction = entityManager.getTransaction(); + try { + transaction.begin(); + final Car car = new Car("Fiat Marea", 2015); + entityManager.persist(car); + transaction.commit(); + } catch (final Exception e) { + System.out.println(e.getCause()); + if (transaction.isActive()) { + transaction.rollback(); + } + } + } + + @Test + public void findCarsByYearNamedProcedure() { + final StoredProcedureQuery findByYearProcedure = entityManager.createNamedStoredProcedureQuery("findByYearProcedure"); + final StoredProcedureQuery storedProcedure = findByYearProcedure.setParameter("p_year", 2015); + storedProcedure.getResultList().forEach(c -> Assert.assertEquals(new Integer(2015), ((Car) c).getYear())); + } + + @Test + public void findCarsByYearNoNamed() { + final StoredProcedureQuery storedProcedure = entityManager.createStoredProcedureQuery("FIND_CAR_BY_YEAR", Car.class).registerStoredProcedureParameter(1, Integer.class, ParameterMode.IN).setParameter(1, 2015); + storedProcedure.getResultList().forEach(c -> Assert.assertEquals(new Integer(2015), ((Car) c).getYear())); + } + + @AfterClass + public static void destroy() { + + if (entityManager != null) { + entityManager.close(); + } + if (factory != null) { + factory.close(); + } + } +} diff --git a/jpa-storedprocedure/src/test/resources/persistence.xml b/jpa-storedprocedure/src/test/resources/persistence.xml new file mode 100644 index 0000000000..d94221b54f --- /dev/null +++ b/jpa-storedprocedure/src/test/resources/persistence.xml @@ -0,0 +1,21 @@ + + + + + org.hibernate.jpa.HibernatePersistenceProvider + com.baeldung.jpa.model.Car + + + + + + + + + + + diff --git a/json-path/.classpath b/json-path/.classpath new file mode 100644 index 0000000000..2244ed1e21 --- /dev/null +++ b/json-path/.classpath @@ -0,0 +1,32 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/mockito-mocks-spring-beans/.gitignore b/json-path/.gitignore similarity index 100% rename from mockito-mocks-spring-beans/.gitignore rename to json-path/.gitignore diff --git a/spring-security-oauth/.project b/json-path/.project similarity index 64% rename from spring-security-oauth/.project rename to json-path/.project index fe6e295165..caa2c41711 100644 --- a/spring-security-oauth/.project +++ b/json-path/.project @@ -1,10 +1,15 @@ - spring-security-oauth + json-path + + org.eclipse.jdt.core.javabuilder + + + org.eclipse.m2e.core.maven2Builder @@ -12,6 +17,7 @@ + org.eclipse.jdt.core.javanature org.eclipse.m2e.core.maven2Nature diff --git a/json-path/pom.xml b/json-path/pom.xml new file mode 100644 index 0000000000..c03385cf1d --- /dev/null +++ b/json-path/pom.xml @@ -0,0 +1,65 @@ + + 4.0.0 + com.baeldung + json-path + 0.0.1-SNAPSHOT + json-path + + + + + com.jayway.jsonpath + json-path + ${json-path.version} + + + + + junit + junit + ${junit.version} + test + + + + + org.slf4j + slf4j-api + ${slf4j.version} + runtime + + + ch.qos.logback + logback-classic + ${logback.version} + runtime + + + + + + + org.apache.maven.plugins + maven-compiler-plugin + 3.5.1 + + 1.8 + 1.8 + + + + + + + + 2.1.0 + + + 4.12 + + + 1.7.14 + 1.1.3 + + \ No newline at end of file diff --git a/json-path/src/main/resources/intro_api.json b/json-path/src/main/resources/intro_api.json new file mode 100644 index 0000000000..8a252f2971 --- /dev/null +++ b/json-path/src/main/resources/intro_api.json @@ -0,0 +1,57 @@ +{ + "tool": + { + "jsonpath": + { + "creator": + { + "name": "Jayway Inc.", + "location": + [ + "Malmo", + "Stockholm", + "Copenhagen", + "San Francisco", + "Karlskrona", + "Halmstad", + "Helsingborg" + ] + }, + + "current release": "2.1" + } + }, + + "book": + [ + { + "title": "Beginning JSON", + "author": "Ben Smith", + "price": 49.99 + }, + + { + "title": "JSON at Work", + "author": "Tom Marrs", + "price": 29.99 + }, + + { + "title": "Learn JSON in a DAY", + "author": "Acodemy", + "price": 8.99 + }, + + { + "title": "JSON: Questions and Answers", + "author": "George Duckett", + "price": 6.00 + } + ], + + "price range": + { + "cheap": 10.00, + "medium": 20.00 + } +} \ No newline at end of file diff --git a/json-path/src/main/resources/intro_service.json b/json-path/src/main/resources/intro_service.json new file mode 100644 index 0000000000..448492463a --- /dev/null +++ b/json-path/src/main/resources/intro_service.json @@ -0,0 +1,61 @@ +[ + { + "id": 1, + "title": "Casino Royale", + "director": "Martin Campbell", + "starring": + [ + "Daniel Craig", + "Eva Green" + ], + + "desc": "Twenty-first James Bond movie", + "release date": 1163466000000, + "box office": 594275385 + }, + + { + "id": 2, + "title": "Quantum of Solace", + "director": "Marc Forster", + "starring": + [ + "Daniel Craig", + "Olga Kurylenko" + ], + + "desc": "Twenty-second James Bond movie", + "release date": 1225242000000, + "box office": 591692078 + }, + + { + "id": 3, + "title": "Skyfall", + "director": "Sam Mendes", + "starring": + [ + "Daniel Craig", + "Naomie Harris" + ], + + "desc": "Twenty-third James Bond movie", + "release date": 1350954000000, + "box office": 1110526981 + }, + + { + "id": 4, + "title": "Spectre", + "director": "Sam Mendes", + "starring": + [ + "Daniel Craig", + "Lea Seydoux" + ], + + "desc": "Twenty-fourth James Bond movie", + "release date": 1445821200000, + "box office": 879376275 + } +] \ No newline at end of file diff --git a/json-path/src/main/resources/intro_user.json b/json-path/src/main/resources/intro_user.json new file mode 100644 index 0000000000..c35914c6c4 --- /dev/null +++ b/json-path/src/main/resources/intro_user.json @@ -0,0 +1,46 @@ +[ + { + "username": "oracle", + "password": + { + "current": + { + "value": "Java_SE_8", + "created": 1397754000000 + }, + + "old": + [ + { + "value": "Java_SE_7", + "created": 1312650000000 + } + ] + } + }, + + { + "username": "sun", + "password": + { + "current": + { + "value": "Java_SE_6", + "created": 1168448400000 + }, + + "old": + [ + { + "value": "J2SE_5.0", + "created": 1099069200000 + }, + + { + "value": "J2SE_1.4", + "created": 1025542800000 + } + ] + } + } +] \ No newline at end of file diff --git a/json-path/src/test/java/com/baeldung/jsonpath/introduction/OperationTest.java b/json-path/src/test/java/com/baeldung/jsonpath/introduction/OperationTest.java new file mode 100644 index 0000000000..d90fafb7cb --- /dev/null +++ b/json-path/src/test/java/com/baeldung/jsonpath/introduction/OperationTest.java @@ -0,0 +1,71 @@ +package com.baeldung.jsonpath.introduction; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertThat; +import static org.hamcrest.CoreMatchers.containsString; +import static org.hamcrest.CoreMatchers.not; + +import org.junit.Test; + +import java.io.InputStream; +import java.util.List; +import java.util.Map; +import java.util.Scanner; + +import com.jayway.jsonpath.Criteria; +import com.jayway.jsonpath.DocumentContext; +import com.jayway.jsonpath.Filter; +import com.jayway.jsonpath.JsonPath; +import com.jayway.jsonpath.Predicate; + +public class OperationTest { + InputStream jsonInputStream = this.getClass().getClassLoader().getResourceAsStream("intro_api.json"); + String jsonDataSourceString = new Scanner(jsonInputStream, "UTF-8").useDelimiter("\\Z").next(); + + @Test + public void givenJsonPathWithoutPredicates_whenReading_thenCorrect() { + String jsonpathCreatorNamePath = "$['tool']['jsonpath']['creator']['name']"; + String jsonpathCreatorLocationPath = "$['tool']['jsonpath']['creator']['location'][*]"; + + DocumentContext jsonContext = JsonPath.parse(jsonDataSourceString); + String jsonpathCreatorName = jsonContext.read(jsonpathCreatorNamePath); + List jsonpathCreatorLocation = jsonContext.read(jsonpathCreatorLocationPath); + + assertEquals("Jayway Inc.", jsonpathCreatorName); + assertThat(jsonpathCreatorLocation.toString(), containsString("Malmo")); + assertThat(jsonpathCreatorLocation.toString(), containsString("San Francisco")); + assertThat(jsonpathCreatorLocation.toString(), containsString("Helsingborg")); + } + + @Test + public void givenJsonPathWithFilterPredicate_whenReading_thenCorrect() { + Filter expensiveFilter = Filter.filter(Criteria.where("price").gt(20.00)); + List> expensive = JsonPath.parse(jsonDataSourceString).read("$['book'][?]", expensiveFilter); + predicateUsageAssertionHelper(expensive); + } + + @Test + public void givenJsonPathWithCustomizedPredicate_whenReading_thenCorrect() { + Predicate expensivePredicate = new Predicate() { + public boolean apply(PredicateContext context) { + String value = context.item(Map.class).get("price").toString(); + return Float.valueOf(value) > 20.00; + } + }; + List> expensive = JsonPath.parse(jsonDataSourceString).read("$['book'][?]", expensivePredicate); + predicateUsageAssertionHelper(expensive); + } + + @Test + public void givenJsonPathWithInlinePredicate_whenReading_thenCorrect() { + List> expensive = JsonPath.parse(jsonDataSourceString).read("$['book'][?(@['price'] > $['price range']['medium'])]"); + predicateUsageAssertionHelper(expensive); + } + + private void predicateUsageAssertionHelper(List predicate) { + assertThat(predicate.toString(), containsString("Beginning JSON")); + assertThat(predicate.toString(), containsString("JSON at Work")); + assertThat(predicate.toString(), not(containsString("Learn JSON in a DAY"))); + assertThat(predicate.toString(), not(containsString("JSON: Questions and Answers"))); + } +} diff --git a/json-path/src/test/java/com/baeldung/jsonpath/introduction/ServiceTest.java b/json-path/src/test/java/com/baeldung/jsonpath/introduction/ServiceTest.java new file mode 100644 index 0000000000..868acac8d0 --- /dev/null +++ b/json-path/src/test/java/com/baeldung/jsonpath/introduction/ServiceTest.java @@ -0,0 +1,91 @@ +package com.baeldung.jsonpath.introduction; + +import static org.junit.Assert.assertThat; +import static org.junit.Assert.assertEquals; +import static org.hamcrest.CoreMatchers.containsString; + +import org.junit.Test; + +import java.io.InputStream; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.Map; +import java.util.Scanner; + +import com.jayway.jsonpath.Configuration; +import com.jayway.jsonpath.DocumentContext; +import com.jayway.jsonpath.JsonPath; +import com.jayway.jsonpath.Option; + +public class ServiceTest { + InputStream jsonInputStream = this.getClass().getClassLoader().getResourceAsStream("intro_service.json"); + String jsonString = new Scanner(jsonInputStream, "UTF-8").useDelimiter("\\Z").next(); + + @Test + public void givenId_whenRequestingRecordData_thenSucceed() { + Object dataObject = JsonPath.parse(jsonString).read("$[?(@.id == 2)]"); + String dataString = dataObject.toString(); + + assertThat(dataString, containsString("2")); + assertThat(dataString, containsString("Quantum of Solace")); + assertThat(dataString, containsString("Twenty-second James Bond movie")); + } + + @Test + public void givenStarring_whenRequestingMovieTitle_thenSucceed() { + List> dataList = JsonPath.parse(jsonString).read("$[?('Eva Green' in @['starring'])]"); + String title = (String) dataList.get(0).get("title"); + + assertEquals("Casino Royale", title); + } + + @Test + public void givenCompleteStructure_whenCalculatingTotalRevenue_thenSucceed() { + DocumentContext context = JsonPath.parse(jsonString); + int length = context.read("$.length()"); + long revenue = 0; + for (int i = 0; i < length; i++) { + revenue += context.read("$[" + i + "]['box office']", Long.class); + } + + assertEquals(594275385L + 591692078L + 1110526981L + 879376275L, revenue); + } + + @Test + public void givenStructure_whenRequestingHighestRevenueMovieTitle_thenSucceed() { + DocumentContext context = JsonPath.parse(jsonString); + List revenueList = context.read("$[*]['box office']"); + Integer[] revenueArray = revenueList.toArray(new Integer[0]); + Arrays.sort(revenueArray); + + int highestRevenue = revenueArray[revenueArray.length - 1]; + Configuration pathConfiguration = Configuration.builder().options(Option.AS_PATH_LIST).build(); + List pathList = JsonPath.using(pathConfiguration).parse(jsonString).read("$[?(@['box office'] == " + highestRevenue + ")]"); + + Map dataRecord = context.read(pathList.get(0)); + String title = dataRecord.get("title"); + + assertEquals("Skyfall", title); + } + + @Test + public void givenDirector_whenRequestingLatestMovieTitle_thenSucceed() { + DocumentContext context = JsonPath.parse(jsonString); + List> dataList = context.read("$[?(@.director == 'Sam Mendes')]"); + + List dateList = new ArrayList<>(); + for (Map item : dataList) { + Object date = item.get("release date"); + dateList.add(date); + } + Long[] dateArray = dateList.toArray(new Long[0]); + Arrays.sort(dateArray); + + long latestTime = dateArray[dateArray.length - 1]; + List> finalDataList = context.read("$[?(@['director'] == 'Sam Mendes' && @['release date'] == " + latestTime + ")]"); + String title = (String) finalDataList.get(0).get("title"); + + assertEquals("Spectre", title); + } +} \ No newline at end of file diff --git a/mockito/pom.xml b/mockito/pom.xml index a73eea7647..95b7b46d44 100644 --- a/mockito/pom.xml +++ b/mockito/pom.xml @@ -1,6 +1,6 @@ 4.0.0 - org.baeldung + com.baeldung mockito 0.1-SNAPSHOT @@ -87,13 +87,9 @@ - - 4.1.5.RELEASE - 3.2.5.RELEASE - - 4.3.10.Final - 5.1.35 + 4.3.11.Final + 5.1.38 1.7.13 @@ -114,14 +110,14 @@ 4.4.1 4.5 - 2.4.1 + 2.9.0 - 3.3 + 3.5.1 2.6 - 2.18.1 + 2.19.1 2.7 - 1.4.14 + 1.4.18 diff --git a/mockito/src/main/webapp/WEB-INF/api-servlet.xml b/mockito/src/main/webapp/WEB-INF/api-servlet.xml deleted file mode 100644 index 4c74be8912..0000000000 --- a/mockito/src/main/webapp/WEB-INF/api-servlet.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - \ No newline at end of file diff --git a/mockito/src/main/webapp/WEB-INF/web.xml b/mockito/src/main/webapp/WEB-INF/web.xml deleted file mode 100644 index 935beae648..0000000000 --- a/mockito/src/main/webapp/WEB-INF/web.xml +++ /dev/null @@ -1,41 +0,0 @@ - - - - Spring MVC Application - - - - contextClass - - org.springframework.web.context.support.AnnotationConfigWebApplicationContext - - - - contextConfigLocation - org.baeldung.config - - - - org.springframework.web.context.ContextLoaderListener - - - - - api - org.springframework.web.servlet.DispatcherServlet - 1 - - - api - / - - - - - - - \ No newline at end of file diff --git a/pom.xml b/pom.xml index 5dad868501..6f63269248 100644 --- a/pom.xml +++ b/pom.xml @@ -1,116 +1,70 @@ - - - 4.0.0 - org.baeldung - spring-security-login-and-registration - spring-security-login-and-registration - war - 1.0.0-BUILD-SNAPSHOT + + 4.0.0 + com.baeldung + parent-modules + 1.0.0-SNAPSHOT - - org.springframework.boot - spring-boot-starter-parent - 1.1.4.RELEASE - + parent-modules + pom - - - - org.springframework.boot - spring-boot-starter-web - - - org.springframework.security - spring-security-config - runtime - - - - - - - org.slf4j - slf4j-api - - - ch.qos.logback - logback-classic - - + + apache-fop + core-java + core-java-8 + gson + + guava + guava18 + guava19 + handling-spring-static-resources + httpclient + jackson + javaxval + json-path + mockito + + querydsl + + rest-testing + resteasy - - org.slf4j - jcl-over-slf4j - - + spring-all + spring-apache-camel + spring-batch + spring-boot + spring-data-cassandra + spring-data-elasticsearch + spring-data-mongodb + spring-data-redis + spring-exceptions + spring-freemarker + spring-hibernate3 + spring-hibernate4 + spring-jpa + spring-katharsis + spring-mockito + spring-mvc-java + spring-mvc-no-xml + spring-mvc-xml + spring-openid + spring-quartz + spring-rest - - org.slf4j - log4j-over-slf4j - + spring-security-basic-auth + spring-security-mvc-custom + spring-security-mvc-digest-auth + spring-security-mvc-ldap + spring-security-mvc-login + spring-security-mvc-persisted-remember-me + spring-security-mvc-session + spring-security-rest + spring-security-rest-basic-auth + spring-security-rest-custom + spring-security-rest-digest-auth + spring-security-rest-full + spring-thymeleaf + spring-zuul - - - javax.inject - javax.inject - ${javax.inject.version} - - - - - javax.servlet - javax.servlet-api - - - - javax.servlet.jsp - javax.servlet.jsp-api - ${javax.servlet.jsp-api.version} - - - - javax.servlet - jstl - - - - - org.springframework.security - spring-security-taglibs - - - - - junit - junit - test - - - - spring-security-login-and-registration - - - src/main/resources - true - - - - - 1.7 - 3.1.1.RELEASE - 3.2.4.RELEASE - 1.6.10 - - - 1.7.6 - 1.1.1 - - - 2.3.2-b01 - - - 1 - + diff --git a/querydsl/.classpath b/querydsl/.classpath new file mode 100644 index 0000000000..264bb653bb --- /dev/null +++ b/querydsl/.classpath @@ -0,0 +1,37 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/querydsl/.project b/querydsl/.project new file mode 100644 index 0000000000..729f89c323 --- /dev/null +++ b/querydsl/.project @@ -0,0 +1,34 @@ + + + querydsl + + + + + + org.eclipse.wst.common.project.facet.core.builder + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.wst.validation.validationbuilder + + + + + org.eclipse.m2e.core.maven2Builder + + + + + + org.eclipse.jdt.core.javanature + org.eclipse.m2e.core.maven2Nature + org.eclipse.wst.common.project.facet.core.nature + + diff --git a/querydsl/pom.xml b/querydsl/pom.xml new file mode 100644 index 0000000000..cf50144d3f --- /dev/null +++ b/querydsl/pom.xml @@ -0,0 +1,188 @@ + + + 4.0.0 + + com.baeldung + querydsl + 0.1-SNAPSHOT + jar + + querydsl + http://maven.apache.org + + + UTF-8 + 1.6 + 4.10 + 3.1.0.RELEASE + 4.3.11.Final + 2.5.0 + 1.5.10 + + + + + + com.mysema.querydsl + querydsl-core + ${querydsl.version} + + + + com.mysema.querydsl + querydsl-jpa + ${querydsl.version} + + + + com.mysema.querydsl + querydsl-apt + ${querydsl.version} + provided + + + + + org.hibernate + hibernate-entitymanager + ${hibernate.version} + compile + + + + org.hibernate.javax.persistence + hibernate-jpa-2.0-api + 1.0.0.Final + compile + + + + commons-dbcp + commons-dbcp + 1.4 + jar + compile + + + + commons-pool + commons-pool + 1.5.5 + jar + compile + + + + + org.hsqldb + hsqldb-j5 + 2.2.4 + + + + + org.springframework + spring-context + ${spring.version} + + + + org.springframework + spring-webmvc + ${spring.version} + + + + org.springframework + spring-orm + ${spring.version} + jar + compile + + + + org.springframework + spring-aop + ${spring.version} + + + + org.springframework + spring-test + ${spring.version} + jar + test + + + + + org.slf4j + slf4j-api + ${slf4j.version} + + + org.slf4j + jcl-over-slf4j + ${slf4j.version} + runtime + + + org.slf4j + slf4j-log4j12 + ${slf4j.version} + runtime + + + log4j + log4j + 1.2.16 + + + + + junit + junit + ${junit.version} + test + + + + + + + + + + org.apache.maven.plugins + maven-compiler-plugin + 2.3.2 + + ${java.version} + ${java.version} + -proc:none + + + + + + com.mysema.maven + maven-apt-plugin + 1.0.3 + + + + process + + + target/metamodel + com.mysema.query.apt.jpa.JPAAnnotationProcessor + + + + + + + + \ No newline at end of file diff --git a/querydsl/src/main/java/org/baeldung/dao/PersonDao.java b/querydsl/src/main/java/org/baeldung/dao/PersonDao.java new file mode 100644 index 0000000000..7df4ebb22d --- /dev/null +++ b/querydsl/src/main/java/org/baeldung/dao/PersonDao.java @@ -0,0 +1,22 @@ +package org.baeldung.dao; + +import java.util.List; +import java.util.Map; + +import org.baeldung.entity.Person; + +public interface PersonDao { + + public Person save(Person person); + + public List findPersonsByFirstnameQueryDSL(String firstname); + + public List findPersonsByFirstnameAndSurnameQueryDSL(String firstname, String surname); + + public List findPersonsByFirstnameInDescendingOrderQueryDSL(String firstname); + + public int findMaxAge(); + + public Map findMaxAgeByName(); + +} \ No newline at end of file diff --git a/querydsl/src/main/java/org/baeldung/dao/PersonDaoImpl.java b/querydsl/src/main/java/org/baeldung/dao/PersonDaoImpl.java new file mode 100644 index 0000000000..555ec226ce --- /dev/null +++ b/querydsl/src/main/java/org/baeldung/dao/PersonDaoImpl.java @@ -0,0 +1,68 @@ +package org.baeldung.dao; + +import java.util.List; +import java.util.Map; + +import javax.persistence.EntityManager; +import javax.persistence.PersistenceContext; + +import org.baeldung.entity.Person; +import org.baeldung.entity.QPerson; +import org.springframework.stereotype.Repository; + +import com.mysema.query.group.GroupBy; +import com.mysema.query.jpa.impl.JPAQuery; + +@Repository +public class PersonDaoImpl implements PersonDao { + + @PersistenceContext + private EntityManager em; + + @Override + public Person save(final Person person) { + em.persist(person); + return person; + } + + @Override + public List findPersonsByFirstnameQueryDSL(final String firstname) { + final JPAQuery query = new JPAQuery(em); + final QPerson person = QPerson.person; + + return query.from(person).where(person.firstname.eq(firstname)).list(person); + } + + @Override + public List findPersonsByFirstnameAndSurnameQueryDSL(final String firstname, final String surname) { + final JPAQuery query = new JPAQuery(em); + final QPerson person = QPerson.person; + + return query.from(person).where(person.firstname.eq(firstname).and(person.surname.eq(surname))).list(person); + } + + @Override + public List findPersonsByFirstnameInDescendingOrderQueryDSL(final String firstname) { + final JPAQuery query = new JPAQuery(em); + final QPerson person = QPerson.person; + + return query.from(person).where(person.firstname.eq(firstname)).orderBy(person.surname.desc()).list(person); + } + + @Override + public int findMaxAge() { + final JPAQuery query = new JPAQuery(em); + final QPerson person = QPerson.person; + + return query.from(person).list(person.age.max()).get(0); + } + + @Override + public Map findMaxAgeByName() { + final JPAQuery query = new JPAQuery(em); + final QPerson person = QPerson.person; + + return query.from(person).transform(GroupBy.groupBy(person.firstname).as(GroupBy.max(person.age))); + } + +} \ No newline at end of file diff --git a/querydsl/src/main/java/org/baeldung/entity/Person.java b/querydsl/src/main/java/org/baeldung/entity/Person.java new file mode 100644 index 0000000000..6f04210d90 --- /dev/null +++ b/querydsl/src/main/java/org/baeldung/entity/Person.java @@ -0,0 +1,69 @@ +package org.baeldung.entity; + +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.GeneratedValue; +import javax.persistence.GenerationType; +import javax.persistence.Id; + +@Entity +public class Person { + + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + private Long id; + + @Column + private String firstname; + + @Column + private String surname; + + @Column + private int age; + + Person() { + } + + public Person(final String firstname, final String surname) { + this.firstname = firstname; + this.surname = surname; + } + + public Person(final String firstname, final String surname, final int age) { + this(firstname, surname); + this.age = age; + } + + public Long getId() { + return id; + } + + public void setId(final Long id) { + this.id = id; + } + + public String getFirstname() { + return firstname; + } + + public void setFirstname(final String firstname) { + this.firstname = firstname; + } + + public String getSurname() { + return surname; + } + + public void setSurname(final String surname) { + this.surname = surname; + } + + public int getAge() { + return age; + } + + public void setAge(final int age) { + this.age = age; + } +} \ No newline at end of file diff --git a/querydsl/src/main/resources/META-INF/persistence.xml b/querydsl/src/main/resources/META-INF/persistence.xml new file mode 100644 index 0000000000..111d7933c3 --- /dev/null +++ b/querydsl/src/main/resources/META-INF/persistence.xml @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/querydsl/src/main/resources/log4j.xml b/querydsl/src/main/resources/log4j.xml new file mode 100644 index 0000000000..a7f96b38a4 --- /dev/null +++ b/querydsl/src/main/resources/log4j.xml @@ -0,0 +1,42 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/querydsl/src/test/java/org/baeldung/dao/PersonDaoTest.java b/querydsl/src/test/java/org/baeldung/dao/PersonDaoTest.java new file mode 100644 index 0000000000..0e5996a8c8 --- /dev/null +++ b/querydsl/src/test/java/org/baeldung/dao/PersonDaoTest.java @@ -0,0 +1,81 @@ +package org.baeldung.dao; + +import java.util.Map; + +import org.baeldung.entity.Person; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.test.context.ContextConfiguration; +import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; +import org.springframework.test.context.transaction.TransactionConfiguration; +import org.springframework.transaction.annotation.Transactional; + +import junit.framework.Assert; + +@ContextConfiguration("/test-context.xml") +@RunWith(SpringJUnit4ClassRunner.class) +@Transactional +@TransactionConfiguration(defaultRollback = true) +public class PersonDaoTest { + + @Autowired + private PersonDao personDao; + + // + + @Test + public void testCreation() { + personDao.save(new Person("Erich", "Gamma")); + final Person person = new Person("Kent", "Beck"); + personDao.save(person); + personDao.save(new Person("Ralph", "Johnson")); + + final Person personFromDb = personDao.findPersonsByFirstnameQueryDSL("Kent").get(0); + Assert.assertEquals(person.getId(), personFromDb.getId()); + } + + @Test + public void testMultipleFilter() { + personDao.save(new Person("Erich", "Gamma")); + final Person person = personDao.save(new Person("Ralph", "Beck")); + final Person person2 = personDao.save(new Person("Ralph", "Johnson")); + + final Person personFromDb = personDao.findPersonsByFirstnameAndSurnameQueryDSL("Ralph", "Johnson").get(0); + Assert.assertNotSame(person.getId(), personFromDb.getId()); + Assert.assertEquals(person2.getId(), personFromDb.getId()); + } + + @Test + public void testOrdering() { + final Person person = personDao.save(new Person("Kent", "Gamma")); + personDao.save(new Person("Ralph", "Johnson")); + final Person person2 = personDao.save(new Person("Kent", "Zivago")); + + final Person personFromDb = personDao.findPersonsByFirstnameInDescendingOrderQueryDSL("Kent").get(0); + Assert.assertNotSame(person.getId(), personFromDb.getId()); + Assert.assertEquals(person2.getId(), personFromDb.getId()); + } + + @Test + public void testMaxAge() { + personDao.save(new Person("Kent", "Gamma", 20)); + personDao.save(new Person("Ralph", "Johnson", 35)); + personDao.save(new Person("Kent", "Zivago", 30)); + + final int maxAge = personDao.findMaxAge(); + Assert.assertTrue(maxAge == 35); + } + + @Test + public void testMaxAgeByName() { + personDao.save(new Person("Kent", "Gamma", 20)); + personDao.save(new Person("Ralph", "Johnson", 35)); + personDao.save(new Person("Kent", "Zivago", 30)); + + final Map maxAge = personDao.findMaxAgeByName(); + Assert.assertTrue(maxAge.size() == 2); + Assert.assertSame(35, maxAge.get("Ralph")); + Assert.assertSame(30, maxAge.get("Kent")); + } +} \ No newline at end of file diff --git a/querydsl/src/test/resources/db.properties b/querydsl/src/test/resources/db.properties new file mode 100644 index 0000000000..efee3669ce --- /dev/null +++ b/querydsl/src/test/resources/db.properties @@ -0,0 +1,6 @@ +#In memory db +db.username=sa +db.password= +db.driver=org.hsqldb.jdbcDriver +db.url=jdbc:hsqldb:mem:app-db +db.dialect=org.hibernate.dialect.HSQLDialect \ No newline at end of file diff --git a/querydsl/src/test/resources/test-context.xml b/querydsl/src/test/resources/test-context.xml new file mode 100644 index 0000000000..13d823a857 --- /dev/null +++ b/querydsl/src/test/resources/test-context.xml @@ -0,0 +1,20 @@ + + + + + + + + + \ No newline at end of file diff --git a/querydsl/src/test/resources/test-db.xml b/querydsl/src/test/resources/test-db.xml new file mode 100644 index 0000000000..7f85630b6b --- /dev/null +++ b/querydsl/src/test/resources/test-db.xml @@ -0,0 +1,49 @@ + + + + + + + classpath:db.properties + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/raml/annotations/README.md b/raml/annotations/README.md new file mode 100644 index 0000000000..4142b33353 --- /dev/null +++ b/raml/annotations/README.md @@ -0,0 +1,7 @@ +========= + +## Define Custom RAML + + +### Relevant Articles: +- [Define Custom RAML Properties Using Annotations](http://www.baeldung.com/raml-custom-properties-with-annotations) diff --git a/raml/annotations/api.raml b/raml/annotations/api.raml new file mode 100644 index 0000000000..e0123536eb --- /dev/null +++ b/raml/annotations/api.raml @@ -0,0 +1,126 @@ +#%RAML 1.0 +title: API for REST Services used in the RAML tutorials on Baeldung.com +documentation: + - title: Overview + content: | + This document defines the interface for the REST services + used in the popular RAML Tutorial series at Baeldung.com. + - title: Disclaimer + content: | + All names used in this definition are purely fictional. + Any similarities between the names used in this tutorial and those of real persons, whether living or dead, are merely coincidental. + - title: Copyright + content: Copyright 2016 by Baeldung.com. All rights reserved. +uses: + mySecuritySchemes: !include libraries/securitySchemes.raml + myDataTypes: !include libraries/dataTypes.raml + myTraits: !include libraries/traits.raml + myResourceTypes: !include libraries/resourceTypes.raml +version: v1 +protocols: [ HTTPS ] +baseUri: http://rest-api.baeldung.com/api/{version} +mediaType: application/json +securedBy: [ mySecuritySchemes.basicAuth ] +annotationTypes: + testCase: + allowedTargets: [ Method ] + allowMultiple: true + usage: | + Use this annotation to declare a test case + within a testSuite declaration. + You may apply this annotation multiple times + within the target testSuite. + properties: + scenario: string + setupScript?: string[] + testScript: string[] + expectedOutput?: string + cleanupScript?: string[] +/foos: + type: myResourceTypes.collection + get: + queryParameters: + name?: string + ownerName?: string + responses: + 200: + body: + example: !include examples/Foos.json + (testCase): + scenario: No Foos + setupScript: deleteAllFoosIfAny + testScript: getAllFoos + expectedOutput: "" + (testCase): + scenario: One Foo + setupScript: [ deleteAllFoosIfAny, addInputFoos ] + testScript: getAllFoos + expectedOutput: '[ { "id": 999, "name": Joe } ]' + cleanupScript: deleteInputFoos + (testCase): + scenario: Multiple Foos + setupScript: [ deleteAllFoosIfAny, addInputFoos ] + testScript: getAllFoos + expectedOutput: '[ { "id": 998, "name": "Bob" }, { "id": 999, "name": "Joe", "ownerName": "Bob" } ]' + cleanupScript: deleteInputFoos + post: + responses: + 200: + body: + example: !include examples/Foo.json + /{fooId}: + type: myResourceTypes.item + get: + responses: + 200: + body: + example: !include examples/Foo.json + put: + responses: + 200: + body: + example: !include examples/Foo.json +/foos/name/{name}: + get: + description: Get all Foos with the name {name} + responses: + 200: + body: + type: myDataTypes.Foo + 404: + body: + type: myDataTypes.Error +/foos/bar/{barId}: + get: + description: Get the Foo for the Bar with barId = {barId} + responses: + 200: + body: + example: !include examples/Foo.json +/bars: + type: myResourceTypes.collection + get: + queryParameters: + name?: string + ownerName?: string + responses: + 200: + body: + example: !include examples/Bars.json + post: + responses: + 200: + body: + example: !include examples/Bar.json + /{barId}: + type: myResourceTypes.item + get: + responses: + 200: + body: + example: !include examples/Bar.json + put: + responses: + 200: + body: + example: !include examples/Bars.json diff --git a/raml/annotations/examples/Bar.json b/raml/annotations/examples/Bar.json new file mode 100644 index 0000000000..0ee1b34edb --- /dev/null +++ b/raml/annotations/examples/Bar.json @@ -0,0 +1,6 @@ +{ + "id" : 1, + "name" : "First Bar", + "city" : "Austin", + "fooId" : 2 +} \ No newline at end of file diff --git a/raml/annotations/examples/Bars.json b/raml/annotations/examples/Bars.json new file mode 100644 index 0000000000..89ea875432 --- /dev/null +++ b/raml/annotations/examples/Bars.json @@ -0,0 +1,19 @@ +[ + { + "id" : 1, + "name" : "First Bar", + "city" : "Austin", + "fooId" : 2 + }, + { + "id" : 2, + "name" : "Second Bar", + "city" : "Dallas", + "fooId" : 1 + }, + { + "id" : 3, + "name" : "Third Bar", + "fooId" : 2 + } +] \ No newline at end of file diff --git a/raml/annotations/examples/Error.json b/raml/annotations/examples/Error.json new file mode 100644 index 0000000000..dca56da7c2 --- /dev/null +++ b/raml/annotations/examples/Error.json @@ -0,0 +1,4 @@ +{ + "message" : "Not found", + "code" : 1001 +} \ No newline at end of file diff --git a/raml/annotations/examples/Foo.json b/raml/annotations/examples/Foo.json new file mode 100644 index 0000000000..1b1b8c891e --- /dev/null +++ b/raml/annotations/examples/Foo.json @@ -0,0 +1,4 @@ +{ + "id" : 1, + "name" : "First Foo" +} \ No newline at end of file diff --git a/raml/annotations/examples/Foos.json b/raml/annotations/examples/Foos.json new file mode 100644 index 0000000000..74f64689f0 --- /dev/null +++ b/raml/annotations/examples/Foos.json @@ -0,0 +1,16 @@ +[ + { + "id" : 1, + "name" : "First Foo", + "ownerName" : "Jack Robinson" + }, + { + "id" : 2, + "name" : "Second Foo" + }, + { + "id" : 3, + "name" : "Third Foo", + "ownerName" : "Chuck Norris" + } +] \ No newline at end of file diff --git a/raml/annotations/extensions/en_US/additionalResources.raml b/raml/annotations/extensions/en_US/additionalResources.raml new file mode 100644 index 0000000000..9ab0d0a243 --- /dev/null +++ b/raml/annotations/extensions/en_US/additionalResources.raml @@ -0,0 +1,13 @@ +#%RAML 1.0 Extension +# File located at: +# /extensions/en_US/additionalResources.raml +masterRef: ../../api.raml +usage: This extension defines additional resources for version 2 of the API. +version: v2 +/foos: + /bar/{barId}: + get: + description: | + Get the foo that is related to the bar having barId = {barId} + queryParameters: + barId?: integer diff --git a/raml/annotations/libraries/dataTypes.raml b/raml/annotations/libraries/dataTypes.raml new file mode 100644 index 0000000000..8a240e62dc --- /dev/null +++ b/raml/annotations/libraries/dataTypes.raml @@ -0,0 +1,19 @@ +#%RAML 1.0 Library +# This is the file /libraries/dataTypes.raml +usage: This library defines the data types for the API +types: + Foo: + properties: + id: integer + name: string + ownerName?: string + Bar: + properties: + id: integer + name: string + city?: string + fooId: integer + Error: + properties: + code: integer + message: string diff --git a/raml/annotations/libraries/resourceTypes.raml b/raml/annotations/libraries/resourceTypes.raml new file mode 100644 index 0000000000..fb054f1a36 --- /dev/null +++ b/raml/annotations/libraries/resourceTypes.raml @@ -0,0 +1,38 @@ +#%RAML 1.0 Library +# This is the file /libraries/resourceTypes.raml +usage: This library defines the resource types for the API +uses: + myTraits: !include traits.raml +resourceTypes: + collection: + usage: Use this resourceType to represent a collection of items + description: A collection of <> + get: + description: | + Get all <>, + optionally filtered + is: [ myTraits.hasResponseCollection ] + post: + description: | + Create a new <> + is: [ myTraits.hasRequestItem ] + item: + usage: Use this resourceType to represent any single item + description: A single <> + get: + description: | + Get a <> + by <>Id + is: [ myTraits.hasResponseItem, myTraits.hasNotFound ] + put: + description: | + Update a <> + by <>Id + is: [ myTraits.hasRequestItem, myTraits.hasResponseItem, myTraits.hasNotFound ] + delete: + description: | + Delete a <> + by <>Id + is: [ myTraits.hasNotFound ] + responses: + 204: diff --git a/raml/annotations/libraries/securitySchemes.raml b/raml/annotations/libraries/securitySchemes.raml new file mode 100644 index 0000000000..621c6ac975 --- /dev/null +++ b/raml/annotations/libraries/securitySchemes.raml @@ -0,0 +1,20 @@ +#%RAML 1.0 Library +# This is the file /libraries/securitySchemes.raml +securitySchemes: + - basicAuth: + description: Each request must contain the headers necessary for + basic authentication + type: Basic Authentication + describedBy: + headers: + Authorization: + description: | + Used to send the Base64 encoded "username:password" + credentials + type: string + responses: + 401: + description: | + Unauthorized. Either the provided username and password + combination is invalid, or the user is not allowed to + access the content provided by the requested URL. diff --git a/raml/annotations/libraries/traits.raml b/raml/annotations/libraries/traits.raml new file mode 100644 index 0000000000..610747e79f --- /dev/null +++ b/raml/annotations/libraries/traits.raml @@ -0,0 +1,32 @@ +#%RAML 1.0 Library +# This is the file /libraries/traits.raml +usage: This library defines some basic traits +uses: + myDataTypes: !include dataTypes.raml +traits: + hasRequestItem: + usage: Use this trait for resources whose request body is a single item + body: + application/json: + type: <> + hasResponseItem: + usage: Use this trait for resources whose response body is a single item + responses: + 200: + body: + application/json: + type: <> + hasResponseCollection: + usage: Use this trait for resources whose response body is a collection of items + responses: + 200: + body: + application/json: + type: <>[] + hasNotFound: + usage: Use this trait for resources that could respond with a 404 status + responses: + 404: + body: + application/json: + type: myDataTypes.Error diff --git a/raml/annotations/overlays/es_ES/additionalResources.raml b/raml/annotations/overlays/es_ES/additionalResources.raml new file mode 100644 index 0000000000..0edd6a9231 --- /dev/null +++ b/raml/annotations/overlays/es_ES/additionalResources.raml @@ -0,0 +1,11 @@ +#%RAML 1.0 Overlay +# Archivo situado en: +# /overlays/es_ES/additionalResources.raml +masterRef: ../../api.raml +usage: | + Se trata de un español demasiado que describe los recursos adicionales + para la versión 1 del API. +/foos/bar/{barId}: + get: + description: | + Obtener el foo que se relaciona con el bar tomando barId = {barId} diff --git a/raml/annotations/overlays/es_ES/documentationItems.raml b/raml/annotations/overlays/es_ES/documentationItems.raml new file mode 100644 index 0000000000..49dd46fb59 --- /dev/null +++ b/raml/annotations/overlays/es_ES/documentationItems.raml @@ -0,0 +1,22 @@ +#%RAML 1.0 Overlay +# File located at (archivo situado en): +# /overlays/es_ES/documentationItems.raml +masterRef: ../../api.raml +usage: | + To provide user documentation and other descriptive text in Spanish + (Para proporcionar la documentación del usuario y otro texto descriptivo en español) +title: API para servicios REST utilizados en los tutoriales RAML en Baeldung.com +documentation: + - title: Descripción general + content: | + Este documento define la interfaz para los servicios REST + utilizados en la popular serie de RAML Tutorial en Baeldung.com + - title: Renuncia + content: | + Todos los nombres usados ​​en esta definición son pura ficción. + Cualquier similitud entre los nombres utilizados en este tutorial + y los de las personas reales, ya sea vivo o muerto, + no son más que coincidenta. + - title: Derechos de autor + content: | + Derechos de autor 2016 por Baeldung.com. Todos los derechos reservados. diff --git a/raml/modularization/README.md b/raml/modularization/README.md new file mode 100644 index 0000000000..de0e047ea6 --- /dev/null +++ b/raml/modularization/README.md @@ -0,0 +1,6 @@ +========= + +## Modular RESTful API Modeling Language + +### Relevant Articles: +- [Modular RAML Using Includes, Libraries, Overlays and Extensions](http://www.baeldung.com/modular-raml-includes-overlays-libraries-extensions) diff --git a/rest-testing/pom.xml b/rest-testing/pom.xml index b8fdc50a01..e159af0b77 100644 --- a/rest-testing/pom.xml +++ b/rest-testing/pom.xml @@ -1,6 +1,6 @@ 4.0.0 - org.baeldung + com.baeldung rest-testing 0.1-SNAPSHOT @@ -66,7 +66,7 @@ org.slf4j jcl-over-slf4j ${org.slf4j.version} - + runtime org.slf4j @@ -137,11 +137,8 @@ - - 4.1.5.RELEASE - - 2.5.5 + 2.7.2 1.7.13 @@ -162,14 +159,14 @@ 4.4.1 4.5 - 2.4.1 + 2.9.0 - 3.3 + 3.5.1 2.6 - 2.18.1 + 2.19.1 2.7 - 1.4.14 + 1.4.18 diff --git a/rest-testing/src/main/webapp/WEB-INF/api-servlet.xml b/rest-testing/src/main/webapp/WEB-INF/api-servlet.xml deleted file mode 100644 index 4c74be8912..0000000000 --- a/rest-testing/src/main/webapp/WEB-INF/api-servlet.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - \ No newline at end of file diff --git a/rest-testing/src/main/webapp/WEB-INF/web.xml b/rest-testing/src/main/webapp/WEB-INF/web.xml deleted file mode 100644 index 935beae648..0000000000 --- a/rest-testing/src/main/webapp/WEB-INF/web.xml +++ /dev/null @@ -1,41 +0,0 @@ - - - - Spring MVC Application - - - - contextClass - - org.springframework.web.context.support.AnnotationConfigWebApplicationContext - - - - contextConfigLocation - org.baeldung.config - - - - org.springframework.web.context.ContextLoaderListener - - - - - api - org.springframework.web.servlet.DispatcherServlet - 1 - - - api - / - - - - - - - \ No newline at end of file diff --git a/resteasy/.classpath b/resteasy/.classpath new file mode 100644 index 0000000000..3c88c332e3 --- /dev/null +++ b/resteasy/.classpath @@ -0,0 +1,32 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/resteasy/.project b/resteasy/.project new file mode 100644 index 0000000000..7303d59739 --- /dev/null +++ b/resteasy/.project @@ -0,0 +1,42 @@ + + + resteasy-tutorial + + + + + + org.eclipse.wst.jsdt.core.javascriptValidator + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.wst.common.project.facet.core.builder + + + + + org.eclipse.wst.validation.validationbuilder + + + + + org.eclipse.m2e.core.maven2Builder + + + + + + org.eclipse.jem.workbench.JavaEMFNature + org.eclipse.wst.common.modulecore.ModuleCoreNature + org.eclipse.jdt.core.javanature + org.eclipse.m2e.core.maven2Nature + org.eclipse.wst.common.project.facet.core.nature + org.eclipse.wst.jsdt.core.jsNature + + diff --git a/resteasy/README.md b/resteasy/README.md new file mode 100644 index 0000000000..722f1dfe93 --- /dev/null +++ b/resteasy/README.md @@ -0,0 +1,8 @@ +========= + +## A Guide to RESTEasy + + +### Relevant Articles: +- [A Guide to RESTEasy](http://www.baeldung.com/resteasy-tutorial) +- [RESTEasy Client API](http://www.baeldung.com/resteasy-client-tutorial) diff --git a/RestEasy Example/pom.xml b/resteasy/pom.xml similarity index 100% rename from RestEasy Example/pom.xml rename to resteasy/pom.xml diff --git a/RestEasy Example/src/main/java/com/baeldung/client/ServicesInterface.java b/resteasy/src/main/java/com/baeldung/client/ServicesInterface.java similarity index 92% rename from RestEasy Example/src/main/java/com/baeldung/client/ServicesInterface.java rename to resteasy/src/main/java/com/baeldung/client/ServicesInterface.java index 3d03c16faf..19ad0c1ec3 100644 --- a/RestEasy Example/src/main/java/com/baeldung/client/ServicesInterface.java +++ b/resteasy/src/main/java/com/baeldung/client/ServicesInterface.java @@ -31,6 +31,6 @@ public interface ServicesInterface { @DELETE @Path("/deletemovie") - Response deleteMovie(@QueryParam("imdbId") String imdbID); + Response deleteMovie(@QueryParam("imdbId") String imdbId); } diff --git a/RestEasy Example/src/main/java/com/baeldung/model/Movie.java b/resteasy/src/main/java/com/baeldung/model/Movie.java similarity index 100% rename from RestEasy Example/src/main/java/com/baeldung/model/Movie.java rename to resteasy/src/main/java/com/baeldung/model/Movie.java diff --git a/RestEasy Example/src/main/java/com/baeldung/server/MovieCrudService.java b/resteasy/src/main/java/com/baeldung/server/MovieCrudService.java similarity index 100% rename from RestEasy Example/src/main/java/com/baeldung/server/MovieCrudService.java rename to resteasy/src/main/java/com/baeldung/server/MovieCrudService.java diff --git a/RestEasy Example/src/main/java/com/baeldung/server/RestEasyServices.java b/resteasy/src/main/java/com/baeldung/server/RestEasyServices.java similarity index 100% rename from RestEasy Example/src/main/java/com/baeldung/server/RestEasyServices.java rename to resteasy/src/main/java/com/baeldung/server/RestEasyServices.java diff --git a/RestEasy Example/src/main/webapp/WEB-INF/classes/logback.xml b/resteasy/src/main/webapp/WEB-INF/classes/logback.xml similarity index 100% rename from RestEasy Example/src/main/webapp/WEB-INF/classes/logback.xml rename to resteasy/src/main/webapp/WEB-INF/classes/logback.xml diff --git a/RestEasy Example/src/main/webapp/WEB-INF/jboss-deployment-structure.xml b/resteasy/src/main/webapp/WEB-INF/jboss-deployment-structure.xml similarity index 100% rename from RestEasy Example/src/main/webapp/WEB-INF/jboss-deployment-structure.xml rename to resteasy/src/main/webapp/WEB-INF/jboss-deployment-structure.xml diff --git a/RestEasy Example/src/main/webapp/WEB-INF/jboss-web.xml b/resteasy/src/main/webapp/WEB-INF/jboss-web.xml similarity index 100% rename from RestEasy Example/src/main/webapp/WEB-INF/jboss-web.xml rename to resteasy/src/main/webapp/WEB-INF/jboss-web.xml diff --git a/RestEasy Example/src/main/webapp/WEB-INF/web.xml b/resteasy/src/main/webapp/WEB-INF/web.xml similarity index 100% rename from RestEasy Example/src/main/webapp/WEB-INF/web.xml rename to resteasy/src/main/webapp/WEB-INF/web.xml diff --git a/resteasy/src/test/java/com/baeldung/server/RestEasyClientTest.java b/resteasy/src/test/java/com/baeldung/server/RestEasyClientTest.java new file mode 100644 index 0000000000..ef18b0f23f --- /dev/null +++ b/resteasy/src/test/java/com/baeldung/server/RestEasyClientTest.java @@ -0,0 +1,179 @@ +package com.baeldung.server; + +import com.baeldung.client.ServicesInterface; +import com.baeldung.model.Movie; +import org.apache.commons.io.IOUtils; +import org.apache.http.impl.client.CloseableHttpClient; +import org.apache.http.impl.client.HttpClients; +import org.apache.http.impl.conn.PoolingHttpClientConnectionManager; +import org.codehaus.jackson.map.DeserializationConfig; +import org.codehaus.jackson.map.ObjectMapper; +import org.jboss.resteasy.client.jaxrs.ResteasyClient; +import org.jboss.resteasy.client.jaxrs.ResteasyClientBuilder; +import org.jboss.resteasy.client.jaxrs.ResteasyWebTarget; +import org.jboss.resteasy.client.jaxrs.engines.ApacheHttpClient4Engine; +import org.junit.Before; +import org.junit.Test; +import javax.naming.NamingException; +import javax.ws.rs.core.Response; +import javax.ws.rs.core.UriBuilder; +import java.io.InputStream; +import java.nio.charset.StandardCharsets; +import java.text.SimpleDateFormat; +import java.util.List; +import java.util.Locale; + +public class RestEasyClientTest { + + public static final UriBuilder FULL_PATH = UriBuilder.fromPath("http://127.0.0.1:8080/RestEasyTutorial/rest"); + Movie transformerMovie = null; + Movie batmanMovie = null; + ObjectMapper jsonMapper = null; + + @Before + public void setup() throws ClassNotFoundException, IllegalAccessException, InstantiationException, NamingException { + + jsonMapper = new ObjectMapper().configure(DeserializationConfig.Feature.FAIL_ON_UNKNOWN_PROPERTIES, false); + jsonMapper.configure(DeserializationConfig.Feature.ACCEPT_SINGLE_VALUE_AS_ARRAY, true); + SimpleDateFormat sdf = new SimpleDateFormat("EEE, dd MMM yyyy HH:mm:ss zzz", Locale.ENGLISH); + jsonMapper.setDateFormat(sdf); + + try (InputStream inputStream = new RestEasyClientTest().getClass().getResourceAsStream("./movies/transformer.json")) { + String transformerMovieAsString = String.format(IOUtils.toString(inputStream, StandardCharsets.UTF_8)); + transformerMovie = jsonMapper.readValue(transformerMovieAsString, Movie.class); + } catch (Exception e) { + e.printStackTrace(); + throw new RuntimeException("Test is going to die ...", e); + } + + try (InputStream inputStream = new RestEasyClientTest().getClass().getResourceAsStream("./movies/batman.json")) { + String batmanMovieAsString = String.format(IOUtils.toString(inputStream, StandardCharsets.UTF_8)); + batmanMovie = jsonMapper.readValue(batmanMovieAsString, Movie.class); + + } catch (Exception e) { + throw new RuntimeException("Test is going to die ...", e); + } + } + + @Test + public void testListAllMovies() { + + ResteasyClient client = new ResteasyClientBuilder().build(); + ResteasyWebTarget target = client.target(FULL_PATH); + ServicesInterface proxy = target.proxy(ServicesInterface.class); + + Response moviesResponse = proxy.addMovie(transformerMovie); + moviesResponse.close(); + moviesResponse = proxy.addMovie(batmanMovie); + moviesResponse.close(); + + List movies = proxy.listMovies(); + System.out.println(movies); + } + + @Test + public void testMovieByImdbId() { + + String transformerImdbId = "tt0418279"; + + ResteasyClient client = new ResteasyClientBuilder().build(); + ResteasyWebTarget target = client.target(FULL_PATH); + ServicesInterface proxy = target.proxy(ServicesInterface.class); + + Response moviesResponse = proxy.addMovie(transformerMovie); + moviesResponse.close(); + + Movie movies = proxy.movieByImdbId(transformerImdbId); + System.out.println(movies); + } + + @Test + public void testAddMovie() { + + ResteasyClient client = new ResteasyClientBuilder().build(); + ResteasyWebTarget target = client.target(FULL_PATH); + ServicesInterface proxy = target.proxy(ServicesInterface.class); + + Response moviesResponse = proxy.addMovie(batmanMovie); + moviesResponse.close(); + moviesResponse = proxy.addMovie(transformerMovie); + + if (moviesResponse.getStatus() != Response.Status.CREATED.getStatusCode()) { + System.out.println("Failed : HTTP error code : " + moviesResponse.getStatus()); + } + + moviesResponse.close(); + System.out.println("Response Code: " + moviesResponse.getStatus()); + } + + @Test + public void testAddMovieMultiConnection() { + + PoolingHttpClientConnectionManager cm = new PoolingHttpClientConnectionManager(); + CloseableHttpClient httpClient = HttpClients.custom() + .setConnectionManager(cm) + .build(); + ApacheHttpClient4Engine engine = new ApacheHttpClient4Engine(httpClient); + ResteasyClient client = new ResteasyClientBuilder().httpEngine(engine).build(); + ResteasyWebTarget target = client.target(FULL_PATH); + ServicesInterface proxy = target.proxy(ServicesInterface.class); + + Response batmanResponse = proxy.addMovie(batmanMovie); + Response transformerResponse = proxy.addMovie(transformerMovie); + + if (batmanResponse.getStatus() != Response.Status.CREATED.getStatusCode()) { + System.out.println("Batman Movie creation Failed : HTTP error code : " + batmanResponse.getStatus()); + } + if (batmanResponse.getStatus() != Response.Status.CREATED.getStatusCode()) { + System.out.println("Batman Movie creation Failed : HTTP error code : " + batmanResponse.getStatus()); + } + + batmanResponse.close(); + transformerResponse.close(); + cm.close(); + + + + } + + @Test + public void testDeleteMovie() { + + ResteasyClient client = new ResteasyClientBuilder().build(); + ResteasyWebTarget target = client.target(FULL_PATH); + ServicesInterface proxy = target.proxy(ServicesInterface.class); + + Response moviesResponse = proxy.addMovie(batmanMovie); + moviesResponse.close(); + moviesResponse = proxy.deleteMovie(batmanMovie.getImdbId()); + + if (moviesResponse.getStatus() != Response.Status.OK.getStatusCode()) { + System.out.println(moviesResponse.readEntity(String.class)); + throw new RuntimeException("Failed : HTTP error code : " + moviesResponse.getStatus()); + } + + moviesResponse.close(); + System.out.println("Response Code: " + moviesResponse.getStatus()); + } + + @Test + public void testUpdateMovie() { + + ResteasyClient client = new ResteasyClientBuilder().build(); + ResteasyWebTarget target = client.target(FULL_PATH); + ServicesInterface proxy = target.proxy(ServicesInterface.class); + + Response moviesResponse = proxy.addMovie(batmanMovie); + moviesResponse.close(); + batmanMovie.setTitle("Batman Begins"); + moviesResponse = proxy.updateMovie(batmanMovie); + + if (moviesResponse.getStatus() != Response.Status.OK.getStatusCode()) { + System.out.println("Failed : HTTP error code : " + moviesResponse.getStatus()); + } + + moviesResponse.close(); + System.out.println("Response Code: " + moviesResponse.getStatus()); + } + +} \ No newline at end of file diff --git a/resteasy/src/test/resources/com/baeldung/server/movies/batman.json b/resteasy/src/test/resources/com/baeldung/server/movies/batman.json new file mode 100644 index 0000000000..82aaaa8f40 --- /dev/null +++ b/resteasy/src/test/resources/com/baeldung/server/movies/batman.json @@ -0,0 +1,4 @@ +{ + "title": "Batman", + "imdbId": "tt0096895" +} \ No newline at end of file diff --git a/resteasy/src/test/resources/com/baeldung/server/movies/transformer.json b/resteasy/src/test/resources/com/baeldung/server/movies/transformer.json new file mode 100644 index 0000000000..634cefc73c --- /dev/null +++ b/resteasy/src/test/resources/com/baeldung/server/movies/transformer.json @@ -0,0 +1,4 @@ +{ + "title": "Transformers", + "imdbId": "tt0418279" +} \ No newline at end of file diff --git a/sandbox/.externalToolBuilders/org.eclipse.wst.jsdt.core.javascriptValidator.launch b/sandbox/.externalToolBuilders/org.eclipse.wst.jsdt.core.javascriptValidator.launch deleted file mode 100644 index 627021fb96..0000000000 --- a/sandbox/.externalToolBuilders/org.eclipse.wst.jsdt.core.javascriptValidator.launch +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/sandbox/.settings/.jsdtscope b/sandbox/.settings/.jsdtscope deleted file mode 100644 index 7b3f0c8b9f..0000000000 --- a/sandbox/.settings/.jsdtscope +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/sandbox/.settings/org.eclipse.jdt.core.prefs b/sandbox/.settings/org.eclipse.jdt.core.prefs deleted file mode 100644 index b126d6476b..0000000000 --- a/sandbox/.settings/org.eclipse.jdt.core.prefs +++ /dev/null @@ -1,95 +0,0 @@ -eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.annotation.missingNonNullByDefaultAnnotation=ignore -org.eclipse.jdt.core.compiler.annotation.nonnull=org.eclipse.jdt.annotation.NonNull -org.eclipse.jdt.core.compiler.annotation.nonnullbydefault=org.eclipse.jdt.annotation.NonNullByDefault -org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jdt.annotation.Nullable -org.eclipse.jdt.core.compiler.annotation.nullanalysis=disabled -org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 -org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve -org.eclipse.jdt.core.compiler.compliance=1.8 -org.eclipse.jdt.core.compiler.debug.lineNumber=generate -org.eclipse.jdt.core.compiler.debug.localVariable=generate -org.eclipse.jdt.core.compiler.debug.sourceFile=generate -org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning -org.eclipse.jdt.core.compiler.problem.assertIdentifier=error -org.eclipse.jdt.core.compiler.problem.autoboxing=ignore -org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning -org.eclipse.jdt.core.compiler.problem.deadCode=warning -org.eclipse.jdt.core.compiler.problem.deprecation=warning -org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled -org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled -org.eclipse.jdt.core.compiler.problem.discouragedReference=warning -org.eclipse.jdt.core.compiler.problem.emptyStatement=ignore -org.eclipse.jdt.core.compiler.problem.enumIdentifier=error -org.eclipse.jdt.core.compiler.problem.explicitlyClosedAutoCloseable=ignore -org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore -org.eclipse.jdt.core.compiler.problem.fatalOptionalError=disabled -org.eclipse.jdt.core.compiler.problem.fieldHiding=error -org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning -org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning -org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning -org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning -org.eclipse.jdt.core.compiler.problem.includeNullInfoFromAsserts=disabled -org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning -org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore -org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=ignore -org.eclipse.jdt.core.compiler.problem.localVariableHiding=error -org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning -org.eclipse.jdt.core.compiler.problem.missingDefaultCase=ignore -org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore -org.eclipse.jdt.core.compiler.problem.missingEnumCaseDespiteDefault=disabled -org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=ignore -org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore -org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled -org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning -org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=ignore -org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning -org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning -org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore -org.eclipse.jdt.core.compiler.problem.nullAnnotationInferenceConflict=error -org.eclipse.jdt.core.compiler.problem.nullReference=warning -org.eclipse.jdt.core.compiler.problem.nullSpecViolation=error -org.eclipse.jdt.core.compiler.problem.nullUncheckedConversion=warning -org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning -org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore -org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=ignore -org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore -org.eclipse.jdt.core.compiler.problem.potentiallyUnclosedCloseable=ignore -org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning -org.eclipse.jdt.core.compiler.problem.redundantNullAnnotation=warning -org.eclipse.jdt.core.compiler.problem.redundantNullCheck=ignore -org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=ignore -org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore -org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=ignore -org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=ignore -org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled -org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning -org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled -org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled -org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore -org.eclipse.jdt.core.compiler.problem.typeParameterHiding=error -org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems=enabled -org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning -org.eclipse.jdt.core.compiler.problem.unclosedCloseable=warning -org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore -org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning -org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore -org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=ignore -org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore -org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=ignore -org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled -org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled -org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled -org.eclipse.jdt.core.compiler.problem.unusedImport=warning -org.eclipse.jdt.core.compiler.problem.unusedLabel=warning -org.eclipse.jdt.core.compiler.problem.unusedLocal=warning -org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation=ignore -org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore -org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled -org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled -org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled -org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning -org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning -org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning -org.eclipse.jdt.core.compiler.source=1.8 diff --git a/sandbox/.settings/org.eclipse.jdt.ui.prefs b/sandbox/.settings/org.eclipse.jdt.ui.prefs deleted file mode 100644 index 471e9b0d81..0000000000 --- a/sandbox/.settings/org.eclipse.jdt.ui.prefs +++ /dev/null @@ -1,55 +0,0 @@ -#Sat Jan 21 23:04:06 EET 2012 -eclipse.preferences.version=1 -editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true -sp_cleanup.add_default_serial_version_id=true -sp_cleanup.add_generated_serial_version_id=false -sp_cleanup.add_missing_annotations=true -sp_cleanup.add_missing_deprecated_annotations=true -sp_cleanup.add_missing_methods=false -sp_cleanup.add_missing_nls_tags=false -sp_cleanup.add_missing_override_annotations=true -sp_cleanup.add_missing_override_annotations_interface_methods=true -sp_cleanup.add_serial_version_id=false -sp_cleanup.always_use_blocks=true -sp_cleanup.always_use_parentheses_in_expressions=true -sp_cleanup.always_use_this_for_non_static_field_access=false -sp_cleanup.always_use_this_for_non_static_method_access=false -sp_cleanup.convert_to_enhanced_for_loop=true -sp_cleanup.correct_indentation=true -sp_cleanup.format_source_code=true -sp_cleanup.format_source_code_changes_only=true -sp_cleanup.make_local_variable_final=true -sp_cleanup.make_parameters_final=true -sp_cleanup.make_private_fields_final=false -sp_cleanup.make_type_abstract_if_missing_method=false -sp_cleanup.make_variable_declarations_final=true -sp_cleanup.never_use_blocks=false -sp_cleanup.never_use_parentheses_in_expressions=false -sp_cleanup.on_save_use_additional_actions=true -sp_cleanup.organize_imports=true -sp_cleanup.qualify_static_field_accesses_with_declaring_class=false -sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true -sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true -sp_cleanup.qualify_static_member_accesses_with_declaring_class=true -sp_cleanup.qualify_static_method_accesses_with_declaring_class=false -sp_cleanup.remove_private_constructors=true -sp_cleanup.remove_trailing_whitespaces=true -sp_cleanup.remove_trailing_whitespaces_all=true -sp_cleanup.remove_trailing_whitespaces_ignore_empty=false -sp_cleanup.remove_unnecessary_casts=true -sp_cleanup.remove_unnecessary_nls_tags=false -sp_cleanup.remove_unused_imports=true -sp_cleanup.remove_unused_local_variables=false -sp_cleanup.remove_unused_private_fields=true -sp_cleanup.remove_unused_private_members=false -sp_cleanup.remove_unused_private_methods=true -sp_cleanup.remove_unused_private_types=true -sp_cleanup.sort_members=false -sp_cleanup.sort_members_all=false -sp_cleanup.use_blocks=false -sp_cleanup.use_blocks_only_for_return_and_throw=false -sp_cleanup.use_parentheses_in_expressions=false -sp_cleanup.use_this_for_non_static_field_access=true -sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true -sp_cleanup.use_this_for_non_static_method_access=true -sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true diff --git a/sandbox/.settings/org.eclipse.m2e.core.prefs b/sandbox/.settings/org.eclipse.m2e.core.prefs deleted file mode 100644 index f897a7f1cb..0000000000 --- a/sandbox/.settings/org.eclipse.m2e.core.prefs +++ /dev/null @@ -1,4 +0,0 @@ -activeProfiles= -eclipse.preferences.version=1 -resolveWorkspaceProjects=true -version=1 diff --git a/sandbox/.settings/org.eclipse.m2e.wtp.prefs b/sandbox/.settings/org.eclipse.m2e.wtp.prefs deleted file mode 100644 index ef86089622..0000000000 --- a/sandbox/.settings/org.eclipse.m2e.wtp.prefs +++ /dev/null @@ -1,2 +0,0 @@ -eclipse.preferences.version=1 -org.eclipse.m2e.wtp.enabledProjectSpecificPrefs=false diff --git a/sandbox/.settings/org.eclipse.wst.common.component b/sandbox/.settings/org.eclipse.wst.common.component deleted file mode 100644 index e98377cb0f..0000000000 --- a/sandbox/.settings/org.eclipse.wst.common.component +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - diff --git a/sandbox/.settings/org.eclipse.wst.common.project.facet.core.xml b/sandbox/.settings/org.eclipse.wst.common.project.facet.core.xml deleted file mode 100644 index f4ef8aa0a5..0000000000 --- a/sandbox/.settings/org.eclipse.wst.common.project.facet.core.xml +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/sandbox/.settings/org.eclipse.wst.jsdt.ui.superType.container b/sandbox/.settings/org.eclipse.wst.jsdt.ui.superType.container deleted file mode 100644 index 3bd5d0a480..0000000000 --- a/sandbox/.settings/org.eclipse.wst.jsdt.ui.superType.container +++ /dev/null @@ -1 +0,0 @@ -org.eclipse.wst.jsdt.launching.baseBrowserLibrary \ No newline at end of file diff --git a/sandbox/.settings/org.eclipse.wst.jsdt.ui.superType.name b/sandbox/.settings/org.eclipse.wst.jsdt.ui.superType.name deleted file mode 100644 index 05bd71b6ec..0000000000 --- a/sandbox/.settings/org.eclipse.wst.jsdt.ui.superType.name +++ /dev/null @@ -1 +0,0 @@ -Window \ No newline at end of file diff --git a/sandbox/.settings/org.eclipse.wst.validation.prefs b/sandbox/.settings/org.eclipse.wst.validation.prefs deleted file mode 100644 index cacf5451ae..0000000000 --- a/sandbox/.settings/org.eclipse.wst.validation.prefs +++ /dev/null @@ -1,14 +0,0 @@ -DELEGATES_PREFERENCE=delegateValidatorList -USER_BUILD_PREFERENCE=enabledBuildValidatorListorg.eclipse.jst.j2ee.internal.classpathdep.ClasspathDependencyValidator; -USER_MANUAL_PREFERENCE=enabledManualValidatorListorg.eclipse.jst.j2ee.internal.classpathdep.ClasspathDependencyValidator; -USER_PREFERENCE=overrideGlobalPreferencestruedisableAllValidationfalseversion1.2.303.v201202090300 -eclipse.preferences.version=1 -override=true -suspend=false -vals/org.eclipse.jst.jsf.ui.JSFAppConfigValidator/global=FF01 -vals/org.eclipse.jst.jsp.core.JSPBatchValidator/global=FF01 -vals/org.eclipse.jst.jsp.core.JSPContentValidator/global=FF01 -vals/org.eclipse.jst.jsp.core.TLDValidator/global=FF01 -vals/org.eclipse.wst.dtd.core.dtdDTDValidator/global=FF01 -vals/org.eclipse.wst.jsdt.web.core.JsBatchValidator/global=TF02 -vf.version=3 diff --git a/sandbox/.settings/org.eclipse.wst.ws.service.policy.prefs b/sandbox/.settings/org.eclipse.wst.ws.service.policy.prefs deleted file mode 100644 index 9cfcabe16f..0000000000 --- a/sandbox/.settings/org.eclipse.wst.ws.service.policy.prefs +++ /dev/null @@ -1,2 +0,0 @@ -eclipse.preferences.version=1 -org.eclipse.wst.ws.service.policy.projectEnabled=false diff --git a/sandbox/.springBeans b/sandbox/.springBeans deleted file mode 100644 index a79097f40d..0000000000 --- a/sandbox/.springBeans +++ /dev/null @@ -1,14 +0,0 @@ - - - 1 - - - - - - - src/main/webapp/WEB-INF/api-servlet.xml - - - - diff --git a/sandbox/README.md b/sandbox/README.md deleted file mode 100644 index 772681ad57..0000000000 --- a/sandbox/README.md +++ /dev/null @@ -1,9 +0,0 @@ -========= - -## Core Java Cookbooks and Examples - -### Relevant Articles: -- [Immutable ArrayList in Java](http://www.baeldung.com/java-immutable-list) -- [Java - Reading a Large File Efficiently](http://www.baeldung.com/java-read-lines-large-file) -- [Java InputStream to String](http://www.baeldung.com/convert-input-stream-to-string) - diff --git a/sandbox/pom.xml b/sandbox/pom.xml deleted file mode 100644 index 95b2df2cb3..0000000000 --- a/sandbox/pom.xml +++ /dev/null @@ -1,176 +0,0 @@ - - 4.0.0 - org.baeldung - sandbox - 0.1-SNAPSHOT - - sandbox - - - - - - - com.google.guava - guava - ${guava.version} - - - - org.apache.commons - commons-collections4 - 4.0 - - - - commons-io - commons-io - 2.4 - - - - org.apache.commons - commons-lang3 - ${commons-lang3.version} - - - - - - - - com.fasterxml.jackson.core - jackson-databind - ${jackson.version} - - - - - - org.slf4j - slf4j-api - ${org.slf4j.version} - - - ch.qos.logback - logback-classic - ${logback.version} - - - - org.slf4j - jcl-over-slf4j - ${org.slf4j.version} - - - - org.slf4j - log4j-over-slf4j - ${org.slf4j.version} - - - - - - junit - junit - ${junit.version} - test - - - - org.hamcrest - hamcrest-core - ${org.hamcrest.version} - test - - - org.hamcrest - hamcrest-library - ${org.hamcrest.version} - test - - - - org.mockito - mockito-core - ${mockito.version} - test - - - - - - core-java - - - src/main/resources - true - - - - - - - org.apache.maven.plugins - maven-compiler-plugin - ${maven-compiler-plugin.version} - - 1.8 - 1.8 - - - - - org.apache.maven.plugins - maven-surefire-plugin - ${maven-surefire-plugin.version} - - - - - - - - - 4.0.3.RELEASE - 3.2.5.RELEASE - - - 4.3.10.Final - 5.1.35 - - - 2.5.5 - - - 1.7.13 - 1.1.3 - - - 5.1.3.Final - - - 16.0.1 - 3.4 - - - 1.3 - 4.12 - 1.10.19 - - 4.4.1 - 4.5 - - 2.4.1 - - - 3.3 - 2.6 - 2.18.1 - 2.7 - 1.4.14 - - - - \ No newline at end of file diff --git a/sandbox/src/main/webapp/WEB-INF/api-servlet.xml b/sandbox/src/main/webapp/WEB-INF/api-servlet.xml deleted file mode 100644 index a675fc6d95..0000000000 --- a/sandbox/src/main/webapp/WEB-INF/api-servlet.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - \ No newline at end of file diff --git a/sandbox/src/main/webapp/WEB-INF/web.xml b/sandbox/src/main/webapp/WEB-INF/web.xml deleted file mode 100644 index 935beae648..0000000000 --- a/sandbox/src/main/webapp/WEB-INF/web.xml +++ /dev/null @@ -1,41 +0,0 @@ - - - - Spring MVC Application - - - - contextClass - - org.springframework.web.context.support.AnnotationConfigWebApplicationContext - - - - contextConfigLocation - org.baeldung.config - - - - org.springframework.web.context.ContextLoaderListener - - - - - api - org.springframework.web.servlet.DispatcherServlet - 1 - - - api - / - - - - - - - \ No newline at end of file diff --git a/sandbox/src/test/java/org/baeldung/codility/CodilityTest1.java b/sandbox/src/test/java/org/baeldung/codility/CodilityTest1.java deleted file mode 100644 index 8bd957c51a..0000000000 --- a/sandbox/src/test/java/org/baeldung/codility/CodilityTest1.java +++ /dev/null @@ -1,72 +0,0 @@ -package org.baeldung.codility; - -import java.util.LinkedHashMap; -import java.util.Map; -import java.util.Random; - -import org.junit.Assert; -import org.junit.Before; -import org.junit.Test; - -public class CodilityTest1 { - - @Before - public final void before() { - // - } - - // tests - - @Test - public final void whenSolutionIsCalculated1_thenCorrect() { - final int[] A = new int[] { 1, 4, 3, 3, 1, 2 }; - final int solution = solution(A); - Assert.assertEquals(4, solution); - } - - @Test - public final void whenSolutionIsCalculated2_thenCorrect() { - final int[] A = new int[] { 6, 4, 4, 6 }; - final int solution = solution(A); - Assert.assertEquals(-1, solution); - } - - @Test - public final void whenSolutionIsCalculated3_thenCorrect() { - final int[] A = new int[100000]; - final Random random = new Random(); - for (final int index : A) { - A[index] = random.nextInt(); - } - - final long start = System.currentTimeMillis(); - final int solution = solution(A); - final long end = System.currentTimeMillis(); - System.out.println("Time: " + (end - start)); - System.out.println(solution); - } - - // - - final int solution(final int elements[]) { - final Map collector = new LinkedHashMap(); - Integer currentValue = null; - for (final int element : elements) { - currentValue = collector.get(element); - if (currentValue == null) { - collector.put(element, 1); - } else if (currentValue >= 1) { - collector.put(element, ++currentValue); - } - } - - for (final Map.Entry entry : collector.entrySet()) { - if (entry.getValue() == 1) { - return entry.getKey(); - } - } - - return -1; - } - -} diff --git a/sandbox/src/test/java/org/baeldung/codility/CodilityTest2.java b/sandbox/src/test/java/org/baeldung/codility/CodilityTest2.java deleted file mode 100644 index d92e9001f9..0000000000 --- a/sandbox/src/test/java/org/baeldung/codility/CodilityTest2.java +++ /dev/null @@ -1,72 +0,0 @@ -package org.baeldung.codility; - -import java.util.regex.Matcher; -import java.util.regex.Pattern; - -import org.junit.Assert; -import org.junit.Test; - -public class CodilityTest2 { - - // tests - - @Test - public final void whenSolutionIsCalculated1_thenCorrect() { - final int solution = solution(955); - Assert.assertEquals(4, solution); - } - - @Test - public final void whenSolutionIsCalculated2_thenCorrect() { - final int solution = solution(102); - Assert.assertEquals(-1, solution); - } - - @Test - public final void whenSolutionIsCalculated3_thenCorrect() { - final int solution = solution(2); - Assert.assertEquals(-1, solution); - } - - @Test - public final void whenSolutionIsCalculated4_thenCorrect() { - final int solution = solution2("codilitycodilityco"); - Assert.assertEquals(8, solution); - } - - // - - public final int solution(final int decimal) { - final String binaryString = Integer.toBinaryString(decimal); - int lastPeriod = -1; - for (int period = 1; period < (binaryString.length() / 2 + 1); period++) { - final Matcher m = Pattern.compile("(\\S{" + period + ",})(?=.*?\\1)").matcher(binaryString); - final boolean found = m.find(); - if (found && m.groupCount() > 0) { - lastPeriod = period; - } - if (!found) { - break; - } - } - - return lastPeriod; - } - - public final int solution2(final String binaryString) { - int lastPeriod = -1; - for (int period = 1; period < (binaryString.length() / 2 + 1); period++) { - final Matcher m = Pattern.compile("(\\S{" + period + ",})(?=.*?\\1)").matcher(binaryString); - final boolean found = m.find(); - if (found && m.groupCount() > 0) { - lastPeriod = period; - } - if (!found) { - break; - } - } - - return lastPeriod; - } - -} diff --git a/sandbox/src/test/java/org/baeldung/codility/CodilityTest3.java b/sandbox/src/test/java/org/baeldung/codility/CodilityTest3.java deleted file mode 100644 index a7067be7b0..0000000000 --- a/sandbox/src/test/java/org/baeldung/codility/CodilityTest3.java +++ /dev/null @@ -1,207 +0,0 @@ -package org.baeldung.codility; - -import java.util.HashMap; -import java.util.Map; - -import org.junit.Assert; -import org.junit.Test; - -public class CodilityTest3 { - - // tests - - @Test - public final void whenSolutionIsCalculated1_thenCorrect() { - final int[] moves = new int[] { 1, 3, 2, 5, 4, 4, 6, 3, 2 }; - final int solution = solution(moves); - Assert.assertEquals(7, solution); - } - - // - - public int solution(final int[] moves) { - final World world = new World(); - int nextMove = 0; - for (final int move : moves) { - switch (nextMove) { - case 0: - if (world.moveNorth(move)) { - nextMove = 1; - break; - } else { - return world.movesCount; - } - case 1: - if (world.moveEast(move)) { - nextMove = 2; - break; - } else { - return world.movesCount; - } - case 2: - if (world.moveSouth(move)) { - nextMove = 3; - break; - } else { - return world.movesCount; - } - case 3: - if (world.moveWest(move)) { - nextMove = 0; - break; - } else { - return world.movesCount; - } - default: - throw new IllegalStateException(); - } - } - - return world.movesCount; - } - -} - -class World { - int movesCount = 1; - int currentX = 0; - int currentY = 0; - Map minXAtY; - Map maxXAtY; - Map minYAtX; - Map maxYAtX; - - public World() { - minXAtY = new HashMap<>(); - maxXAtY = new HashMap<>(); - minYAtX = new HashMap<>(); - maxYAtX = new HashMap<>(); - } - - final boolean moveNorth(final int steps) { - if (isMoveNorthValid(steps)) { - storeMoveNorth(steps); - movesCount++; - return true; - } - return false; - } - - final boolean moveEast(final int steps) { - if (isMoveEastValid(steps)) { - storeMoveEast(steps); - movesCount++; - return true; - } - return false; - } - - final boolean moveSouth(final int steps) { - if (isMoveSouthValid(steps)) { - storeMoveSouth(steps); - movesCount++; - return true; - } - return false; - } - - final boolean moveWest(final int steps) { - if (isMoveWestValid(steps)) { - storeMoveWest(steps); - movesCount++; - return true; - } - return false; - } - - // - - private boolean isMoveNorthValid(final int steps) { - int currentPosition = currentY; - for (int i = 1; i <= steps; i++) { - currentPosition += 1; - if (minXAtY.get(currentPosition) != null && minXAtY.get(currentPosition) > currentX) { - return false; - } - if (maxXAtY.get(currentPosition) != null && maxXAtY.get(currentPosition) < currentX) { - return false; - } - } - return true; - } - - private boolean isMoveEastValid(final int steps) { // - int currentPosition = currentX; - for (int i = 1; i <= steps; i++) { - currentPosition += 1; - if (minYAtX.get(currentPosition) != null && minYAtX.get(currentPosition) < currentY) { - return false; - } - if (maxYAtX.get(currentPosition) != null && maxYAtX.get(currentPosition) > currentY) { - return false; - } - } - return true; - } - - private boolean isMoveSouthValid(final int steps) { - int currentPosition = currentY; - for (int i = 1; i <= steps; i++) { - currentPosition -= 1; - if (minXAtY.get(currentPosition) != null && minXAtY.get(currentPosition) < currentX) { - return false; - } - if (maxXAtY.get(currentPosition) != null && maxXAtY.get(currentPosition) > currentX) { - return false; - } - } - return true; - } - - private boolean isMoveWestValid(final int steps) { - int currentPosition = currentX; - for (int i = 1; i <= steps; i++) { - currentPosition -= 1; - if (minYAtX.get(currentPosition) != null && minYAtX.get(currentPosition) > currentY) { - return false; - } - if (maxYAtX.get(currentPosition) != null && maxYAtX.get(currentPosition) < currentY) { - return false; - } - } - return true; - } - - private void storeMoveNorth(final int steps) { - currentY = currentY + steps; - final Integer currentMaxYAtThisLevel = maxYAtX.get(currentX); - if (currentMaxYAtThisLevel == null || currentMaxYAtThisLevel == null && currentMaxYAtThisLevel < currentY) { - maxYAtX.put(currentX, currentY); - } - } - - private void storeMoveEast(final int steps) { - currentX = currentX + steps; - final Integer currentMaxXAtThisLevel = maxXAtY.get(currentY); - if (currentMaxXAtThisLevel == null || currentMaxXAtThisLevel == null && currentMaxXAtThisLevel < currentX) { - maxXAtY.put(currentY, currentX); - } - } - - private void storeMoveSouth(final int steps) { - currentY = currentY - steps; - final Integer currentMinYAtThisLevel = minYAtX.get(currentX); - if (currentMinYAtThisLevel == null || currentMinYAtThisLevel == null && currentMinYAtThisLevel > currentY) { - minYAtX.put(currentX, currentY); - } - } - - private void storeMoveWest(final int steps) { - currentX = currentX - steps; - final Integer currentMinXAtThisLevel = minXAtY.get(currentY); - if (currentMinXAtThisLevel == null || currentMinXAtThisLevel == null && currentMinXAtThisLevel > currentX) { - minXAtY.put(currentY, currentX); - } - } - -} diff --git a/sandbox/src/test/resources/.gitignore b/sandbox/src/test/resources/.gitignore deleted file mode 100644 index 83c05e60c8..0000000000 --- a/sandbox/src/test/resources/.gitignore +++ /dev/null @@ -1,13 +0,0 @@ -*.class - -#folders# -/target -/neoDb* -/data -/src/main/webapp/WEB-INF/classes -*/META-INF/* - -# Packaged files # -*.jar -*.war -*.ear \ No newline at end of file diff --git a/spring-all/pom.xml b/spring-all/pom.xml index 6ce8ad7196..8ff09e5e17 100644 --- a/spring-all/pom.xml +++ b/spring-all/pom.xml @@ -1,6 +1,6 @@ 4.0.0 - org.baeldung + com.baeldung spring-all 0.1-SNAPSHOT @@ -217,14 +217,14 @@ - 4.2.4.RELEASE - 4.0.3.RELEASE + 4.2.5.RELEASE + 4.0.4.RELEASE 3.20.0-GA 1.2 4.3.11.Final - 5.1.37 + 5.1.38 1.7.13 @@ -245,14 +245,14 @@ 4.4.1 4.5 - 2.4.1 + 2.9.0 - 3.3 + 3.5.1 2.6 - 2.18.1 + 2.19.1 2.7 - 1.4.15 + 1.4.18 diff --git a/spring-data-elasticsearch/.classpath b/spring-apache-camel/.classpath similarity index 100% rename from spring-data-elasticsearch/.classpath rename to spring-apache-camel/.classpath diff --git a/spring-data-elasticsearch/.project b/spring-apache-camel/.project similarity index 94% rename from spring-data-elasticsearch/.project rename to spring-apache-camel/.project index 09b9a781ed..7725877f6a 100644 --- a/spring-data-elasticsearch/.project +++ b/spring-apache-camel/.project @@ -1,6 +1,6 @@ - spring-data-elasticsearch + spring-apache-camel diff --git a/spring-apache-camel/README.md b/spring-apache-camel/README.md new file mode 100644 index 0000000000..4015760f7d --- /dev/null +++ b/spring-apache-camel/README.md @@ -0,0 +1,33 @@ + +

Configure and Use Apache Camel with Spring

+ +This article will demonstrate how to configure and use Apache Camel with Spring Framework. + +

Relevant Articles

+ + + +

Framework Versions:

+ +
    +
  • Spring 4.2.4
  • +
  • Apache Camel 2.16.1
  • +
+ +

Build and Run Application

+ +To build this application execute following maven command in ApacheCamelFileProcessor directory. + +mvn clean install + +To run this application you can either run our main class App from your IDE or you can execute following maven command: + +mvn exec:java -Dexec.mainClass="App" + +

Relevant Articles on Baeldung

+ diff --git a/spring-apache-camel/pom.xml b/spring-apache-camel/pom.xml new file mode 100644 index 0000000000..fbea9b779d --- /dev/null +++ b/spring-apache-camel/pom.xml @@ -0,0 +1,67 @@ + + 4.0.0 + org.apache.camel + spring-apache-camel + jar + 1.0-SNAPSHOT + spring-apache-camel + http://maven.apache.org + + + 2.16.1 + 4.2.4.RELEASE + 1.7 + 4.1 + + + + + + junit + junit + ${junit.version} + test + + + + org.apache.camel + camel-core + ${env.camel.version} + + + + org.apache.camel + camel-spring + ${env.camel.version} + + + + org.apache.camel + camel-stream + ${env.camel.version} + + + + org.springframework + spring-context + ${env.spring.version} + + + + + + + + maven-compiler-plugin + + true + true + ${java.version} + ${java.version} + ${java.version} + + + + + diff --git a/spring-apache-camel/src/main/java/com/baeldung/camel/main/App.java b/spring-apache-camel/src/main/java/com/baeldung/camel/main/App.java new file mode 100644 index 0000000000..ac0605a215 --- /dev/null +++ b/spring-apache-camel/src/main/java/com/baeldung/camel/main/App.java @@ -0,0 +1,12 @@ +package com.baeldung.camel.main; + +import org.springframework.context.support.ClassPathXmlApplicationContext; + +public class App { + public static void main(final String[] args) throws Exception { + ClassPathXmlApplicationContext applicationContext = new ClassPathXmlApplicationContext("camel-context.xml"); + // Keep main thread alive for some time to let application finish processing the input files. + Thread.sleep(5000); + applicationContext.close(); + } +} \ No newline at end of file diff --git a/spring-apache-camel/src/main/java/com/baeldung/camel/processor/FileProcessor.java b/spring-apache-camel/src/main/java/com/baeldung/camel/processor/FileProcessor.java new file mode 100644 index 0000000000..971dd206cd --- /dev/null +++ b/spring-apache-camel/src/main/java/com/baeldung/camel/processor/FileProcessor.java @@ -0,0 +1,14 @@ +package com.baeldung.camel.processor; + +import org.apache.camel.Exchange; +import org.apache.camel.Processor; + +public class FileProcessor implements Processor { + + public void process(Exchange exchange) throws Exception { + String originalFileContent = exchange.getIn().getBody(String.class); + String upperCaseFileContent = originalFileContent.toUpperCase(); + exchange.getIn().setBody(upperCaseFileContent); + } + +} diff --git a/spring-apache-camel/src/main/resources/camel-context.xml b/spring-apache-camel/src/main/resources/camel-context.xml new file mode 100644 index 0000000000..0c10e0ecef --- /dev/null +++ b/spring-apache-camel/src/main/resources/camel-context.xml @@ -0,0 +1,39 @@ + + + + + + + + + + + + + + + + + + + ${body.toLowerCase()} + + + + + + + + .......... File content conversion completed .......... + + + + + + + + + \ No newline at end of file diff --git a/spring-apache-camel/src/test/data/sampleInputFile/file.txt b/spring-apache-camel/src/test/data/sampleInputFile/file.txt new file mode 100644 index 0000000000..e057427864 --- /dev/null +++ b/spring-apache-camel/src/test/data/sampleInputFile/file.txt @@ -0,0 +1 @@ +This is data that will be processed by a Camel route! \ No newline at end of file diff --git a/spring-apache-camel/src/test/java/org/apache/camel/main/AppTest.java b/spring-apache-camel/src/test/java/org/apache/camel/main/AppTest.java new file mode 100644 index 0000000000..87b20369f3 --- /dev/null +++ b/spring-apache-camel/src/test/java/org/apache/camel/main/AppTest.java @@ -0,0 +1,117 @@ +package org.apache.camel.main; + +import com.baeldung.camel.main.App; +import junit.framework.TestCase; +import org.apache.camel.util.FileUtil; +import org.junit.After; +import org.junit.Before; +import org.junit.Test; + +import java.io.File; +import java.io.FileInputStream; +import java.io.FileOutputStream; +import java.io.IOException; +import java.nio.channels.FileChannel; +import java.nio.file.Files; +import java.nio.file.Paths; + +public class AppTest extends TestCase { + + private static final String FILE_NAME = "file.txt"; + private static final String SAMPLE_INPUT_DIR = "src/test/data/sampleInputFile/"; + private static final String TEST_INPUT_DIR = "src/test/data/input/"; + private static final String UPPERCASE_OUTPUT_DIR = "src/test/data/outputUpperCase/"; + private static final String LOWERCASE_OUTPUT_DIR = "src/test/data/outputLowerCase/"; + + @Before + public void setUp() throws Exception { + // Prepare input file for test + copySampleFileToInputDirectory(); + } + + @After + public void tearDown() throws Exception { + System.out.println("Deleting the test input and output files..."); + deleteFile(TEST_INPUT_DIR); + deleteFile(LOWERCASE_OUTPUT_DIR); + deleteFile(UPPERCASE_OUTPUT_DIR); + } + + @Test + public final void testMain() throws Exception { + App.main(null); + + String inputFileContent = readFileContent(SAMPLE_INPUT_DIR + FILE_NAME); + String outputUpperCase = readFileContent(UPPERCASE_OUTPUT_DIR + FILE_NAME); + String outputLowerCase = readFileContent(LOWERCASE_OUTPUT_DIR + FILE_NAME); + + System.out.println("Input File content = [" + inputFileContent + "]"); + System.out.println("UpperCaseOutput file content = [" + outputUpperCase + "]"); + System.out.println("LowerCaseOtput file content = [" + outputLowerCase + "]"); + + assertEquals(inputFileContent.toUpperCase(), outputUpperCase); + assertEquals(inputFileContent.toLowerCase(), outputLowerCase); + } + + private String readFileContent(String path) throws IOException { + byte[] encoded = Files.readAllBytes(Paths.get(path)); + return new String(encoded); + } + + private void deleteFile(String path) { + try { + FileUtil.removeDir(new File(path)); + } catch (Exception e) { + e.printStackTrace(); + } + } + + /** + * Copy sample input file to input directory. + */ + private void copySampleFileToInputDirectory() { + File sourceFile = new File(SAMPLE_INPUT_DIR + FILE_NAME); + File destFile = new File(TEST_INPUT_DIR + FILE_NAME); + + if (!sourceFile.exists()) { + System.out.println("Sample input file not found at location = [" + SAMPLE_INPUT_DIR + FILE_NAME + "]. Please provide this file."); + } + + if (!destFile.exists()) { + try { + System.out.println("Creating input file = [" + TEST_INPUT_DIR + FILE_NAME + "]"); + + File destDir = new File(TEST_INPUT_DIR); + if (!destDir.exists()) { + destDir.mkdir(); + } + destFile.createNewFile(); + } catch (IOException e) { + e.printStackTrace(); + } + } + FileChannel source = null; + FileChannel destination = null; + + try { + source = new FileInputStream(sourceFile).getChannel(); + destination = new FileOutputStream(destFile).getChannel(); + if (destination != null && source != null) { + destination.transferFrom(source, 0, source.size()); + } + } catch (Exception e) { + e.printStackTrace(); + } finally { + try { + source.close(); + } catch (Exception e) { + e.printStackTrace(); + } + try { + destination.close(); + } catch (Exception e) { + e.printStackTrace(); + } + } + } +} diff --git a/spring-batch/pom.xml b/spring-batch/pom.xml index c85aeff6f3..5538dd912f 100644 --- a/spring-batch/pom.xml +++ b/spring-batch/pom.xml @@ -1,7 +1,7 @@ 4.0.0 - org.baeldung + com.baeldung spring-batch 0.1-SNAPSHOT jar diff --git a/spring-boot/pom.xml b/spring-boot/pom.xml index 3a116a2974..bedab2391e 100644 --- a/spring-boot/pom.xml +++ b/spring-boot/pom.xml @@ -1,6 +1,6 @@ 4.0.0 - org.baeldung + com.baeldung spring-boot 0.0.1-SNAPSHOT war diff --git a/spring-data-cassandra/pom.xml b/spring-data-cassandra/pom.xml index 7e21859b5d..e5f8779942 100644 --- a/spring-data-cassandra/pom.xml +++ b/spring-data-cassandra/pom.xml @@ -2,7 +2,7 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 - org.baeldung + com.baeldung spring-data-cassandra 0.0.1-SNAPSHOT jar @@ -12,7 +12,7 @@ UTF-8 - 4.2.3.RELEASE + 4.2.5.RELEASE 1.3.2.RELEASE diff --git a/spring-data-couchbase-2/.classpath b/spring-data-couchbase-2/.classpath new file mode 100644 index 0000000000..f4c34adf1f --- /dev/null +++ b/spring-data-couchbase-2/.classpath @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/spring-data-couchbase-2/.project b/spring-data-couchbase-2/.project new file mode 100644 index 0000000000..1690ad8ce2 --- /dev/null +++ b/spring-data-couchbase-2/.project @@ -0,0 +1,30 @@ + + + spring-data-couchbase-2 + This project is a simple template for a jar utility using Spring. + + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.springframework.ide.eclipse.core.springbuilder + + + + + org.eclipse.m2e.core.maven2Builder + + + + + + org.springframework.ide.eclipse.core.springnature + org.eclipse.jdt.core.javanature + org.eclipse.m2e.core.maven2Nature + + diff --git a/spring-security-login-and-registration/.springBeans b/spring-data-couchbase-2/.springBeans similarity index 52% rename from spring-security-login-and-registration/.springBeans rename to spring-data-couchbase-2/.springBeans index 8096aa036b..0c014a97b6 100644 --- a/spring-security-login-and-registration/.springBeans +++ b/spring-data-couchbase-2/.springBeans @@ -1,15 +1,20 @@ 1 - + - - + + + true + false + + + diff --git a/spring-data-couchbase-2/README.md b/spring-data-couchbase-2/README.md new file mode 100644 index 0000000000..e58e37e090 --- /dev/null +++ b/spring-data-couchbase-2/README.md @@ -0,0 +1,35 @@ +## Spring Data Couchbase Tutorial Project + +### Relevant Articles: +- [Spring Data Couchbase](http://www.baeldung.com/spring-data-couchbase) + +### Overview +This Maven project contains the Java code for Spring Data Couchbase +entities, repositories, and template-based services +as described in the tutorial, as well as a unit test +for each service implementation. + +### Working with the Code +The project was developed and tested using Java 7 nad 8 in the Eclipse-based +Spring Source Toolkit (STS) and therefore should run fine in any +recent version of Eclipse or another IDE of your choice +that supports Java 7 or later. + +### Building the Project +You can also build the project using Maven outside of any IDE: +``` +mvn clean install +``` + +### Running the tests +There are three test classes in src/test/java in the package +org.baeldung.spring.data.couchbase.service: +- PersonServiceTest (abstract) +- PersonRepositoryTest (concrete) +- PersonTemplateServiceTest (concrete) + +The latter two may be run as JUnit tests from your IDE +or using the Maven command line: +``` +mvn test +``` diff --git a/spring-data-couchbase-2/pom.xml b/spring-data-couchbase-2/pom.xml new file mode 100644 index 0000000000..93b3dbddb4 --- /dev/null +++ b/spring-data-couchbase-2/pom.xml @@ -0,0 +1,105 @@ + + 4.0.0 + org.baeldung + spring-data-couchbase-2 + 0.1-SNAPSHOT + spring-data-couchbase-2 + jar + + + + + + org.springframework + spring-context + ${spring-framework.version} + + + org.springframework + spring-context-support + ${spring-framework.version} + + + org.springframework.data + spring-data-couchbase + ${spring-data-couchbase.version} + + + + + org.hibernate + hibernate-validator + ${hibernate-validator.version} + + + + joda-time + joda-time + ${joda-time.version} + + + + + org.slf4j + slf4j-api + ${org.slf4j.version} + compile + + + ch.qos.logback + logback-classic + ${logback.version} + + + org.slf4j + jcl-over-slf4j + ${org.slf4j.version} + + + org.slf4j + log4j-over-slf4j + ${org.slf4j.version} + + + + + org.springframework + spring-test + ${spring-framework.version} + test + + + junit + junit + ${junit.version} + test + + + + + + + maven-compiler-plugin + 2.3.2 + + 1.7 + 1.7 + + + + + + + 1.7 + UTF-8 + 4.2.4.RELEASE + 2.0.0.RELEASE + 5.2.4.Final + 2.9.2 + 1.1.3 + 1.7.12 + 4.11 + + + + diff --git a/spring-data-couchbase-2/src/main/java/org/baeldung/spring/data/couchbase/MyCouchbaseConfig.java b/spring-data-couchbase-2/src/main/java/org/baeldung/spring/data/couchbase/MyCouchbaseConfig.java new file mode 100644 index 0000000000..5c0b1a93ca --- /dev/null +++ b/spring-data-couchbase-2/src/main/java/org/baeldung/spring/data/couchbase/MyCouchbaseConfig.java @@ -0,0 +1,32 @@ +package org.baeldung.spring.data.couchbase; + +import java.util.Arrays; +import java.util.List; + +import org.springframework.context.annotation.Configuration; +import org.springframework.data.couchbase.config.AbstractCouchbaseConfiguration; +import org.springframework.data.couchbase.repository.config.EnableCouchbaseRepositories; + +@Configuration +@EnableCouchbaseRepositories(basePackages={"org.baeldung.spring.data.couchbase"}) +public class MyCouchbaseConfig extends AbstractCouchbaseConfiguration { + + public static final List NODE_LIST = Arrays.asList("localhost"); + public static final String BUCKET_NAME = "baeldung"; + public static final String BUCKET_PASSWORD = ""; + + @Override + protected List getBootstrapHosts() { + return NODE_LIST; + } + + @Override + protected String getBucketName() { + return BUCKET_NAME; + } + + @Override + protected String getBucketPassword() { + return BUCKET_PASSWORD; + } +} diff --git a/spring-data-couchbase-2/src/main/java/org/baeldung/spring/data/couchbase/model/Person.java b/spring-data-couchbase-2/src/main/java/org/baeldung/spring/data/couchbase/model/Person.java new file mode 100644 index 0000000000..9220e157ed --- /dev/null +++ b/spring-data-couchbase-2/src/main/java/org/baeldung/spring/data/couchbase/model/Person.java @@ -0,0 +1,87 @@ +package org.baeldung.spring.data.couchbase.model; + +import javax.validation.constraints.NotNull; + +import org.joda.time.DateTime; +import org.springframework.data.annotation.Id; +import org.springframework.data.couchbase.core.mapping.Document; + +import com.couchbase.client.java.repository.annotation.Field; + +@Document +public class Person { + + @Id + private String id; + @Field + @NotNull + private String firstName; + @Field + @NotNull + private String lastName; + @Field + @NotNull + private DateTime created; + @Field + private DateTime updated; + + public Person(String id, String firstName, String lastName) { + this.id = id; + this.firstName = firstName; + this.lastName = lastName; + } + + public String getId() { + return id; + } + public void setId(String id) { + this.id = id; + } + public String getFirstName() { + return firstName; + } + public void setFirstName(String firstName) { + this.firstName = firstName; + } + public String getLastName() { + return lastName; + } + public void setLastName(String lastName) { + this.lastName = lastName; + } + public DateTime getCreated() { + return created; + } + public void setCreated(DateTime created) { + this.created = created; + } + public DateTime getUpdated() { + return updated; + } + public void setUpdated(DateTime updated) { + this.updated = updated; + } + + @Override + public int hashCode() { + int hash = 1; + if(id != null) { + hash = hash * 31 + id.hashCode(); + } + if(firstName != null) { + hash = hash * 31 + firstName.hashCode(); + } + if(lastName != null) { + hash = hash * 31 + lastName.hashCode(); + } + return hash; + } + + @Override + public boolean equals(Object obj) { + if((obj == null) || (obj.getClass() != this.getClass())) return false; + if(obj == this) return true; + Person other = (Person) obj; + return this.hashCode() == other.hashCode(); + } +} diff --git a/spring-data-couchbase-2/src/main/java/org/baeldung/spring/data/couchbase/repos/PersonRepository.java b/spring-data-couchbase-2/src/main/java/org/baeldung/spring/data/couchbase/repos/PersonRepository.java new file mode 100644 index 0000000000..14b77759e3 --- /dev/null +++ b/spring-data-couchbase-2/src/main/java/org/baeldung/spring/data/couchbase/repos/PersonRepository.java @@ -0,0 +1,11 @@ +package org.baeldung.spring.data.couchbase.repos; + +import java.util.List; + +import org.baeldung.spring.data.couchbase.model.Person; +import org.springframework.data.repository.CrudRepository; + +public interface PersonRepository extends CrudRepository { + List findByFirstName(String firstName); + List findByLastName(String lastName); +} diff --git a/spring-data-couchbase-2/src/main/java/org/baeldung/spring/data/couchbase/service/PersonRepositoryService.java b/spring-data-couchbase-2/src/main/java/org/baeldung/spring/data/couchbase/service/PersonRepositoryService.java new file mode 100644 index 0000000000..90cc36780a --- /dev/null +++ b/spring-data-couchbase-2/src/main/java/org/baeldung/spring/data/couchbase/service/PersonRepositoryService.java @@ -0,0 +1,58 @@ +package org.baeldung.spring.data.couchbase.service; + +import java.util.ArrayList; +import java.util.Iterator; +import java.util.List; + +import org.baeldung.spring.data.couchbase.model.Person; +import org.baeldung.spring.data.couchbase.repos.PersonRepository; +import org.joda.time.DateTime; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Qualifier; +import org.springframework.stereotype.Service; + +@Service +@Qualifier("PersonRepositoryService") +public class PersonRepositoryService implements PersonService { + + private PersonRepository repo; + @Autowired + public void setPersonRepository(PersonRepository repo) { + this.repo = repo; + } + + public Person findOne(String id) { + return repo.findOne(id); + } + + public List findAll() { + List people = new ArrayList(); + Iterator it = repo.findAll().iterator(); + while(it.hasNext()) { + people.add(it.next()); + } + return people; + } + + public List findByFirstName(String firstName) { + return repo.findByFirstName(firstName); + } + + public List findByLastName(String lastName) { + return repo.findByLastName(lastName); + } + + public void create(Person person) { + person.setCreated(DateTime.now()); + repo.save(person); + } + + public void update(Person person) { + person.setUpdated(DateTime.now()); + repo.save(person); + } + + public void delete(Person person) { + repo.delete(person); + } +} diff --git a/spring-data-couchbase-2/src/main/java/org/baeldung/spring/data/couchbase/service/PersonService.java b/spring-data-couchbase-2/src/main/java/org/baeldung/spring/data/couchbase/service/PersonService.java new file mode 100644 index 0000000000..a823908b01 --- /dev/null +++ b/spring-data-couchbase-2/src/main/java/org/baeldung/spring/data/couchbase/service/PersonService.java @@ -0,0 +1,22 @@ +package org.baeldung.spring.data.couchbase.service; + +import java.util.List; + +import org.baeldung.spring.data.couchbase.model.Person; + +public interface PersonService { + + Person findOne(String id); + + List findAll(); + + List findByFirstName(String firstName); + + List findByLastName(String lastName); + + void create(Person person); + + void update(Person person); + + void delete(Person person); +} diff --git a/spring-data-couchbase-2/src/main/java/org/baeldung/spring/data/couchbase/service/PersonTemplateService.java b/spring-data-couchbase-2/src/main/java/org/baeldung/spring/data/couchbase/service/PersonTemplateService.java new file mode 100644 index 0000000000..45e9b90a19 --- /dev/null +++ b/spring-data-couchbase-2/src/main/java/org/baeldung/spring/data/couchbase/service/PersonTemplateService.java @@ -0,0 +1,55 @@ +package org.baeldung.spring.data.couchbase.service; + +import java.util.List; + +import org.baeldung.spring.data.couchbase.model.Person; +import org.joda.time.DateTime; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Qualifier; +import org.springframework.data.couchbase.core.CouchbaseTemplate; +import org.springframework.stereotype.Service; + +import com.couchbase.client.java.view.ViewQuery; + +@Service +@Qualifier("PersonTemplateService") +public class PersonTemplateService implements PersonService { + + private static final String DESIGN_DOC = "person"; + + private CouchbaseTemplate template; + @Autowired + public void setCouchbaseTemplate(CouchbaseTemplate template) { + this.template = template; + } + + public Person findOne(String id) { + return template.findById(id, Person.class); + } + + public List findAll() { + return template.findByView(ViewQuery.from(DESIGN_DOC, "all"), Person.class); + } + + public List findByFirstName(String firstName) { + return template.findByView(ViewQuery.from(DESIGN_DOC, "byFirstName"), Person.class); + } + + public List findByLastName(String lastName) { + return template.findByView(ViewQuery.from(DESIGN_DOC, "byLastName"), Person.class); + } + + public void create(Person person) { + person.setCreated(DateTime.now()); + template.insert(person); + } + + public void update(Person person) { + person.setUpdated(DateTime.now()); + template.update(person); + } + + public void delete(Person person) { + template.remove(person); + } +} diff --git a/sandbox/src/main/resources/logback.xml b/spring-data-couchbase-2/src/main/resources/logback.xml similarity index 72% rename from sandbox/src/main/resources/logback.xml rename to spring-data-couchbase-2/src/main/resources/logback.xml index 62d0ea5037..d9067fd1da 100644 --- a/sandbox/src/main/resources/logback.xml +++ b/spring-data-couchbase-2/src/main/resources/logback.xml @@ -7,7 +7,8 @@ - + + diff --git a/spring-data-couchbase-2/src/site/site.xml b/spring-data-couchbase-2/src/site/site.xml new file mode 100644 index 0000000000..dda96feecd --- /dev/null +++ b/spring-data-couchbase-2/src/site/site.xml @@ -0,0 +1,25 @@ + + + + + Spring Sample: ${project.name} + index.html + + + + org.springframework.maven.skins + maven-spring-skin + 1.0.5 + + + + + + + + + + + + + diff --git a/spring-data-couchbase-2/src/test/java/org/baeldung/spring/data/couchbase/IntegrationTest.java b/spring-data-couchbase-2/src/test/java/org/baeldung/spring/data/couchbase/IntegrationTest.java new file mode 100644 index 0000000000..ce2daa92cd --- /dev/null +++ b/spring-data-couchbase-2/src/test/java/org/baeldung/spring/data/couchbase/IntegrationTest.java @@ -0,0 +1,13 @@ +package org.baeldung.spring.data.couchbase; + +import org.junit.runner.RunWith; +import org.springframework.test.context.ContextConfiguration; +import org.springframework.test.context.TestExecutionListeners; +import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; +import org.springframework.test.context.support.DependencyInjectionTestExecutionListener; + +@RunWith(SpringJUnit4ClassRunner.class) +@ContextConfiguration(classes = { MyCouchbaseConfig.class, IntegrationTestConfig.class }) +@TestExecutionListeners(listeners = { DependencyInjectionTestExecutionListener.class }) +public abstract class IntegrationTest { +} diff --git a/spring-data-couchbase-2/src/test/java/org/baeldung/spring/data/couchbase/IntegrationTestConfig.java b/spring-data-couchbase-2/src/test/java/org/baeldung/spring/data/couchbase/IntegrationTestConfig.java new file mode 100644 index 0000000000..6f040c34db --- /dev/null +++ b/spring-data-couchbase-2/src/test/java/org/baeldung/spring/data/couchbase/IntegrationTestConfig.java @@ -0,0 +1,9 @@ +package org.baeldung.spring.data.couchbase; + +import org.springframework.context.annotation.ComponentScan; +import org.springframework.context.annotation.Configuration; + +@Configuration +@ComponentScan(basePackages = "org.baeldung.spring.data.couchbase") +public class IntegrationTestConfig { +} diff --git a/spring-data-couchbase-2/src/test/java/org/baeldung/spring/data/couchbase/TestCouchbaseConfig.java b/spring-data-couchbase-2/src/test/java/org/baeldung/spring/data/couchbase/TestCouchbaseConfig.java new file mode 100644 index 0000000000..4edfb165bf --- /dev/null +++ b/spring-data-couchbase-2/src/test/java/org/baeldung/spring/data/couchbase/TestCouchbaseConfig.java @@ -0,0 +1,11 @@ +package org.baeldung.spring.data.couchbase; + +import org.springframework.data.couchbase.core.convert.MappingCouchbaseConverter; + +public class TestCouchbaseConfig extends MyCouchbaseConfig { + + @Override + public String typeKey() { + return MappingCouchbaseConverter.TYPEKEY_SYNCGATEWAY_COMPATIBLE; + } +} diff --git a/spring-data-couchbase-2/src/test/java/org/baeldung/spring/data/couchbase/service/PersonRepositoryServiceTest.java b/spring-data-couchbase-2/src/test/java/org/baeldung/spring/data/couchbase/service/PersonRepositoryServiceTest.java new file mode 100644 index 0000000000..ce5cf7667d --- /dev/null +++ b/spring-data-couchbase-2/src/test/java/org/baeldung/spring/data/couchbase/service/PersonRepositoryServiceTest.java @@ -0,0 +1,13 @@ +package org.baeldung.spring.data.couchbase.service; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Qualifier; + +public class PersonRepositoryServiceTest extends PersonServiceTest { + + @Autowired + @Qualifier("PersonRepositoryService") + public void setPersonService(PersonService service) { + this.personService = service; + } +} diff --git a/spring-data-couchbase-2/src/test/java/org/baeldung/spring/data/couchbase/service/PersonServiceTest.java b/spring-data-couchbase-2/src/test/java/org/baeldung/spring/data/couchbase/service/PersonServiceTest.java new file mode 100644 index 0000000000..bedae26e00 --- /dev/null +++ b/spring-data-couchbase-2/src/test/java/org/baeldung/spring/data/couchbase/service/PersonServiceTest.java @@ -0,0 +1,126 @@ +package org.baeldung.spring.data.couchbase.service; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertTrue; + +import java.util.List; + +import org.baeldung.spring.data.couchbase.IntegrationTest; +import org.baeldung.spring.data.couchbase.MyCouchbaseConfig; +import org.baeldung.spring.data.couchbase.model.Person; +import org.joda.time.DateTime; +import org.junit.BeforeClass; +import org.junit.Test; + +import com.couchbase.client.java.Bucket; +import com.couchbase.client.java.Cluster; +import com.couchbase.client.java.CouchbaseCluster; +import com.couchbase.client.java.document.JsonDocument; +import com.couchbase.client.java.document.json.JsonObject; + +public abstract class PersonServiceTest extends IntegrationTest { + + static final String typeField = "_class"; + static final String john = "John"; + static final String smith = "Smith"; + static final String johnSmithId = "person:" + john + ":" + smith; + static final Person johnSmith = new Person(johnSmithId, john, smith); + static final JsonObject jsonJohnSmith = JsonObject.empty() + .put(typeField, Person.class.getName()) + .put("firstName", john) + .put("lastName", smith) + .put("created", DateTime.now().getMillis()); + + static final String foo = "Foo"; + static final String bar = "Bar"; + static final String foobarId = "person:" + foo + ":" + bar; + static final Person foobar = new Person(foobarId, foo, bar); + static final JsonObject jsonFooBar = JsonObject.empty() + .put(typeField, Person.class.getName()) + .put("firstName", foo) + .put("lastName", bar) + .put("created", DateTime.now().getMillis()); + + PersonService personService; + + @BeforeClass + public static void setupBeforeClass() { + Cluster cluster = CouchbaseCluster.create(MyCouchbaseConfig.NODE_LIST); + Bucket bucket = cluster.openBucket(MyCouchbaseConfig.BUCKET_NAME, MyCouchbaseConfig.BUCKET_PASSWORD); + bucket.upsert(JsonDocument.create(johnSmithId, jsonJohnSmith)); + bucket.upsert(JsonDocument.create(foobarId, jsonFooBar)); + bucket.close(); + cluster.disconnect(); + } + + @Test + public void whenFindingPersonByJohnSmithId_thenReturnsJohnSmith() { + Person actualPerson = personService.findOne(johnSmithId); + assertNotNull(actualPerson); + assertNotNull(actualPerson.getCreated()); + assertEquals(johnSmith, actualPerson); + } + + @Test + public void whenFindingAllPersons_thenReturnsTwoOrMorePersonsIncludingJohnSmithAndFooBar() { + List resultList = personService.findAll(); + assertNotNull(resultList); + assertFalse(resultList.isEmpty()); + assertTrue(resultContains(resultList, johnSmith)); + assertTrue(resultContains(resultList, foobar)); + assertTrue(resultList.size() >= 2); + } + + @Test + public void whenFindingByFirstNameJohn_thenReturnsOnlyPersonsNamedJohn() { + String expectedFirstName = john; + List resultList = personService.findByFirstName(expectedFirstName); + assertNotNull(resultList); + assertFalse(resultList.isEmpty()); + assertTrue(allResultsContainExpectedFirstName(resultList, expectedFirstName)); + } + + @Test + public void whenFindingByLastNameSmith_thenReturnsOnlyPersonsNamedSmith() { + String expectedLastName = smith; + List resultList = personService.findByLastName(expectedLastName); + assertNotNull(resultList); + assertFalse(resultList.isEmpty()); + assertTrue(allResultsContainExpectedLastName(resultList, expectedLastName)); + } + + private boolean resultContains(List resultList, Person person) { + boolean found = false; + for(Person p : resultList) { + if(p.equals(person)) { + found = true; + break; + } + } + return found; + } + + private boolean allResultsContainExpectedFirstName(List resultList, String firstName) { + boolean found = false; + for(Person p : resultList) { + if(p.getFirstName().equals(firstName)) { + found = true; + break; + } + } + return found; + } + + private boolean allResultsContainExpectedLastName(List resultList, String lastName) { + boolean found = false; + for(Person p : resultList) { + if(p.getLastName().equals(lastName)) { + found = true; + break; + } + } + return found; + } +} diff --git a/spring-data-couchbase-2/src/test/java/org/baeldung/spring/data/couchbase/service/PersonTemplateServiceTest.java b/spring-data-couchbase-2/src/test/java/org/baeldung/spring/data/couchbase/service/PersonTemplateServiceTest.java new file mode 100644 index 0000000000..0238fa21fb --- /dev/null +++ b/spring-data-couchbase-2/src/test/java/org/baeldung/spring/data/couchbase/service/PersonTemplateServiceTest.java @@ -0,0 +1,13 @@ +package org.baeldung.spring.data.couchbase.service; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Qualifier; + +public class PersonTemplateServiceTest extends PersonServiceTest { + + @Autowired + @Qualifier("PersonTemplateService") + public void setPersonService(PersonService service) { + this.personService = service; + } +} diff --git a/spring-data-couchbase-2/src/test/resources/logback.xml b/spring-data-couchbase-2/src/test/resources/logback.xml new file mode 100644 index 0000000000..d9067fd1da --- /dev/null +++ b/spring-data-couchbase-2/src/test/resources/logback.xml @@ -0,0 +1,17 @@ + + + + + web - %date [%thread] %-5level %logger{36} - %message%n + + + + + + + + + + + + \ No newline at end of file diff --git a/spring-data-elasticsearch/README.md b/spring-data-elasticsearch/README.md index 0dae92e0e7..74d9e4f642 100644 --- a/spring-data-elasticsearch/README.md +++ b/spring-data-elasticsearch/README.md @@ -1,4 +1,5 @@ ## Spring Data Elasticsearch +- [Introduction to Spring Data Elasticsearch](http://www.baeldung.com/spring-data-elasticsearch-tutorial) ### Build the Project with Tests Running ``` diff --git a/spring-data-elasticsearch/pom.xml b/spring-data-elasticsearch/pom.xml index 7ac6dd0fcf..27fb521dbc 100644 --- a/spring-data-elasticsearch/pom.xml +++ b/spring-data-elasticsearch/pom.xml @@ -2,7 +2,7 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 - org.baeldung + com.baeldung spring-data-elasticsearch 0.0.1-SNAPSHOT jar @@ -11,8 +11,10 @@ UTF-8 - 1.3.2.RELEASE - 4.2.2.RELEASE + + 1.3.2.RELEASE + 4.2.5.RELEASE + 4.11 1.7.12 1.1.3 diff --git a/spring-data-elasticsearch/src/main/java/com/baeldung/spring/data/es/config/Config.java b/spring-data-elasticsearch/src/main/java/com/baeldung/spring/data/es/config/Config.java index 78e4083a28..3857056b70 100644 --- a/spring-data-elasticsearch/src/main/java/com/baeldung/spring/data/es/config/Config.java +++ b/spring-data-elasticsearch/src/main/java/com/baeldung/spring/data/es/config/Config.java @@ -1,5 +1,6 @@ package com.baeldung.spring.data.es.config; +import org.elasticsearch.client.Client; import org.elasticsearch.common.settings.ImmutableSettings; import org.elasticsearch.node.NodeBuilder; import org.slf4j.Logger; @@ -17,20 +18,14 @@ import java.nio.file.Path; import java.nio.file.Paths; @Configuration -@EnableElasticsearchRepositories(basePackages = "com.baeldung.repository") +@EnableElasticsearchRepositories(basePackages = "com.baeldung.spring.data.es.repository") @ComponentScan(basePackages = {"com.baeldung.spring.data.es.service"}) public class Config { private static Logger logger = LoggerFactory.getLogger(Config.class); @Bean - public NodeBuilder nodeBuilder() { - return new NodeBuilder(); - } - - @Bean - public ElasticsearchOperations elasticsearchTemplate() { - + public Client client() { try { Path tmpDir = Files.createTempDirectory(Paths.get(System.getProperty("java.io.tmpdir")), "elasticsearch_data"); @@ -40,14 +35,19 @@ public class Config { logger.debug(tmpDir.toAbsolutePath().toString()); - return new ElasticsearchTemplate(nodeBuilder() + return new NodeBuilder() .local(true) .settings(elasticsearchSettings.build()) .node() - .client()); + .client(); } catch (IOException ioex) { logger.error("Cannot create temp dir", ioex); throw new RuntimeException(); } } + + @Bean + public ElasticsearchOperations elasticsearchTemplate() { + return new ElasticsearchTemplate(client()); + } } diff --git a/spring-data-elasticsearch/src/main/java/com/baeldung/spring/data/es/dao/ArticleRepository.java b/spring-data-elasticsearch/src/main/java/com/baeldung/spring/data/es/dao/ArticleRepository.java deleted file mode 100644 index 313eba5b36..0000000000 --- a/spring-data-elasticsearch/src/main/java/com/baeldung/spring/data/es/dao/ArticleRepository.java +++ /dev/null @@ -1,15 +0,0 @@ -package com.baeldung.spring.data.es.dao; - -import com.baeldung.spring.data.es.model.Article; -import org.springframework.data.domain.Page; -import org.springframework.data.domain.Pageable; -import org.springframework.data.elasticsearch.annotations.Query; -import org.springframework.data.elasticsearch.repository.ElasticsearchRepository; - -public interface ArticleRepository extends ElasticsearchRepository { - - Page
findByAuthorsName(String name, Pageable pageable); - - @Query("{\"bool\": {\"must\": [{\"match\": {\"authors.name\": \"?0\"}}]}}") - Page
findByAuthorsNameUsingCustomQuery(String name, Pageable pageable); -} diff --git a/spring-data-elasticsearch/src/main/java/com/baeldung/spring/data/es/model/Article.java b/spring-data-elasticsearch/src/main/java/com/baeldung/spring/data/es/model/Article.java index dd472982ce..40db51ac13 100644 --- a/spring-data-elasticsearch/src/main/java/com/baeldung/spring/data/es/model/Article.java +++ b/spring-data-elasticsearch/src/main/java/com/baeldung/spring/data/es/model/Article.java @@ -1,23 +1,35 @@ package com.baeldung.spring.data.es.model; import org.springframework.data.annotation.Id; -import org.springframework.data.elasticsearch.annotations.Document; -import org.springframework.data.elasticsearch.annotations.Field; -import org.springframework.data.elasticsearch.annotations.FieldIndex; -import org.springframework.data.elasticsearch.annotations.FieldType; +import org.springframework.data.elasticsearch.annotations.*; +import java.util.Arrays; import java.util.List; +import static org.springframework.data.elasticsearch.annotations.FieldIndex.not_analyzed; +import static org.springframework.data.elasticsearch.annotations.FieldType.Nested; +import static org.springframework.data.elasticsearch.annotations.FieldType.String; + @Document(indexName = "blog", type = "article") public class Article { @Id private String id; - @Field(type = FieldType.String, index = FieldIndex.not_analyzed) + + @MultiField( + mainField = @Field(type = String), + otherFields = { + @NestedField(index = not_analyzed, dotSuffix = "verbatim", type = String) + } + ) private String title; - @Field(type = FieldType.Nested) + + @Field(type = Nested) private List authors; + @Field(type = String, index = not_analyzed) + private String[] tags; + public Article() { } @@ -49,12 +61,21 @@ public class Article { this.authors = authors; } + public String[] getTags() { + return tags; + } + + public void setTags(String... tags) { + this.tags = tags; + } + @Override public String toString() { return "Article{" + "id='" + id + '\'' + ", title='" + title + '\'' + ", authors=" + authors + + ", tags=" + Arrays.toString(tags) + '}'; } } diff --git a/spring-data-elasticsearch/src/main/java/com/baeldung/spring/data/es/repository/ArticleRepository.java b/spring-data-elasticsearch/src/main/java/com/baeldung/spring/data/es/repository/ArticleRepository.java index 27628950d7..8aef865401 100644 --- a/spring-data-elasticsearch/src/main/java/com/baeldung/spring/data/es/repository/ArticleRepository.java +++ b/spring-data-elasticsearch/src/main/java/com/baeldung/spring/data/es/repository/ArticleRepository.java @@ -5,7 +5,9 @@ import org.springframework.data.domain.Page; import org.springframework.data.domain.Pageable; import org.springframework.data.elasticsearch.annotations.Query; import org.springframework.data.elasticsearch.repository.ElasticsearchRepository; +import org.springframework.stereotype.Repository; +@Repository public interface ArticleRepository extends ElasticsearchRepository { Page
findByAuthorsName(String name, Pageable pageable); diff --git a/spring-data-elasticsearch/src/test/java/com/baeldung/spring/data/es/ElasticSearchQueryTest.java b/spring-data-elasticsearch/src/test/java/com/baeldung/spring/data/es/ElasticSearchQueryTest.java new file mode 100644 index 0000000000..fbc18cbb4c --- /dev/null +++ b/spring-data-elasticsearch/src/test/java/com/baeldung/spring/data/es/ElasticSearchQueryTest.java @@ -0,0 +1,211 @@ +package com.baeldung.spring.data.es; + +import com.baeldung.spring.data.es.config.Config; +import com.baeldung.spring.data.es.model.Article; +import com.baeldung.spring.data.es.model.Author; +import com.baeldung.spring.data.es.service.ArticleService; +import org.elasticsearch.action.ActionFuture; +import org.elasticsearch.action.index.IndexRequest; +import org.elasticsearch.action.index.IndexResponse; +import org.elasticsearch.action.search.SearchResponse; +import org.elasticsearch.client.Client; +import org.elasticsearch.common.unit.Fuzziness; +import org.elasticsearch.index.query.MultiMatchQueryBuilder; +import org.elasticsearch.index.query.QueryBuilder; +import org.elasticsearch.search.aggregations.Aggregation; +import org.elasticsearch.search.aggregations.AggregationBuilders; +import org.elasticsearch.search.aggregations.bucket.terms.StringTerms; +import org.elasticsearch.search.aggregations.bucket.terms.Terms; +import org.elasticsearch.search.aggregations.bucket.terms.TermsBuilder; +import org.junit.Before; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.data.elasticsearch.core.ElasticsearchTemplate; +import org.springframework.data.elasticsearch.core.query.NativeSearchQueryBuilder; +import org.springframework.data.elasticsearch.core.query.SearchQuery; +import org.springframework.test.context.ContextConfiguration; +import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; +import org.springframework.test.context.support.AnnotationConfigContextLoader; + +import java.util.Collections; +import java.util.List; +import java.util.Map; +import java.util.concurrent.TimeUnit; + +import static java.util.Arrays.asList; +import static java.util.stream.Collectors.toList; +import static org.elasticsearch.index.query.MatchQueryBuilder.Operator.AND; +import static org.elasticsearch.index.query.QueryBuilders.*; +import static org.junit.Assert.assertEquals; + +@RunWith(SpringJUnit4ClassRunner.class) +@ContextConfiguration(classes = {Config.class}, loader = AnnotationConfigContextLoader.class) +public class ElasticSearchQueryTest { + + @Autowired + private ElasticsearchTemplate elasticsearchTemplate; + + @Autowired + private ArticleService articleService; + + @Autowired + private Client client; + + private final Author johnSmith = new Author("John Smith"); + private final Author johnDoe = new Author("John Doe"); + + @Before + public void before() { + elasticsearchTemplate.deleteIndex(Article.class); + elasticsearchTemplate.createIndex(Article.class); + elasticsearchTemplate.putMapping(Article.class); + elasticsearchTemplate.refresh(Article.class, true); + + Article article = new Article("Spring Data Elasticsearch"); + article.setAuthors(asList(johnSmith, johnDoe)); + article.setTags("elasticsearch", "spring data"); + articleService.save(article); + + article = new Article("Search engines"); + article.setAuthors(asList(johnDoe)); + article.setTags("search engines", "tutorial"); + articleService.save(article); + + article = new Article("Second Article About Elasticsearch"); + article.setAuthors(asList(johnSmith)); + article.setTags("elasticsearch", "spring data"); + articleService.save(article); + + article = new Article("Elasticsearch Tutorial"); + article.setAuthors(asList(johnDoe)); + article.setTags("elasticsearch"); + articleService.save(article); + } + + @Test + public void givenFullTitle_whenRunMatchQuery_thenDocIsFound() { + SearchQuery searchQuery = new NativeSearchQueryBuilder() + .withQuery(matchQuery("title", "Search engines").operator(AND)) + .build(); + List
articles = elasticsearchTemplate + .queryForList(searchQuery, Article.class); + assertEquals(1, articles.size()); + } + + @Test + public void givenOneTermFromTitle_whenRunMatchQuery_thenDocIsFound() { + SearchQuery searchQuery = new NativeSearchQueryBuilder() + .withQuery(matchQuery("title", "Engines Solutions")) + .build(); + List
articles = elasticsearchTemplate + .queryForList(searchQuery, Article.class); + assertEquals(1, articles.size()); + assertEquals("Search engines", articles.get(0).getTitle()); + } + + @Test + public void givenPartTitle_whenRunMatchQuery_thenDocIsFound() { + SearchQuery searchQuery = new NativeSearchQueryBuilder() + .withQuery(matchQuery("title", "elasticsearch data")) + .build(); + List
articles = elasticsearchTemplate + .queryForList(searchQuery, Article.class); + assertEquals(3, articles.size()); + } + + @Test + public void givenFullTitle_whenRunMatchQueryOnVerbatimField_thenDocIsFound() { + SearchQuery searchQuery = new NativeSearchQueryBuilder() + .withQuery(matchQuery("title.verbatim", "Second Article About Elasticsearch")) + .build(); + List
articles = elasticsearchTemplate + .queryForList(searchQuery, Article.class); + assertEquals(1, articles.size()); + + searchQuery = new NativeSearchQueryBuilder() + .withQuery(matchQuery("title.verbatim", "Second Article About")) + .build(); + articles = elasticsearchTemplate + .queryForList(searchQuery, Article.class); + assertEquals(0, articles.size()); + } + + @Test + public void givenNestedObject_whenQueryByAuthorsName_thenFoundArticlesByThatAuthor() { + QueryBuilder builder = nestedQuery("authors", + boolQuery().must(termQuery("authors.name", "smith"))); + + SearchQuery searchQuery = new NativeSearchQueryBuilder().withQuery(builder).build(); + List
articles = elasticsearchTemplate.queryForList(searchQuery, Article.class); + + assertEquals(2, articles.size()); + } + + @Test + public void givenAnalyzedQuery_whenMakeAggregationOnTermCount_thenEachTokenCountsSeparately() { + TermsBuilder aggregation = AggregationBuilders.terms("top_tags").field("title"); + SearchResponse response = client.prepareSearch("blog").setTypes("article") + .addAggregation(aggregation).execute().actionGet(); + + Map results = response.getAggregations().asMap(); + StringTerms topTags = (StringTerms) results.get("top_tags"); + + List keys = topTags.getBuckets().stream().map(b -> b.getKey()).collect(toList()); + Collections.sort(keys); + assertEquals(asList("about", "article", "data", "elasticsearch", + "engines", "search", "second", "spring", "tutorial"), keys); + } + + @Test + public void givenNotAnalyzedQuery_whenMakeAggregationOnTermCount_thenEachTermCountsIndividually() { + TermsBuilder aggregation = AggregationBuilders.terms("top_tags").field("tags") + .order(Terms.Order.aggregation("_count", false)); + SearchResponse response = client.prepareSearch("blog").setTypes("article") + .addAggregation(aggregation).execute().actionGet(); + + Map results = response.getAggregations().asMap(); + StringTerms topTags = (StringTerms) results.get("top_tags"); + + List keys = topTags.getBuckets().stream().map(b -> b.getKey()).collect(toList()); + assertEquals(asList("elasticsearch", "spring data", "search engines", "tutorial"), keys); + } + + @Test + public void givenNotExactPhrase_whenUseSlop_thenQueryMatches() { + SearchQuery searchQuery = new NativeSearchQueryBuilder() + .withQuery(matchPhraseQuery("title", "spring elasticsearch").slop(1)) + .build(); + List
articles = elasticsearchTemplate + .queryForList(searchQuery, Article.class); + assertEquals(1, articles.size()); + } + + @Test + public void givenPhraseWithType_whenUseFuzziness_thenQueryMatches() { + SearchQuery searchQuery = new NativeSearchQueryBuilder() + .withQuery(matchQuery("title", "spring date elasticserch") + .operator(AND) + .fuzziness(Fuzziness.ONE) + .prefixLength(3)) + .build(); + + List
articles = elasticsearchTemplate + .queryForList(searchQuery, Article.class); + assertEquals(1, articles.size()); + } + + @Test + public void givenMultimatchQuery_whenDoSearch_thenAllProvidedFieldsMatch() { + SearchQuery searchQuery = new NativeSearchQueryBuilder() + .withQuery(multiMatchQuery("tutorial") + .field("title") + .field("tags") + .type(MultiMatchQueryBuilder.Type.BEST_FIELDS)) + .build(); + + List
articles = elasticsearchTemplate + .queryForList(searchQuery, Article.class); + assertEquals(2, articles.size()); + } +} diff --git a/spring-data-elasticsearch/src/test/java/com/baeldung/spring/data/es/ElasticSearchTest.java b/spring-data-elasticsearch/src/test/java/com/baeldung/spring/data/es/ElasticSearchTest.java index 34ccfd788e..7b48772d3f 100644 --- a/spring-data-elasticsearch/src/test/java/com/baeldung/spring/data/es/ElasticSearchTest.java +++ b/spring-data-elasticsearch/src/test/java/com/baeldung/spring/data/es/ElasticSearchTest.java @@ -21,6 +21,7 @@ import java.util.List; import static java.util.Arrays.asList; import static org.elasticsearch.index.query.FilterBuilders.regexpFilter; +import static org.elasticsearch.index.query.MatchQueryBuilder.Operator.AND; import static org.elasticsearch.index.query.QueryBuilders.*; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; @@ -31,6 +32,7 @@ public class ElasticSearchTest { @Autowired private ElasticsearchTemplate elasticsearchTemplate; + @Autowired private ArticleService articleService; @@ -126,4 +128,13 @@ public class ElasticSearchTest { assertEquals(count - 1, articleService.count()); } + + @Test + public void givenSavedDoc_whenOneTermMatches_thenFindByTitle() { + SearchQuery searchQuery = new NativeSearchQueryBuilder() + .withQuery(matchQuery("title", "Search engines").operator(AND)) + .build(); + List
articles = elasticsearchTemplate.queryForList(searchQuery, Article.class); + assertEquals(1, articles.size()); + } } diff --git a/spring-data-mongodb/pom.xml b/spring-data-mongodb/pom.xml index 558af930b3..102344a3fa 100644 --- a/spring-data-mongodb/pom.xml +++ b/spring-data-mongodb/pom.xml @@ -1,7 +1,7 @@ 4.0.0 - org.baeldung + com.baeldung spring-data-mongodb 0.0.1-SNAPSHOT @@ -118,13 +118,13 @@ UTF-8 - 4.2.4.RELEASE + 4.2.5.RELEASE 1.7.1.RELEASE 1.3 4.11 - 2.4.1 + 2.9.0 3.6.6 1.1.3 diff --git a/spring-data-redis/README.md b/spring-data-redis/README.md index b9b2e5d93d..89eae99f05 100644 --- a/spring-data-redis/README.md +++ b/spring-data-redis/README.md @@ -1,7 +1,7 @@ ## Spring Data Redis ### Relevant Articles: -- [Introduction to Spring Data Redis] +- [Introduction to Spring Data Redis](http://www.baeldung.com/spring-data-redis-tutorial) ### Build the Project with Tests Running ``` diff --git a/spring-data-redis/pom.xml b/spring-data-redis/pom.xml index 98da69934c..25686fca16 100644 --- a/spring-data-redis/pom.xml +++ b/spring-data-redis/pom.xml @@ -1,76 +1,76 @@ - 4.0.0 + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + + 4.0.0 + com.baeldung + spring-data-redis + 1.0 + jar - org.baeldung - sprint-data-redis - 0.0.1-SNAPSHOT - jar + + UTF-8 + 4.2.5.RELEASE + 1.6.2.RELEASE + 0.8.0 + - - UTF-8 - 4.2.2.RELEASE - 1.6.2.RELEASE - 0.8.0 - + + + org.springframework.data + spring-data-redis + ${spring-data-redis} + - - - org.springframework.data - spring-data-redis - ${spring-data-redis} - + + cglib + cglib-nodep + 2.2 + - - cglib - cglib-nodep - 2.2 - + + log4j + log4j + 1.2.16 + - - log4j - log4j - 1.2.16 - + + redis.clients + jedis + 2.5.1 + jar + - - redis.clients - jedis - 2.5.1 - jar - + + org.springframework + spring-core + ${spring.version} + - - org.springframework - spring-core - ${spring.version} - + + org.springframework + spring-context + ${spring.version} + - - org.springframework - spring-context - ${spring.version} - + + junit + junit + 4.12 + test + - - junit - junit - 4.12 - test - + + org.springframework + spring-test + ${spring.version} + test + - - org.springframework - spring-test - ${spring.version} - test - - - - com.lordofthejars - nosqlunit-redis - ${nosqlunit.version} - - - + + com.lordofthejars + nosqlunit-redis + ${nosqlunit.version} + + + diff --git a/spring-data-redis/src/main/java/com/baeldung/spring/data/redis/config/RedisConfig.java b/spring-data-redis/src/main/java/com/baeldung/spring/data/redis/config/RedisConfig.java new file mode 100644 index 0000000000..4fd83a2bb6 --- /dev/null +++ b/spring-data-redis/src/main/java/com/baeldung/spring/data/redis/config/RedisConfig.java @@ -0,0 +1,55 @@ +package com.baeldung.spring.data.redis.config; + +import com.baeldung.spring.data.redis.queue.MessagePublisher; +import com.baeldung.spring.data.redis.queue.RedisMessagePublisher; +import com.baeldung.spring.data.redis.queue.RedisMessageSubscriber; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.ComponentScan; +import org.springframework.context.annotation.Configuration; +import org.springframework.data.redis.connection.jedis.JedisConnectionFactory; +import org.springframework.data.redis.core.RedisTemplate; +import org.springframework.data.redis.listener.ChannelTopic; +import org.springframework.data.redis.listener.RedisMessageListenerContainer; +import org.springframework.data.redis.listener.adapter.MessageListenerAdapter; +import org.springframework.data.redis.serializer.GenericToStringSerializer; + +@Configuration +@ComponentScan("com.baeldung.spring.data.redis") +public class RedisConfig { + + @Bean + JedisConnectionFactory jedisConnectionFactory() { + return new JedisConnectionFactory(); + } + + @Bean + public RedisTemplate redisTemplate() { + final RedisTemplate template = new RedisTemplate(); + template.setConnectionFactory(jedisConnectionFactory()); + template.setValueSerializer(new GenericToStringSerializer(Object.class)); + return template; + } + + @Bean + MessageListenerAdapter messageListener() { + return new MessageListenerAdapter(new RedisMessageSubscriber()); + } + + @Bean + RedisMessageListenerContainer redisContainer() { + final RedisMessageListenerContainer container = new RedisMessageListenerContainer(); + container.setConnectionFactory(jedisConnectionFactory()); + container.addMessageListener(messageListener(), topic()); + return container; + } + + @Bean + MessagePublisher redisPublisher() { + return new RedisMessagePublisher(redisTemplate(), topic()); + } + + @Bean + ChannelTopic topic() { + return new ChannelTopic("pubsub:queue"); + } +} diff --git a/spring-data-redis/src/main/java/org/baeldung/spring/data/redis/model/Student.java b/spring-data-redis/src/main/java/com/baeldung/spring/data/redis/model/Student.java similarity index 95% rename from spring-data-redis/src/main/java/org/baeldung/spring/data/redis/model/Student.java rename to spring-data-redis/src/main/java/com/baeldung/spring/data/redis/model/Student.java index acc96899ce..10ba0f5ef4 100644 --- a/spring-data-redis/src/main/java/org/baeldung/spring/data/redis/model/Student.java +++ b/spring-data-redis/src/main/java/com/baeldung/spring/data/redis/model/Student.java @@ -1,4 +1,4 @@ -package org.baeldung.spring.data.redis.model; +package com.baeldung.spring.data.redis.model; import java.io.Serializable; diff --git a/spring-data-redis/src/main/java/com/baeldung/spring/data/redis/queue/MessagePublisher.java b/spring-data-redis/src/main/java/com/baeldung/spring/data/redis/queue/MessagePublisher.java new file mode 100644 index 0000000000..9a42545d6c --- /dev/null +++ b/spring-data-redis/src/main/java/com/baeldung/spring/data/redis/queue/MessagePublisher.java @@ -0,0 +1,7 @@ +package com.baeldung.spring.data.redis.queue; + + +public interface MessagePublisher { + + void publish(final String message); +} diff --git a/spring-data-redis/src/main/java/com/baeldung/spring/data/redis/queue/RedisMessagePublisher.java b/spring-data-redis/src/main/java/com/baeldung/spring/data/redis/queue/RedisMessagePublisher.java new file mode 100644 index 0000000000..f4b3180a37 --- /dev/null +++ b/spring-data-redis/src/main/java/com/baeldung/spring/data/redis/queue/RedisMessagePublisher.java @@ -0,0 +1,28 @@ +package com.baeldung.spring.data.redis.queue; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.data.redis.core.RedisTemplate; +import org.springframework.data.redis.listener.ChannelTopic; +import org.springframework.stereotype.Service; + +@Service +public class RedisMessagePublisher implements MessagePublisher { + + @Autowired + private RedisTemplate redisTemplate; + @Autowired + private ChannelTopic topic; + + public RedisMessagePublisher() { + } + + public RedisMessagePublisher(final RedisTemplate redisTemplate, + final ChannelTopic topic) { + this.redisTemplate = redisTemplate; + this.topic = topic; + } + + public void publish(final String message) { + redisTemplate.convertAndSend(topic.getTopic(), message); + } +} diff --git a/spring-data-redis/src/main/java/com/baeldung/spring/data/redis/queue/RedisMessageSubscriber.java b/spring-data-redis/src/main/java/com/baeldung/spring/data/redis/queue/RedisMessageSubscriber.java new file mode 100644 index 0000000000..849e1fb59f --- /dev/null +++ b/spring-data-redis/src/main/java/com/baeldung/spring/data/redis/queue/RedisMessageSubscriber.java @@ -0,0 +1,19 @@ +package com.baeldung.spring.data.redis.queue; + +import org.springframework.data.redis.connection.Message; +import org.springframework.data.redis.connection.MessageListener; +import org.springframework.stereotype.Service; + +import java.util.ArrayList; +import java.util.List; + +@Service +public class RedisMessageSubscriber implements MessageListener { + + public static List messageList = new ArrayList(); + + public void onMessage(final Message message, final byte[] pattern) { + messageList.add(message.toString()); + System.out.println("Message received: " + new String(message.getBody())); + } +} \ No newline at end of file diff --git a/spring-data-redis/src/main/java/org/baeldung/spring/data/redis/repo/StudentRepository.java b/spring-data-redis/src/main/java/com/baeldung/spring/data/redis/repo/StudentRepository.java similarity index 55% rename from spring-data-redis/src/main/java/org/baeldung/spring/data/redis/repo/StudentRepository.java rename to spring-data-redis/src/main/java/com/baeldung/spring/data/redis/repo/StudentRepository.java index 9e5502f8e0..250c227f00 100644 --- a/spring-data-redis/src/main/java/org/baeldung/spring/data/redis/repo/StudentRepository.java +++ b/spring-data-redis/src/main/java/com/baeldung/spring/data/redis/repo/StudentRepository.java @@ -1,15 +1,13 @@ -package org.baeldung.spring.data.redis.repo; +package com.baeldung.spring.data.redis.repo; -import org.baeldung.spring.data.redis.model.Student; -import org.springframework.data.redis.core.RedisTemplate; -import org.springframework.stereotype.Component; +import com.baeldung.spring.data.redis.model.Student; import java.util.Map; public interface StudentRepository { void saveStudent(Student person); - + void updateStudent(Student student); Student findStudent(String id); diff --git a/spring-data-redis/src/main/java/org/baeldung/spring/data/redis/repo/StudentRepositoryImpl.java b/spring-data-redis/src/main/java/com/baeldung/spring/data/redis/repo/StudentRepositoryImpl.java similarity index 93% rename from spring-data-redis/src/main/java/org/baeldung/spring/data/redis/repo/StudentRepositoryImpl.java rename to spring-data-redis/src/main/java/com/baeldung/spring/data/redis/repo/StudentRepositoryImpl.java index 43294cae58..f13bef0f54 100644 --- a/spring-data-redis/src/main/java/org/baeldung/spring/data/redis/repo/StudentRepositoryImpl.java +++ b/spring-data-redis/src/main/java/com/baeldung/spring/data/redis/repo/StudentRepositoryImpl.java @@ -1,6 +1,6 @@ -package org.baeldung.spring.data.redis.repo; +package com.baeldung.spring.data.redis.repo; -import org.baeldung.spring.data.redis.model.Student; +import com.baeldung.spring.data.redis.model.Student; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.data.redis.core.HashOperations; import org.springframework.data.redis.core.RedisTemplate; diff --git a/spring-data-redis/src/main/java/org/baeldung/spring/data/redis/config/RedisConfig.java b/spring-data-redis/src/main/java/org/baeldung/spring/data/redis/config/RedisConfig.java deleted file mode 100644 index a7e75a438a..0000000000 --- a/spring-data-redis/src/main/java/org/baeldung/spring/data/redis/config/RedisConfig.java +++ /dev/null @@ -1,24 +0,0 @@ -package org.baeldung.spring.data.redis.config; - -import org.springframework.context.annotation.Bean; -import org.springframework.context.annotation.ComponentScan; -import org.springframework.context.annotation.Configuration; -import org.springframework.data.redis.connection.jedis.JedisConnectionFactory; -import org.springframework.data.redis.core.RedisTemplate; - -@Configuration -@ComponentScan("org.baeldung.spring.data.redis") -public class RedisConfig { - - @Bean - JedisConnectionFactory jedisConnectionFactory() { - return new JedisConnectionFactory(); - } - - @Bean - public RedisTemplate redisTemplate() { - final RedisTemplate< String, Object> template = new RedisTemplate(); - template.setConnectionFactory(jedisConnectionFactory()); - return template; - } -} diff --git a/spring-data-redis/src/test/java/com/baeldung/spring/data/redis/RedisMessageListenerTest.java b/spring-data-redis/src/test/java/com/baeldung/spring/data/redis/RedisMessageListenerTest.java new file mode 100644 index 0000000000..403cf990e0 --- /dev/null +++ b/spring-data-redis/src/test/java/com/baeldung/spring/data/redis/RedisMessageListenerTest.java @@ -0,0 +1,30 @@ +package com.baeldung.spring.data.redis; + +import com.baeldung.spring.data.redis.config.RedisConfig; +import com.baeldung.spring.data.redis.queue.RedisMessageSubscriber; +import com.baeldung.spring.data.redis.queue.RedisMessagePublisher; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.test.context.ContextConfiguration; +import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; + +import java.util.UUID; + +import static org.junit.Assert.assertTrue; + +@RunWith(SpringJUnit4ClassRunner.class) +@ContextConfiguration(classes = RedisConfig.class) +public class RedisMessageListenerTest { + + @Autowired + private RedisMessagePublisher redisMessagePublisher; + + @Test + public void testOnMessage() throws Exception { + String message = "Message " + UUID.randomUUID(); + redisMessagePublisher.publish(message); + Thread.sleep(100); + assertTrue(RedisMessageSubscriber.messageList.get(0).contains(message)); + } +} \ No newline at end of file diff --git a/spring-data-redis/src/test/java/org/baeldung/spring/data/redis/repo/StudentRepositoryTest.java b/spring-data-redis/src/test/java/com/baeldung/spring/data/redis/repo/StudentRepositoryTest.java similarity index 93% rename from spring-data-redis/src/test/java/org/baeldung/spring/data/redis/repo/StudentRepositoryTest.java rename to spring-data-redis/src/test/java/com/baeldung/spring/data/redis/repo/StudentRepositoryTest.java index 08540abd36..c32dfc7670 100644 --- a/spring-data-redis/src/test/java/org/baeldung/spring/data/redis/repo/StudentRepositoryTest.java +++ b/spring-data-redis/src/test/java/com/baeldung/spring/data/redis/repo/StudentRepositoryTest.java @@ -1,8 +1,7 @@ -package org.baeldung.spring.data.redis.repo; +package com.baeldung.spring.data.redis.repo; -import org.baeldung.spring.data.redis.config.RedisConfig; -import org.baeldung.spring.data.redis.model.Student; -import org.junit.Before; +import com.baeldung.spring.data.redis.config.RedisConfig; +import com.baeldung.spring.data.redis.model.Student; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Autowired; diff --git a/spring-data-rest/README.md b/spring-data-rest/README.md new file mode 100644 index 0000000000..d9be83113b --- /dev/null +++ b/spring-data-rest/README.md @@ -0,0 +1,11 @@ +# About this project +This project contains examples from the [Introduction to Spring Data REST](http://www.baeldung.com/spring-data-rest-intro) article from Baeldung. + +# Running the project +The application uses [Spring Boot](http://projects.spring.io/spring-boot/), so it is easy to run. You can start it any of a few ways: +* Run the `main` method from `SpringDataRestApplication` +* Use the Maven Spring Boot plugin: `mvn spring-boot:run` +* Package the application as a JAR and run it using `java -jar intro-spring-data-rest.jar` + +# Viewing the running application +To view the running application, visit [http://localhost:8080](http://localhost:8080) in your browser diff --git a/spring-data-rest/pom.xml b/spring-data-rest/pom.xml new file mode 100644 index 0000000000..f7f28aa9f1 --- /dev/null +++ b/spring-data-rest/pom.xml @@ -0,0 +1,63 @@ + + + 4.0.0 + + com.baeldung + intro-spring-data-rest + 1.0 + jar + + intro-spring-data-rest + Intro to Spring Data REST + + + org.springframework.boot + spring-boot-starter-parent + 1.3.3.RELEASE + + + + + UTF-8 + 1.8 + + + + + org.springframework.boot + spring-boot-starter + + + + org.springframework.boot + spring-boot-starter-data-rest + + + org.springframework.boot + spring-boot-starter-data-jpa + + + com.h2database + h2 + + + + org.springframework.boot + spring-boot-starter-test + test + + + + + ${project.artifactId} + + + org.springframework.boot + spring-boot-maven-plugin + + + + + + diff --git a/spring-data-rest/src/main/java/com/baeldung/SpringDataRestApplication.java b/spring-data-rest/src/main/java/com/baeldung/SpringDataRestApplication.java new file mode 100644 index 0000000000..6e8e62f52c --- /dev/null +++ b/spring-data-rest/src/main/java/com/baeldung/SpringDataRestApplication.java @@ -0,0 +1,11 @@ +package com.baeldung; + +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; + +@SpringBootApplication +public class SpringDataRestApplication { + public static void main(String[] args) { + SpringApplication.run(SpringDataRestApplication.class, args); + } +} diff --git a/spring-data-rest/src/main/java/com/baeldung/UserRepository.java b/spring-data-rest/src/main/java/com/baeldung/UserRepository.java new file mode 100644 index 0000000000..ebbf0d49ab --- /dev/null +++ b/spring-data-rest/src/main/java/com/baeldung/UserRepository.java @@ -0,0 +1,12 @@ +package com.baeldung; + +import org.springframework.data.repository.PagingAndSortingRepository; +import org.springframework.data.repository.query.Param; +import org.springframework.data.rest.core.annotation.RepositoryRestResource; + +import java.util.List; + +@RepositoryRestResource(collectionResourceRel = "users", path = "users") +public interface UserRepository extends PagingAndSortingRepository { + List findByName(@Param("name") String name); +} diff --git a/spring-data-rest/src/main/java/com/baeldung/WebsiteUser.java b/spring-data-rest/src/main/java/com/baeldung/WebsiteUser.java new file mode 100644 index 0000000000..a7a35a2573 --- /dev/null +++ b/spring-data-rest/src/main/java/com/baeldung/WebsiteUser.java @@ -0,0 +1,41 @@ +package com.baeldung; + +import javax.persistence.Entity; +import javax.persistence.GeneratedValue; +import javax.persistence.GenerationType; +import javax.persistence.Id; + +@Entity +public class WebsiteUser { + + @Id + @GeneratedValue(strategy = GenerationType.AUTO) + private long id; + + private String name; + private String email; + + public long getId() { + return id; + } + + public void setId(long id) { + this.id = id; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getEmail() { + return email; + } + + public void setEmail(String email) { + this.email = email; + } +} diff --git a/mockito-mocks-spring-beans/src/main/resources/application.properties b/spring-data-rest/src/main/resources/application.properties similarity index 100% rename from mockito-mocks-spring-beans/src/main/resources/application.properties rename to spring-data-rest/src/main/resources/application.properties diff --git a/spring-exceptions/pom.xml b/spring-exceptions/pom.xml index 324b7475b3..554bb0c170 100644 --- a/spring-exceptions/pom.xml +++ b/spring-exceptions/pom.xml @@ -1,6 +1,6 @@ 4.0.0 - org.baeldung + com.baeldung spring-exceptions 0.1-SNAPSHOT @@ -203,14 +203,14 @@ - 4.2.4.RELEASE - 4.0.3.RELEASE + 4.2.5.RELEASE + 4.0.4.RELEASE 3.20.0-GA 1.2 4.3.11.Final - 5.1.37 + 5.1.38 7.0.42 @@ -232,15 +232,15 @@ 4.4.1 4.5 - 2.4.1 + 2.9.0 1.8.9 - 3.3 + 3.5.1 2.6 - 2.18.1 + 2.19.1 2.7 - 1.4.15 + 1.4.18 diff --git a/spring-mvc-xml/.classpath b/spring-freemarker/.classpath similarity index 100% rename from spring-mvc-xml/.classpath rename to spring-freemarker/.classpath index 6b533711d3..5c3ac53820 100644 --- a/spring-mvc-xml/.classpath +++ b/spring-freemarker/.classpath @@ -6,32 +6,32 @@ - - - - - - + + + + + + + + + + + - - - - - diff --git a/spring-security-oauth/spring-security-oauth-server/.project b/spring-freemarker/.project similarity index 96% rename from spring-security-oauth/spring-security-oauth-server/.project rename to spring-freemarker/.project index a66e7f1009..1d63e30744 100644 --- a/spring-security-oauth/spring-security-oauth-server/.project +++ b/spring-freemarker/.project @@ -1,6 +1,6 @@ - spring-security-oauth-server + spring4-freemarker-example @@ -21,12 +21,12 @@ - org.springframework.ide.eclipse.core.springbuilder + org.eclipse.wst.validation.validationbuilder - org.eclipse.wst.validation.validationbuilder + org.springframework.ide.eclipse.core.springbuilder @@ -37,9 +37,9 @@ + org.springframework.ide.eclipse.core.springnature org.eclipse.jem.workbench.JavaEMFNature org.eclipse.wst.common.modulecore.ModuleCoreNature - org.springframework.ide.eclipse.core.springnature org.eclipse.jdt.core.javanature org.eclipse.m2e.core.maven2Nature org.eclipse.wst.common.project.facet.core.nature diff --git a/spring-hibernate3/pom.xml b/spring-hibernate3/pom.xml index d88358168f..59053be596 100644 --- a/spring-hibernate3/pom.xml +++ b/spring-hibernate3/pom.xml @@ -1,6 +1,6 @@ 4.0.0 - org.baeldung + com.baeldung spring-hibernate3 0.1-SNAPSHOT @@ -162,13 +162,13 @@ - 4.2.4.RELEASE - 4.0.3.RELEASE + 4.2.5.RELEASE + 4.0.4.RELEASE 3.20.0-GA 3.6.10.Final - 5.1.37 + 5.1.38 7.0.47 @@ -190,13 +190,13 @@ 4.4.1 4.5 - 2.4.1 + 2.9.0 - 3.3 - 2.18.1 + 3.5.1 + 2.19.1 2.7 - 1.4.15 + 1.4.18 diff --git a/spring-hibernate4/pom.xml b/spring-hibernate4/pom.xml index 652636b7cc..3652674614 100644 --- a/spring-hibernate4/pom.xml +++ b/spring-hibernate4/pom.xml @@ -213,15 +213,15 @@ - 4.2.4.RELEASE - 4.0.3.RELEASE + 4.2.5.RELEASE + 4.0.4.RELEASE 1.9.2.RELEASE 3.20.0-GA 4.3.11.Final ${hibernate.version} - 5.1.37 + 5.1.38 8.0.30 1.1 2.2.4 @@ -245,13 +245,13 @@ 4.4.1 4.5 - 2.4.1 + 2.9.0 - 3.3 - 2.18.1 + 3.5.1 + 2.19.1 2.7 - 1.4.15 + 1.4.18 diff --git a/spring-jpa/pom.xml b/spring-jpa/pom.xml index 2e8f818776..25dd960435 100644 --- a/spring-jpa/pom.xml +++ b/spring-jpa/pom.xml @@ -1,7 +1,7 @@ 4.0.0 - org.baeldung + com.baeldung spring-jpa 0.1-SNAPSHOT @@ -179,13 +179,12 @@ - 4.2.4.RELEASE - 4.0.2.RELEASE + 4.2.5.RELEASE 3.20.0-GA 4.3.11.Final - 5.1.37 + 5.1.38 1.8.2.RELEASE @@ -207,13 +206,13 @@ 4.4.1 4.5 - 2.4.1 + 2.9.0 - 3.3 - 2.18.1 + 3.5.1 + 2.19.1 2.7 - 1.4.15 + 1.4.18 diff --git a/spring-mockito/.classpath b/spring-mockito/.classpath new file mode 100644 index 0000000000..6d7587a819 --- /dev/null +++ b/spring-mockito/.classpath @@ -0,0 +1,31 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/sandbox/.gitignore b/spring-mockito/.gitignore similarity index 100% rename from sandbox/.gitignore rename to spring-mockito/.gitignore diff --git a/spring-mockito/.project b/spring-mockito/.project new file mode 100644 index 0000000000..5f0e9cacbc --- /dev/null +++ b/spring-mockito/.project @@ -0,0 +1,35 @@ + + + spring-mockito + + + + + + org.eclipse.wst.common.project.facet.core.builder + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.m2e.core.maven2Builder + + + + + org.springframework.ide.eclipse.core.springbuilder + + + + + + org.springframework.ide.eclipse.core.springnature + org.eclipse.jdt.core.javanature + org.eclipse.m2e.core.maven2Nature + org.eclipse.wst.common.project.facet.core.nature + + diff --git a/mockito-mocks-spring-beans/README.md b/spring-mockito/README.md similarity index 100% rename from mockito-mocks-spring-beans/README.md rename to spring-mockito/README.md diff --git a/mockito-mocks-spring-beans/pom.xml b/spring-mockito/pom.xml similarity index 80% rename from mockito-mocks-spring-beans/pom.xml rename to spring-mockito/pom.xml index 64dc7d83c9..3dcca7aab7 100644 --- a/mockito-mocks-spring-beans/pom.xml +++ b/spring-mockito/pom.xml @@ -1,38 +1,30 @@ - + 4.0.0 com.baeldung - mockito-mocks-spring-beans + spring-mockito 0.0.1-SNAPSHOT jar - mocks + spring-mockito Injecting Mockito Mocks into Spring Beans org.springframework.boot spring-boot-starter-parent - 1.3.1.RELEASE + 1.3.3.RELEASE - - UTF-8 - 1.8 - - org.springframework.boot spring-boot-starter - 1.3.1.RELEASE org.springframework.boot spring-boot-starter-test - 1.3.1.RELEASE test @@ -51,4 +43,9 @@ + + UTF-8 + 1.8 + + diff --git a/mockito-mocks-spring-beans/src/main/java/com/baeldung/MocksApplication.java b/spring-mockito/src/main/java/com/baeldung/MocksApplication.java similarity index 100% rename from mockito-mocks-spring-beans/src/main/java/com/baeldung/MocksApplication.java rename to spring-mockito/src/main/java/com/baeldung/MocksApplication.java diff --git a/mockito-mocks-spring-beans/src/main/java/com/baeldung/NameService.java b/spring-mockito/src/main/java/com/baeldung/NameService.java similarity index 100% rename from mockito-mocks-spring-beans/src/main/java/com/baeldung/NameService.java rename to spring-mockito/src/main/java/com/baeldung/NameService.java diff --git a/mockito-mocks-spring-beans/src/main/java/com/baeldung/UserService.java b/spring-mockito/src/main/java/com/baeldung/UserService.java similarity index 100% rename from mockito-mocks-spring-beans/src/main/java/com/baeldung/UserService.java rename to spring-mockito/src/main/java/com/baeldung/UserService.java diff --git a/spring-mockito/src/main/resources/application.properties b/spring-mockito/src/main/resources/application.properties new file mode 100644 index 0000000000..e69de29bb2 diff --git a/mockito-mocks-spring-beans/src/test/java/com/baeldung/NameServiceTestConfiguration.java b/spring-mockito/src/test/java/com/baeldung/NameServiceTestConfiguration.java similarity index 100% rename from mockito-mocks-spring-beans/src/test/java/com/baeldung/NameServiceTestConfiguration.java rename to spring-mockito/src/test/java/com/baeldung/NameServiceTestConfiguration.java diff --git a/mockito-mocks-spring-beans/src/test/java/com/baeldung/UserServiceTest.java b/spring-mockito/src/test/java/com/baeldung/UserServiceTest.java similarity index 100% rename from mockito-mocks-spring-beans/src/test/java/com/baeldung/UserServiceTest.java rename to spring-mockito/src/test/java/com/baeldung/UserServiceTest.java diff --git a/spring-mvc-java/pom.xml b/spring-mvc-java/pom.xml index d9a578cb8c..d1e24a4d3d 100644 --- a/spring-mvc-java/pom.xml +++ b/spring-mvc-java/pom.xml @@ -1,6 +1,6 @@ 4.0.0 - org.baeldung + com.baeldung spring-mvc-java 0.1-SNAPSHOT spring-mvc-java @@ -99,6 +99,19 @@ thymeleaf ${thymeleaf.version} + + + + com.fasterxml.jackson.core + jackson-core + 2.1.2 + + + com.fasterxml.jackson.core + jackson-databind + 2.1.2 + + @@ -172,12 +185,12 @@ - 4.2.4.RELEASE - 4.0.3.RELEASE + 4.2.5.RELEASE + 4.0.4.RELEASE 2.1.4.RELEASE 4.3.11.Final - 5.1.37 + 5.1.38 1.7.13 1.1.3 @@ -192,13 +205,14 @@ 1.10.19 4.4.1 4.5 - 2.4.1 + 2.9.0 - 3.3 + 3.5.1 2.6 - 2.18.1 + 2.19.1 2.7 - 1.4.17 + 1.4.18 + 1.8.7 diff --git a/spring-mvc-java/src/main/java/org/baeldung/model/Employee.java b/spring-mvc-java/src/main/java/org/baeldung/model/Employee.java new file mode 100644 index 0000000000..5365068a89 --- /dev/null +++ b/spring-mvc-java/src/main/java/org/baeldung/model/Employee.java @@ -0,0 +1,51 @@ +package org.baeldung.model; + +import javax.xml.bind.annotation.XmlRootElement; + +@XmlRootElement +public class Employee { + + private long id; + private String name; + private String contactNumber; + + public Employee() { + super(); + } + + public Employee(final long id, final String name, final String contactNumber) { + this.id = id; + this.name = name; + this.contactNumber = contactNumber; + } + + public String getName() { + return name; + } + + public void setName(final String name) { + this.name = name; + } + + public long getId() { + return id; + } + + public void setId(final long id) { + this.id = id; + } + + public String getContactNumber() { + return contactNumber; + } + + public void setContactNumber(final String contactNumber) { + this.contactNumber = contactNumber; + } + + @Override + public String toString() { + return "Employee [id=" + id + ", name=" + name + ", contactNumber=" + contactNumber + "]"; + } + +} diff --git a/spring-mvc-java/src/main/java/org/baeldung/spring/web/config/ContentManagementWebConfig.java b/spring-mvc-java/src/main/java/org/baeldung/spring/web/config/ContentManagementWebConfig.java new file mode 100644 index 0000000000..2c5b423029 --- /dev/null +++ b/spring-mvc-java/src/main/java/org/baeldung/spring/web/config/ContentManagementWebConfig.java @@ -0,0 +1,52 @@ +package org.baeldung.spring.web.config; + +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; +import org.springframework.http.MediaType; +import org.springframework.web.servlet.ViewResolver; +import org.springframework.web.servlet.config.annotation.ContentNegotiationConfigurer; +import org.springframework.web.servlet.config.annotation.EnableWebMvc; +import org.springframework.web.servlet.config.annotation.ViewControllerRegistry; +import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter; +import org.springframework.web.servlet.view.InternalResourceViewResolver; +import org.springframework.web.servlet.view.JstlView; + +@EnableWebMvc +@Configuration +public class ContentManagementWebConfig extends WebMvcConfigurerAdapter { + + public ContentManagementWebConfig() { + super(); + } + + // API + + @Override + public void configureContentNegotiation(final ContentNegotiationConfigurer configurer) { + configurer.favorPathExtension(false). + favorParameter(true). + parameterName("mediaType"). + ignoreAcceptHeader(true). + useJaf(false). + defaultContentType(MediaType.APPLICATION_JSON). + mediaType("xml", MediaType.APPLICATION_XML). + mediaType("json", MediaType.APPLICATION_JSON); + } + + @Override + public void addViewControllers(final ViewControllerRegistry registry) { + super.addViewControllers(registry); + registry.addViewController("/sample.html"); + } + + @Bean + public ViewResolver viewResolver() { + final InternalResourceViewResolver bean = new InternalResourceViewResolver(); + bean.setViewClass(JstlView.class); + bean.setPrefix("/WEB-INF/view/"); + bean.setSuffix(".jsp"); + bean.setOrder(0); + return bean; + } + +} diff --git a/spring-mvc-xml/src/main/java/org/baeldung/spring/controller/EmployeeController.java b/spring-mvc-java/src/main/java/org/baeldung/web/controller/EmployeeController.java similarity index 57% rename from spring-mvc-xml/src/main/java/org/baeldung/spring/controller/EmployeeController.java rename to spring-mvc-java/src/main/java/org/baeldung/web/controller/EmployeeController.java index 1dbe230adc..e18bbdbf63 100644 --- a/spring-mvc-xml/src/main/java/org/baeldung/spring/controller/EmployeeController.java +++ b/spring-mvc-java/src/main/java/org/baeldung/web/controller/EmployeeController.java @@ -1,33 +1,45 @@ -package org.baeldung.spring.controller; +package org.baeldung.web.controller; -import javax.validation.Valid; +import java.util.HashMap; +import java.util.Map; -import org.baeldung.spring.form.Employee; +import org.baeldung.model.Employee; import org.springframework.stereotype.Controller; import org.springframework.ui.ModelMap; import org.springframework.validation.BindingResult; import org.springframework.web.bind.annotation.ModelAttribute; +import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; +import org.springframework.web.bind.annotation.ResponseBody; import org.springframework.web.servlet.ModelAndView; @Controller public class EmployeeController { + Map employeeMap = new HashMap<>(); + @RequestMapping(value = "/employee", method = RequestMethod.GET) public ModelAndView showForm() { return new ModelAndView("employeeHome", "employee", new Employee()); } + @RequestMapping(value = "/employee/{Id}", produces = { "application/json", "application/xml" }, method = RequestMethod.GET) + public @ResponseBody Employee getEmployeeById(@PathVariable final long Id) { + return employeeMap.get(Id); + } + @RequestMapping(value = "/addEmployee", method = RequestMethod.POST) - public String submit(@Valid @ModelAttribute("employee") final Employee employee, final BindingResult result, final ModelMap model) { + public String submit(@ModelAttribute("employee") final Employee employee, final BindingResult result, final ModelMap model) { if (result.hasErrors()) { return "error"; } - model.addAttribute("name", employee.getName()); model.addAttribute("contactNumber", employee.getContactNumber()); model.addAttribute("id", employee.getId()); + + employeeMap.put(employee.getId(), employee); + return "employeeView"; } diff --git a/spring-mvc-java/src/main/webapp/WEB-INF/view/employeeHome.jsp b/spring-mvc-java/src/main/webapp/WEB-INF/view/employeeHome.jsp new file mode 100644 index 0000000000..c000bea39f --- /dev/null +++ b/spring-mvc-java/src/main/webapp/WEB-INF/view/employeeHome.jsp @@ -0,0 +1,33 @@ +<%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%> +<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%> + + + +Form Example - Register an Employee + + +

Welcome, Enter The Employee Details

+ + + + + + + + + + + + + + + + + + +
Name
Id
Contact Number
+
+ + + + \ No newline at end of file diff --git a/spring-mvc-java/src/main/webapp/WEB-INF/view/employeeView.jsp b/spring-mvc-java/src/main/webapp/WEB-INF/view/employeeView.jsp new file mode 100644 index 0000000000..1457bc5fc8 --- /dev/null +++ b/spring-mvc-java/src/main/webapp/WEB-INF/view/employeeView.jsp @@ -0,0 +1,24 @@ +<%@taglib uri="http://www.springframework.org/tags/form" prefix="form"%> + + +Spring MVC Form Handling + + + +

Submitted Employee Information

+ + + + + + + + + + + + + +
Name :${name}
ID :${id}
Contact Number :${contactNumber}
+ + \ No newline at end of file diff --git a/spring-mvc-no-xml/pom.xml b/spring-mvc-no-xml/pom.xml index da71a699db..202aee7295 100644 --- a/spring-mvc-no-xml/pom.xml +++ b/spring-mvc-no-xml/pom.xml @@ -1,6 +1,6 @@ 4.0.0 - org.baeldung + com.baeldung 0.1-SNAPSHOT spring-mvc-no-xml @@ -144,7 +144,7 @@ - 4.2.4.RELEASE + 4.2.5.RELEASE 1.7.13 @@ -158,14 +158,14 @@ 4.4.1 4.5 - 2.4.1 + 2.9.0 - 3.3 + 3.5.1 2.6 - 2.18.1 + 2.19.1 2.7 - 1.4.15 + 1.4.18 diff --git a/spring-mvc-xml/.externalToolBuilders/org.eclipse.wst.jsdt.core.javascriptValidator.launch b/spring-mvc-xml/.externalToolBuilders/org.eclipse.wst.jsdt.core.javascriptValidator.launch deleted file mode 100644 index 627021fb96..0000000000 --- a/spring-mvc-xml/.externalToolBuilders/org.eclipse.wst.jsdt.core.javascriptValidator.launch +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/spring-mvc-xml/.settings/.jsdtscope b/spring-mvc-xml/.settings/.jsdtscope deleted file mode 100644 index b46b9207a8..0000000000 --- a/spring-mvc-xml/.settings/.jsdtscope +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - - - - - diff --git a/spring-mvc-xml/.settings/org.eclipse.jdt.core.prefs b/spring-mvc-xml/.settings/org.eclipse.jdt.core.prefs deleted file mode 100644 index 5ff04b9f96..0000000000 --- a/spring-mvc-xml/.settings/org.eclipse.jdt.core.prefs +++ /dev/null @@ -1,91 +0,0 @@ -eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.annotation.missingNonNullByDefaultAnnotation=ignore -org.eclipse.jdt.core.compiler.annotation.nonnull=org.eclipse.jdt.annotation.NonNull -org.eclipse.jdt.core.compiler.annotation.nonnullbydefault=org.eclipse.jdt.annotation.NonNullByDefault -org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jdt.annotation.Nullable -org.eclipse.jdt.core.compiler.annotation.nullanalysis=disabled -org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 -org.eclipse.jdt.core.compiler.compliance=1.8 -org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning -org.eclipse.jdt.core.compiler.problem.assertIdentifier=error -org.eclipse.jdt.core.compiler.problem.autoboxing=ignore -org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning -org.eclipse.jdt.core.compiler.problem.deadCode=warning -org.eclipse.jdt.core.compiler.problem.deprecation=warning -org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled -org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled -org.eclipse.jdt.core.compiler.problem.discouragedReference=warning -org.eclipse.jdt.core.compiler.problem.emptyStatement=ignore -org.eclipse.jdt.core.compiler.problem.enumIdentifier=error -org.eclipse.jdt.core.compiler.problem.explicitlyClosedAutoCloseable=ignore -org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore -org.eclipse.jdt.core.compiler.problem.fatalOptionalError=disabled -org.eclipse.jdt.core.compiler.problem.fieldHiding=error -org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning -org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning -org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning -org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning -org.eclipse.jdt.core.compiler.problem.includeNullInfoFromAsserts=disabled -org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning -org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore -org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=ignore -org.eclipse.jdt.core.compiler.problem.localVariableHiding=error -org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning -org.eclipse.jdt.core.compiler.problem.missingDefaultCase=ignore -org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore -org.eclipse.jdt.core.compiler.problem.missingEnumCaseDespiteDefault=disabled -org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=ignore -org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore -org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled -org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning -org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=ignore -org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning -org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning -org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore -org.eclipse.jdt.core.compiler.problem.nullAnnotationInferenceConflict=error -org.eclipse.jdt.core.compiler.problem.nullReference=warning -org.eclipse.jdt.core.compiler.problem.nullSpecViolation=error -org.eclipse.jdt.core.compiler.problem.nullUncheckedConversion=warning -org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning -org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore -org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=ignore -org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore -org.eclipse.jdt.core.compiler.problem.potentiallyUnclosedCloseable=ignore -org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning -org.eclipse.jdt.core.compiler.problem.redundantNullAnnotation=warning -org.eclipse.jdt.core.compiler.problem.redundantNullCheck=ignore -org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=ignore -org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore -org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=ignore -org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=ignore -org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled -org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning -org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled -org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled -org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore -org.eclipse.jdt.core.compiler.problem.typeParameterHiding=error -org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems=enabled -org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning -org.eclipse.jdt.core.compiler.problem.unclosedCloseable=warning -org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore -org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning -org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore -org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=ignore -org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore -org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=ignore -org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled -org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled -org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled -org.eclipse.jdt.core.compiler.problem.unusedImport=warning -org.eclipse.jdt.core.compiler.problem.unusedLabel=warning -org.eclipse.jdt.core.compiler.problem.unusedLocal=warning -org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation=ignore -org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore -org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled -org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled -org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled -org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning -org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning -org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning -org.eclipse.jdt.core.compiler.source=1.8 diff --git a/spring-mvc-xml/.settings/org.eclipse.jdt.ui.prefs b/spring-mvc-xml/.settings/org.eclipse.jdt.ui.prefs deleted file mode 100644 index 471e9b0d81..0000000000 --- a/spring-mvc-xml/.settings/org.eclipse.jdt.ui.prefs +++ /dev/null @@ -1,55 +0,0 @@ -#Sat Jan 21 23:04:06 EET 2012 -eclipse.preferences.version=1 -editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true -sp_cleanup.add_default_serial_version_id=true -sp_cleanup.add_generated_serial_version_id=false -sp_cleanup.add_missing_annotations=true -sp_cleanup.add_missing_deprecated_annotations=true -sp_cleanup.add_missing_methods=false -sp_cleanup.add_missing_nls_tags=false -sp_cleanup.add_missing_override_annotations=true -sp_cleanup.add_missing_override_annotations_interface_methods=true -sp_cleanup.add_serial_version_id=false -sp_cleanup.always_use_blocks=true -sp_cleanup.always_use_parentheses_in_expressions=true -sp_cleanup.always_use_this_for_non_static_field_access=false -sp_cleanup.always_use_this_for_non_static_method_access=false -sp_cleanup.convert_to_enhanced_for_loop=true -sp_cleanup.correct_indentation=true -sp_cleanup.format_source_code=true -sp_cleanup.format_source_code_changes_only=true -sp_cleanup.make_local_variable_final=true -sp_cleanup.make_parameters_final=true -sp_cleanup.make_private_fields_final=false -sp_cleanup.make_type_abstract_if_missing_method=false -sp_cleanup.make_variable_declarations_final=true -sp_cleanup.never_use_blocks=false -sp_cleanup.never_use_parentheses_in_expressions=false -sp_cleanup.on_save_use_additional_actions=true -sp_cleanup.organize_imports=true -sp_cleanup.qualify_static_field_accesses_with_declaring_class=false -sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true -sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true -sp_cleanup.qualify_static_member_accesses_with_declaring_class=true -sp_cleanup.qualify_static_method_accesses_with_declaring_class=false -sp_cleanup.remove_private_constructors=true -sp_cleanup.remove_trailing_whitespaces=true -sp_cleanup.remove_trailing_whitespaces_all=true -sp_cleanup.remove_trailing_whitespaces_ignore_empty=false -sp_cleanup.remove_unnecessary_casts=true -sp_cleanup.remove_unnecessary_nls_tags=false -sp_cleanup.remove_unused_imports=true -sp_cleanup.remove_unused_local_variables=false -sp_cleanup.remove_unused_private_fields=true -sp_cleanup.remove_unused_private_members=false -sp_cleanup.remove_unused_private_methods=true -sp_cleanup.remove_unused_private_types=true -sp_cleanup.sort_members=false -sp_cleanup.sort_members_all=false -sp_cleanup.use_blocks=false -sp_cleanup.use_blocks_only_for_return_and_throw=false -sp_cleanup.use_parentheses_in_expressions=false -sp_cleanup.use_this_for_non_static_field_access=true -sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true -sp_cleanup.use_this_for_non_static_method_access=true -sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true diff --git a/spring-mvc-xml/.settings/org.eclipse.m2e.core.prefs b/spring-mvc-xml/.settings/org.eclipse.m2e.core.prefs deleted file mode 100644 index f897a7f1cb..0000000000 --- a/spring-mvc-xml/.settings/org.eclipse.m2e.core.prefs +++ /dev/null @@ -1,4 +0,0 @@ -activeProfiles= -eclipse.preferences.version=1 -resolveWorkspaceProjects=true -version=1 diff --git a/spring-mvc-xml/.settings/org.eclipse.m2e.wtp.prefs b/spring-mvc-xml/.settings/org.eclipse.m2e.wtp.prefs deleted file mode 100644 index ef86089622..0000000000 --- a/spring-mvc-xml/.settings/org.eclipse.m2e.wtp.prefs +++ /dev/null @@ -1,2 +0,0 @@ -eclipse.preferences.version=1 -org.eclipse.m2e.wtp.enabledProjectSpecificPrefs=false diff --git a/spring-mvc-xml/.settings/org.eclipse.wst.common.component b/spring-mvc-xml/.settings/org.eclipse.wst.common.component deleted file mode 100644 index fc995759ac..0000000000 --- a/spring-mvc-xml/.settings/org.eclipse.wst.common.component +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - - - diff --git a/spring-mvc-xml/.settings/org.eclipse.wst.common.project.facet.core.xml b/spring-mvc-xml/.settings/org.eclipse.wst.common.project.facet.core.xml deleted file mode 100644 index 9ca0d1c1b7..0000000000 --- a/spring-mvc-xml/.settings/org.eclipse.wst.common.project.facet.core.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/spring-mvc-xml/.settings/org.eclipse.wst.jsdt.ui.superType.container b/spring-mvc-xml/.settings/org.eclipse.wst.jsdt.ui.superType.container deleted file mode 100644 index 3bd5d0a480..0000000000 --- a/spring-mvc-xml/.settings/org.eclipse.wst.jsdt.ui.superType.container +++ /dev/null @@ -1 +0,0 @@ -org.eclipse.wst.jsdt.launching.baseBrowserLibrary \ No newline at end of file diff --git a/spring-mvc-xml/.settings/org.eclipse.wst.jsdt.ui.superType.name b/spring-mvc-xml/.settings/org.eclipse.wst.jsdt.ui.superType.name deleted file mode 100644 index 05bd71b6ec..0000000000 --- a/spring-mvc-xml/.settings/org.eclipse.wst.jsdt.ui.superType.name +++ /dev/null @@ -1 +0,0 @@ -Window \ No newline at end of file diff --git a/spring-mvc-xml/.settings/org.eclipse.wst.validation.prefs b/spring-mvc-xml/.settings/org.eclipse.wst.validation.prefs deleted file mode 100644 index 0d0aee4f72..0000000000 --- a/spring-mvc-xml/.settings/org.eclipse.wst.validation.prefs +++ /dev/null @@ -1,15 +0,0 @@ -DELEGATES_PREFERENCE=delegateValidatorList -USER_BUILD_PREFERENCE=enabledBuildValidatorListorg.eclipse.jst.j2ee.internal.classpathdep.ClasspathDependencyValidator; -USER_MANUAL_PREFERENCE=enabledManualValidatorListorg.eclipse.jst.j2ee.internal.classpathdep.ClasspathDependencyValidator; -USER_PREFERENCE=overrideGlobalPreferencestruedisableAllValidationfalseversion1.2.402.v201212031633 -disabled=06target -eclipse.preferences.version=1 -override=true -suspend=false -vals/org.eclipse.jst.jsf.ui.JSFAppConfigValidator/global=FF01 -vals/org.eclipse.jst.jsp.core.JSPBatchValidator/global=FF01 -vals/org.eclipse.jst.jsp.core.JSPContentValidator/global=FF01 -vals/org.eclipse.jst.jsp.core.TLDValidator/global=FF01 -vals/org.eclipse.wst.dtd.core.dtdDTDValidator/global=FF01 -vals/org.eclipse.wst.jsdt.web.core.JsBatchValidator/global=TF02 -vf.version=3 diff --git a/spring-mvc-xml/.settings/org.eclipse.wst.ws.service.policy.prefs b/spring-mvc-xml/.settings/org.eclipse.wst.ws.service.policy.prefs deleted file mode 100644 index 9cfcabe16f..0000000000 --- a/spring-mvc-xml/.settings/org.eclipse.wst.ws.service.policy.prefs +++ /dev/null @@ -1,2 +0,0 @@ -eclipse.preferences.version=1 -org.eclipse.wst.ws.service.policy.projectEnabled=false diff --git a/spring-mvc-xml/.springBeans b/spring-mvc-xml/.springBeans deleted file mode 100644 index 7623a7e888..0000000000 --- a/spring-mvc-xml/.springBeans +++ /dev/null @@ -1,14 +0,0 @@ - - - 1 - - - - - - - src/main/webapp/WEB-INF/mvc-servlet.xml - - - - diff --git a/spring-mvc-xml/pom.xml b/spring-mvc-xml/pom.xml index 896d744e99..f77efe501b 100644 --- a/spring-mvc-xml/pom.xml +++ b/spring-mvc-xml/pom.xml @@ -1,6 +1,6 @@ 4.0.0 - org.baeldung + com.baeldung 0.1-SNAPSHOT spring-mvc-xml @@ -98,6 +98,18 @@ test + + + com.fasterxml.jackson.core + jackson-core + 2.7.2 + + + com.fasterxml.jackson.core + jackson-databind + 2.7.2 + + @@ -146,7 +158,7 @@ - 4.2.4.RELEASE + 4.2.5.RELEASE 1.7.13 @@ -160,14 +172,14 @@ 4.4.1 4.5 - 2.4.1 + 2.9.0 - 3.3 + 3.5.1 2.6 - 2.18.1 + 2.19.1 2.7 - 1.4.15 + 1.4.18 diff --git a/spring-mvc-xml/src/main/java/org/baeldung/spring/ClientWebConfig.java b/spring-mvc-xml/src/main/java/com/baeldung/spring/ClientWebConfig.java similarity index 93% rename from spring-mvc-xml/src/main/java/org/baeldung/spring/ClientWebConfig.java rename to spring-mvc-xml/src/main/java/com/baeldung/spring/ClientWebConfig.java index c4d819caa5..b5238b04d5 100644 --- a/spring-mvc-xml/src/main/java/org/baeldung/spring/ClientWebConfig.java +++ b/spring-mvc-xml/src/main/java/com/baeldung/spring/ClientWebConfig.java @@ -1,4 +1,4 @@ -package org.baeldung.spring; +package com.baeldung.spring; import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.ImportResource; diff --git a/spring-mvc-xml/src/main/java/org/baeldung/spring/ClientWebConfigJava.java b/spring-mvc-xml/src/main/java/com/baeldung/spring/ClientWebConfigJava.java similarity index 97% rename from spring-mvc-xml/src/main/java/org/baeldung/spring/ClientWebConfigJava.java rename to spring-mvc-xml/src/main/java/com/baeldung/spring/ClientWebConfigJava.java index d2b57da818..06b2c0e461 100644 --- a/spring-mvc-xml/src/main/java/org/baeldung/spring/ClientWebConfigJava.java +++ b/spring-mvc-xml/src/main/java/com/baeldung/spring/ClientWebConfigJava.java @@ -1,4 +1,4 @@ -package org.baeldung.spring; +package com.baeldung.spring; import org.springframework.context.annotation.Bean; import org.springframework.web.servlet.ViewResolver; diff --git a/spring-mvc-xml/src/main/java/com/baeldung/spring/controller/EmployeeController.java b/spring-mvc-xml/src/main/java/com/baeldung/spring/controller/EmployeeController.java new file mode 100644 index 0000000000..aa25f47a2a --- /dev/null +++ b/spring-mvc-xml/src/main/java/com/baeldung/spring/controller/EmployeeController.java @@ -0,0 +1,45 @@ +package com.baeldung.spring.controller; + +import java.util.HashMap; +import java.util.Map; + +import org.springframework.stereotype.Controller; +import org.springframework.ui.ModelMap; +import org.springframework.validation.BindingResult; +import org.springframework.web.bind.annotation.ModelAttribute; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; +import org.springframework.web.bind.annotation.ResponseBody; +import org.springframework.web.servlet.ModelAndView; + +import com.baeldung.spring.form.Employee; + +@Controller +public class EmployeeController { + + Map employeeMap = new HashMap<>(); + + @RequestMapping(value = "/employee", method = RequestMethod.GET) + public ModelAndView showForm() { + return new ModelAndView("employeeHome", "employee", new Employee()); + } + + @RequestMapping(value = "/employee/{Id}", produces = { "application/json", "application/xml" }, method = RequestMethod.GET) + public @ResponseBody Employee getEmployeeById(@PathVariable final long Id) { + return employeeMap.get(Id); + } + + @RequestMapping(value = "/addEmployee", method = RequestMethod.POST) + public String submit(@ModelAttribute("employee") final Employee employee, final BindingResult result, final ModelMap model) { + if (result.hasErrors()) { + return "error"; + } + model.addAttribute("name", employee.getName()); + model.addAttribute("contactNumber", employee.getContactNumber()); + model.addAttribute("id", employee.getId()); + employeeMap.put(employee.getId(), employee); + return "employeeView"; + } + +} diff --git a/spring-mvc-xml/src/main/java/com/baeldung/spring/controller/HelloController.java b/spring-mvc-xml/src/main/java/com/baeldung/spring/controller/HelloController.java new file mode 100644 index 0000000000..cc9d66d4d4 --- /dev/null +++ b/spring-mvc-xml/src/main/java/com/baeldung/spring/controller/HelloController.java @@ -0,0 +1,19 @@ +package com.baeldung.spring.controller; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import org.springframework.web.servlet.ModelAndView; +import org.springframework.web.servlet.mvc.AbstractController; + +public class HelloController extends AbstractController { + + @Override + protected ModelAndView handleRequestInternal(HttpServletRequest request, HttpServletResponse response) throws Exception { + ModelAndView model = new ModelAndView("helloworld"); + model.addObject("msg", "Welcome to Baeldung's Spring Handler Mappings Guide.
This request was mapped" + + " using SimpleUrlHandlerMapping."); + + return model; + } +} diff --git a/spring-mvc-xml/src/main/java/com/baeldung/spring/controller/HelloGuestController.java b/spring-mvc-xml/src/main/java/com/baeldung/spring/controller/HelloGuestController.java new file mode 100644 index 0000000000..614888ae42 --- /dev/null +++ b/spring-mvc-xml/src/main/java/com/baeldung/spring/controller/HelloGuestController.java @@ -0,0 +1,18 @@ +package com.baeldung.spring.controller; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import org.springframework.web.servlet.ModelAndView; +import org.springframework.web.servlet.mvc.AbstractController; + +public class HelloGuestController extends AbstractController { + @Override + protected ModelAndView handleRequestInternal(HttpServletRequest request, HttpServletResponse response) throws Exception { + ModelAndView model = new ModelAndView("helloworld"); + model.addObject("msg", "Welcome to Baeldung's Spring Handler Mappings Guide.
This request was mapped" + + " using ControllerClassNameHandlerMapping."); + + return model; + } +} diff --git a/spring-mvc-xml/src/main/java/com/baeldung/spring/controller/HelloWorldController.java b/spring-mvc-xml/src/main/java/com/baeldung/spring/controller/HelloWorldController.java new file mode 100644 index 0000000000..6ed3d06ab7 --- /dev/null +++ b/spring-mvc-xml/src/main/java/com/baeldung/spring/controller/HelloWorldController.java @@ -0,0 +1,18 @@ +package com.baeldung.spring.controller; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import org.springframework.web.servlet.ModelAndView; +import org.springframework.web.servlet.mvc.AbstractController; + +public class HelloWorldController extends AbstractController { + @Override + protected ModelAndView handleRequestInternal(HttpServletRequest request, HttpServletResponse response) throws Exception { + ModelAndView model = new ModelAndView("helloworld"); + model.addObject("msg", "Welcome to Baeldung's Spring Handler Mappings Guide.
This request was mapped" + + " using BeanNameUrlHandlerMapping."); + + return model; + } +} diff --git a/spring-mvc-xml/src/main/java/com/baeldung/spring/controller/PersonController.java b/spring-mvc-xml/src/main/java/com/baeldung/spring/controller/PersonController.java new file mode 100644 index 0000000000..39dabf86ed --- /dev/null +++ b/spring-mvc-xml/src/main/java/com/baeldung/spring/controller/PersonController.java @@ -0,0 +1,84 @@ +package com.baeldung.spring.controller; + +import java.util.ArrayList; +import java.util.LinkedHashMap; +import java.util.List; +import java.util.Map; + +import javax.validation.Valid; + +import com.baeldung.spring.form.Person; +import com.baeldung.spring.validator.PersonValidator; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Controller; +import org.springframework.ui.Model; +import org.springframework.ui.ModelMap; +import org.springframework.validation.BindingResult; +import org.springframework.web.bind.annotation.ModelAttribute; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; +import org.springframework.web.servlet.ModelAndView; + +@Controller +public class PersonController { + + @Autowired + PersonValidator validator; + + @RequestMapping(value = "/person", method = RequestMethod.GET) + public ModelAndView showForm(final Model model) { + + initData(model); + return new ModelAndView("personForm", "person", new Person()); + } + + @RequestMapping(value = "/addPerson", method = RequestMethod.POST) + public String submit(@Valid @ModelAttribute("person") final Person person, final BindingResult result, + final ModelMap modelMap, final Model model) { + + validator.validate(person, result); + + if (result.hasErrors()) { + + initData(model); + return "personForm"; + } + + modelMap.addAttribute("person", person); + + return "personView"; + } + + private void initData(final Model model) { + + final List favouriteLanguageItem = new ArrayList(); + favouriteLanguageItem.add("Java"); + favouriteLanguageItem.add("C++"); + favouriteLanguageItem.add("Perl"); + model.addAttribute("favouriteLanguageItem", favouriteLanguageItem); + + final List jobItem = new ArrayList(); + jobItem.add("Full time"); + jobItem.add("Part time"); + model.addAttribute("jobItem", jobItem); + + final Map countryItems = new LinkedHashMap(); + countryItems.put("US", "United Stated"); + countryItems.put("IT", "Italy"); + countryItems.put("UK", "United Kingdom"); + countryItems.put("FR", "Grance"); + model.addAttribute("countryItems", countryItems); + + final List fruit = new ArrayList(); + fruit.add("Banana"); + fruit.add("Mango"); + fruit.add("Apple"); + model.addAttribute("fruit", fruit); + + final List books = new ArrayList(); + books.add("The Great Gatsby"); + books.add("Nineteen Eighty-Four"); + books.add("The Lord of the Rings"); + model.addAttribute("books", books); + } +} diff --git a/spring-mvc-xml/src/main/java/com/baeldung/spring/controller/WelcomeController.java b/spring-mvc-xml/src/main/java/com/baeldung/spring/controller/WelcomeController.java new file mode 100644 index 0000000000..5459481674 --- /dev/null +++ b/spring-mvc-xml/src/main/java/com/baeldung/spring/controller/WelcomeController.java @@ -0,0 +1,19 @@ +package com.baeldung.spring.controller; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import org.springframework.web.servlet.ModelAndView; +import org.springframework.web.servlet.mvc.AbstractController; + +public class WelcomeController extends AbstractController { + @Override + protected ModelAndView handleRequestInternal(HttpServletRequest request, HttpServletResponse response) throws Exception { + + ModelAndView model = new ModelAndView("welcome"); + model.addObject("msg", " Baeldung's Spring Handler Mappings Guide.
This request was mapped" + + " using SimpleUrlHandlerMapping."); + + return model; + } +} \ No newline at end of file diff --git a/spring-mvc-xml/src/main/java/org/baeldung/spring/form/Employee.java b/spring-mvc-xml/src/main/java/com/baeldung/spring/form/Employee.java similarity index 88% rename from spring-mvc-xml/src/main/java/org/baeldung/spring/form/Employee.java rename to spring-mvc-xml/src/main/java/com/baeldung/spring/form/Employee.java index 70132b9665..66b2e9f185 100644 --- a/spring-mvc-xml/src/main/java/org/baeldung/spring/form/Employee.java +++ b/spring-mvc-xml/src/main/java/com/baeldung/spring/form/Employee.java @@ -1,8 +1,10 @@ -package org.baeldung.spring.form; +package com.baeldung.spring.form; import javax.validation.constraints.NotNull; import javax.validation.constraints.Size; +import javax.xml.bind.annotation.XmlRootElement; +@XmlRootElement public class Employee { private long id; diff --git a/spring-mvc-xml/src/main/java/com/baeldung/spring/form/Person.java b/spring-mvc-xml/src/main/java/com/baeldung/spring/form/Person.java new file mode 100644 index 0000000000..88e4f9ff4c --- /dev/null +++ b/spring-mvc-xml/src/main/java/com/baeldung/spring/form/Person.java @@ -0,0 +1,152 @@ +package com.baeldung.spring.form; + +import java.util.List; + +import org.hibernate.validator.constraints.NotEmpty; +import org.springframework.web.multipart.MultipartFile; + +public class Person { + + private long id; + + private String name; + private String email; + private String dateOfBirth; + + @NotEmpty + private String password; + private String sex; + private String country; + private String book; + private String job; + private boolean receiveNewsletter; + private String[] hobbies; + private List favouriteLanguage; + private List fruit; + private String notes; + private MultipartFile file; + + public Person() { + super(); + } + + public long getId() { + return id; + } + + public void setId(final long id) { + this.id = id; + } + + public String getName() { + return name; + } + + public void setName(final String name) { + this.name = name; + } + + public String getEmail() { + return email; + } + + public void setEmail(final String email) { + this.email = email; + } + + public String getDateOfBirth() { + return dateOfBirth; + } + + public void setDateOfBirth(final String dateOfBirth) { + this.dateOfBirth = dateOfBirth; + } + + public String getPassword() { + return password; + } + + public void setPassword(final String password) { + this.password = password; + } + + public String getSex() { + return sex; + } + + public void setSex(final String sex) { + this.sex = sex; + } + + public String getCountry() { + return country; + } + + public void setCountry(final String country) { + this.country = country; + } + + public String getJob() { + return job; + } + + public void setJob(final String job) { + this.job = job; + } + + public boolean isReceiveNewsletter() { + return receiveNewsletter; + } + + public void setReceiveNewsletter(final boolean receiveNewsletter) { + this.receiveNewsletter = receiveNewsletter; + } + + public String[] getHobbies() { + return hobbies; + } + + public void setHobbies(final String[] hobbies) { + this.hobbies = hobbies; + } + + public List getFavouriteLanguage() { + return favouriteLanguage; + } + + public void setFavouriteLanguage(final List favouriteLanguage) { + this.favouriteLanguage = favouriteLanguage; + } + + public String getNotes() { + return notes; + } + + public void setNotes(final String notes) { + this.notes = notes; + } + + public List getFruit() { + return fruit; + } + + public void setFruit(final List fruit) { + this.fruit = fruit; + } + + public String getBook() { + return book; + } + + public void setBook(final String book) { + this.book = book; + } + + public MultipartFile getFile() { + return file; + } + + public void setFile(final MultipartFile file) { + this.file = file; + } +} diff --git a/spring-mvc-xml/src/main/java/com/baeldung/spring/validator/PersonValidator.java b/spring-mvc-xml/src/main/java/com/baeldung/spring/validator/PersonValidator.java new file mode 100644 index 0000000000..3a271f6545 --- /dev/null +++ b/spring-mvc-xml/src/main/java/com/baeldung/spring/validator/PersonValidator.java @@ -0,0 +1,22 @@ +package com.baeldung.spring.validator; + +import com.baeldung.spring.form.Person; +import org.springframework.stereotype.Component; +import org.springframework.validation.Errors; +import org.springframework.validation.ValidationUtils; +import org.springframework.validation.Validator; + +@Component +public class PersonValidator implements Validator { + + @Override + public boolean supports(final Class calzz) { + return Person.class.isAssignableFrom(calzz); + } + + @Override + public void validate(final Object obj, final Errors errors) { + + ValidationUtils.rejectIfEmptyOrWhitespace(errors, "name", "required.name"); + } +} \ No newline at end of file diff --git a/spring-mvc-xml/src/main/resources/contentManagementWebMvcConfig.xml b/spring-mvc-xml/src/main/resources/contentManagementWebMvcConfig.xml new file mode 100644 index 0000000000..e68c88d19d --- /dev/null +++ b/spring-mvc-xml/src/main/resources/contentManagementWebMvcConfig.xml @@ -0,0 +1,42 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/spring-mvc-xml/src/main/resources/messages.properties b/spring-mvc-xml/src/main/resources/messages.properties new file mode 100644 index 0000000000..2a3cccf76c --- /dev/null +++ b/spring-mvc-xml/src/main/resources/messages.properties @@ -0,0 +1,2 @@ +required.name = Name is required! +NotEmpty.person.password = Password is required! \ No newline at end of file diff --git a/spring-mvc-xml/src/main/resources/webMvcConfig.xml b/spring-mvc-xml/src/main/resources/webMvcConfig.xml index a7aa252c08..0947eec368 100644 --- a/spring-mvc-xml/src/main/resources/webMvcConfig.xml +++ b/spring-mvc-xml/src/main/resources/webMvcConfig.xml @@ -11,7 +11,9 @@ > - + + + @@ -19,4 +21,8 @@ + + + + \ No newline at end of file diff --git a/spring-mvc-xml/src/main/webapp/WEB-INF/mvc-servlet.xml b/spring-mvc-xml/src/main/webapp/WEB-INF/mvc-servlet.xml index 4ba9642448..6cefb21961 100644 --- a/spring-mvc-xml/src/main/webapp/WEB-INF/mvc-servlet.xml +++ b/spring-mvc-xml/src/main/webapp/WEB-INF/mvc-servlet.xml @@ -1,6 +1,57 @@ + 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-4.2.xsd"> + + + + + + + + + + + + + + + + + + + + welcomeController + welcomeController + helloController + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/spring-mvc-xml/src/main/webapp/WEB-INF/view/hello.jsp b/spring-mvc-xml/src/main/webapp/WEB-INF/view/hello.jsp new file mode 100644 index 0000000000..2acdae9b0f --- /dev/null +++ b/spring-mvc-xml/src/main/webapp/WEB-INF/view/hello.jsp @@ -0,0 +1,15 @@ +<%@ page language="java" contentType="text/html; charset=ISO-8859-1" + pageEncoding="ISO-8859-1"%> + + + + +Hello World + + +

Hello ${msg}

+
+

+ Go to spring handler mappings homepage + + \ No newline at end of file diff --git a/spring-mvc-xml/src/main/webapp/WEB-INF/view/helloworld.jsp b/spring-mvc-xml/src/main/webapp/WEB-INF/view/helloworld.jsp new file mode 100644 index 0000000000..2eeabbe0ac --- /dev/null +++ b/spring-mvc-xml/src/main/webapp/WEB-INF/view/helloworld.jsp @@ -0,0 +1,15 @@ +<%@ page language="java" contentType="text/html; charset=ISO-8859-1" + pageEncoding="ISO-8859-1"%> + + + + +Hello World + + +

Hello World ${msg}

+
+

+ Go to spring handler mappings homepage + + \ No newline at end of file diff --git a/spring-mvc-xml/src/main/webapp/WEB-INF/view/personForm.jsp b/spring-mvc-xml/src/main/webapp/WEB-INF/view/personForm.jsp new file mode 100644 index 0000000000..1d14658f93 --- /dev/null +++ b/spring-mvc-xml/src/main/webapp/WEB-INF/view/personForm.jsp @@ -0,0 +1,120 @@ +<%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%> +<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%> + + + + Form Example - Register a Person + + + + + + +

Welcome, Enter the Person Details

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Name
E-mail
Date of birth
Password
Sex + Male:
+ Female: +
Job + +
Country + +
Book + + + + +
Fruit + +
Receive newsletter
Hobbies + Bird watching: + Astronomy: + Snowboarding: +
Favourite languages + +
Notes
+ +
+ + + + \ No newline at end of file diff --git a/spring-mvc-xml/src/main/webapp/WEB-INF/view/personView.jsp b/spring-mvc-xml/src/main/webapp/WEB-INF/view/personView.jsp new file mode 100644 index 0000000000..8e874fbd02 --- /dev/null +++ b/spring-mvc-xml/src/main/webapp/WEB-INF/view/personView.jsp @@ -0,0 +1,66 @@ +<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> + + + + Spring MVC Form Handling + + + +

Submitted Person Information

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Id :${person.id}
Name :${person.name}
Date of birth :${person.dateOfBirth}
Password :${person.password}
Sex :${person.sex}
Job :${person.job}
Country :${person.country}
Fruit :[]
Book :${person.book}
Receive Newsletter :${person.receiveNewsletter}
Hobbies :[]
Favourite Languages :[]
Notes :${person.notes}
+ + + \ No newline at end of file diff --git a/spring-mvc-xml/src/main/webapp/WEB-INF/view/welcome.jsp b/spring-mvc-xml/src/main/webapp/WEB-INF/view/welcome.jsp new file mode 100644 index 0000000000..348ca652ff --- /dev/null +++ b/spring-mvc-xml/src/main/webapp/WEB-INF/view/welcome.jsp @@ -0,0 +1,15 @@ +<%@ page language="java" contentType="text/html; charset=ISO-8859-1" + pageEncoding="ISO-8859-1"%> + + + + +Welcome Page + + +

Welcome to ${msg}

+
+

+ Go to spring handler mappings homepage + + \ No newline at end of file diff --git a/spring-mvc-xml/src/main/webapp/WEB-INF/web.xml b/spring-mvc-xml/src/main/webapp/WEB-INF/web.xml index 5275efdf24..29608a17ef 100644 --- a/spring-mvc-xml/src/main/webapp/WEB-INF/web.xml +++ b/spring-mvc-xml/src/main/webapp/WEB-INF/web.xml @@ -16,7 +16,7 @@ contextConfigLocation - org.baeldung.spring + com.baeldung.spring diff --git a/spring-mvc-xml/src/main/webapp/index.jsp b/spring-mvc-xml/src/main/webapp/index.jsp index 1ecfcec9d7..ce7b3107d8 100644 --- a/spring-mvc-xml/src/main/webapp/index.jsp +++ b/spring-mvc-xml/src/main/webapp/index.jsp @@ -12,6 +12,7 @@

Spring MVC Examples

diff --git a/spring-mvc-xml/src/main/webapp/spring-handler-index.jsp b/spring-mvc-xml/src/main/webapp/spring-handler-index.jsp new file mode 100644 index 0000000000..0fdd51d1ec --- /dev/null +++ b/spring-mvc-xml/src/main/webapp/spring-handler-index.jsp @@ -0,0 +1,18 @@ + + + + + Welcome + + +

Spring Handler Mapping Examples

+

Click each link below to see how the request is mapped using the specified mapping: +

+
    +
  1. BeanNameUrlHandlerMapping - Mapping by bean name
  2. +
  3. SimpleUrlHandlerMapping
  4. +
  5. ControllerClassNameHandlerMapping - Mapping by controller name
  6. +
+Home + + \ No newline at end of file diff --git a/spring-openid/README.md b/spring-openid/README.md new file mode 100644 index 0000000000..c5989217f4 --- /dev/null +++ b/spring-openid/README.md @@ -0,0 +1,17 @@ +========= + +## OpenID Connect with Spring Security + + +### Build the Project +``` +mvn clean install +``` + + +### Obtain Google App - Client ID, Secret +- You need to get client id and client secret from [Google Developer Console](https://console.developers.google.com/project/_/apiui/credential?pli=1) +- Make sure to add OAuth2 credentials by selecting Add credentials > OAuth 2.0 client ID +- Make sure you set redirect URI to http://localhost:8081/google-login + +- Once you have your client id and secret, make sure you add them to the `application.properties` of the project diff --git a/spring-openid/pom.xml b/spring-openid/pom.xml index 641fe93a09..39cf3e9d4e 100644 --- a/spring-openid/pom.xml +++ b/spring-openid/pom.xml @@ -1,68 +1,66 @@ - - 4.0.0 + + 4.0.0 - org.baeldung - spring-openid - 0.0.1-SNAPSHOT - war + com.baeldung + spring-openid + 0.0.1-SNAPSHOT + war - spring-openid - Spring OpenID sample project + spring-openid + Spring OpenID sample project - - org.springframework.boot - spring-boot-starter-parent - 1.3.2.RELEASE - + + org.springframework.boot + spring-boot-starter-parent + 1.3.3.RELEASE + - + + + org.springframework.boot + spring-boot-starter-security + + + org.springframework.boot + spring-boot-starter-web + - - - org.springframework.boot - spring-boot-starter-security - - - org.springframework.boot - spring-boot-starter-web - - - - org.springframework.boot - spring-boot-starter-tomcat - provided - - - + + org.springframework.boot + spring-boot-starter-tomcat + provided + + + org.springframework.security.oauth spring-security-oauth2 - - org.springframework.security - spring-security-jwt - + + org.springframework.security + spring-security-jwt + + + + org.springframework.boot + spring-boot-starter-test + test + + + + + + + org.springframework.boot + spring-boot-maven-plugin + + + - - org.springframework.boot - spring-boot-starter-test - test - - - - - - - org.springframework.boot - spring-boot-maven-plugin - - - - UTF-8 1.8 + diff --git a/spring-openid/src/main/resources/application.properties b/spring-openid/src/main/resources/application.properties deleted file mode 100644 index fa567a164c..0000000000 --- a/spring-openid/src/main/resources/application.properties +++ /dev/null @@ -1,6 +0,0 @@ -server.port=8081 -google.clientId=497324626536-d6fphsh1qpl2o6j2j66nukajrfqc0rtq.apps.googleusercontent.com -google.clientSecret=vtueZycMsrRjjCjnY6JzbEZT -google.accessTokenUri=https://www.googleapis.com/oauth2/v3/token -google.userAuthorizationUri=https://accounts.google.com/o/oauth2/auth -google.redirectUri=http://localhost:8081/google-login \ No newline at end of file diff --git a/spring-openid/src/main/resources/application.properties.sample.properties b/spring-openid/src/main/resources/application.properties.sample.properties new file mode 100644 index 0000000000..3b4f7716f0 --- /dev/null +++ b/spring-openid/src/main/resources/application.properties.sample.properties @@ -0,0 +1,6 @@ +server.port=8081 +google.clientId=TODO +google.clientSecret=TODO +google.accessTokenUri=https://www.googleapis.com/oauth2/v3/token +google.userAuthorizationUri=https://accounts.google.com/o/oauth2/auth +google.redirectUri=http://localhost:8081/google-login \ No newline at end of file diff --git a/spring-quartz/.classpath b/spring-quartz/.classpath new file mode 100644 index 0000000000..6d7587a819 --- /dev/null +++ b/spring-quartz/.classpath @@ -0,0 +1,31 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/spring-quartz/.project b/spring-quartz/.project new file mode 100644 index 0000000000..6adc420837 --- /dev/null +++ b/spring-quartz/.project @@ -0,0 +1,35 @@ + + + spring-quartz + + + + + + org.eclipse.wst.common.project.facet.core.builder + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.m2e.core.maven2Builder + + + + + org.springframework.ide.eclipse.core.springbuilder + + + + + + org.springframework.ide.eclipse.core.springnature + org.eclipse.jdt.core.javanature + org.eclipse.m2e.core.maven2Nature + org.eclipse.wst.common.project.facet.core.nature + + diff --git a/spring-quartz/pom.xml b/spring-quartz/pom.xml index ce286f3d1f..709cfb9e3d 100644 --- a/spring-quartz/pom.xml +++ b/spring-quartz/pom.xml @@ -3,7 +3,7 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 - org.baeldung + com.baeldung spring-quartz spring-quartz 0.0.1-SNAPSHOT diff --git a/spring-rest/pom.xml b/spring-rest/pom.xml index 54ac868b95..767f90a6a6 100644 --- a/spring-rest/pom.xml +++ b/spring-rest/pom.xml @@ -1,6 +1,6 @@ 4.0.0 - org.baeldung + com.baeldung spring-rest 0.1-SNAPSHOT spring-rest @@ -226,15 +226,15 @@ - 4.0.3.RELEASE + 4.0.4.RELEASE 4.3.11.Final - 5.1.37 + 5.1.38 - 2.5.5 + 2.7.2 5.2.2.Final @@ -251,17 +251,17 @@ 4.4.1 4.5 - 2.4.1 + 2.9.0 1.7.13 1.1.3 - 3.3 + 3.5.1 2.6 - 2.18.1 - 1.4.15 + 2.19.1 + 1.4.18 diff --git a/spring-security-basic-auth/pom.xml b/spring-security-basic-auth/pom.xml index 1e15cd5b53..009f5584bb 100644 --- a/spring-security-basic-auth/pom.xml +++ b/spring-security-basic-auth/pom.xml @@ -1,6 +1,6 @@ 4.0.0 - org.baeldung + com.baeldung spring-security-mvc-basic-auth 0.1-SNAPSHOT @@ -225,12 +225,12 @@ - 4.2.4.RELEASE - 4.0.3.RELEASE + 4.2.5.RELEASE + 4.0.4.RELEASE 4.3.11.Final - 5.1.37 + 5.1.38 1.7.13 @@ -253,14 +253,14 @@ 4.4.1 4.5 - 2.4.1 + 2.9.0 - 3.3 + 3.5.1 2.6 - 2.18.1 + 2.19.1 2.7 - 1.4.15 + 1.4.18 diff --git a/spring-security-oauth/spring-security-oauth-resource/.classpath b/spring-security-client/spring-security-jsp-authentication/.classpath similarity index 100% rename from spring-security-oauth/spring-security-oauth-resource/.classpath rename to spring-security-client/spring-security-jsp-authentication/.classpath diff --git a/spring-security-oauth/spring-security-oauth-ui-password/.project b/spring-security-client/spring-security-jsp-authentication/.project similarity index 96% rename from spring-security-oauth/spring-security-oauth-ui-password/.project rename to spring-security-client/spring-security-jsp-authentication/.project index 58d50a3f3a..6fbbb8518e 100644 --- a/spring-security-oauth/spring-security-oauth-ui-password/.project +++ b/spring-security-client/spring-security-jsp-authentication/.project @@ -1,6 +1,6 @@ - spring-security-oauth-ui-password + spring-security-jsp-authenticate @@ -20,6 +20,11 @@ + + org.eclipse.m2e.core.maven2Builder + + + org.springframework.ide.eclipse.core.springbuilder @@ -30,11 +35,6 @@ - - org.eclipse.m2e.core.maven2Builder - - - org.eclipse.jem.workbench.JavaEMFNature diff --git a/spring-security-client/spring-security-jsp-authentication/pom.xml b/spring-security-client/spring-security-jsp-authentication/pom.xml new file mode 100644 index 0000000000..74de4d729b --- /dev/null +++ b/spring-security-client/spring-security-jsp-authentication/pom.xml @@ -0,0 +1,67 @@ + + + 4.0.0 + + com.baeldung + spring-security-jsp-authentication + 0.0.1-SNAPSHOT + war + + spring-security-jsp-authenticate + Spring Security JSP Authentication tag sample + + + org.springframework.boot + spring-boot-starter-parent + 1.3.3.RELEASE + + + + + org.springframework.boot + spring-boot-starter-security + + + org.springframework.boot + spring-boot-starter-web + + + + org.springframework.boot + spring-boot-starter-tomcat + provided + + + + org.apache.tomcat.embed + tomcat-embed-jasper + provided + + + + javax.servlet + jstl + + + + org.springframework.security + spring-security-taglibs + + + + + + + + org.springframework.boot + spring-boot-maven-plugin + + + + + + UTF-8 + 1.8 + + + diff --git a/spring-security-client/spring-security-jsp-authentication/src/main/java/org/baeldung/config/Application.java b/spring-security-client/spring-security-jsp-authentication/src/main/java/org/baeldung/config/Application.java new file mode 100644 index 0000000000..4057a85f13 --- /dev/null +++ b/spring-security-client/spring-security-jsp-authentication/src/main/java/org/baeldung/config/Application.java @@ -0,0 +1,20 @@ +package org.baeldung.config; + +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.boot.builder.SpringApplicationBuilder; +import org.springframework.boot.context.web.SpringBootServletInitializer; + +@SpringBootApplication +public class Application extends SpringBootServletInitializer { + + @Override + protected SpringApplicationBuilder configure(SpringApplicationBuilder application) { + return application.sources(Application.class); + } + + public static void main(String[] args) { + SpringApplication.run(Application.class, args); + } + +} diff --git a/spring-security-client/spring-security-jsp-authentication/src/main/java/org/baeldung/config/MvcConfig.java b/spring-security-client/spring-security-jsp-authentication/src/main/java/org/baeldung/config/MvcConfig.java new file mode 100644 index 0000000000..fa2a324146 --- /dev/null +++ b/spring-security-client/spring-security-jsp-authentication/src/main/java/org/baeldung/config/MvcConfig.java @@ -0,0 +1,23 @@ +package org.baeldung.config; + +import org.springframework.context.annotation.Configuration; +import org.springframework.web.servlet.config.annotation.ViewControllerRegistry; +import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter; + +@Configuration +public class MvcConfig extends WebMvcConfigurerAdapter { + + public MvcConfig() { + super(); + } + + // + + @Override + public void addViewControllers(final ViewControllerRegistry registry) { + super.addViewControllers(registry); + registry.addViewController("/").setViewName("forward:/index"); + registry.addViewController("/index"); + } + +} \ No newline at end of file diff --git a/spring-security-oauth/spring-security-oauth-server/src/main/java/org/baeldung/config/ServerSecurityConfig.java b/spring-security-client/spring-security-jsp-authentication/src/main/java/org/baeldung/config/SecurityConfig.java similarity index 56% rename from spring-security-oauth/spring-security-oauth-server/src/main/java/org/baeldung/config/ServerSecurityConfig.java rename to spring-security-client/spring-security-jsp-authentication/src/main/java/org/baeldung/config/SecurityConfig.java index 3e1a8a8ccb..bd6c56d38a 100644 --- a/spring-security-oauth/spring-security-oauth-server/src/main/java/org/baeldung/config/ServerSecurityConfig.java +++ b/spring-security-client/spring-security-jsp-authentication/src/main/java/org/baeldung/config/SecurityConfig.java @@ -1,25 +1,29 @@ package org.baeldung.config; -import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; -import org.springframework.security.authentication.AuthenticationManager; import org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder; import org.springframework.security.config.annotation.web.builders.HttpSecurity; +import org.springframework.security.config.annotation.web.builders.WebSecurity; +import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity; import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter; @Configuration -public class ServerSecurityConfig extends WebSecurityConfigurerAdapter { +@EnableWebSecurity +public class SecurityConfig extends WebSecurityConfigurerAdapter { @Override protected void configure(final AuthenticationManagerBuilder auth) throws Exception { - auth.inMemoryAuthentication().withUser("john").password("123").roles("USER"); - + // @formatter:off + auth.inMemoryAuthentication() + .withUser("john").password("123").roles("USER") + .and() + .withUser("tom").password("111").roles("ADMIN"); + // @formatter:on } @Override - @Bean - public AuthenticationManager authenticationManagerBean() throws Exception { - return super.authenticationManagerBean(); + public void configure(WebSecurity web) throws Exception { + web.ignoring().antMatchers("/resources/**"); } @Override @@ -27,10 +31,10 @@ public class ServerSecurityConfig extends WebSecurityConfigurerAdapter { // @formatter:off http.authorizeRequests() .antMatchers("/login").permitAll() + .antMatchers("/admin").hasRole("ADMIN") .anyRequest().authenticated() .and().formLogin().permitAll() ; // @formatter:on } - -} +} \ No newline at end of file diff --git a/spring-security-client/spring-security-jsp-authentication/src/main/resources/application.properties b/spring-security-client/spring-security-jsp-authentication/src/main/resources/application.properties new file mode 100644 index 0000000000..26a80c79f3 --- /dev/null +++ b/spring-security-client/spring-security-jsp-authentication/src/main/resources/application.properties @@ -0,0 +1,3 @@ +server.port: 8081 +spring.mvc.view.prefix: /WEB-INF/jsp/ +spring.mvc.view.suffix: .jsp \ No newline at end of file diff --git a/spring-security-client/spring-security-jsp-authentication/src/main/webapp/WEB-INF/jsp/index.jsp b/spring-security-client/spring-security-jsp-authentication/src/main/webapp/WEB-INF/jsp/index.jsp new file mode 100644 index 0000000000..90c00e980a --- /dev/null +++ b/spring-security-client/spring-security-jsp-authentication/src/main/webapp/WEB-INF/jsp/index.jsp @@ -0,0 +1,24 @@ + <%@ taglib prefix="sec" uri="http://www.springframework.org/security/tags" %> + + + + +Spring Security JSP Authorize + + + + + +
+ Current user name: +
+ Current user roles: +
+ + \ No newline at end of file diff --git a/spring-security-oauth/spring-security-oauth-server/.classpath b/spring-security-client/spring-security-jsp-authorize/.classpath similarity index 100% rename from spring-security-oauth/spring-security-oauth-server/.classpath rename to spring-security-client/spring-security-jsp-authorize/.classpath diff --git a/spring-security-oauth/spring-security-oauth-resource/.project b/spring-security-client/spring-security-jsp-authorize/.project similarity index 96% rename from spring-security-oauth/spring-security-oauth-resource/.project rename to spring-security-client/spring-security-jsp-authorize/.project index c3a285960b..a526feb28e 100644 --- a/spring-security-oauth/spring-security-oauth-resource/.project +++ b/spring-security-client/spring-security-jsp-authorize/.project @@ -1,6 +1,6 @@ - spring-security-oauth-resource + spring-security-jsp-authorize @@ -20,6 +20,11 @@ + + org.eclipse.m2e.core.maven2Builder + + + org.springframework.ide.eclipse.core.springbuilder @@ -30,11 +35,6 @@ - - org.eclipse.m2e.core.maven2Builder - - - org.eclipse.jem.workbench.JavaEMFNature diff --git a/spring-security-client/spring-security-jsp-authorize/pom.xml b/spring-security-client/spring-security-jsp-authorize/pom.xml new file mode 100644 index 0000000000..25bb21b663 --- /dev/null +++ b/spring-security-client/spring-security-jsp-authorize/pom.xml @@ -0,0 +1,67 @@ + + + 4.0.0 + + com.baeldung + spring-security-jsp-authorize + 0.0.1-SNAPSHOT + war + + spring-security-jsp-authorize + Spring Security JSP Authorize tag sample + + + org.springframework.boot + spring-boot-starter-parent + 1.3.3.RELEASE + + + + + org.springframework.boot + spring-boot-starter-security + + + org.springframework.boot + spring-boot-starter-web + + + + org.springframework.boot + spring-boot-starter-tomcat + provided + + + + org.apache.tomcat.embed + tomcat-embed-jasper + provided + + + + javax.servlet + jstl + + + + org.springframework.security + spring-security-taglibs + + + + + + + + org.springframework.boot + spring-boot-maven-plugin + + + + + + UTF-8 + 1.8 + + + diff --git a/spring-security-client/spring-security-jsp-authorize/src/main/java/org/baeldung/config/Application.java b/spring-security-client/spring-security-jsp-authorize/src/main/java/org/baeldung/config/Application.java new file mode 100644 index 0000000000..4057a85f13 --- /dev/null +++ b/spring-security-client/spring-security-jsp-authorize/src/main/java/org/baeldung/config/Application.java @@ -0,0 +1,20 @@ +package org.baeldung.config; + +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.boot.builder.SpringApplicationBuilder; +import org.springframework.boot.context.web.SpringBootServletInitializer; + +@SpringBootApplication +public class Application extends SpringBootServletInitializer { + + @Override + protected SpringApplicationBuilder configure(SpringApplicationBuilder application) { + return application.sources(Application.class); + } + + public static void main(String[] args) { + SpringApplication.run(Application.class, args); + } + +} diff --git a/spring-security-client/spring-security-jsp-authorize/src/main/java/org/baeldung/config/MvcConfig.java b/spring-security-client/spring-security-jsp-authorize/src/main/java/org/baeldung/config/MvcConfig.java new file mode 100644 index 0000000000..fa2a324146 --- /dev/null +++ b/spring-security-client/spring-security-jsp-authorize/src/main/java/org/baeldung/config/MvcConfig.java @@ -0,0 +1,23 @@ +package org.baeldung.config; + +import org.springframework.context.annotation.Configuration; +import org.springframework.web.servlet.config.annotation.ViewControllerRegistry; +import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter; + +@Configuration +public class MvcConfig extends WebMvcConfigurerAdapter { + + public MvcConfig() { + super(); + } + + // + + @Override + public void addViewControllers(final ViewControllerRegistry registry) { + super.addViewControllers(registry); + registry.addViewController("/").setViewName("forward:/index"); + registry.addViewController("/index"); + } + +} \ No newline at end of file diff --git a/spring-security-client/spring-security-jsp-authorize/src/main/java/org/baeldung/config/SecurityConfig.java b/spring-security-client/spring-security-jsp-authorize/src/main/java/org/baeldung/config/SecurityConfig.java new file mode 100644 index 0000000000..bd6c56d38a --- /dev/null +++ b/spring-security-client/spring-security-jsp-authorize/src/main/java/org/baeldung/config/SecurityConfig.java @@ -0,0 +1,40 @@ +package org.baeldung.config; + +import org.springframework.context.annotation.Configuration; +import org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder; +import org.springframework.security.config.annotation.web.builders.HttpSecurity; +import org.springframework.security.config.annotation.web.builders.WebSecurity; +import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity; +import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter; + +@Configuration +@EnableWebSecurity +public class SecurityConfig extends WebSecurityConfigurerAdapter { + + @Override + protected void configure(final AuthenticationManagerBuilder auth) throws Exception { + // @formatter:off + auth.inMemoryAuthentication() + .withUser("john").password("123").roles("USER") + .and() + .withUser("tom").password("111").roles("ADMIN"); + // @formatter:on + } + + @Override + public void configure(WebSecurity web) throws Exception { + web.ignoring().antMatchers("/resources/**"); + } + + @Override + protected void configure(final HttpSecurity http) throws Exception { + // @formatter:off + http.authorizeRequests() + .antMatchers("/login").permitAll() + .antMatchers("/admin").hasRole("ADMIN") + .anyRequest().authenticated() + .and().formLogin().permitAll() + ; + // @formatter:on + } +} \ No newline at end of file diff --git a/spring-security-client/spring-security-jsp-authorize/src/main/resources/application.properties b/spring-security-client/spring-security-jsp-authorize/src/main/resources/application.properties new file mode 100644 index 0000000000..26a80c79f3 --- /dev/null +++ b/spring-security-client/spring-security-jsp-authorize/src/main/resources/application.properties @@ -0,0 +1,3 @@ +server.port: 8081 +spring.mvc.view.prefix: /WEB-INF/jsp/ +spring.mvc.view.suffix: .jsp \ No newline at end of file diff --git a/spring-security-client/spring-security-jsp-authorize/src/main/webapp/WEB-INF/jsp/index.jsp b/spring-security-client/spring-security-jsp-authorize/src/main/webapp/WEB-INF/jsp/index.jsp new file mode 100644 index 0000000000..08af845bd4 --- /dev/null +++ b/spring-security-client/spring-security-jsp-authorize/src/main/webapp/WEB-INF/jsp/index.jsp @@ -0,0 +1,33 @@ + <%@ taglib prefix="sec" uri="http://www.springframework.org/security/tags" %> + + + + +Spring Security JSP Authorize + + + + + +
+ + Only admins can see this message + + + + Only users can see this message + +
+ + + Only users who can call "/admin" URL can see this message + +
+ + \ No newline at end of file diff --git a/spring-security-oauth/spring-security-oauth-ui-implicit/.classpath b/spring-security-client/spring-security-jsp-config/.classpath similarity index 100% rename from spring-security-oauth/spring-security-oauth-ui-implicit/.classpath rename to spring-security-client/spring-security-jsp-config/.classpath diff --git a/spring-security-client/spring-security-jsp-config/.project b/spring-security-client/spring-security-jsp-config/.project new file mode 100644 index 0000000000..9afe120f66 --- /dev/null +++ b/spring-security-client/spring-security-jsp-config/.project @@ -0,0 +1,48 @@ + + + spring-security-jsp-config + + + + + + org.eclipse.wst.jsdt.core.javascriptValidator + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.wst.common.project.facet.core.builder + + + + + org.eclipse.m2e.core.maven2Builder + + + + + org.springframework.ide.eclipse.core.springbuilder + + + + + org.eclipse.wst.validation.validationbuilder + + + + + + org.eclipse.jem.workbench.JavaEMFNature + org.eclipse.wst.common.modulecore.ModuleCoreNature + org.springframework.ide.eclipse.core.springnature + org.eclipse.jdt.core.javanature + org.eclipse.m2e.core.maven2Nature + org.eclipse.wst.common.project.facet.core.nature + org.eclipse.wst.jsdt.core.jsNature + + diff --git a/spring-security-client/spring-security-jsp-config/pom.xml b/spring-security-client/spring-security-jsp-config/pom.xml new file mode 100644 index 0000000000..2416552d7c --- /dev/null +++ b/spring-security-client/spring-security-jsp-config/pom.xml @@ -0,0 +1,67 @@ + + + 4.0.0 + + com.baeldung + spring-security-jsp-config + 0.0.1-SNAPSHOT + war + + spring-security-jsp-config + Spring Security JSP configuration + + + org.springframework.boot + spring-boot-starter-parent + 1.3.3.RELEASE + + + + + org.springframework.boot + spring-boot-starter-security + + + org.springframework.boot + spring-boot-starter-web + + + + org.springframework.boot + spring-boot-starter-tomcat + provided + + + + org.apache.tomcat.embed + tomcat-embed-jasper + provided + + + + javax.servlet + jstl + + + + org.springframework.security + spring-security-taglibs + + + + + + + + org.springframework.boot + spring-boot-maven-plugin + + + + + + UTF-8 + 1.8 + + + diff --git a/spring-security-client/spring-security-jsp-config/src/main/java/org/baeldung/config/Application.java b/spring-security-client/spring-security-jsp-config/src/main/java/org/baeldung/config/Application.java new file mode 100644 index 0000000000..4057a85f13 --- /dev/null +++ b/spring-security-client/spring-security-jsp-config/src/main/java/org/baeldung/config/Application.java @@ -0,0 +1,20 @@ +package org.baeldung.config; + +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.boot.builder.SpringApplicationBuilder; +import org.springframework.boot.context.web.SpringBootServletInitializer; + +@SpringBootApplication +public class Application extends SpringBootServletInitializer { + + @Override + protected SpringApplicationBuilder configure(SpringApplicationBuilder application) { + return application.sources(Application.class); + } + + public static void main(String[] args) { + SpringApplication.run(Application.class, args); + } + +} diff --git a/spring-security-client/spring-security-jsp-config/src/main/java/org/baeldung/config/MvcConfig.java b/spring-security-client/spring-security-jsp-config/src/main/java/org/baeldung/config/MvcConfig.java new file mode 100644 index 0000000000..fa2a324146 --- /dev/null +++ b/spring-security-client/spring-security-jsp-config/src/main/java/org/baeldung/config/MvcConfig.java @@ -0,0 +1,23 @@ +package org.baeldung.config; + +import org.springframework.context.annotation.Configuration; +import org.springframework.web.servlet.config.annotation.ViewControllerRegistry; +import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter; + +@Configuration +public class MvcConfig extends WebMvcConfigurerAdapter { + + public MvcConfig() { + super(); + } + + // + + @Override + public void addViewControllers(final ViewControllerRegistry registry) { + super.addViewControllers(registry); + registry.addViewController("/").setViewName("forward:/index"); + registry.addViewController("/index"); + } + +} \ No newline at end of file diff --git a/spring-security-client/spring-security-jsp-config/src/main/java/org/baeldung/config/SecurityConfig.java b/spring-security-client/spring-security-jsp-config/src/main/java/org/baeldung/config/SecurityConfig.java new file mode 100644 index 0000000000..bd6c56d38a --- /dev/null +++ b/spring-security-client/spring-security-jsp-config/src/main/java/org/baeldung/config/SecurityConfig.java @@ -0,0 +1,40 @@ +package org.baeldung.config; + +import org.springframework.context.annotation.Configuration; +import org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder; +import org.springframework.security.config.annotation.web.builders.HttpSecurity; +import org.springframework.security.config.annotation.web.builders.WebSecurity; +import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity; +import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter; + +@Configuration +@EnableWebSecurity +public class SecurityConfig extends WebSecurityConfigurerAdapter { + + @Override + protected void configure(final AuthenticationManagerBuilder auth) throws Exception { + // @formatter:off + auth.inMemoryAuthentication() + .withUser("john").password("123").roles("USER") + .and() + .withUser("tom").password("111").roles("ADMIN"); + // @formatter:on + } + + @Override + public void configure(WebSecurity web) throws Exception { + web.ignoring().antMatchers("/resources/**"); + } + + @Override + protected void configure(final HttpSecurity http) throws Exception { + // @formatter:off + http.authorizeRequests() + .antMatchers("/login").permitAll() + .antMatchers("/admin").hasRole("ADMIN") + .anyRequest().authenticated() + .and().formLogin().permitAll() + ; + // @formatter:on + } +} \ No newline at end of file diff --git a/spring-security-client/spring-security-jsp-config/src/main/resources/application.properties b/spring-security-client/spring-security-jsp-config/src/main/resources/application.properties new file mode 100644 index 0000000000..26a80c79f3 --- /dev/null +++ b/spring-security-client/spring-security-jsp-config/src/main/resources/application.properties @@ -0,0 +1,3 @@ +server.port: 8081 +spring.mvc.view.prefix: /WEB-INF/jsp/ +spring.mvc.view.suffix: .jsp \ No newline at end of file diff --git a/spring-security-client/spring-security-jsp-config/src/main/webapp/WEB-INF/jsp/index.jsp b/spring-security-client/spring-security-jsp-config/src/main/webapp/WEB-INF/jsp/index.jsp new file mode 100644 index 0000000000..bd5ccb0c78 --- /dev/null +++ b/spring-security-client/spring-security-jsp-config/src/main/webapp/WEB-INF/jsp/index.jsp @@ -0,0 +1,21 @@ + + + + +Spring Security JSP + + + + + +
+ Welcome +
+ + \ No newline at end of file diff --git a/spring-security-oauth/spring-security-oauth-ui-password/.classpath b/spring-security-client/spring-security-mvc/.classpath similarity index 100% rename from spring-security-oauth/spring-security-oauth-ui-password/.classpath rename to spring-security-client/spring-security-mvc/.classpath diff --git a/spring-security-client/spring-security-mvc/.project b/spring-security-client/spring-security-mvc/.project new file mode 100644 index 0000000000..d675acbf57 --- /dev/null +++ b/spring-security-client/spring-security-mvc/.project @@ -0,0 +1,48 @@ + + + spring-security-mvc + + + + + + org.eclipse.wst.jsdt.core.javascriptValidator + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.wst.common.project.facet.core.builder + + + + + org.eclipse.m2e.core.maven2Builder + + + + + org.springframework.ide.eclipse.core.springbuilder + + + + + org.eclipse.wst.validation.validationbuilder + + + + + + org.eclipse.jem.workbench.JavaEMFNature + org.eclipse.wst.common.modulecore.ModuleCoreNature + org.springframework.ide.eclipse.core.springnature + org.eclipse.jdt.core.javanature + org.eclipse.m2e.core.maven2Nature + org.eclipse.wst.common.project.facet.core.nature + org.eclipse.wst.jsdt.core.jsNature + + diff --git a/spring-security-client/spring-security-mvc/pom.xml b/spring-security-client/spring-security-mvc/pom.xml new file mode 100644 index 0000000000..ec3b1f1782 --- /dev/null +++ b/spring-security-client/spring-security-mvc/pom.xml @@ -0,0 +1,45 @@ + + + 4.0.0 + + com.baeldung + spring-security-mvc + 0.0.1-SNAPSHOT + war + + spring-security-mvc + Spring Security MVC + + + org.springframework.boot + spring-boot-starter-parent + 1.3.3.RELEASE + + + + + org.springframework.boot + spring-boot-starter-security + + + org.springframework.boot + spring-boot-starter-web + + + + + + + + org.springframework.boot + spring-boot-maven-plugin + + + + + + UTF-8 + 1.8 + + + diff --git a/spring-security-client/spring-security-mvc/src/main/java/org/baeldung/config/Application.java b/spring-security-client/spring-security-mvc/src/main/java/org/baeldung/config/Application.java new file mode 100644 index 0000000000..4057a85f13 --- /dev/null +++ b/spring-security-client/spring-security-mvc/src/main/java/org/baeldung/config/Application.java @@ -0,0 +1,20 @@ +package org.baeldung.config; + +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.boot.builder.SpringApplicationBuilder; +import org.springframework.boot.context.web.SpringBootServletInitializer; + +@SpringBootApplication +public class Application extends SpringBootServletInitializer { + + @Override + protected SpringApplicationBuilder configure(SpringApplicationBuilder application) { + return application.sources(Application.class); + } + + public static void main(String[] args) { + SpringApplication.run(Application.class, args); + } + +} diff --git a/spring-security-client/spring-security-mvc/src/main/java/org/baeldung/config/SecurityConfig.java b/spring-security-client/spring-security-mvc/src/main/java/org/baeldung/config/SecurityConfig.java new file mode 100644 index 0000000000..bd6c56d38a --- /dev/null +++ b/spring-security-client/spring-security-mvc/src/main/java/org/baeldung/config/SecurityConfig.java @@ -0,0 +1,40 @@ +package org.baeldung.config; + +import org.springframework.context.annotation.Configuration; +import org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder; +import org.springframework.security.config.annotation.web.builders.HttpSecurity; +import org.springframework.security.config.annotation.web.builders.WebSecurity; +import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity; +import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter; + +@Configuration +@EnableWebSecurity +public class SecurityConfig extends WebSecurityConfigurerAdapter { + + @Override + protected void configure(final AuthenticationManagerBuilder auth) throws Exception { + // @formatter:off + auth.inMemoryAuthentication() + .withUser("john").password("123").roles("USER") + .and() + .withUser("tom").password("111").roles("ADMIN"); + // @formatter:on + } + + @Override + public void configure(WebSecurity web) throws Exception { + web.ignoring().antMatchers("/resources/**"); + } + + @Override + protected void configure(final HttpSecurity http) throws Exception { + // @formatter:off + http.authorizeRequests() + .antMatchers("/login").permitAll() + .antMatchers("/admin").hasRole("ADMIN") + .anyRequest().authenticated() + .and().formLogin().permitAll() + ; + // @formatter:on + } +} \ No newline at end of file diff --git a/spring-security-client/spring-security-mvc/src/main/resources/application.properties b/spring-security-client/spring-security-mvc/src/main/resources/application.properties new file mode 100644 index 0000000000..c2eee0d931 --- /dev/null +++ b/spring-security-client/spring-security-mvc/src/main/resources/application.properties @@ -0,0 +1 @@ +server.port: 8081 \ No newline at end of file diff --git a/spring-security-login-and-registration/.classpath b/spring-security-client/spring-security-thymeleaf-authentication/.classpath similarity index 100% rename from spring-security-login-and-registration/.classpath rename to spring-security-client/spring-security-thymeleaf-authentication/.classpath index 26981b6dd7..0cad5db2d0 100644 --- a/spring-security-login-and-registration/.classpath +++ b/spring-security-client/spring-security-thymeleaf-authentication/.classpath @@ -17,16 +17,16 @@
+ + + + + - - - - - diff --git a/spring-security-client/spring-security-thymeleaf-authentication/.project b/spring-security-client/spring-security-thymeleaf-authentication/.project new file mode 100644 index 0000000000..c6b921b16c --- /dev/null +++ b/spring-security-client/spring-security-thymeleaf-authentication/.project @@ -0,0 +1,48 @@ + + + spring-security-thymeleaf-authentication + + + + + + org.eclipse.wst.jsdt.core.javascriptValidator + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.wst.common.project.facet.core.builder + + + + + org.eclipse.m2e.core.maven2Builder + + + + + org.springframework.ide.eclipse.core.springbuilder + + + + + org.eclipse.wst.validation.validationbuilder + + + + + + org.eclipse.jem.workbench.JavaEMFNature + org.eclipse.wst.common.modulecore.ModuleCoreNature + org.springframework.ide.eclipse.core.springnature + org.eclipse.jdt.core.javanature + org.eclipse.m2e.core.maven2Nature + org.eclipse.wst.common.project.facet.core.nature + org.eclipse.wst.jsdt.core.jsNature + + diff --git a/spring-security-client/spring-security-thymeleaf-authentication/pom.xml b/spring-security-client/spring-security-thymeleaf-authentication/pom.xml new file mode 100644 index 0000000000..cdbe0946f4 --- /dev/null +++ b/spring-security-client/spring-security-thymeleaf-authentication/pom.xml @@ -0,0 +1,62 @@ + + + 4.0.0 + + com.baeldung + spring-security-thymeleaf-authentication + 0.0.1-SNAPSHOT + war + + spring-security-thymeleaf-authentication + Spring Security thymeleaf authentication tag sample + + + org.springframework.boot + spring-boot-starter-parent + 1.3.3.RELEASE + + + + + org.springframework.boot + spring-boot-starter-security + + + org.springframework.boot + spring-boot-starter-web + + + + org.springframework.boot + spring-boot-starter-tomcat + provided + + + + org.springframework.boot + spring-boot-starter-thymeleaf + + + + org.thymeleaf.extras + thymeleaf-extras-springsecurity4 + + + + + + + + + org.springframework.boot + spring-boot-maven-plugin + + + + + + UTF-8 + 1.8 + + + diff --git a/spring-security-oauth/spring-security-oauth-ui-password/src/main/java/org/baeldung/config/UiApplication.java b/spring-security-client/spring-security-thymeleaf-authentication/src/main/java/org/baeldung/config/Application.java similarity index 53% rename from spring-security-oauth/spring-security-oauth-ui-password/src/main/java/org/baeldung/config/UiApplication.java rename to spring-security-client/spring-security-thymeleaf-authentication/src/main/java/org/baeldung/config/Application.java index 8f491516aa..bea0194b40 100644 --- a/spring-security-oauth/spring-security-oauth-ui-password/src/main/java/org/baeldung/config/UiApplication.java +++ b/spring-security-client/spring-security-thymeleaf-authentication/src/main/java/org/baeldung/config/Application.java @@ -2,12 +2,12 @@ package org.baeldung.config; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; -import org.springframework.boot.context.web.SpringBootServletInitializer; @SpringBootApplication -public class UiApplication extends SpringBootServletInitializer { +public class Application { public static void main(String[] args) { - SpringApplication.run(UiApplication.class, args); + SpringApplication.run(Application.class, args); } -} \ No newline at end of file + +} diff --git a/spring-security-oauth/spring-security-oauth-ui-implicit/src/main/java/org/baeldung/config/UiWebConfig.java b/spring-security-client/spring-security-thymeleaf-authentication/src/main/java/org/baeldung/config/MvcConfig.java similarity index 92% rename from spring-security-oauth/spring-security-oauth-ui-implicit/src/main/java/org/baeldung/config/UiWebConfig.java rename to spring-security-client/spring-security-thymeleaf-authentication/src/main/java/org/baeldung/config/MvcConfig.java index 71197ce5d2..9ade60e54c 100644 --- a/spring-security-oauth/spring-security-oauth-ui-implicit/src/main/java/org/baeldung/config/UiWebConfig.java +++ b/spring-security-client/spring-security-thymeleaf-authentication/src/main/java/org/baeldung/config/MvcConfig.java @@ -11,8 +11,13 @@ import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter @Configuration @EnableWebMvc -public class UiWebConfig extends WebMvcConfigurerAdapter { +public class MvcConfig extends WebMvcConfigurerAdapter { + public MvcConfig() { + super(); + } + + // @Bean public static PropertySourcesPlaceholderConfigurer propertySourcesPlaceholderConfigurer() { return new PropertySourcesPlaceholderConfigurer(); @@ -27,7 +32,6 @@ public class UiWebConfig extends WebMvcConfigurerAdapter { public void addViewControllers(final ViewControllerRegistry registry) { super.addViewControllers(registry); registry.addViewController("/").setViewName("forward:/index"); - registry.addViewController("/oauthTemp"); registry.addViewController("/index"); } @@ -35,5 +39,4 @@ public class UiWebConfig extends WebMvcConfigurerAdapter { public void addResourceHandlers(final ResourceHandlerRegistry registry) { registry.addResourceHandler("/resources/**").addResourceLocations("/resources/"); } - } \ No newline at end of file diff --git a/spring-security-client/spring-security-thymeleaf-authentication/src/main/java/org/baeldung/config/SecurityConfig.java b/spring-security-client/spring-security-thymeleaf-authentication/src/main/java/org/baeldung/config/SecurityConfig.java new file mode 100644 index 0000000000..bd6c56d38a --- /dev/null +++ b/spring-security-client/spring-security-thymeleaf-authentication/src/main/java/org/baeldung/config/SecurityConfig.java @@ -0,0 +1,40 @@ +package org.baeldung.config; + +import org.springframework.context.annotation.Configuration; +import org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder; +import org.springframework.security.config.annotation.web.builders.HttpSecurity; +import org.springframework.security.config.annotation.web.builders.WebSecurity; +import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity; +import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter; + +@Configuration +@EnableWebSecurity +public class SecurityConfig extends WebSecurityConfigurerAdapter { + + @Override + protected void configure(final AuthenticationManagerBuilder auth) throws Exception { + // @formatter:off + auth.inMemoryAuthentication() + .withUser("john").password("123").roles("USER") + .and() + .withUser("tom").password("111").roles("ADMIN"); + // @formatter:on + } + + @Override + public void configure(WebSecurity web) throws Exception { + web.ignoring().antMatchers("/resources/**"); + } + + @Override + protected void configure(final HttpSecurity http) throws Exception { + // @formatter:off + http.authorizeRequests() + .antMatchers("/login").permitAll() + .antMatchers("/admin").hasRole("ADMIN") + .anyRequest().authenticated() + .and().formLogin().permitAll() + ; + // @formatter:on + } +} \ No newline at end of file diff --git a/spring-security-client/spring-security-thymeleaf-authentication/src/main/resources/application.properties b/spring-security-client/spring-security-thymeleaf-authentication/src/main/resources/application.properties new file mode 100644 index 0000000000..bafddced85 --- /dev/null +++ b/spring-security-client/spring-security-thymeleaf-authentication/src/main/resources/application.properties @@ -0,0 +1 @@ +server.port=8081 \ No newline at end of file diff --git a/spring-security-client/spring-security-thymeleaf-authentication/src/main/resources/templates/index.html b/spring-security-client/spring-security-thymeleaf-authentication/src/main/resources/templates/index.html new file mode 100644 index 0000000000..c65b5f092b --- /dev/null +++ b/spring-security-client/spring-security-thymeleaf-authentication/src/main/resources/templates/index.html @@ -0,0 +1,23 @@ + + + + +Spring Security Thymeleaf + + + + + +
+ Current user name: Bob +
+ Current user roles: [ROLE_USER, ROLE_ADMIN] +
+ + \ No newline at end of file diff --git a/spring-security-client/spring-security-thymeleaf-authorize/.classpath b/spring-security-client/spring-security-thymeleaf-authorize/.classpath new file mode 100644 index 0000000000..0cad5db2d0 --- /dev/null +++ b/spring-security-client/spring-security-thymeleaf-authorize/.classpath @@ -0,0 +1,32 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/spring-security-client/spring-security-thymeleaf-authorize/.project b/spring-security-client/spring-security-thymeleaf-authorize/.project new file mode 100644 index 0000000000..b722d4072d --- /dev/null +++ b/spring-security-client/spring-security-thymeleaf-authorize/.project @@ -0,0 +1,48 @@ + + + spring-security-thymeleaf-authorize + + + + + + org.eclipse.wst.jsdt.core.javascriptValidator + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.wst.common.project.facet.core.builder + + + + + org.eclipse.m2e.core.maven2Builder + + + + + org.springframework.ide.eclipse.core.springbuilder + + + + + org.eclipse.wst.validation.validationbuilder + + + + + + org.eclipse.jem.workbench.JavaEMFNature + org.eclipse.wst.common.modulecore.ModuleCoreNature + org.springframework.ide.eclipse.core.springnature + org.eclipse.jdt.core.javanature + org.eclipse.m2e.core.maven2Nature + org.eclipse.wst.common.project.facet.core.nature + org.eclipse.wst.jsdt.core.jsNature + + diff --git a/spring-security-client/spring-security-thymeleaf-authorize/pom.xml b/spring-security-client/spring-security-thymeleaf-authorize/pom.xml new file mode 100644 index 0000000000..5254f1db1a --- /dev/null +++ b/spring-security-client/spring-security-thymeleaf-authorize/pom.xml @@ -0,0 +1,62 @@ + + + 4.0.0 + + com.baeldung + spring-security-thymeleaf-authorize + 0.0.1-SNAPSHOT + war + + spring-security-thymeleaf-authorize + Spring Security thymeleaf authorize tag sample + + + org.springframework.boot + spring-boot-starter-parent + 1.3.3.RELEASE + + + + + org.springframework.boot + spring-boot-starter-security + + + org.springframework.boot + spring-boot-starter-web + + + + org.springframework.boot + spring-boot-starter-tomcat + provided + + + + org.springframework.boot + spring-boot-starter-thymeleaf + + + + org.thymeleaf.extras + thymeleaf-extras-springsecurity4 + + + + + + + + + org.springframework.boot + spring-boot-maven-plugin + + + + + + UTF-8 + 1.8 + + + diff --git a/spring-security-oauth/spring-security-oauth-ui-implicit/src/main/java/org/baeldung/config/UiApplication.java b/spring-security-client/spring-security-thymeleaf-authorize/src/main/java/org/baeldung/config/Application.java similarity index 53% rename from spring-security-oauth/spring-security-oauth-ui-implicit/src/main/java/org/baeldung/config/UiApplication.java rename to spring-security-client/spring-security-thymeleaf-authorize/src/main/java/org/baeldung/config/Application.java index 8f491516aa..bea0194b40 100644 --- a/spring-security-oauth/spring-security-oauth-ui-implicit/src/main/java/org/baeldung/config/UiApplication.java +++ b/spring-security-client/spring-security-thymeleaf-authorize/src/main/java/org/baeldung/config/Application.java @@ -2,12 +2,12 @@ package org.baeldung.config; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; -import org.springframework.boot.context.web.SpringBootServletInitializer; @SpringBootApplication -public class UiApplication extends SpringBootServletInitializer { +public class Application { public static void main(String[] args) { - SpringApplication.run(UiApplication.class, args); + SpringApplication.run(Application.class, args); } -} \ No newline at end of file + +} diff --git a/spring-security-oauth/spring-security-oauth-ui-password/src/main/java/org/baeldung/config/UiWebConfig.java b/spring-security-client/spring-security-thymeleaf-authorize/src/main/java/org/baeldung/config/MvcConfig.java similarity index 92% rename from spring-security-oauth/spring-security-oauth-ui-password/src/main/java/org/baeldung/config/UiWebConfig.java rename to spring-security-client/spring-security-thymeleaf-authorize/src/main/java/org/baeldung/config/MvcConfig.java index 0732182354..9ade60e54c 100644 --- a/spring-security-oauth/spring-security-oauth-ui-password/src/main/java/org/baeldung/config/UiWebConfig.java +++ b/spring-security-client/spring-security-thymeleaf-authorize/src/main/java/org/baeldung/config/MvcConfig.java @@ -11,8 +11,13 @@ import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter @Configuration @EnableWebMvc -public class UiWebConfig extends WebMvcConfigurerAdapter { +public class MvcConfig extends WebMvcConfigurerAdapter { + public MvcConfig() { + super(); + } + + // @Bean public static PropertySourcesPlaceholderConfigurer propertySourcesPlaceholderConfigurer() { return new PropertySourcesPlaceholderConfigurer(); @@ -28,12 +33,10 @@ public class UiWebConfig extends WebMvcConfigurerAdapter { super.addViewControllers(registry); registry.addViewController("/").setViewName("forward:/index"); registry.addViewController("/index"); - registry.addViewController("/login"); } @Override public void addResourceHandlers(final ResourceHandlerRegistry registry) { registry.addResourceHandler("/resources/**").addResourceLocations("/resources/"); } - } \ No newline at end of file diff --git a/spring-security-client/spring-security-thymeleaf-authorize/src/main/java/org/baeldung/config/SecurityConfig.java b/spring-security-client/spring-security-thymeleaf-authorize/src/main/java/org/baeldung/config/SecurityConfig.java new file mode 100644 index 0000000000..bd6c56d38a --- /dev/null +++ b/spring-security-client/spring-security-thymeleaf-authorize/src/main/java/org/baeldung/config/SecurityConfig.java @@ -0,0 +1,40 @@ +package org.baeldung.config; + +import org.springframework.context.annotation.Configuration; +import org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder; +import org.springframework.security.config.annotation.web.builders.HttpSecurity; +import org.springframework.security.config.annotation.web.builders.WebSecurity; +import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity; +import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter; + +@Configuration +@EnableWebSecurity +public class SecurityConfig extends WebSecurityConfigurerAdapter { + + @Override + protected void configure(final AuthenticationManagerBuilder auth) throws Exception { + // @formatter:off + auth.inMemoryAuthentication() + .withUser("john").password("123").roles("USER") + .and() + .withUser("tom").password("111").roles("ADMIN"); + // @formatter:on + } + + @Override + public void configure(WebSecurity web) throws Exception { + web.ignoring().antMatchers("/resources/**"); + } + + @Override + protected void configure(final HttpSecurity http) throws Exception { + // @formatter:off + http.authorizeRequests() + .antMatchers("/login").permitAll() + .antMatchers("/admin").hasRole("ADMIN") + .anyRequest().authenticated() + .and().formLogin().permitAll() + ; + // @formatter:on + } +} \ No newline at end of file diff --git a/spring-security-client/spring-security-thymeleaf-authorize/src/main/resources/application.properties b/spring-security-client/spring-security-thymeleaf-authorize/src/main/resources/application.properties new file mode 100644 index 0000000000..bafddced85 --- /dev/null +++ b/spring-security-client/spring-security-thymeleaf-authorize/src/main/resources/application.properties @@ -0,0 +1 @@ +server.port=8081 \ No newline at end of file diff --git a/spring-security-client/spring-security-thymeleaf-authorize/src/main/resources/templates/index.html b/spring-security-client/spring-security-thymeleaf-authorize/src/main/resources/templates/index.html new file mode 100644 index 0000000000..fcbbfb4957 --- /dev/null +++ b/spring-security-client/spring-security-thymeleaf-authorize/src/main/resources/templates/index.html @@ -0,0 +1,32 @@ + + + + +Spring Security Thymeleaf + + + + + +
+
+ Only admins can see this message +
+ +
+ Only users can see this message +
+
+ +
+ Only users who can call "/admin" URL can see this message +
+
+ + \ No newline at end of file diff --git a/spring-security-client/spring-security-thymeleaf-config/.classpath b/spring-security-client/spring-security-thymeleaf-config/.classpath new file mode 100644 index 0000000000..0cad5db2d0 --- /dev/null +++ b/spring-security-client/spring-security-thymeleaf-config/.classpath @@ -0,0 +1,32 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/spring-security-client/spring-security-thymeleaf-config/.project b/spring-security-client/spring-security-thymeleaf-config/.project new file mode 100644 index 0000000000..f1e44573c4 --- /dev/null +++ b/spring-security-client/spring-security-thymeleaf-config/.project @@ -0,0 +1,48 @@ + + + spring-security-thymeleaf-config + + + + + + org.eclipse.wst.jsdt.core.javascriptValidator + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.wst.common.project.facet.core.builder + + + + + org.eclipse.m2e.core.maven2Builder + + + + + org.springframework.ide.eclipse.core.springbuilder + + + + + org.eclipse.wst.validation.validationbuilder + + + + + + org.eclipse.jem.workbench.JavaEMFNature + org.eclipse.wst.common.modulecore.ModuleCoreNature + org.springframework.ide.eclipse.core.springnature + org.eclipse.jdt.core.javanature + org.eclipse.m2e.core.maven2Nature + org.eclipse.wst.common.project.facet.core.nature + org.eclipse.wst.jsdt.core.jsNature + + diff --git a/spring-security-client/spring-security-thymeleaf-config/pom.xml b/spring-security-client/spring-security-thymeleaf-config/pom.xml new file mode 100644 index 0000000000..ec145a29c8 --- /dev/null +++ b/spring-security-client/spring-security-thymeleaf-config/pom.xml @@ -0,0 +1,62 @@ + + + 4.0.0 + + com.baeldung + spring-security-thymeleaf-config + 0.0.1-SNAPSHOT + war + + spring-security-thymeleaf-config + Spring Security thymeleaf configuration sample project + + + org.springframework.boot + spring-boot-starter-parent + 1.3.3.RELEASE + + + + + org.springframework.boot + spring-boot-starter-security + + + org.springframework.boot + spring-boot-starter-web + + + + org.springframework.boot + spring-boot-starter-tomcat + provided + + + + org.springframework.boot + spring-boot-starter-thymeleaf + + + + org.thymeleaf.extras + thymeleaf-extras-springsecurity4 + + + + + + + + + org.springframework.boot + spring-boot-maven-plugin + + + + + + UTF-8 + 1.8 + + + diff --git a/spring-security-oauth/spring-security-oauth-server/src/main/java/org/baeldung/config/ServerApplication.java b/spring-security-client/spring-security-thymeleaf-config/src/main/java/org/baeldung/config/Application.java similarity index 52% rename from spring-security-oauth/spring-security-oauth-server/src/main/java/org/baeldung/config/ServerApplication.java rename to spring-security-client/spring-security-thymeleaf-config/src/main/java/org/baeldung/config/Application.java index 4b1ff2c7ad..bea0194b40 100644 --- a/spring-security-oauth/spring-security-oauth-server/src/main/java/org/baeldung/config/ServerApplication.java +++ b/spring-security-client/spring-security-thymeleaf-config/src/main/java/org/baeldung/config/Application.java @@ -2,13 +2,12 @@ package org.baeldung.config; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; -import org.springframework.boot.context.web.SpringBootServletInitializer; @SpringBootApplication -public class ServerApplication extends SpringBootServletInitializer { +public class Application { public static void main(String[] args) { - SpringApplication.run(ServerApplication.class, args); + SpringApplication.run(Application.class, args); } -} \ No newline at end of file +} diff --git a/spring-security-client/spring-security-thymeleaf-config/src/main/java/org/baeldung/config/MvcConfig.java b/spring-security-client/spring-security-thymeleaf-config/src/main/java/org/baeldung/config/MvcConfig.java new file mode 100644 index 0000000000..9ade60e54c --- /dev/null +++ b/spring-security-client/spring-security-thymeleaf-config/src/main/java/org/baeldung/config/MvcConfig.java @@ -0,0 +1,42 @@ +package org.baeldung.config; + +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; +import org.springframework.context.support.PropertySourcesPlaceholderConfigurer; +import org.springframework.web.servlet.config.annotation.DefaultServletHandlerConfigurer; +import org.springframework.web.servlet.config.annotation.EnableWebMvc; +import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry; +import org.springframework.web.servlet.config.annotation.ViewControllerRegistry; +import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter; + +@Configuration +@EnableWebMvc +public class MvcConfig extends WebMvcConfigurerAdapter { + + public MvcConfig() { + super(); + } + + // + @Bean + public static PropertySourcesPlaceholderConfigurer propertySourcesPlaceholderConfigurer() { + return new PropertySourcesPlaceholderConfigurer(); + } + + @Override + public void configureDefaultServletHandling(final DefaultServletHandlerConfigurer configurer) { + configurer.enable(); + } + + @Override + public void addViewControllers(final ViewControllerRegistry registry) { + super.addViewControllers(registry); + registry.addViewController("/").setViewName("forward:/index"); + registry.addViewController("/index"); + } + + @Override + public void addResourceHandlers(final ResourceHandlerRegistry registry) { + registry.addResourceHandler("/resources/**").addResourceLocations("/resources/"); + } +} \ No newline at end of file diff --git a/spring-security-client/spring-security-thymeleaf-config/src/main/java/org/baeldung/config/SecurityConfig.java b/spring-security-client/spring-security-thymeleaf-config/src/main/java/org/baeldung/config/SecurityConfig.java new file mode 100644 index 0000000000..bd6c56d38a --- /dev/null +++ b/spring-security-client/spring-security-thymeleaf-config/src/main/java/org/baeldung/config/SecurityConfig.java @@ -0,0 +1,40 @@ +package org.baeldung.config; + +import org.springframework.context.annotation.Configuration; +import org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder; +import org.springframework.security.config.annotation.web.builders.HttpSecurity; +import org.springframework.security.config.annotation.web.builders.WebSecurity; +import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity; +import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter; + +@Configuration +@EnableWebSecurity +public class SecurityConfig extends WebSecurityConfigurerAdapter { + + @Override + protected void configure(final AuthenticationManagerBuilder auth) throws Exception { + // @formatter:off + auth.inMemoryAuthentication() + .withUser("john").password("123").roles("USER") + .and() + .withUser("tom").password("111").roles("ADMIN"); + // @formatter:on + } + + @Override + public void configure(WebSecurity web) throws Exception { + web.ignoring().antMatchers("/resources/**"); + } + + @Override + protected void configure(final HttpSecurity http) throws Exception { + // @formatter:off + http.authorizeRequests() + .antMatchers("/login").permitAll() + .antMatchers("/admin").hasRole("ADMIN") + .anyRequest().authenticated() + .and().formLogin().permitAll() + ; + // @formatter:on + } +} \ No newline at end of file diff --git a/spring-security-client/spring-security-thymeleaf-config/src/main/resources/application.properties b/spring-security-client/spring-security-thymeleaf-config/src/main/resources/application.properties new file mode 100644 index 0000000000..bafddced85 --- /dev/null +++ b/spring-security-client/spring-security-thymeleaf-config/src/main/resources/application.properties @@ -0,0 +1 @@ +server.port=8081 \ No newline at end of file diff --git a/spring-security-client/spring-security-thymeleaf-config/src/main/resources/templates/index.html b/spring-security-client/spring-security-thymeleaf-config/src/main/resources/templates/index.html new file mode 100644 index 0000000000..8e7394ad6a --- /dev/null +++ b/spring-security-client/spring-security-thymeleaf-config/src/main/resources/templates/index.html @@ -0,0 +1,21 @@ + + + + +Spring Security Thymeleaf + + + + + +
+ Welcome +
+ + \ No newline at end of file diff --git a/spring-security-custom-permission/.classpath b/spring-security-custom-permission/.classpath new file mode 100644 index 0000000000..0cad5db2d0 --- /dev/null +++ b/spring-security-custom-permission/.classpath @@ -0,0 +1,32 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/spring-security-custom-permission/.project b/spring-security-custom-permission/.project new file mode 100644 index 0000000000..06b5975e98 --- /dev/null +++ b/spring-security-custom-permission/.project @@ -0,0 +1,48 @@ + + + spring-security-custom-permission + + + + + + org.eclipse.wst.jsdt.core.javascriptValidator + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.wst.common.project.facet.core.builder + + + + + org.eclipse.m2e.core.maven2Builder + + + + + org.springframework.ide.eclipse.core.springbuilder + + + + + org.eclipse.wst.validation.validationbuilder + + + + + + org.eclipse.jem.workbench.JavaEMFNature + org.eclipse.wst.common.modulecore.ModuleCoreNature + org.springframework.ide.eclipse.core.springnature + org.eclipse.jdt.core.javanature + org.eclipse.m2e.core.maven2Nature + org.eclipse.wst.common.project.facet.core.nature + org.eclipse.wst.jsdt.core.jsNature + + diff --git a/spring-security-custom-permission/pom.xml b/spring-security-custom-permission/pom.xml new file mode 100644 index 0000000000..6f460f1751 --- /dev/null +++ b/spring-security-custom-permission/pom.xml @@ -0,0 +1,107 @@ + + + 4.0.0 + + com.baeldung + spring-security-custom-permission + 0.0.1-SNAPSHOT + war + + spring-security-custom-permission + Spring Security custom permission + + + org.springframework.boot + spring-boot-starter-parent + 1.3.3.RELEASE + + + + + org.springframework.boot + spring-boot-starter-security + + + org.springframework.boot + spring-boot-starter-web + + + + org.springframework.boot + spring-boot-starter-tomcat + provided + + + + org.springframework.boot + spring-boot-starter-thymeleaf + + + + org.thymeleaf.extras + thymeleaf-extras-springsecurity4 + + + + + + org.springframework.boot + spring-boot-starter-data-jpa + + + + com.h2database + h2 + + + + + + junit + junit + test + + + + org.hamcrest + hamcrest-core + test + + + + org.hamcrest + hamcrest-library + test + + + + com.jayway.restassured + rest-assured + ${rest-assured.version} + test + + + commons-logging + commons-logging + + + + + + + + + + org.springframework.boot + spring-boot-maven-plugin + + + + + + UTF-8 + 1.8 + 2.4.0 + + + diff --git a/spring-security-custom-permission/src/main/java/org/baeldung/Application.java b/spring-security-custom-permission/src/main/java/org/baeldung/Application.java new file mode 100644 index 0000000000..a9d6f3b8b1 --- /dev/null +++ b/spring-security-custom-permission/src/main/java/org/baeldung/Application.java @@ -0,0 +1,12 @@ +package org.baeldung; + +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; + +@SpringBootApplication +public class Application { + + public static void main(String[] args) { + SpringApplication.run(Application.class, args); + } +} diff --git a/spring-security-custom-permission/src/main/java/org/baeldung/config/MethodSecurityConfig.java b/spring-security-custom-permission/src/main/java/org/baeldung/config/MethodSecurityConfig.java new file mode 100644 index 0000000000..c4624e85e0 --- /dev/null +++ b/spring-security-custom-permission/src/main/java/org/baeldung/config/MethodSecurityConfig.java @@ -0,0 +1,21 @@ +package org.baeldung.config; + +import org.baeldung.security.CustomMethodSecurityExpressionHandler; +import org.baeldung.security.CustomPermissionEvaluator; +import org.springframework.context.annotation.Configuration; +import org.springframework.security.access.expression.method.MethodSecurityExpressionHandler; +import org.springframework.security.config.annotation.method.configuration.EnableGlobalMethodSecurity; +import org.springframework.security.config.annotation.method.configuration.GlobalMethodSecurityConfiguration; + +@Configuration +@EnableGlobalMethodSecurity(prePostEnabled = true) +public class MethodSecurityConfig extends GlobalMethodSecurityConfiguration { + + @Override + protected MethodSecurityExpressionHandler createExpressionHandler() { + // final DefaultMethodSecurityExpressionHandler expressionHandler = new DefaultMethodSecurityExpressionHandler(); + final CustomMethodSecurityExpressionHandler expressionHandler = new CustomMethodSecurityExpressionHandler(); + expressionHandler.setPermissionEvaluator(new CustomPermissionEvaluator()); + return expressionHandler; + } +} diff --git a/spring-security-custom-permission/src/main/java/org/baeldung/config/MvcConfig.java b/spring-security-custom-permission/src/main/java/org/baeldung/config/MvcConfig.java new file mode 100644 index 0000000000..9ade60e54c --- /dev/null +++ b/spring-security-custom-permission/src/main/java/org/baeldung/config/MvcConfig.java @@ -0,0 +1,42 @@ +package org.baeldung.config; + +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; +import org.springframework.context.support.PropertySourcesPlaceholderConfigurer; +import org.springframework.web.servlet.config.annotation.DefaultServletHandlerConfigurer; +import org.springframework.web.servlet.config.annotation.EnableWebMvc; +import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry; +import org.springframework.web.servlet.config.annotation.ViewControllerRegistry; +import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter; + +@Configuration +@EnableWebMvc +public class MvcConfig extends WebMvcConfigurerAdapter { + + public MvcConfig() { + super(); + } + + // + @Bean + public static PropertySourcesPlaceholderConfigurer propertySourcesPlaceholderConfigurer() { + return new PropertySourcesPlaceholderConfigurer(); + } + + @Override + public void configureDefaultServletHandling(final DefaultServletHandlerConfigurer configurer) { + configurer.enable(); + } + + @Override + public void addViewControllers(final ViewControllerRegistry registry) { + super.addViewControllers(registry); + registry.addViewController("/").setViewName("forward:/index"); + registry.addViewController("/index"); + } + + @Override + public void addResourceHandlers(final ResourceHandlerRegistry registry) { + registry.addResourceHandler("/resources/**").addResourceLocations("/resources/"); + } +} \ No newline at end of file diff --git a/spring-security-custom-permission/src/main/java/org/baeldung/config/SecurityConfig.java b/spring-security-custom-permission/src/main/java/org/baeldung/config/SecurityConfig.java new file mode 100644 index 0000000000..b365744bea --- /dev/null +++ b/spring-security-custom-permission/src/main/java/org/baeldung/config/SecurityConfig.java @@ -0,0 +1,43 @@ +package org.baeldung.config; + +import org.baeldung.security.MyUserDetailsService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.context.annotation.ComponentScan; +import org.springframework.context.annotation.Configuration; +import org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder; +import org.springframework.security.config.annotation.web.builders.HttpSecurity; +import org.springframework.security.config.annotation.web.builders.WebSecurity; +import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity; +import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter; + +@Configuration +@EnableWebSecurity +@ComponentScan("org.baeldung.security") +public class SecurityConfig extends WebSecurityConfigurerAdapter { + + @Autowired + private MyUserDetailsService userDetailsService; + + @Override + protected void configure(final AuthenticationManagerBuilder auth) throws Exception { + auth.userDetailsService(userDetailsService); + } + + @Override + public void configure(WebSecurity web) throws Exception { + web.ignoring().antMatchers("/resources/**"); + } + + @Override + protected void configure(final HttpSecurity http) throws Exception { + // @formatter:off + http.authorizeRequests() + .antMatchers("/login").permitAll() + .antMatchers("/admin").hasRole("ADMIN") + .anyRequest().authenticated() + .and().formLogin().permitAll() + .and().csrf().disable(); + ; + // @formatter:on + } +} \ No newline at end of file diff --git a/spring-security-custom-permission/src/main/java/org/baeldung/persistence/SetupData.java b/spring-security-custom-permission/src/main/java/org/baeldung/persistence/SetupData.java new file mode 100644 index 0000000000..47616ca61a --- /dev/null +++ b/spring-security-custom-permission/src/main/java/org/baeldung/persistence/SetupData.java @@ -0,0 +1,70 @@ +package org.baeldung.persistence; + +import java.util.Arrays; +import java.util.HashSet; + +import javax.annotation.PostConstruct; + +import org.baeldung.persistence.dao.OrganizationRepository; +import org.baeldung.persistence.dao.PrivilegeRepository; +import org.baeldung.persistence.dao.UserRepository; +import org.baeldung.persistence.model.Organization; +import org.baeldung.persistence.model.Privilege; +import org.baeldung.persistence.model.User; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; + +@Component +public class SetupData { + @Autowired + private UserRepository userRepository; + + @Autowired + private PrivilegeRepository privilegeRepository; + + @Autowired + private OrganizationRepository organizationRepository; + + @PostConstruct + public void init() { + initPrivileges(); + initOrganizations(); + initUsers(); + } + + private void initUsers() { + final Privilege privilege1 = privilegeRepository.findByName("FOO_READ_PRIVILEGE"); + final Privilege privilege2 = privilegeRepository.findByName("FOO_WRITE_PRIVILEGE"); + // + final User user1 = new User(); + user1.setUsername("john"); + user1.setPassword("123"); + user1.setPrivileges(new HashSet(Arrays.asList(privilege1))); + user1.setOrganization(organizationRepository.findByName("FirstOrg")); + userRepository.save(user1); + // + final User user2 = new User(); + user2.setUsername("tom"); + user2.setPassword("111"); + user2.setPrivileges(new HashSet(Arrays.asList(privilege1, privilege2))); + user2.setOrganization(organizationRepository.findByName("SecondOrg")); + userRepository.save(user2); + } + + private void initOrganizations() { + final Organization org1 = new Organization("FirstOrg"); + organizationRepository.save(org1); + // + final Organization org2 = new Organization("SecondOrg"); + organizationRepository.save(org2); + + } + + private void initPrivileges() { + final Privilege privilege1 = new Privilege("FOO_READ_PRIVILEGE"); + privilegeRepository.save(privilege1); + // + final Privilege privilege2 = new Privilege("FOO_WRITE_PRIVILEGE"); + privilegeRepository.save(privilege2); + } +} diff --git a/spring-security-custom-permission/src/main/java/org/baeldung/persistence/dao/OrganizationRepository.java b/spring-security-custom-permission/src/main/java/org/baeldung/persistence/dao/OrganizationRepository.java new file mode 100644 index 0000000000..a20d24057b --- /dev/null +++ b/spring-security-custom-permission/src/main/java/org/baeldung/persistence/dao/OrganizationRepository.java @@ -0,0 +1,10 @@ +package org.baeldung.persistence.dao; + +import org.baeldung.persistence.model.Organization; +import org.springframework.data.jpa.repository.JpaRepository; + +public interface OrganizationRepository extends JpaRepository { + + public Organization findByName(String name); + +} diff --git a/spring-security-login-and-registration/src/main/java/org/baeldung/persistence/dao/PrivilegeRepository.java b/spring-security-custom-permission/src/main/java/org/baeldung/persistence/dao/PrivilegeRepository.java similarity index 71% rename from spring-security-login-and-registration/src/main/java/org/baeldung/persistence/dao/PrivilegeRepository.java rename to spring-security-custom-permission/src/main/java/org/baeldung/persistence/dao/PrivilegeRepository.java index f728e171df..edf9002c3d 100644 --- a/spring-security-login-and-registration/src/main/java/org/baeldung/persistence/dao/PrivilegeRepository.java +++ b/spring-security-custom-permission/src/main/java/org/baeldung/persistence/dao/PrivilegeRepository.java @@ -5,9 +5,6 @@ import org.springframework.data.jpa.repository.JpaRepository; public interface PrivilegeRepository extends JpaRepository { - Privilege findByName(String name); - - @Override - void delete(Privilege privilege); + public Privilege findByName(String name); } diff --git a/spring-security-login-and-registration/src/main/java/org/baeldung/persistence/dao/UserRepository.java b/spring-security-custom-permission/src/main/java/org/baeldung/persistence/dao/UserRepository.java similarity index 73% rename from spring-security-login-and-registration/src/main/java/org/baeldung/persistence/dao/UserRepository.java rename to spring-security-custom-permission/src/main/java/org/baeldung/persistence/dao/UserRepository.java index 680b6973fa..679dd6c363 100644 --- a/spring-security-login-and-registration/src/main/java/org/baeldung/persistence/dao/UserRepository.java +++ b/spring-security-custom-permission/src/main/java/org/baeldung/persistence/dao/UserRepository.java @@ -4,9 +4,7 @@ import org.baeldung.persistence.model.User; import org.springframework.data.jpa.repository.JpaRepository; public interface UserRepository extends JpaRepository { - User findByEmail(String email); - @Override - void delete(User user); + User findByUsername(final String username); } diff --git a/spring-security-custom-permission/src/main/java/org/baeldung/persistence/model/Foo.java b/spring-security-custom-permission/src/main/java/org/baeldung/persistence/model/Foo.java new file mode 100644 index 0000000000..29c19cf22e --- /dev/null +++ b/spring-security-custom-permission/src/main/java/org/baeldung/persistence/model/Foo.java @@ -0,0 +1,94 @@ +package org.baeldung.persistence.model; + +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.GeneratedValue; +import javax.persistence.GenerationType; +import javax.persistence.Id; + +@Entity +public class Foo { + @Id + @GeneratedValue(strategy = GenerationType.AUTO) + private Long id; + + @Column(nullable = false) + private String name; + + // + + public Foo() { + super(); + } + + public Foo(String name) { + super(); + this.name = name; + } + + // + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + // + + @Override + public String toString() { + final StringBuilder builder = new StringBuilder(); + builder.append("Foo [id=").append(id).append(", name=").append(name).append("]"); + return builder.toString(); + } + + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = (prime * result) + ((id == null) ? 0 : id.hashCode()); + result = (prime * result) + ((name == null) ? 0 : name.hashCode()); + return result; + } + + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + if (obj == null) { + return false; + } + if (getClass() != obj.getClass()) { + return false; + } + final Foo other = (Foo) obj; + if (id == null) { + if (other.id != null) { + return false; + } + } else if (!id.equals(other.id)) { + return false; + } + if (name == null) { + if (other.name != null) { + return false; + } + } else if (!name.equals(other.name)) { + return false; + } + return true; + } + +} diff --git a/spring-security-custom-permission/src/main/java/org/baeldung/persistence/model/Organization.java b/spring-security-custom-permission/src/main/java/org/baeldung/persistence/model/Organization.java new file mode 100644 index 0000000000..645285b5e9 --- /dev/null +++ b/spring-security-custom-permission/src/main/java/org/baeldung/persistence/model/Organization.java @@ -0,0 +1,95 @@ +package org.baeldung.persistence.model; + +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.GeneratedValue; +import javax.persistence.GenerationType; +import javax.persistence.Id; + +@Entity +public class Organization { + + @Id + @GeneratedValue(strategy = GenerationType.AUTO) + private Long id; + + @Column(nullable = false, unique = true) + private String name; + + // + + public Organization() { + super(); + } + + public Organization(String name) { + super(); + this.name = name; + } + + // + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + // + + @Override + public String toString() { + final StringBuilder builder = new StringBuilder(); + builder.append("Organization [id=").append(id).append(", name=").append(name).append("]"); + return builder.toString(); + } + + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = (prime * result) + ((id == null) ? 0 : id.hashCode()); + result = (prime * result) + ((name == null) ? 0 : name.hashCode()); + return result; + } + + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + if (obj == null) { + return false; + } + if (getClass() != obj.getClass()) { + return false; + } + final Organization other = (Organization) obj; + if (id == null) { + if (other.id != null) { + return false; + } + } else if (!id.equals(other.id)) { + return false; + } + if (name == null) { + if (other.name != null) { + return false; + } + } else if (!name.equals(other.name)) { + return false; + } + return true; + } + +} diff --git a/spring-security-login-and-registration/src/main/java/org/baeldung/persistence/model/Privilege.java b/spring-security-custom-permission/src/main/java/org/baeldung/persistence/model/Privilege.java similarity index 57% rename from spring-security-login-and-registration/src/main/java/org/baeldung/persistence/model/Privilege.java rename to spring-security-custom-permission/src/main/java/org/baeldung/persistence/model/Privilege.java index 1331b1985d..ff3ae62c25 100644 --- a/spring-security-login-and-registration/src/main/java/org/baeldung/persistence/model/Privilege.java +++ b/spring-security-custom-permission/src/main/java/org/baeldung/persistence/model/Privilege.java @@ -1,12 +1,10 @@ package org.baeldung.persistence.model; -import java.util.Collection; - +import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.GeneratedValue; import javax.persistence.GenerationType; import javax.persistence.Id; -import javax.persistence.ManyToMany; @Entity public class Privilege { @@ -15,16 +13,16 @@ public class Privilege { @GeneratedValue(strategy = GenerationType.AUTO) private Long id; + @Column(nullable = false, unique = true) private String name; - @ManyToMany(mappedBy = "privileges") - private Collection roles; + // public Privilege() { super(); } - public Privilege(final String name) { + public Privilege(String name) { super(); this.name = name; } @@ -35,7 +33,7 @@ public class Privilege { return id; } - public void setId(final Long id) { + public void setId(Long id) { this.id = id; } @@ -43,28 +41,30 @@ public class Privilege { return name; } - public void setName(final String name) { + public void setName(String name) { this.name = name; } - public Collection getRoles() { - return roles; - } + // - public void setRoles(final Collection roles) { - this.roles = roles; + @Override + public String toString() { + final StringBuilder builder = new StringBuilder(); + builder.append("Privilege [id=").append(id).append(", name=").append(name).append("]"); + return builder.toString(); } @Override public int hashCode() { final int prime = 31; int result = 1; - result = prime * result + ((name == null) ? 0 : name.hashCode()); + result = (prime * result) + ((id == null) ? 0 : id.hashCode()); + result = (prime * result) + ((name == null) ? 0 : name.hashCode()); return result; } @Override - public boolean equals(final Object obj) { + public boolean equals(Object obj) { if (this == obj) { return true; } @@ -74,17 +74,22 @@ public class Privilege { if (getClass() != obj.getClass()) { return false; } - final Privilege privilege = (Privilege) obj; - if (!privilege.equals(privilege.name)) { + final Privilege other = (Privilege) obj; + if (id == null) { + if (other.id != null) { + return false; + } + } else if (!id.equals(other.id)) { + return false; + } + if (name == null) { + if (other.name != null) { + return false; + } + } else if (!name.equals(other.name)) { return false; } return true; } - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(); - builder.append("Privilege [name=").append(name).append("]").append("[id=").append(id).append("]"); - return builder.toString(); - } } diff --git a/spring-security-custom-permission/src/main/java/org/baeldung/persistence/model/User.java b/spring-security-custom-permission/src/main/java/org/baeldung/persistence/model/User.java new file mode 100644 index 0000000000..86b81cdcee --- /dev/null +++ b/spring-security-custom-permission/src/main/java/org/baeldung/persistence/model/User.java @@ -0,0 +1,195 @@ +package org.baeldung.persistence.model; + +import java.util.ArrayList; +import java.util.Collection; +import java.util.List; +import java.util.Set; + +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.FetchType; +import javax.persistence.GeneratedValue; +import javax.persistence.GenerationType; +import javax.persistence.Id; +import javax.persistence.JoinColumn; +import javax.persistence.JoinTable; +import javax.persistence.ManyToMany; +import javax.persistence.ManyToOne; + +import org.springframework.security.core.GrantedAuthority; +import org.springframework.security.core.authority.SimpleGrantedAuthority; +import org.springframework.security.core.userdetails.UserDetails; + +@Entity +public class User implements UserDetails { + + private static final long serialVersionUID = 1L; + + @Id + @GeneratedValue(strategy = GenerationType.AUTO) + private Long id; + + @Column(nullable = false, unique = true) + private String username; + + private String password; + + @ManyToMany(fetch = FetchType.EAGER) + @JoinTable(name = "users_privileges", joinColumns = @JoinColumn(name = "user_id", referencedColumnName = "id"), inverseJoinColumns = @JoinColumn(name = "privilege_id", referencedColumnName = "id")) + private Set privileges; + + @ManyToOne(fetch = FetchType.EAGER) + @JoinColumn(name = "organization_id", referencedColumnName = "id") + private Organization organization; + + // + + public User() { + super(); + } + + // + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + @Override + public String getUsername() { + return username; + } + + public void setUsername(String username) { + this.username = username; + } + + @Override + public String getPassword() { + return password; + } + + public void setPassword(String password) { + this.password = password; + } + + public Set getPrivileges() { + return privileges; + } + + public void setPrivileges(Set privileges) { + this.privileges = privileges; + } + + public Organization getOrganization() { + return organization; + } + + public void setOrganization(Organization organization) { + this.organization = organization; + } + + // + + @Override + public Collection getAuthorities() { + final List authorities = new ArrayList(); + for (final Privilege privilege : this.getPrivileges()) { + authorities.add(new SimpleGrantedAuthority(privilege.getName())); + } + return authorities; + } + + @Override + public boolean isAccountNonExpired() { + return true; + } + + @Override + public boolean isAccountNonLocked() { + return true; + } + + @Override + public boolean isCredentialsNonExpired() { + return true; + } + + @Override + public boolean isEnabled() { + return true; + } + + // + + @Override + public String toString() { + final StringBuilder builder = new StringBuilder(); + builder.append("User [id=").append(id).append(", username=").append(username).append(", password=").append(password).append(", privileges=").append(privileges).append(", organization=").append(organization).append("]"); + return builder.toString(); + } + + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = (prime * result) + ((id == null) ? 0 : id.hashCode()); + result = (prime * result) + ((organization == null) ? 0 : organization.hashCode()); + result = (prime * result) + ((password == null) ? 0 : password.hashCode()); + result = (prime * result) + ((privileges == null) ? 0 : privileges.hashCode()); + result = (prime * result) + ((username == null) ? 0 : username.hashCode()); + return result; + } + + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + if (obj == null) { + return false; + } + if (getClass() != obj.getClass()) { + return false; + } + final User other = (User) obj; + if (id == null) { + if (other.id != null) { + return false; + } + } else if (!id.equals(other.id)) { + return false; + } + if (organization == null) { + if (other.organization != null) { + return false; + } + } else if (!organization.equals(other.organization)) { + return false; + } + if (password == null) { + if (other.password != null) { + return false; + } + } else if (!password.equals(other.password)) { + return false; + } + if (privileges == null) { + if (other.privileges != null) { + return false; + } + } else if (!privileges.equals(other.privileges)) { + return false; + } + if (username == null) { + if (other.username != null) { + return false; + } + } else if (!username.equals(other.username)) { + return false; + } + return true; + } +} diff --git a/spring-security-custom-permission/src/main/java/org/baeldung/security/CustomMethodSecurityExpressionHandler.java b/spring-security-custom-permission/src/main/java/org/baeldung/security/CustomMethodSecurityExpressionHandler.java new file mode 100644 index 0000000000..e040a0b109 --- /dev/null +++ b/spring-security-custom-permission/src/main/java/org/baeldung/security/CustomMethodSecurityExpressionHandler.java @@ -0,0 +1,22 @@ +package org.baeldung.security; + +import org.aopalliance.intercept.MethodInvocation; +import org.springframework.security.access.expression.method.DefaultMethodSecurityExpressionHandler; +import org.springframework.security.access.expression.method.MethodSecurityExpressionOperations; +import org.springframework.security.authentication.AuthenticationTrustResolver; +import org.springframework.security.authentication.AuthenticationTrustResolverImpl; +import org.springframework.security.core.Authentication; + +public class CustomMethodSecurityExpressionHandler extends DefaultMethodSecurityExpressionHandler { + private final AuthenticationTrustResolver trustResolver = new AuthenticationTrustResolverImpl(); + + @Override + protected MethodSecurityExpressionOperations createSecurityExpressionRoot(Authentication authentication, MethodInvocation invocation) { + // final CustomMethodSecurityExpressionRoot root = new CustomMethodSecurityExpressionRoot(authentication); + final MySecurityExpressionRoot root = new MySecurityExpressionRoot(authentication); + root.setPermissionEvaluator(getPermissionEvaluator()); + root.setTrustResolver(this.trustResolver); + root.setRoleHierarchy(getRoleHierarchy()); + return root; + } +} diff --git a/spring-security-custom-permission/src/main/java/org/baeldung/security/CustomMethodSecurityExpressionRoot.java b/spring-security-custom-permission/src/main/java/org/baeldung/security/CustomMethodSecurityExpressionRoot.java new file mode 100644 index 0000000000..a3f4644592 --- /dev/null +++ b/spring-security-custom-permission/src/main/java/org/baeldung/security/CustomMethodSecurityExpressionRoot.java @@ -0,0 +1,50 @@ +package org.baeldung.security; + +import org.baeldung.persistence.model.User; +import org.springframework.security.access.expression.SecurityExpressionRoot; +import org.springframework.security.access.expression.method.MethodSecurityExpressionOperations; +import org.springframework.security.core.Authentication; + +public class CustomMethodSecurityExpressionRoot extends SecurityExpressionRoot implements MethodSecurityExpressionOperations { + + private Object filterObject; + private Object returnObject; + + public CustomMethodSecurityExpressionRoot(Authentication authentication) { + super(authentication); + } + + // + public boolean isMember(Long OrganizationId) { + final User user = (User) this.getPrincipal(); + return user.getOrganization().getId().longValue() == OrganizationId.longValue(); + } + + // + + @Override + public Object getFilterObject() { + return this.filterObject; + } + + @Override + public Object getReturnObject() { + return this.returnObject; + } + + @Override + public Object getThis() { + return this; + } + + @Override + public void setFilterObject(Object obj) { + this.filterObject = obj; + } + + @Override + public void setReturnObject(Object obj) { + this.returnObject = obj; + } + +} diff --git a/spring-security-custom-permission/src/main/java/org/baeldung/security/CustomPermissionEvaluator.java b/spring-security-custom-permission/src/main/java/org/baeldung/security/CustomPermissionEvaluator.java new file mode 100644 index 0000000000..e81f9f8939 --- /dev/null +++ b/spring-security-custom-permission/src/main/java/org/baeldung/security/CustomPermissionEvaluator.java @@ -0,0 +1,47 @@ +package org.baeldung.security; + +import java.io.Serializable; + +import org.springframework.security.access.PermissionEvaluator; +import org.springframework.security.core.Authentication; +import org.springframework.security.core.GrantedAuthority; + +public class CustomPermissionEvaluator implements PermissionEvaluator { + + @Override + public boolean hasPermission(Authentication auth, Object targetDomainObject, Object permission) { + System.out.println(auth); + if ((auth == null) || (targetDomainObject == null) || !(permission instanceof String)) { + return false; + } + String targetType = ""; + if (targetDomainObject instanceof String) { + targetType = targetDomainObject.toString().toUpperCase(); + } else { + targetType = targetDomainObject.getClass().getSimpleName().toUpperCase(); + System.out.println(targetType); + } + return hasPrivilege(auth, targetType, permission.toString().toUpperCase()); + } + + @Override + public boolean hasPermission(Authentication auth, Serializable targetId, String targetType, Object permission) { + if ((auth == null) || (targetType == null) || !(permission instanceof String)) { + return false; + } + return hasPrivilege(auth, targetType.toUpperCase(), permission.toString().toUpperCase()); + } + + private boolean hasPrivilege(Authentication auth, String targetType, String permission) { + for (final GrantedAuthority grantedAuth : auth.getAuthorities()) { + System.out.println("here " + grantedAuth); + if (grantedAuth.getAuthority().startsWith(targetType)) { + if (grantedAuth.getAuthority().contains(permission)) { + return true; + } + } + } + return false; + } + +} diff --git a/spring-security-custom-permission/src/main/java/org/baeldung/security/MySecurityExpressionRoot.java b/spring-security-custom-permission/src/main/java/org/baeldung/security/MySecurityExpressionRoot.java new file mode 100644 index 0000000000..a09d166798 --- /dev/null +++ b/spring-security-custom-permission/src/main/java/org/baeldung/security/MySecurityExpressionRoot.java @@ -0,0 +1,203 @@ +package org.baeldung.security; + +import java.io.Serializable; +import java.util.Collection; +import java.util.HashSet; +import java.util.Set; + +import org.baeldung.persistence.model.User; +import org.springframework.security.access.PermissionEvaluator; +import org.springframework.security.access.expression.method.MethodSecurityExpressionOperations; +import org.springframework.security.access.hierarchicalroles.RoleHierarchy; +import org.springframework.security.authentication.AuthenticationTrustResolver; +import org.springframework.security.core.Authentication; +import org.springframework.security.core.GrantedAuthority; +import org.springframework.security.core.authority.AuthorityUtils; + +public class MySecurityExpressionRoot implements MethodSecurityExpressionOperations { + protected final Authentication authentication; + private AuthenticationTrustResolver trustResolver; + private RoleHierarchy roleHierarchy; + private Set roles; + private String defaultRolePrefix = "ROLE_"; + + public final boolean permitAll = true; + public final boolean denyAll = false; + private PermissionEvaluator permissionEvaluator; + public final String read = "read"; + public final String write = "write"; + public final String create = "create"; + public final String delete = "delete"; + public final String admin = "administration"; + + // + + private Object filterObject; + private Object returnObject; + + public MySecurityExpressionRoot(Authentication authentication) { + if (authentication == null) { + throw new IllegalArgumentException("Authentication object cannot be null"); + } + this.authentication = authentication; + } + + @Override + public final boolean hasAuthority(String authority) { + throw new RuntimeException("method hasAuthority() not allowed"); + } + + @Override + public final boolean hasAnyAuthority(String... authorities) { + return hasAnyAuthorityName(null, authorities); + } + + @Override + public final boolean hasRole(String role) { + return hasAnyRole(role); + } + + @Override + public final boolean hasAnyRole(String... roles) { + return hasAnyAuthorityName(defaultRolePrefix, roles); + } + + private boolean hasAnyAuthorityName(String prefix, String... roles) { + final Set roleSet = getAuthoritySet(); + + for (final String role : roles) { + final String defaultedRole = getRoleWithDefaultPrefix(prefix, role); + if (roleSet.contains(defaultedRole)) { + return true; + } + } + + return false; + } + + @Override + public final Authentication getAuthentication() { + return authentication; + } + + @Override + public final boolean permitAll() { + return true; + } + + @Override + public final boolean denyAll() { + return false; + } + + @Override + public final boolean isAnonymous() { + return trustResolver.isAnonymous(authentication); + } + + @Override + public final boolean isAuthenticated() { + return !isAnonymous(); + } + + @Override + public final boolean isRememberMe() { + return trustResolver.isRememberMe(authentication); + } + + @Override + public final boolean isFullyAuthenticated() { + return !trustResolver.isAnonymous(authentication) && !trustResolver.isRememberMe(authentication); + } + + public Object getPrincipal() { + return authentication.getPrincipal(); + } + + public void setTrustResolver(AuthenticationTrustResolver trustResolver) { + this.trustResolver = trustResolver; + } + + public void setRoleHierarchy(RoleHierarchy roleHierarchy) { + this.roleHierarchy = roleHierarchy; + } + + public void setDefaultRolePrefix(String defaultRolePrefix) { + this.defaultRolePrefix = defaultRolePrefix; + } + + private Set getAuthoritySet() { + if (roles == null) { + roles = new HashSet(); + Collection userAuthorities = authentication.getAuthorities(); + + if (roleHierarchy != null) { + userAuthorities = roleHierarchy.getReachableGrantedAuthorities(userAuthorities); + } + + roles = AuthorityUtils.authorityListToSet(userAuthorities); + } + + return roles; + } + + @Override + public boolean hasPermission(Object target, Object permission) { + return permissionEvaluator.hasPermission(authentication, target, permission); + } + + @Override + public boolean hasPermission(Object targetId, String targetType, Object permission) { + return permissionEvaluator.hasPermission(authentication, (Serializable) targetId, targetType, permission); + } + + public void setPermissionEvaluator(PermissionEvaluator permissionEvaluator) { + this.permissionEvaluator = permissionEvaluator; + } + + private static String getRoleWithDefaultPrefix(String defaultRolePrefix, String role) { + if (role == null) { + return role; + } + if ((defaultRolePrefix == null) || (defaultRolePrefix.length() == 0)) { + return role; + } + if (role.startsWith(defaultRolePrefix)) { + return role; + } + return defaultRolePrefix + role; + } + + // + public boolean isMember(Long OrganizationId) { + final User user = (User) this.getPrincipal(); + return user.getOrganization().getId().longValue() == OrganizationId.longValue(); + } + + // + + @Override + public Object getFilterObject() { + return this.filterObject; + } + + @Override + public Object getReturnObject() { + return this.returnObject; + } + + @Override + public Object getThis() { + return this; + } + + @Override + public void setFilterObject(Object obj) { + this.filterObject = obj; + } + + @Override + public void setReturnObject(Object obj) { + this.returnObject = obj; + } +} \ No newline at end of file diff --git a/spring-security-custom-permission/src/main/java/org/baeldung/security/MyUserDetailsService.java b/spring-security-custom-permission/src/main/java/org/baeldung/security/MyUserDetailsService.java new file mode 100644 index 0000000000..19276a906e --- /dev/null +++ b/spring-security-custom-permission/src/main/java/org/baeldung/security/MyUserDetailsService.java @@ -0,0 +1,31 @@ +package org.baeldung.security; + +import org.baeldung.persistence.dao.UserRepository; +import org.baeldung.persistence.model.User; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.security.core.userdetails.UserDetails; +import org.springframework.security.core.userdetails.UserDetailsService; +import org.springframework.security.core.userdetails.UsernameNotFoundException; +import org.springframework.stereotype.Service; + +@Service +public class MyUserDetailsService implements UserDetailsService { + + @Autowired + private UserRepository userRepository; + + public MyUserDetailsService() { + super(); + } + + // API + + @Override + public UserDetails loadUserByUsername(final String username) { + final User user = userRepository.findByUsername(username); + if (user == null) { + throw new UsernameNotFoundException(username); + } + return user; + } +} diff --git a/spring-security-custom-permission/src/main/java/org/baeldung/web/MainController.java b/spring-security-custom-permission/src/main/java/org/baeldung/web/MainController.java new file mode 100644 index 0000000000..7e279907c6 --- /dev/null +++ b/spring-security-custom-permission/src/main/java/org/baeldung/web/MainController.java @@ -0,0 +1,57 @@ +package org.baeldung.web; + +import org.baeldung.persistence.dao.OrganizationRepository; +import org.baeldung.persistence.model.Foo; +import org.baeldung.persistence.model.Organization; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.http.HttpStatus; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.ResponseBody; +import org.springframework.web.bind.annotation.ResponseStatus; + +@Controller +public class MainController { + + @Autowired + private OrganizationRepository organizationRepository; + + @PreAuthorize("hasPermission('Foo', 'read')") + @RequestMapping(method = RequestMethod.GET, value = "/foos/{id}") + @ResponseBody + public Foo findById(@PathVariable final long id) { + return new Foo("Sample"); + } + + @PreAuthorize("hasPermission(#foo, 'write')") + @RequestMapping(method = RequestMethod.POST, value = "/foos") + @ResponseStatus(HttpStatus.CREATED) + @ResponseBody + public Foo create(@RequestBody final Foo foo) { + return foo; + } + + // + + @PreAuthorize("hasAuthority('FOO_READ_PRIVILEGE')") + @RequestMapping(method = RequestMethod.GET, value = "/foos") + @ResponseBody + public Foo findFooByName(@RequestParam final String name) { + return new Foo(name); + } + + // + + @PreAuthorize("isMember(#id)") + @RequestMapping(method = RequestMethod.GET, value = "/organizations/{id}") + @ResponseBody + public Organization findOrgById(@PathVariable final long id) { + return organizationRepository.findOne(id); + } + +} diff --git a/spring-security-custom-permission/src/main/resources/application.properties b/spring-security-custom-permission/src/main/resources/application.properties new file mode 100644 index 0000000000..0b40f62fa9 --- /dev/null +++ b/spring-security-custom-permission/src/main/resources/application.properties @@ -0,0 +1,9 @@ +server.port=8081 +spring.datasource.driver-class-name=org.h2.Driver +spring.datasource.url=jdbc:h2:mem:security_permission;DB_CLOSE_DELAY=-1 +spring.datasource.username=sa +spring.datasource.password= +spring.jpa.hibernate.ddl-auto=create-drop +spring.jpa.database=H2 +spring.jpa.show-sql=false +spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.H2Dialect \ No newline at end of file diff --git a/spring-security-custom-permission/src/main/resources/templates/index.html b/spring-security-custom-permission/src/main/resources/templates/index.html new file mode 100644 index 0000000000..8e7394ad6a --- /dev/null +++ b/spring-security-custom-permission/src/main/resources/templates/index.html @@ -0,0 +1,21 @@ + + + + +Spring Security Thymeleaf + + + + + +
+ Welcome +
+ + \ No newline at end of file diff --git a/spring-security-custom-permission/src/test/java/org/baeldung/web/LiveTest.java b/spring-security-custom-permission/src/test/java/org/baeldung/web/LiveTest.java new file mode 100644 index 0000000000..80b1390083 --- /dev/null +++ b/spring-security-custom-permission/src/test/java/org/baeldung/web/LiveTest.java @@ -0,0 +1,67 @@ +package org.baeldung.web; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertTrue; + +import org.baeldung.persistence.model.Foo; +import org.junit.Test; +import org.springframework.http.MediaType; + +import com.jayway.restassured.RestAssured; +import com.jayway.restassured.authentication.FormAuthConfig; +import com.jayway.restassured.response.Response; +import com.jayway.restassured.specification.RequestSpecification; + +public class LiveTest { + + private final FormAuthConfig formAuthConfig = new FormAuthConfig("http://localhost:8081/login", "username", "password"); + + @Test + public void givenUserWithReadPrivilegeAndHasPermission_whenGetFooById_thenOK() { + final Response response = givenAuth("john", "123").get("http://localhost:8081/foos/1"); + assertEquals(200, response.getStatusCode()); + assertTrue(response.asString().contains("id")); + } + + @Test + public void givenUserWithNoWritePrivilegeAndHasPermission_whenPostFoo_thenForbidden() { + final Response response = givenAuth("john", "123").contentType(MediaType.APPLICATION_JSON_VALUE).body(new Foo("sample")).post("http://localhost:8081/foos"); + assertEquals(403, response.getStatusCode()); + } + + @Test + public void givenUserWithWritePrivilegeAndHasPermission_whenPostFoo_thenOk() { + final Response response = givenAuth("tom", "111").contentType(MediaType.APPLICATION_JSON_VALUE).body(new Foo("sample")).post("http://localhost:8081/foos"); + assertEquals(201, response.getStatusCode()); + assertTrue(response.asString().contains("id")); + } + + // + + @Test + public void givenUserMemberInOrganization_whenGetOrganization_thenOK() { + final Response response = givenAuth("john", "123").get("http://localhost:8081/organizations/1"); + assertEquals(200, response.getStatusCode()); + assertTrue(response.asString().contains("id")); + } + + @Test + public void givenUserMemberNotInOrganization_whenGetOrganization_thenForbidden() { + final Response response = givenAuth("john", "123").get("http://localhost:8081/organizations/2"); + assertEquals(403, response.getStatusCode()); + } + + // + + @Test + public void givenDisabledSecurityExpression_whenGetFooByName_thenError() { + final Response response = givenAuth("john", "123").get("http://localhost:8081/foos?name=sample"); + assertEquals(500, response.getStatusCode()); + assertTrue(response.asString().contains("method hasAuthority() not allowed")); + } + + // + private RequestSpecification givenAuth(String username, String password) { + return RestAssured.given().auth().form(username, password, formAuthConfig); + } +} \ No newline at end of file diff --git a/spring-security-login-and-registration/.externalToolBuilders/org.eclipse.wst.jsdt.core.javascriptValidator.launch b/spring-security-login-and-registration/.externalToolBuilders/org.eclipse.wst.jsdt.core.javascriptValidator.launch deleted file mode 100644 index 627021fb96..0000000000 --- a/spring-security-login-and-registration/.externalToolBuilders/org.eclipse.wst.jsdt.core.javascriptValidator.launch +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/spring-security-login-and-registration/.project b/spring-security-login-and-registration/.project deleted file mode 100644 index 4a27f224a4..0000000000 --- a/spring-security-login-and-registration/.project +++ /dev/null @@ -1,55 +0,0 @@ - - - spring-security-login-and-registration - - - - - - org.eclipse.ui.externaltools.ExternalToolBuilder - full,incremental, - - - LaunchConfigHandle - <project>/.externalToolBuilders/org.eclipse.wst.jsdt.core.javascriptValidator.launch - - - - - org.eclipse.jdt.core.javabuilder - - - - - org.eclipse.wst.common.project.facet.core.builder - - - - - org.springframework.ide.eclipse.core.springbuilder - - - - - org.eclipse.wst.validation.validationbuilder - - - - - org.eclipse.m2e.core.maven2Builder - - - - - - org.eclipse.jem.workbench.JavaEMFNature - org.eclipse.wst.common.modulecore.ModuleCoreNature - org.springframework.ide.eclipse.core.springnature - org.eclipse.jdt.core.javanature - org.eclipse.m2e.core.maven2Nature - org.eclipse.wst.common.project.facet.core.nature - org.eclipse.wst.jsdt.core.jsNature - org.hibernate.eclipse.console.hibernateNature - org.jboss.tools.jst.web.kb.kbnature - - diff --git a/spring-security-login-and-registration/README.md b/spring-security-login-and-registration/README.md deleted file mode 100644 index 07fb21bfff..0000000000 --- a/spring-security-login-and-registration/README.md +++ /dev/null @@ -1,37 +0,0 @@ -========= - -## Login and Registration Example Project with Spring Security - - -### Relevant Articles: -- [Spring Security Registration Tutorial](http://www.baeldung.com/spring-security-registration) -- [The Registration Process With Spring Security](http://www.baeldung.com/registration-with-spring-mvc-and-spring-security) -- [Registration – Activate a New Account by Email](http://www.baeldung.com/registration-verify-user-by-email) -- [Registration with Spring Security – Password Encoding](http://www.baeldung.com/spring-security-registration-password-encoding-bcrypt) -- [Spring Security – Roles and Privileges](http://www.baeldung.com/role-and-privilege-for-spring-security-registration) -- [Prevent Brute Force Authentication Attempts with Spring Security](http://www.baeldung.com/spring-security-block-brute-force-authentication-attempts) -- [Spring Security – Reset Your Password](http://www.baeldung.com/spring-security-registration-i-forgot-my-password) -- [Spring Security Registration – Resend Verification Email](http://www.baeldung.com/spring-security-registration-verification-email) -- [The Registration API becomes RESTful](http://www.baeldung.com/registration-restful-api) -- [Registration – Password Strength and Rules](http://www.baeldung.com/registration-password-strength-and-rules) -- [Updating your Password](http://www.baeldung.com/updating-your-password/) - -### Build the Project -``` -mvn clean install -``` - - -### Set up MySQL -``` -mysql -u root -p -> CREATE USER 'tutorialuser'@'localhost' IDENTIFIED BY 'tutorialmy5ql'; -> GRANT ALL PRIVILEGES ON *.* TO 'tutorialuser'@'localhost'; -> FLUSH PRIVILEGES; -``` - - -### Set up Email - -You need to configure the email by renaming file "email.properties.sample" to "email.properties" and provide your own username and password. -You also need to use your own host, you can use Amazon or Google for example. diff --git a/spring-security-login-and-registration/pom.xml b/spring-security-login-and-registration/pom.xml deleted file mode 100644 index bcbe9371e2..0000000000 --- a/spring-security-login-and-registration/pom.xml +++ /dev/null @@ -1,354 +0,0 @@ - - - 4.0.0 - - org.baeldung - spring-security-login-and-registration - 1.0.1-SNAPSHOT - - spring-security-login-and-registration - war - - - - - - - - - org.springframework.security - spring-security-web - ${org.springframework.security.version} - - - org.springframework.security - spring-security-config - ${org.springframework.security.version} - - - org.springframework.security - spring-security-taglibs - ${org.springframework.security.version} - - - - - - org.springframework - spring-core - ${org.springframework.version} - - - commons-logging - commons-logging - - - - - org.springframework - spring-context - ${org.springframework.version} - - - org.springframework - spring-context-support - ${org.springframework.version} - - - org.springframework - spring-jdbc - ${org.springframework.version} - - - org.springframework - spring-beans - ${org.springframework.version} - - - org.springframework - spring-aop - ${org.springframework.version} - - - org.springframework - spring-tx - ${org.springframework.version} - - - org.springframework - spring-expression - ${org.springframework.version} - - - - org.springframework - spring-web - ${org.springframework.version} - - - org.springframework - spring-webmvc - ${org.springframework.version} - - - - - javax.servlet - javax.servlet-api - ${javax.servlet.version} - provided - - - - javax.servlet - jstl - ${jstl.version} - runtime - - - - - org.springframework - spring-test - ${org.springframework.version} - test - - - - - org.passay - passay - ${passay.version} - - - - - org.springframework.data - spring-data-jpa - ${spring-data-jpa.version} - - - org.hibernate - hibernate-entitymanager - ${hibernate.version} - - - - - - - - - org.hibernate - hibernate-validator - ${hibernate-validator.version} - - - - - mysql - mysql-connector-java - ${mysql-connector-java.version} - - - commons-dbcp - commons-dbcp - ${commons-dbcp.version} - - - com.fasterxml.jackson.core - jackson-databind - ${jackson.version} - - - javax.mail - mail - ${javax.mail.version} - - - com.google.guava - guava - ${guava.version} - - - - - org.slf4j - slf4j-api - ${org.slf4j.version} - - - ch.qos.logback - logback-classic - ${logback.version} - - - - org.slf4j - jcl-over-slf4j - ${org.slf4j.version} - - - - org.slf4j - log4j-over-slf4j - ${org.slf4j.version} - - - - - junit - junit - ${junit.version} - test - - - - org.hamcrest - hamcrest-core - ${org.hamcrest.version} - test - - - org.hamcrest - hamcrest-library - ${org.hamcrest.version} - test - - - - com.jayway.restassured - rest-assured - ${rest-assured.version} - test - - - commons-logging - commons-logging - - - - - - javax.el - el-api - 2.2 - - - - - spring-security-login-and-registration - - - src/main/resources - true - - - - - - - org.apache.maven.plugins - maven-compiler-plugin - ${maven-compiler-plugin.version} - - 1.8 - 1.8 - - - - - org.apache.maven.plugins - maven-war-plugin - ${maven-war-plugin.version} - - - - org.apache.maven.plugins - maven-surefire-plugin - ${maven-surefire-plugin.version} - - - **/*IntegrationTest.java - **/*LiveTest.java - - - - - - - - - org.codehaus.cargo - cargo-maven2-plugin - ${cargo-maven2-plugin.version} - - true - - jetty8x - embedded - - - - - - - 8082 - - - - - - - - - - - 1.8 - - - 4.2.4.RELEASE - 4.0.3.RELEASE - - - 4.3.11.Final - 5.2.2.Final - 5.1.37 - 1.9.2.RELEASE - - - - 1.7.13 - 1.1.3 - - - 2.3.2-b01 - 3.0.1 - 1.2 - - - 1 - - - 1.8.2.RELEASE - - - 19.0 - - 1.3 - 4.12 - 1.0 - 2.4.0 - 1.4.7 - 2.6.4 - 1.4 - - - 1.4.17 - 3.3 - 2.6 - 2.18.1 - - - - \ No newline at end of file diff --git a/spring-security-login-and-registration/src/main/java/org/baeldung/persistence/dao/PasswordResetTokenRepository.java b/spring-security-login-and-registration/src/main/java/org/baeldung/persistence/dao/PasswordResetTokenRepository.java deleted file mode 100644 index a1c22998de..0000000000 --- a/spring-security-login-and-registration/src/main/java/org/baeldung/persistence/dao/PasswordResetTokenRepository.java +++ /dev/null @@ -1,13 +0,0 @@ -package org.baeldung.persistence.dao; - -import org.baeldung.persistence.model.PasswordResetToken; -import org.baeldung.persistence.model.User; -import org.springframework.data.jpa.repository.JpaRepository; - -public interface PasswordResetTokenRepository extends JpaRepository { - - PasswordResetToken findByToken(String token); - - PasswordResetToken findByUser(User user); - -} diff --git a/spring-security-login-and-registration/src/main/java/org/baeldung/persistence/dao/RoleRepository.java b/spring-security-login-and-registration/src/main/java/org/baeldung/persistence/dao/RoleRepository.java deleted file mode 100644 index 3d6ba16d0f..0000000000 --- a/spring-security-login-and-registration/src/main/java/org/baeldung/persistence/dao/RoleRepository.java +++ /dev/null @@ -1,13 +0,0 @@ -package org.baeldung.persistence.dao; - -import org.baeldung.persistence.model.Role; -import org.springframework.data.jpa.repository.JpaRepository; - -public interface RoleRepository extends JpaRepository { - - Role findByName(String name); - - @Override - void delete(Role role); - -} diff --git a/spring-security-login-and-registration/src/main/java/org/baeldung/persistence/dao/VerificationTokenRepository.java b/spring-security-login-and-registration/src/main/java/org/baeldung/persistence/dao/VerificationTokenRepository.java deleted file mode 100644 index d40a843e88..0000000000 --- a/spring-security-login-and-registration/src/main/java/org/baeldung/persistence/dao/VerificationTokenRepository.java +++ /dev/null @@ -1,13 +0,0 @@ -package org.baeldung.persistence.dao; - -import org.baeldung.persistence.model.User; -import org.baeldung.persistence.model.VerificationToken; -import org.springframework.data.jpa.repository.JpaRepository; - -public interface VerificationTokenRepository extends JpaRepository { - - VerificationToken findByToken(String token); - - VerificationToken findByUser(User user); - -} diff --git a/spring-security-login-and-registration/src/main/java/org/baeldung/persistence/model/PasswordResetToken.java b/spring-security-login-and-registration/src/main/java/org/baeldung/persistence/model/PasswordResetToken.java deleted file mode 100644 index fdf5473764..0000000000 --- a/spring-security-login-and-registration/src/main/java/org/baeldung/persistence/model/PasswordResetToken.java +++ /dev/null @@ -1,143 +0,0 @@ -package org.baeldung.persistence.model; - -import java.util.Calendar; -import java.util.Date; - -import javax.persistence.Entity; -import javax.persistence.FetchType; -import javax.persistence.GeneratedValue; -import javax.persistence.GenerationType; -import javax.persistence.Id; -import javax.persistence.JoinColumn; -import javax.persistence.OneToOne; - -@Entity -public class PasswordResetToken { - - private static final int EXPIRATION = 60 * 24; - - @Id - @GeneratedValue(strategy = GenerationType.AUTO) - private Long id; - - private String token; - - @OneToOne(targetEntity = User.class, fetch = FetchType.EAGER) - @JoinColumn(nullable = false, name = "user_id") - private User user; - - private Date expiryDate; - - public PasswordResetToken() { - super(); - } - - public PasswordResetToken(final String token) { - super(); - - this.token = token; - this.expiryDate = calculateExpiryDate(EXPIRATION); - } - - public PasswordResetToken(final String token, final User user) { - super(); - - this.token = token; - this.user = user; - this.expiryDate = calculateExpiryDate(EXPIRATION); - } - - // - - public String getToken() { - return token; - } - - public void setToken(final String token) { - this.token = token; - } - - public User getUser() { - return user; - } - - public void setUser(final User user) { - this.user = user; - } - - public Date getExpiryDate() { - return expiryDate; - } - - public void setExpiryDate(final Date expiryDate) { - this.expiryDate = expiryDate; - } - - private Date calculateExpiryDate(final int expiryTimeInMinutes) { - final Calendar cal = Calendar.getInstance(); - cal.setTimeInMillis(new Date().getTime()); - cal.add(Calendar.MINUTE, expiryTimeInMinutes); - return new Date(cal.getTime().getTime()); - } - - public void updateToken(final String token) { - this.token = token; - this.expiryDate = calculateExpiryDate(EXPIRATION); - } - - // - - @Override - public int hashCode() { - final int prime = 31; - int result = 1; - result = prime * result + ((expiryDate == null) ? 0 : expiryDate.hashCode()); - result = prime * result + ((token == null) ? 0 : token.hashCode()); - result = prime * result + ((user == null) ? 0 : user.hashCode()); - return result; - } - - @Override - public boolean equals(final Object obj) { - if (this == obj) { - return true; - } - if (obj == null) { - return false; - } - if (getClass() != obj.getClass()) { - return false; - } - final PasswordResetToken other = (PasswordResetToken) obj; - if (expiryDate == null) { - if (other.expiryDate != null) { - return false; - } - } else if (!expiryDate.equals(other.expiryDate)) { - return false; - } - if (token == null) { - if (other.token != null) { - return false; - } - } else if (!token.equals(other.token)) { - return false; - } - if (user == null) { - if (other.user != null) { - return false; - } - } else if (!user.equals(other.user)) { - return false; - } - return true; - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(); - builder.append("Token [String=").append(token).append("]").append("[Expires").append(expiryDate).append("]"); - return builder.toString(); - } - -} diff --git a/spring-security-login-and-registration/src/main/java/org/baeldung/persistence/model/Role.java b/spring-security-login-and-registration/src/main/java/org/baeldung/persistence/model/Role.java deleted file mode 100644 index 86680252d2..0000000000 --- a/spring-security-login-and-registration/src/main/java/org/baeldung/persistence/model/Role.java +++ /dev/null @@ -1,104 +0,0 @@ -package org.baeldung.persistence.model; - -import java.util.Collection; - -import javax.persistence.Entity; -import javax.persistence.GeneratedValue; -import javax.persistence.GenerationType; -import javax.persistence.Id; -import javax.persistence.JoinColumn; -import javax.persistence.JoinTable; -import javax.persistence.ManyToMany; - -@Entity -public class Role { - - @Id - @GeneratedValue(strategy = GenerationType.AUTO) - private Long id; - - @ManyToMany(mappedBy = "roles") - private Collection users; - - @ManyToMany - @JoinTable(name = "roles_privileges", joinColumns = @JoinColumn(name = "role_id", referencedColumnName = "id") , inverseJoinColumns = @JoinColumn(name = "privilege_id", referencedColumnName = "id") ) - private Collection privileges; - - private String name; - - public Role() { - super(); - } - - public Role(final String name) { - super(); - this.name = name; - } - - // - - public Long getId() { - return id; - } - - public void setId(final Long id) { - this.id = id; - } - - public String getName() { - return name; - } - - public void setName(final String name) { - this.name = name; - } - - public Collection getUsers() { - return users; - } - - public void setUsers(final Collection users) { - this.users = users; - } - - public Collection getPrivileges() { - return privileges; - } - - public void setPrivileges(final Collection privileges) { - this.privileges = privileges; - } - - @Override - public int hashCode() { - final int prime = 31; - int result = 1; - result = prime * result + ((name == null) ? 0 : name.hashCode()); - return result; - } - - @Override - public boolean equals(final Object obj) { - if (this == obj) { - return true; - } - if (obj == null) { - return false; - } - if (getClass() != obj.getClass()) { - return false; - } - final Role role = (Role) obj; - if (!role.equals(role.name)) { - return false; - } - return true; - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(); - builder.append("Role [name=").append(name).append("]").append("[id=").append(id).append("]"); - return builder.toString(); - } -} \ No newline at end of file diff --git a/spring-security-login-and-registration/src/main/java/org/baeldung/persistence/model/User.java b/spring-security-login-and-registration/src/main/java/org/baeldung/persistence/model/User.java deleted file mode 100644 index 9640ba079b..0000000000 --- a/spring-security-login-and-registration/src/main/java/org/baeldung/persistence/model/User.java +++ /dev/null @@ -1,143 +0,0 @@ -package org.baeldung.persistence.model; - -import java.util.Collection; - -import javax.persistence.Column; -import javax.persistence.Entity; -import javax.persistence.GeneratedValue; -import javax.persistence.GenerationType; -import javax.persistence.Id; -import javax.persistence.JoinColumn; -import javax.persistence.JoinTable; -import javax.persistence.ManyToMany; - -@Entity -public class User { - - @Id - @GeneratedValue(strategy = GenerationType.AUTO) - private Long id; - - private String firstName; - - private String lastName; - - private String email; - - @Column(length = 60) - private String password; - - private boolean enabled; - - private boolean tokenExpired; - - // - - @ManyToMany - @JoinTable(name = "users_roles", joinColumns = @JoinColumn(name = "user_id", referencedColumnName = "id") , inverseJoinColumns = @JoinColumn(name = "role_id", referencedColumnName = "id") ) - private Collection roles; - - public User() { - super(); - this.enabled = false; - this.tokenExpired = false; - } - - public Long getId() { - return id; - } - - public void setId(final Long id) { - this.id = id; - } - - public String getFirstName() { - return firstName; - } - - public void setFirstName(final String firstName) { - this.firstName = firstName; - } - - public String getLastName() { - return lastName; - } - - public void setLastName(final String lastName) { - this.lastName = lastName; - } - - public String getEmail() { - return email; - } - - public void setEmail(final String username) { - this.email = username; - } - - public String getPassword() { - return password; - } - - public void setPassword(final String password) { - this.password = password; - } - - public Collection getRoles() { - return roles; - } - - public void setRoles(final Collection roles) { - this.roles = roles; - } - - public boolean isEnabled() { - return enabled; - } - - public void setEnabled(final boolean enabled) { - this.enabled = enabled; - } - - public boolean isTokenExpired() { - return tokenExpired; - } - - public void setTokenExpired(final boolean expired) { - this.tokenExpired = expired; - } - - @Override - public int hashCode() { - final int prime = 31; - int result = 1; - result = prime * result + ((email == null) ? 0 : email.hashCode()); - return result; - } - - @Override - public boolean equals(final Object obj) { - if (this == obj) { - return true; - } - if (obj == null) { - return false; - } - if (getClass() != obj.getClass()) { - return false; - } - final User user = (User) obj; - if (!email.equals(user.email)) { - return false; - } - return true; - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(); - builder.append("User [firstName=").append(firstName).append("]").append("[lastName=").append(lastName).append("]").append("[username").append(email).append("]"); - return builder.toString(); - } - -} \ No newline at end of file diff --git a/spring-security-login-and-registration/src/main/java/org/baeldung/persistence/model/VerificationToken.java b/spring-security-login-and-registration/src/main/java/org/baeldung/persistence/model/VerificationToken.java deleted file mode 100644 index a8eb49f672..0000000000 --- a/spring-security-login-and-registration/src/main/java/org/baeldung/persistence/model/VerificationToken.java +++ /dev/null @@ -1,141 +0,0 @@ -package org.baeldung.persistence.model; - -import java.util.Calendar; -import java.util.Date; - -import javax.persistence.Entity; -import javax.persistence.FetchType; -import javax.persistence.GeneratedValue; -import javax.persistence.GenerationType; -import javax.persistence.Id; -import javax.persistence.JoinColumn; -import javax.persistence.OneToOne; - -@Entity -public class VerificationToken { - - private static final int EXPIRATION = 60 * 24; - - @Id - @GeneratedValue(strategy = GenerationType.AUTO) - private Long id; - - private String token; - - @OneToOne(targetEntity = User.class, fetch = FetchType.EAGER) - @JoinColumn(nullable = false, name = "user_id") - private User user; - - private Date expiryDate; - - public VerificationToken() { - super(); - } - - public VerificationToken(final String token) { - super(); - - this.token = token; - this.expiryDate = calculateExpiryDate(EXPIRATION); - } - - public VerificationToken(final String token, final User user) { - super(); - - this.token = token; - this.user = user; - this.expiryDate = calculateExpiryDate(EXPIRATION); - } - - public String getToken() { - return token; - } - - public void setToken(final String token) { - this.token = token; - } - - public User getUser() { - return user; - } - - public void setUser(final User user) { - this.user = user; - } - - public Date getExpiryDate() { - return expiryDate; - } - - public void setExpiryDate(final Date expiryDate) { - this.expiryDate = expiryDate; - } - - private Date calculateExpiryDate(final int expiryTimeInMinutes) { - final Calendar cal = Calendar.getInstance(); - cal.setTimeInMillis(new Date().getTime()); - cal.add(Calendar.MINUTE, expiryTimeInMinutes); - return new Date(cal.getTime().getTime()); - } - - public void updateToken(final String token) { - this.token = token; - this.expiryDate = calculateExpiryDate(EXPIRATION); - } - - // - - @Override - public int hashCode() { - final int prime = 31; - int result = 1; - result = prime * result + ((expiryDate == null) ? 0 : expiryDate.hashCode()); - result = prime * result + ((token == null) ? 0 : token.hashCode()); - result = prime * result + ((user == null) ? 0 : user.hashCode()); - return result; - } - - @Override - public boolean equals(final Object obj) { - if (this == obj) { - return true; - } - if (obj == null) { - return false; - } - if (getClass() != obj.getClass()) { - return false; - } - final VerificationToken other = (VerificationToken) obj; - if (expiryDate == null) { - if (other.expiryDate != null) { - return false; - } - } else if (!expiryDate.equals(other.expiryDate)) { - return false; - } - if (token == null) { - if (other.token != null) { - return false; - } - } else if (!token.equals(other.token)) { - return false; - } - if (user == null) { - if (other.user != null) { - return false; - } - } else if (!user.equals(other.user)) { - return false; - } - return true; - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(); - builder.append("Token [String=").append(token).append("]").append("[Expires").append(expiryDate).append("]"); - return builder.toString(); - } - -} diff --git a/spring-security-login-and-registration/src/main/java/org/baeldung/persistence/service/IUserService.java b/spring-security-login-and-registration/src/main/java/org/baeldung/persistence/service/IUserService.java deleted file mode 100644 index 9fa97395fa..0000000000 --- a/spring-security-login-and-registration/src/main/java/org/baeldung/persistence/service/IUserService.java +++ /dev/null @@ -1,38 +0,0 @@ -package org.baeldung.persistence.service; - -import org.baeldung.persistence.model.PasswordResetToken; -import org.baeldung.persistence.model.User; -import org.baeldung.persistence.model.VerificationToken; -import org.baeldung.validation.EmailExistsException; - -public interface IUserService { - - User registerNewUserAccount(UserDto accountDto) throws EmailExistsException; - - User getUser(String verificationToken); - - void saveRegisteredUser(User user); - - void deleteUser(User user); - - void createVerificationTokenForUser(User user, String token); - - VerificationToken getVerificationToken(String VerificationToken); - - VerificationToken generateNewVerificationToken(String token); - - void createPasswordResetTokenForUser(User user, String token); - - User findUserByEmail(String email); - - PasswordResetToken getPasswordResetToken(String token); - - User getUserByPasswordResetToken(String token); - - User getUserByID(long id); - - void changeUserPassword(User user, String password); - - boolean checkIfValidOldPassword(User user, String password); - -} diff --git a/spring-security-login-and-registration/src/main/java/org/baeldung/persistence/service/UserDto.java b/spring-security-login-and-registration/src/main/java/org/baeldung/persistence/service/UserDto.java deleted file mode 100644 index 627aac81c4..0000000000 --- a/spring-security-login-and-registration/src/main/java/org/baeldung/persistence/service/UserDto.java +++ /dev/null @@ -1,88 +0,0 @@ -package org.baeldung.persistence.service; - -import javax.validation.constraints.NotNull; -import javax.validation.constraints.Size; - -import org.baeldung.validation.PasswordMatches; -import org.baeldung.validation.ValidEmail; -import org.baeldung.validation.ValidPassword; - -@PasswordMatches -public class UserDto { - @NotNull - @Size(min = 1) - private String firstName; - - @NotNull - @Size(min = 1) - private String lastName; - - @ValidPassword - private String password; - - @NotNull - @Size(min = 1) - private String matchingPassword; - - @ValidEmail - @NotNull - @Size(min = 1) - private String email; - - public String getEmail() { - return email; - } - - public void setEmail(final String email) { - this.email = email; - } - - private Integer role; - - public Integer getRole() { - return role; - } - - public void setRole(final Integer role) { - this.role = role; - } - - public String getFirstName() { - return firstName; - } - - public void setFirstName(final String firstName) { - this.firstName = firstName; - } - - public String getLastName() { - return lastName; - } - - public void setLastName(final String lastName) { - this.lastName = lastName; - } - - public String getPassword() { - return password; - } - - public void setPassword(final String password) { - this.password = password; - } - - public String getMatchingPassword() { - return matchingPassword; - } - - public void setMatchingPassword(final String matchingPassword) { - this.matchingPassword = matchingPassword; - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(); - builder.append("User [firstName=").append(firstName).append("]").append("[lastName=").append(lastName).append("]").append("[email").append(email).append("]").append("[password").append(password).append("]"); - return builder.toString(); - } -} diff --git a/spring-security-login-and-registration/src/main/java/org/baeldung/persistence/service/UserService.java b/spring-security-login-and-registration/src/main/java/org/baeldung/persistence/service/UserService.java deleted file mode 100644 index fafe52953f..0000000000 --- a/spring-security-login-and-registration/src/main/java/org/baeldung/persistence/service/UserService.java +++ /dev/null @@ -1,136 +0,0 @@ -package org.baeldung.persistence.service; - -import java.util.Arrays; -import java.util.UUID; - -import javax.transaction.Transactional; - -import org.baeldung.persistence.dao.PasswordResetTokenRepository; -import org.baeldung.persistence.dao.RoleRepository; -import org.baeldung.persistence.dao.UserRepository; -import org.baeldung.persistence.dao.VerificationTokenRepository; -import org.baeldung.persistence.model.PasswordResetToken; -import org.baeldung.persistence.model.User; -import org.baeldung.persistence.model.VerificationToken; -import org.baeldung.validation.EmailExistsException; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.security.crypto.password.PasswordEncoder; -import org.springframework.stereotype.Service; - -@Service -@Transactional -public class UserService implements IUserService { - @Autowired - private UserRepository repository; - - @Autowired - private VerificationTokenRepository tokenRepository; - - @Autowired - private PasswordResetTokenRepository passwordTokenRepository; - - @Autowired - private PasswordEncoder passwordEncoder; - - @Autowired - private RoleRepository roleRepository; - - // API - - @Override - public User registerNewUserAccount(final UserDto accountDto) throws EmailExistsException { - if (emailExist(accountDto.getEmail())) { - throw new EmailExistsException("There is an account with that email adress: " + accountDto.getEmail()); - } - final User user = new User(); - - user.setFirstName(accountDto.getFirstName()); - user.setLastName(accountDto.getLastName()); - user.setPassword(passwordEncoder.encode(accountDto.getPassword())); - user.setEmail(accountDto.getEmail()); - - user.setRoles(Arrays.asList(roleRepository.findByName("ROLE_USER"))); - return repository.save(user); - } - - @Override - public User getUser(final String verificationToken) { - final User user = tokenRepository.findByToken(verificationToken).getUser(); - return user; - } - - @Override - public VerificationToken getVerificationToken(final String VerificationToken) { - return tokenRepository.findByToken(VerificationToken); - } - - @Override - public void saveRegisteredUser(final User user) { - repository.save(user); - } - - @Override - public void deleteUser(final User user) { - repository.delete(user); - } - - @Override - public void createVerificationTokenForUser(final User user, final String token) { - final VerificationToken myToken = new VerificationToken(token, user); - tokenRepository.save(myToken); - } - - @Override - public VerificationToken generateNewVerificationToken(final String existingVerificationToken) { - VerificationToken vToken = tokenRepository.findByToken(existingVerificationToken); - vToken.updateToken(UUID.randomUUID().toString()); - vToken = tokenRepository.save(vToken); - return vToken; - } - - @Override - public void createPasswordResetTokenForUser(final User user, final String token) { - final PasswordResetToken myToken = new PasswordResetToken(token, user); - passwordTokenRepository.save(myToken); - } - - @Override - public User findUserByEmail(final String email) { - return repository.findByEmail(email); - } - - @Override - public PasswordResetToken getPasswordResetToken(final String token) { - return passwordTokenRepository.findByToken(token); - } - - @Override - public User getUserByPasswordResetToken(final String token) { - return passwordTokenRepository.findByToken(token).getUser(); - } - - @Override - public User getUserByID(final long id) { - return repository.findOne(id); - } - - @Override - public void changeUserPassword(final User user, final String password) { - user.setPassword(passwordEncoder.encode(password)); - repository.save(user); - } - - @Override - public boolean checkIfValidOldPassword(final User user, final String oldPassword) { - return passwordEncoder.matches(oldPassword, user.getPassword()); - } - - private boolean emailExist(final String email) { - final User user = repository.findByEmail(email); - if (user != null) { - return true; - } - return false; - } - -} \ No newline at end of file diff --git a/spring-security-login-and-registration/src/main/java/org/baeldung/registration/OnRegistrationCompleteEvent.java b/spring-security-login-and-registration/src/main/java/org/baeldung/registration/OnRegistrationCompleteEvent.java deleted file mode 100644 index 75433f1286..0000000000 --- a/spring-security-login-and-registration/src/main/java/org/baeldung/registration/OnRegistrationCompleteEvent.java +++ /dev/null @@ -1,36 +0,0 @@ -package org.baeldung.registration; - -import java.util.Locale; - -import org.baeldung.persistence.model.User; -import org.springframework.context.ApplicationEvent; - -@SuppressWarnings("serial") -public class OnRegistrationCompleteEvent extends ApplicationEvent { - - private final String appUrl; - private final Locale locale; - private final User user; - - public OnRegistrationCompleteEvent(final User user, final Locale locale, final String appUrl) { - super(user); - this.user = user; - this.locale = locale; - this.appUrl = appUrl; - } - - // - - public String getAppUrl() { - return appUrl; - } - - public Locale getLocale() { - return locale; - } - - public User getUser() { - return user; - } - -} diff --git a/spring-security-login-and-registration/src/main/java/org/baeldung/registration/listener/RegistrationListener.java b/spring-security-login-and-registration/src/main/java/org/baeldung/registration/listener/RegistrationListener.java deleted file mode 100644 index 0a3689f670..0000000000 --- a/spring-security-login-and-registration/src/main/java/org/baeldung/registration/listener/RegistrationListener.java +++ /dev/null @@ -1,61 +0,0 @@ -package org.baeldung.registration.listener; - -import java.util.UUID; - -import org.baeldung.persistence.model.User; -import org.baeldung.persistence.service.IUserService; -import org.baeldung.registration.OnRegistrationCompleteEvent; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.context.ApplicationListener; -import org.springframework.context.MessageSource; -import org.springframework.core.env.Environment; -import org.springframework.mail.SimpleMailMessage; -import org.springframework.mail.javamail.JavaMailSender; -import org.springframework.stereotype.Component; - -@Component -public class RegistrationListener implements ApplicationListener { - @Autowired - private IUserService service; - - @Autowired - private MessageSource messages; - - @Autowired - private JavaMailSender mailSender; - - @Autowired - private Environment env; - - // API - - @Override - public void onApplicationEvent(final OnRegistrationCompleteEvent event) { - this.confirmRegistration(event); - } - - private void confirmRegistration(final OnRegistrationCompleteEvent event) { - final User user = event.getUser(); - final String token = UUID.randomUUID().toString(); - service.createVerificationTokenForUser(user, token); - - final SimpleMailMessage email = constructEmailMessage(event, user, token); - mailSender.send(email); - } - - // - - private final SimpleMailMessage constructEmailMessage(final OnRegistrationCompleteEvent event, final User user, final String token) { - final String recipientAddress = user.getEmail(); - final String subject = "Registration Confirmation"; - final String confirmationUrl = event.getAppUrl() + "/regitrationConfirm.html?token=" + token; - final String message = messages.getMessage("message.regSucc", null, event.getLocale()); - final SimpleMailMessage email = new SimpleMailMessage(); - email.setTo(recipientAddress); - email.setSubject(subject); - email.setText(message + " \r\n" + confirmationUrl); - email.setFrom(env.getProperty("support.email")); - return email; - } - -} diff --git a/spring-security-login-and-registration/src/main/java/org/baeldung/security/AuthenticationFailureListener.java b/spring-security-login-and-registration/src/main/java/org/baeldung/security/AuthenticationFailureListener.java deleted file mode 100644 index aad26eebb7..0000000000 --- a/spring-security-login-and-registration/src/main/java/org/baeldung/security/AuthenticationFailureListener.java +++ /dev/null @@ -1,23 +0,0 @@ -package org.baeldung.security; - -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.context.ApplicationListener; -import org.springframework.security.authentication.event.AuthenticationFailureBadCredentialsEvent; -import org.springframework.security.web.authentication.WebAuthenticationDetails; -import org.springframework.stereotype.Component; - -@Component -public class AuthenticationFailureListener implements ApplicationListener { - - @Autowired - private LoginAttemptService loginAttemptService; - - @Override - public void onApplicationEvent(final AuthenticationFailureBadCredentialsEvent e) { - final WebAuthenticationDetails auth = (WebAuthenticationDetails) e.getAuthentication().getDetails(); - if (auth != null) { - loginAttemptService.loginFailed(auth.getRemoteAddress()); - } - } - -} \ No newline at end of file diff --git a/spring-security-login-and-registration/src/main/java/org/baeldung/security/AuthenticationSuccessEventListener.java b/spring-security-login-and-registration/src/main/java/org/baeldung/security/AuthenticationSuccessEventListener.java deleted file mode 100644 index bd4c69faa8..0000000000 --- a/spring-security-login-and-registration/src/main/java/org/baeldung/security/AuthenticationSuccessEventListener.java +++ /dev/null @@ -1,23 +0,0 @@ -package org.baeldung.security; - -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.context.ApplicationListener; -import org.springframework.security.authentication.event.AuthenticationSuccessEvent; -import org.springframework.security.web.authentication.WebAuthenticationDetails; -import org.springframework.stereotype.Component; - -@Component -public class AuthenticationSuccessEventListener implements ApplicationListener { - - @Autowired - private LoginAttemptService loginAttemptService; - - @Override - public void onApplicationEvent(final AuthenticationSuccessEvent e) { - final WebAuthenticationDetails auth = (WebAuthenticationDetails) e.getAuthentication().getDetails(); - if (auth != null) { - loginAttemptService.loginSucceeded(auth.getRemoteAddress()); - } - } - -} diff --git a/spring-security-login-and-registration/src/main/java/org/baeldung/security/CustomAuthenticationFailureHandler.java b/spring-security-login-and-registration/src/main/java/org/baeldung/security/CustomAuthenticationFailureHandler.java deleted file mode 100644 index 94440f8a89..0000000000 --- a/spring-security-login-and-registration/src/main/java/org/baeldung/security/CustomAuthenticationFailureHandler.java +++ /dev/null @@ -1,47 +0,0 @@ -package org.baeldung.security; - -import java.io.IOException; -import java.util.Locale; - -import javax.servlet.ServletException; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.context.MessageSource; -import org.springframework.security.core.AuthenticationException; -import org.springframework.security.web.WebAttributes; -import org.springframework.security.web.authentication.SimpleUrlAuthenticationFailureHandler; -import org.springframework.stereotype.Component; -import org.springframework.web.servlet.LocaleResolver; - -@Component("authenticationFailureHandler") -public class CustomAuthenticationFailureHandler extends SimpleUrlAuthenticationFailureHandler { - - @Autowired - private MessageSource messages; - - @Autowired - private LocaleResolver localeResolver; - - @Override - public void onAuthenticationFailure(final HttpServletRequest request, final HttpServletResponse response, final AuthenticationException exception) throws IOException, ServletException { - setDefaultFailureUrl("/login.html?error=true"); - - super.onAuthenticationFailure(request, response, exception); - - final Locale locale = localeResolver.resolveLocale(request); - - String errorMessage = messages.getMessage("message.badCredentials", null, locale); - - if (exception.getMessage().equalsIgnoreCase("User is disabled")) { - errorMessage = messages.getMessage("auth.message.disabled", null, locale); - } else if (exception.getMessage().equalsIgnoreCase("User account has expired")) { - errorMessage = messages.getMessage("auth.message.expired", null, locale); - } else if (exception.getMessage().equalsIgnoreCase("blocked")) { - errorMessage = messages.getMessage("auth.message.blocked", null, locale); - } - - request.getSession().setAttribute(WebAttributes.AUTHENTICATION_EXCEPTION, errorMessage); - } -} \ No newline at end of file diff --git a/spring-security-login-and-registration/src/main/java/org/baeldung/security/LoginAttemptService.java b/spring-security-login-and-registration/src/main/java/org/baeldung/security/LoginAttemptService.java deleted file mode 100644 index 26eeee53f2..0000000000 --- a/spring-security-login-and-registration/src/main/java/org/baeldung/security/LoginAttemptService.java +++ /dev/null @@ -1,52 +0,0 @@ -package org.baeldung.security; - -import java.util.concurrent.ExecutionException; -import java.util.concurrent.TimeUnit; - -import org.springframework.stereotype.Service; - -import com.google.common.cache.CacheBuilder; -import com.google.common.cache.CacheLoader; -import com.google.common.cache.LoadingCache; - -@Service -public class LoginAttemptService { - - private final int MAX_ATTEMPT = 10; - private LoadingCache attemptsCache; - - public LoginAttemptService() { - super(); - attemptsCache = CacheBuilder.newBuilder().expireAfterWrite(1, TimeUnit.DAYS).build(new CacheLoader() { - @Override - public Integer load(final String key) { - return 0; - } - }); - } - - // - - public void loginSucceeded(final String key) { - attemptsCache.invalidate(key); - } - - public void loginFailed(final String key) { - int attempts = 0; - try { - attempts = attemptsCache.get(key); - } catch (final ExecutionException e) { - attempts = 0; - } - attempts++; - attemptsCache.put(key, attempts); - } - - public boolean isBlocked(final String key) { - try { - return attemptsCache.get(key) >= MAX_ATTEMPT; - } catch (final ExecutionException e) { - return false; - } - } -} diff --git a/spring-security-login-and-registration/src/main/java/org/baeldung/security/MySimpleUrlAuthenticationSuccessHandler.java b/spring-security-login-and-registration/src/main/java/org/baeldung/security/MySimpleUrlAuthenticationSuccessHandler.java deleted file mode 100644 index 37703d9a09..0000000000 --- a/spring-security-login-and-registration/src/main/java/org/baeldung/security/MySimpleUrlAuthenticationSuccessHandler.java +++ /dev/null @@ -1,84 +0,0 @@ -package org.baeldung.security; - -import java.io.IOException; -import java.util.Collection; - -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; -import javax.servlet.http.HttpSession; - -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.springframework.security.core.Authentication; -import org.springframework.security.core.GrantedAuthority; -import org.springframework.security.web.DefaultRedirectStrategy; -import org.springframework.security.web.RedirectStrategy; -import org.springframework.security.web.WebAttributes; -import org.springframework.security.web.authentication.AuthenticationSuccessHandler; -import org.springframework.stereotype.Component; - -@Component("myAuthenticationSuccessHandler") -public class MySimpleUrlAuthenticationSuccessHandler implements AuthenticationSuccessHandler { - private final Logger logger = LoggerFactory.getLogger(getClass()); - - private RedirectStrategy redirectStrategy = new DefaultRedirectStrategy(); - - @Override - public void onAuthenticationSuccess(final HttpServletRequest request, final HttpServletResponse response, final Authentication authentication) throws IOException { - handle(request, response, authentication); - final HttpSession session = request.getSession(false); - if (session != null) { - session.setMaxInactiveInterval(30 * 60); - } - clearAuthenticationAttributes(request); - } - - protected void handle(final HttpServletRequest request, final HttpServletResponse response, final Authentication authentication) throws IOException { - final String targetUrl = determineTargetUrl(authentication); - - if (response.isCommitted()) { - logger.debug("Response has already been committed. Unable to redirect to " + targetUrl); - return; - } - - redirectStrategy.sendRedirect(request, response, targetUrl); - } - - protected String determineTargetUrl(final Authentication authentication) { - boolean isUser = false; - boolean isAdmin = false; - final Collection authorities = authentication.getAuthorities(); - for (final GrantedAuthority grantedAuthority : authorities) { - if (grantedAuthority.getAuthority().equals("READ_PRIVILEGE")) { - isUser = true; - } else if (grantedAuthority.getAuthority().equals("WRITE_PRIVILEGE")) { - isAdmin = true; - isUser = false; - break; - } - } - if (isUser) { - return "/homepage.html?user=" + authentication.getName(); - } else if (isAdmin) { - return "/console.html"; - } else { - throw new IllegalStateException(); - } - } - - protected void clearAuthenticationAttributes(final HttpServletRequest request) { - final HttpSession session = request.getSession(false); - if (session == null) { - return; - } - session.removeAttribute(WebAttributes.AUTHENTICATION_EXCEPTION); - } - - public void setRedirectStrategy(final RedirectStrategy redirectStrategy) { - this.redirectStrategy = redirectStrategy; - } - - protected RedirectStrategy getRedirectStrategy() { - return redirectStrategy; - } -} \ No newline at end of file diff --git a/spring-security-login-and-registration/src/main/java/org/baeldung/security/MyUserDetailsService.java b/spring-security-login-and-registration/src/main/java/org/baeldung/security/MyUserDetailsService.java deleted file mode 100644 index d4b77878be..0000000000 --- a/spring-security-login-and-registration/src/main/java/org/baeldung/security/MyUserDetailsService.java +++ /dev/null @@ -1,93 +0,0 @@ -package org.baeldung.security; - -import java.util.ArrayList; -import java.util.Collection; -import java.util.List; - -import javax.servlet.http.HttpServletRequest; - -import org.baeldung.persistence.dao.UserRepository; -import org.baeldung.persistence.model.Privilege; -import org.baeldung.persistence.model.Role; -import org.baeldung.persistence.model.User; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.security.core.GrantedAuthority; -import org.springframework.security.core.authority.SimpleGrantedAuthority; -import org.springframework.security.core.userdetails.UserDetails; -import org.springframework.security.core.userdetails.UserDetailsService; -import org.springframework.security.core.userdetails.UsernameNotFoundException; -import org.springframework.stereotype.Service; -import org.springframework.transaction.annotation.Transactional; - -@Service("userDetailsService") -@Transactional -public class MyUserDetailsService implements UserDetailsService { - - @Autowired - private UserRepository userRepository; - - @Autowired - private LoginAttemptService loginAttemptService; - - @Autowired - private HttpServletRequest request; - - public MyUserDetailsService() { - super(); - } - - // API - - @Override - public UserDetails loadUserByUsername(final String email) throws UsernameNotFoundException { - final String ip = getClientIP(); - if (loginAttemptService.isBlocked(ip)) { - throw new RuntimeException("blocked"); - } - - try { - final User user = userRepository.findByEmail(email); - if (user == null) { - throw new UsernameNotFoundException("No user found with username: " + email); - } - - return new org.springframework.security.core.userdetails.User(user.getEmail(), user.getPassword(), user.isEnabled(), true, true, true, getAuthorities(user.getRoles())); - } catch (final Exception e) { - throw new RuntimeException(e); - } - } - - // UTIL - - public final Collection getAuthorities(final Collection roles) { - return getGrantedAuthorities(getPrivileges(roles)); - } - - private final List getPrivileges(final Collection roles) { - final List privileges = new ArrayList(); - final List collection = new ArrayList(); - for (final Role role : roles) { - collection.addAll(role.getPrivileges()); - } - for (final Privilege item : collection) { - privileges.add(item.getName()); - } - return privileges; - } - - private final List getGrantedAuthorities(final List privileges) { - final List authorities = new ArrayList(); - for (final String privilege : privileges) { - authorities.add(new SimpleGrantedAuthority(privilege)); - } - return authorities; - } - - private String getClientIP() { - final String xfHeader = request.getHeader("X-Forwarded-For"); - if (xfHeader == null) { - return request.getRemoteAddr(); - } - return xfHeader.split(",")[0]; - } -} diff --git a/spring-security-login-and-registration/src/main/java/org/baeldung/spring/AppConfig.java b/spring-security-login-and-registration/src/main/java/org/baeldung/spring/AppConfig.java deleted file mode 100644 index cba2b25285..0000000000 --- a/spring-security-login-and-registration/src/main/java/org/baeldung/spring/AppConfig.java +++ /dev/null @@ -1,44 +0,0 @@ -package org.baeldung.spring; - -import java.util.Properties; - -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.context.annotation.Bean; -import org.springframework.context.annotation.ComponentScan; -import org.springframework.context.annotation.Configuration; -import org.springframework.context.annotation.PropertySource; -import org.springframework.context.support.PropertySourcesPlaceholderConfigurer; -import org.springframework.core.env.Environment; -import org.springframework.mail.javamail.JavaMailSenderImpl; - -@Configuration -@ComponentScan(basePackages = { "org.baeldung.registration" }) -@PropertySource("classpath:email.properties") -public class AppConfig { - - @Autowired - private Environment env; - - // beans - - @Bean - public static PropertySourcesPlaceholderConfigurer propertyPlaceHolderConfigurer() { - return new PropertySourcesPlaceholderConfigurer(); - } - - @Bean - public JavaMailSenderImpl javaMailSenderImpl() { - final JavaMailSenderImpl mailSenderImpl = new JavaMailSenderImpl(); - mailSenderImpl.setHost(env.getProperty("smtp.host")); - mailSenderImpl.setPort(env.getProperty("smtp.port", Integer.class)); - mailSenderImpl.setProtocol(env.getProperty("smtp.protocol")); - mailSenderImpl.setUsername(env.getProperty("smtp.username")); - mailSenderImpl.setPassword(env.getProperty("smtp.password")); - final Properties javaMailProps = new Properties(); - javaMailProps.put("mail.smtp.auth", true); - javaMailProps.put("mail.smtp.starttls.enable", true); - mailSenderImpl.setJavaMailProperties(javaMailProps); - return mailSenderImpl; - } - -} \ No newline at end of file diff --git a/spring-security-login-and-registration/src/main/java/org/baeldung/spring/MvcConfig.java b/spring-security-login-and-registration/src/main/java/org/baeldung/spring/MvcConfig.java deleted file mode 100644 index 1234cde0d0..0000000000 --- a/spring-security-login-and-registration/src/main/java/org/baeldung/spring/MvcConfig.java +++ /dev/null @@ -1,105 +0,0 @@ -package org.baeldung.spring; - -import java.util.Locale; - -import org.baeldung.validation.EmailValidator; -import org.baeldung.validation.PasswordMatchesValidator; -import org.springframework.context.MessageSource; -import org.springframework.context.annotation.Bean; -import org.springframework.context.annotation.ComponentScan; -import org.springframework.context.annotation.Configuration; -import org.springframework.context.support.ReloadableResourceBundleMessageSource; -import org.springframework.web.servlet.LocaleResolver; -import org.springframework.web.servlet.ViewResolver; -import org.springframework.web.servlet.config.annotation.EnableWebMvc; -import org.springframework.web.servlet.config.annotation.InterceptorRegistry; -import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry; -import org.springframework.web.servlet.config.annotation.ViewControllerRegistry; -import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter; -import org.springframework.web.servlet.i18n.CookieLocaleResolver; -import org.springframework.web.servlet.i18n.LocaleChangeInterceptor; -import org.springframework.web.servlet.view.InternalResourceViewResolver; -import org.springframework.web.servlet.view.JstlView; - -@Configuration -@ComponentScan(basePackages = { "org.baeldung.web" }) -@EnableWebMvc -public class MvcConfig extends WebMvcConfigurerAdapter { - - public MvcConfig() { - super(); - } - - // - - @Override - public void addViewControllers(final ViewControllerRegistry registry) { - super.addViewControllers(registry); - registry.addViewController("/login"); - registry.addViewController("/registration.html"); - registry.addViewController("/logout.html"); - registry.addViewController("/homepage.html"); - registry.addViewController("/expiredAccount.html"); - registry.addViewController("/badUser.html"); - registry.addViewController("/emailError.html"); - registry.addViewController("/home.html"); - registry.addViewController("/invalidSession.html"); - registry.addViewController("/console.html"); - registry.addViewController("/admin.html"); - registry.addViewController("/successRegister.html"); - registry.addViewController("/forgetPassword.html"); - registry.addViewController("/updatePassword.html"); - registry.addViewController("/changePassword.html"); - } - - @Override - public void addResourceHandlers(final ResourceHandlerRegistry registry) { - registry.addResourceHandler("/resources/**").addResourceLocations("/", "/resources/"); - } - - @Override - public void addInterceptors(final InterceptorRegistry registry) { - final LocaleChangeInterceptor localeChangeInterceptor = new LocaleChangeInterceptor(); - localeChangeInterceptor.setParamName("lang"); - registry.addInterceptor(localeChangeInterceptor); - } - - // beans - - @Bean - public ViewResolver viewResolver() { - final InternalResourceViewResolver bean = new InternalResourceViewResolver(); - bean.setViewClass(JstlView.class); - bean.setPrefix("/WEB-INF/view/"); - bean.setSuffix(".jsp"); - return bean; - } - - @Bean - public LocaleResolver localeResolver() { - final CookieLocaleResolver cookieLocaleResolver = new CookieLocaleResolver(); - cookieLocaleResolver.setDefaultLocale(Locale.ENGLISH); - return cookieLocaleResolver; - } - - @Bean - public MessageSource messageSource() { - final ReloadableResourceBundleMessageSource messageSource = new ReloadableResourceBundleMessageSource(); - messageSource.setBasename("classpath:messages"); - messageSource.setUseCodeAsDefaultMessage(true); - messageSource.setDefaultEncoding("UTF-8"); - messageSource.setCacheSeconds(0); - return messageSource; - } - - @Bean - public EmailValidator usernameValidator() { - return new EmailValidator(); - } - - @Bean - public PasswordMatchesValidator passwordMatchesValidator() { - return new PasswordMatchesValidator(); - } - -} \ No newline at end of file diff --git a/spring-security-login-and-registration/src/main/java/org/baeldung/spring/PersistenceJPAConfig.java b/spring-security-login-and-registration/src/main/java/org/baeldung/spring/PersistenceJPAConfig.java deleted file mode 100644 index cb00353fe8..0000000000 --- a/spring-security-login-and-registration/src/main/java/org/baeldung/spring/PersistenceJPAConfig.java +++ /dev/null @@ -1,77 +0,0 @@ -package org.baeldung.spring; - -import java.util.Properties; - -import javax.sql.DataSource; - -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.context.annotation.Bean; -import org.springframework.context.annotation.ComponentScan; -import org.springframework.context.annotation.Configuration; -import org.springframework.context.annotation.PropertySource; -import org.springframework.core.env.Environment; -import org.springframework.dao.annotation.PersistenceExceptionTranslationPostProcessor; -import org.springframework.data.jpa.repository.config.EnableJpaRepositories; -import org.springframework.jdbc.datasource.DriverManagerDataSource; -import org.springframework.orm.jpa.JpaTransactionManager; -import org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean; -import org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter; -import org.springframework.transaction.annotation.EnableTransactionManagement; - -@Configuration -@EnableTransactionManagement -@PropertySource({ "classpath:persistence.properties" }) -@ComponentScan({ "org.baeldung.persistence" }) -@EnableJpaRepositories(basePackages = "org.baeldung.persistence.dao") -public class PersistenceJPAConfig { - - @Autowired - private Environment env; - - public PersistenceJPAConfig() { - super(); - } - - // - - @Bean - public LocalContainerEntityManagerFactoryBean entityManagerFactory() { - final LocalContainerEntityManagerFactoryBean em = new LocalContainerEntityManagerFactoryBean(); - em.setDataSource(dataSource()); - em.setPackagesToScan(new String[] { "org.baeldung.persistence.model" }); - final HibernateJpaVendorAdapter vendorAdapter = new HibernateJpaVendorAdapter(); - em.setJpaVendorAdapter(vendorAdapter); - em.setJpaProperties(additionalProperties()); - return em; - } - - @Bean - public DataSource dataSource() { - final DriverManagerDataSource dataSource = new DriverManagerDataSource(); - dataSource.setDriverClassName(env.getProperty("jdbc.driverClassName")); - dataSource.setUrl(env.getProperty("jdbc.url")); - dataSource.setUsername(env.getProperty("jdbc.user")); - dataSource.setPassword(env.getProperty("jdbc.pass")); - return dataSource; - } - - @Bean - public JpaTransactionManager transactionManager() { - final JpaTransactionManager transactionManager = new JpaTransactionManager(); - transactionManager.setEntityManagerFactory(entityManagerFactory().getObject()); - return transactionManager; - } - - @Bean - public PersistenceExceptionTranslationPostProcessor exceptionTranslation() { - return new PersistenceExceptionTranslationPostProcessor(); - } - - final Properties additionalProperties() { - final Properties hibernateProperties = new Properties(); - hibernateProperties.setProperty("hibernate.hbm2ddl.auto", env.getProperty("hibernate.hbm2ddl.auto")); - hibernateProperties.setProperty("hibernate.dialect", env.getProperty("hibernate.dialect")); - return hibernateProperties; - } - -} diff --git a/spring-security-login-and-registration/src/main/java/org/baeldung/spring/SecSecurityConfig.java b/spring-security-login-and-registration/src/main/java/org/baeldung/spring/SecSecurityConfig.java deleted file mode 100644 index 9ae8f6e78b..0000000000 --- a/spring-security-login-and-registration/src/main/java/org/baeldung/spring/SecSecurityConfig.java +++ /dev/null @@ -1,96 +0,0 @@ -package org.baeldung.spring; - -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.context.annotation.Bean; -import org.springframework.context.annotation.ComponentScan; -import org.springframework.context.annotation.Configuration; -import org.springframework.security.authentication.dao.DaoAuthenticationProvider; -import org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder; -import org.springframework.security.config.annotation.web.builders.HttpSecurity; -import org.springframework.security.config.annotation.web.builders.WebSecurity; -import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity; -import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter; -import org.springframework.security.core.userdetails.UserDetailsService; -import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder; -import org.springframework.security.crypto.password.PasswordEncoder; -import org.springframework.security.web.authentication.AuthenticationFailureHandler; -import org.springframework.security.web.authentication.AuthenticationSuccessHandler; - -@Configuration -@ComponentScan(basePackages = { "org.baeldung.security" }) -// @ImportResource({ "classpath:webSecurityConfig.xml" }) -@EnableWebSecurity -public class SecSecurityConfig extends WebSecurityConfigurerAdapter { - - @Autowired - private UserDetailsService userDetailsService; - - @Autowired - private AuthenticationSuccessHandler myAuthenticationSuccessHandler; - - @Autowired - private AuthenticationFailureHandler authenticationFailureHandler; - - public SecSecurityConfig() { - super(); - } - - @Override - protected void configure(final AuthenticationManagerBuilder auth) throws Exception { - auth.authenticationProvider(authProvider()); - } - - @Override - public void configure(final WebSecurity web) throws Exception { - web.ignoring().antMatchers("/resources/**"); - } - - @Override - protected void configure(final HttpSecurity http) throws Exception { - // @formatter:off - http - .csrf().disable() - .authorizeRequests() - .antMatchers("/login*","/login*", "/logout*", "/signin/**", "/signup/**", - "/user/registration*", "/regitrationConfirm*", "/expiredAccount*", "/registration*", - "/badUser*", "/user/resendRegistrationToken*" ,"/forgetPassword*", "/user/resetPassword*", - "/user/changePassword*", "/emailError*", "/resources/**","/old/user/registration*","/successRegister*").permitAll() - .antMatchers("/invalidSession*").anonymous() - .anyRequest().authenticated() - .and() - .formLogin() - .loginPage("/login") - .defaultSuccessUrl("/homepage.html") - .failureUrl("/login?error=true") - .successHandler(myAuthenticationSuccessHandler) - .failureHandler(authenticationFailureHandler) - .permitAll() - .and() - .sessionManagement() - .invalidSessionUrl("/invalidSession.html") - .sessionFixation().none() - .and() - .logout() - .invalidateHttpSession(false) - .logoutSuccessUrl("/logout.html?logSucc=true") - .deleteCookies("JSESSIONID") - .permitAll(); - // @formatter:on - } - - // beans - - @Bean - public DaoAuthenticationProvider authProvider() { - final DaoAuthenticationProvider authProvider = new DaoAuthenticationProvider(); - authProvider.setUserDetailsService(userDetailsService); - authProvider.setPasswordEncoder(encoder()); - return authProvider; - } - - @Bean - public PasswordEncoder encoder() { - return new BCryptPasswordEncoder(11); - } - -} \ No newline at end of file diff --git a/spring-security-login-and-registration/src/main/java/org/baeldung/spring/SetupDataLoader.java b/spring-security-login-and-registration/src/main/java/org/baeldung/spring/SetupDataLoader.java deleted file mode 100644 index 9f785b3239..0000000000 --- a/spring-security-login-and-registration/src/main/java/org/baeldung/spring/SetupDataLoader.java +++ /dev/null @@ -1,89 +0,0 @@ -package org.baeldung.spring; - -import java.util.Arrays; -import java.util.Collection; -import java.util.List; - -import org.baeldung.persistence.dao.PrivilegeRepository; -import org.baeldung.persistence.dao.RoleRepository; -import org.baeldung.persistence.dao.UserRepository; -import org.baeldung.persistence.model.Privilege; -import org.baeldung.persistence.model.Role; -import org.baeldung.persistence.model.User; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.context.ApplicationListener; -import org.springframework.context.event.ContextRefreshedEvent; -import org.springframework.security.crypto.password.PasswordEncoder; -import org.springframework.stereotype.Component; -import org.springframework.transaction.annotation.Transactional; - -@Component -public class SetupDataLoader implements ApplicationListener { - - private boolean alreadySetup = false; - - @Autowired - private UserRepository userRepository; - - @Autowired - private RoleRepository roleRepository; - - @Autowired - private PrivilegeRepository privilegeRepository; - - @Autowired - private PasswordEncoder passwordEncoder; - - // API - - @Override - @Transactional - public void onApplicationEvent(final ContextRefreshedEvent event) { - if (alreadySetup) { - return; - } - - // == create initial privileges - final Privilege readPrivilege = createPrivilegeIfNotFound("READ_PRIVILEGE"); - final Privilege writePrivilege = createPrivilegeIfNotFound("WRITE_PRIVILEGE"); - - // == create initial roles - final List adminPrivileges = Arrays.asList(readPrivilege, writePrivilege); - createRoleIfNotFound("ROLE_ADMIN", adminPrivileges); - createRoleIfNotFound("ROLE_USER", Arrays.asList(readPrivilege)); - - final Role adminRole = roleRepository.findByName("ROLE_ADMIN"); - final User user = new User(); - user.setFirstName("Test"); - user.setLastName("Test"); - user.setPassword(passwordEncoder.encode("test")); - user.setEmail("test@test.com"); - user.setRoles(Arrays.asList(adminRole)); - user.setEnabled(true); - userRepository.save(user); - - alreadySetup = true; - } - - @Transactional - private final Privilege createPrivilegeIfNotFound(final String name) { - Privilege privilege = privilegeRepository.findByName(name); - if (privilege == null) { - privilege = new Privilege(name); - privilegeRepository.save(privilege); - } - return privilege; - } - - @Transactional - private final Role createRoleIfNotFound(final String name, final Collection privileges) { - Role role = roleRepository.findByName(name); - if (role == null) { - role = new Role(name); - role.setPrivileges(privileges); - roleRepository.save(role); - } - return role; - } - -} \ No newline at end of file diff --git a/spring-security-login-and-registration/src/main/java/org/baeldung/test/TestConfig.java b/spring-security-login-and-registration/src/main/java/org/baeldung/test/TestConfig.java deleted file mode 100644 index 97b2c20632..0000000000 --- a/spring-security-login-and-registration/src/main/java/org/baeldung/test/TestConfig.java +++ /dev/null @@ -1,17 +0,0 @@ -package org.baeldung.test; - -import org.baeldung.spring.PersistenceJPAConfig; -import org.springframework.context.annotation.Bean; -import org.springframework.context.annotation.ComponentScan; -import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder; -import org.springframework.security.crypto.password.PasswordEncoder; - -@ComponentScan({ "org.baeldung.persistence.dao" }) -public class TestConfig extends PersistenceJPAConfig { - - @Bean - public PasswordEncoder encoder() { - return new BCryptPasswordEncoder(11); - } - -} diff --git a/spring-security-login-and-registration/src/main/java/org/baeldung/validation/EmailExistsException.java b/spring-security-login-and-registration/src/main/java/org/baeldung/validation/EmailExistsException.java deleted file mode 100644 index 554dfe7cbc..0000000000 --- a/spring-security-login-and-registration/src/main/java/org/baeldung/validation/EmailExistsException.java +++ /dev/null @@ -1,10 +0,0 @@ -package org.baeldung.validation; - -@SuppressWarnings("serial") -public class EmailExistsException extends Throwable { - - public EmailExistsException(final String message) { - super(message); - } - -} diff --git a/spring-security-login-and-registration/src/main/java/org/baeldung/validation/EmailValidator.java b/spring-security-login-and-registration/src/main/java/org/baeldung/validation/EmailValidator.java deleted file mode 100644 index ee2801eba0..0000000000 --- a/spring-security-login-and-registration/src/main/java/org/baeldung/validation/EmailValidator.java +++ /dev/null @@ -1,28 +0,0 @@ -package org.baeldung.validation; - -import java.util.regex.Matcher; -import java.util.regex.Pattern; - -import javax.validation.ConstraintValidator; -import javax.validation.ConstraintValidatorContext; - -public class EmailValidator implements ConstraintValidator { - private Pattern pattern; - private Matcher matcher; - private static final String EMAIL_PATTERN = "^[_A-Za-z0-9-\\+]+(\\.[_A-Za-z0-9-]+)*@" + "[A-Za-z0-9-]+(\\.[A-Za-z0-9]+)*(\\.[A-Za-z]{2,})$"; - - @Override - public void initialize(final ValidEmail constraintAnnotation) { - } - - @Override - public boolean isValid(final String username, final ConstraintValidatorContext context) { - return (validateEmail(username)); - } - - private boolean validateEmail(final String email) { - pattern = Pattern.compile(EMAIL_PATTERN); - matcher = pattern.matcher(email); - return matcher.matches(); - } -} diff --git a/spring-security-login-and-registration/src/main/java/org/baeldung/validation/PasswordConstraintValidator.java b/spring-security-login-and-registration/src/main/java/org/baeldung/validation/PasswordConstraintValidator.java deleted file mode 100644 index 80d06a0f69..0000000000 --- a/spring-security-login-and-registration/src/main/java/org/baeldung/validation/PasswordConstraintValidator.java +++ /dev/null @@ -1,38 +0,0 @@ -package org.baeldung.validation; - -import java.util.Arrays; - -import javax.validation.ConstraintValidator; -import javax.validation.ConstraintValidatorContext; - -import org.passay.DigitCharacterRule; -import org.passay.LengthRule; -import org.passay.PasswordData; -import org.passay.PasswordValidator; -import org.passay.RuleResult; -import org.passay.SpecialCharacterRule; -import org.passay.UppercaseCharacterRule; -import org.passay.WhitespaceRule; - -import com.google.common.base.Joiner; - -public class PasswordConstraintValidator implements ConstraintValidator { - - @Override - public void initialize(final ValidPassword arg0) { - - } - - @Override - public boolean isValid(final String password, final ConstraintValidatorContext context) { - final PasswordValidator validator = new PasswordValidator(Arrays.asList(new LengthRule(8, 30), new UppercaseCharacterRule(1), new DigitCharacterRule(1), new SpecialCharacterRule(1), new WhitespaceRule())); - final RuleResult result = validator.validate(new PasswordData(password)); - if (result.isValid()) { - return true; - } - context.disableDefaultConstraintViolation(); - context.buildConstraintViolationWithTemplate(Joiner.on("\n").join(validator.getMessages(result))).addConstraintViolation(); - return false; - } - -} diff --git a/spring-security-login-and-registration/src/main/java/org/baeldung/validation/PasswordMatches.java b/spring-security-login-and-registration/src/main/java/org/baeldung/validation/PasswordMatches.java deleted file mode 100644 index fcc7e228a7..0000000000 --- a/spring-security-login-and-registration/src/main/java/org/baeldung/validation/PasswordMatches.java +++ /dev/null @@ -1,26 +0,0 @@ -package org.baeldung.validation; - -import static java.lang.annotation.ElementType.ANNOTATION_TYPE; -import static java.lang.annotation.ElementType.TYPE; -import static java.lang.annotation.RetentionPolicy.RUNTIME; - -import java.lang.annotation.Documented; -import java.lang.annotation.Retention; -import java.lang.annotation.Target; - -import javax.validation.Constraint; -import javax.validation.Payload; - -@Target({ TYPE, ANNOTATION_TYPE }) -@Retention(RUNTIME) -@Constraint(validatedBy = PasswordMatchesValidator.class) -@Documented -public @interface PasswordMatches { - - String message() default "Passwords don't match"; - - Class[] groups() default {}; - - Class[] payload() default {}; - -} diff --git a/spring-security-login-and-registration/src/main/java/org/baeldung/validation/PasswordMatchesValidator.java b/spring-security-login-and-registration/src/main/java/org/baeldung/validation/PasswordMatchesValidator.java deleted file mode 100644 index a103b91e90..0000000000 --- a/spring-security-login-and-registration/src/main/java/org/baeldung/validation/PasswordMatchesValidator.java +++ /dev/null @@ -1,21 +0,0 @@ -package org.baeldung.validation; - -import javax.validation.ConstraintValidator; -import javax.validation.ConstraintValidatorContext; - -import org.baeldung.persistence.service.UserDto; - -public class PasswordMatchesValidator implements ConstraintValidator { - - @Override - public void initialize(final PasswordMatches constraintAnnotation) { - // - } - - @Override - public boolean isValid(final Object obj, final ConstraintValidatorContext context) { - final UserDto user = (UserDto) obj; - return user.getPassword().equals(user.getMatchingPassword()); - } - -} diff --git a/spring-security-login-and-registration/src/main/java/org/baeldung/validation/UserValidator.java b/spring-security-login-and-registration/src/main/java/org/baeldung/validation/UserValidator.java deleted file mode 100644 index 76348bee7e..0000000000 --- a/spring-security-login-and-registration/src/main/java/org/baeldung/validation/UserValidator.java +++ /dev/null @@ -1,23 +0,0 @@ -package org.baeldung.validation; - -import org.baeldung.persistence.service.UserDto; -import org.springframework.validation.Errors; -import org.springframework.validation.ValidationUtils; -import org.springframework.validation.Validator; - -public class UserValidator implements Validator { - - @Override - public boolean supports(final Class clazz) { - return UserDto.class.isAssignableFrom(clazz); - } - - @Override - public void validate(final Object obj, final Errors errors) { - ValidationUtils.rejectIfEmptyOrWhitespace(errors, "firstName", "message.firstName", "Firstname is required."); - ValidationUtils.rejectIfEmptyOrWhitespace(errors, "lastName", "message.lastName", "LastName is required."); - ValidationUtils.rejectIfEmptyOrWhitespace(errors, "password", "message.password", "LastName is required."); - ValidationUtils.rejectIfEmptyOrWhitespace(errors, "username", "message.username", "UserName is required."); - } - -} diff --git a/spring-security-login-and-registration/src/main/java/org/baeldung/validation/ValidEmail.java b/spring-security-login-and-registration/src/main/java/org/baeldung/validation/ValidEmail.java deleted file mode 100644 index a520a45b0c..0000000000 --- a/spring-security-login-and-registration/src/main/java/org/baeldung/validation/ValidEmail.java +++ /dev/null @@ -1,26 +0,0 @@ -package org.baeldung.validation; - -import static java.lang.annotation.ElementType.ANNOTATION_TYPE; -import static java.lang.annotation.ElementType.FIELD; -import static java.lang.annotation.ElementType.TYPE; -import static java.lang.annotation.RetentionPolicy.RUNTIME; - -import java.lang.annotation.Documented; -import java.lang.annotation.Retention; -import java.lang.annotation.Target; - -import javax.validation.Constraint; -import javax.validation.Payload; - -@Target({ TYPE, FIELD, ANNOTATION_TYPE }) -@Retention(RUNTIME) -@Constraint(validatedBy = EmailValidator.class) -@Documented -public @interface ValidEmail { - - String message() default "Invalid Email"; - - Class[] groups() default {}; - - Class[] payload() default {}; -} diff --git a/spring-security-login-and-registration/src/main/java/org/baeldung/validation/ValidPassword.java b/spring-security-login-and-registration/src/main/java/org/baeldung/validation/ValidPassword.java deleted file mode 100644 index 37b217213a..0000000000 --- a/spring-security-login-and-registration/src/main/java/org/baeldung/validation/ValidPassword.java +++ /dev/null @@ -1,27 +0,0 @@ -package org.baeldung.validation; - -import static java.lang.annotation.ElementType.ANNOTATION_TYPE; -import static java.lang.annotation.ElementType.FIELD; -import static java.lang.annotation.ElementType.TYPE; -import static java.lang.annotation.RetentionPolicy.RUNTIME; - -import java.lang.annotation.Documented; -import java.lang.annotation.Retention; -import java.lang.annotation.Target; - -import javax.validation.Constraint; -import javax.validation.Payload; - -@Documented -@Constraint(validatedBy = PasswordConstraintValidator.class) -@Target({ TYPE, FIELD, ANNOTATION_TYPE }) -@Retention(RUNTIME) -public @interface ValidPassword { - - String message() default "Invalid Password"; - - Class[] groups() default {}; - - Class[] payload() default {}; - -} diff --git a/spring-security-login-and-registration/src/main/java/org/baeldung/web/controller/OldRegistrationController.java b/spring-security-login-and-registration/src/main/java/org/baeldung/web/controller/OldRegistrationController.java deleted file mode 100644 index dc14ad70a1..0000000000 --- a/spring-security-login-and-registration/src/main/java/org/baeldung/web/controller/OldRegistrationController.java +++ /dev/null @@ -1,237 +0,0 @@ -package org.baeldung.web.controller; - -import java.util.Calendar; -import java.util.Locale; -import java.util.UUID; - -import javax.servlet.http.HttpServletRequest; -import javax.validation.Valid; - -import org.baeldung.persistence.model.PasswordResetToken; -import org.baeldung.persistence.model.User; -import org.baeldung.persistence.model.VerificationToken; -import org.baeldung.persistence.service.IUserService; -import org.baeldung.persistence.service.UserDto; -import org.baeldung.registration.OnRegistrationCompleteEvent; -import org.baeldung.validation.EmailExistsException; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.context.ApplicationEventPublisher; -import org.springframework.context.MessageSource; -import org.springframework.core.env.Environment; -import org.springframework.mail.MailAuthenticationException; -import org.springframework.mail.SimpleMailMessage; -import org.springframework.mail.javamail.JavaMailSender; -import org.springframework.security.access.prepost.PreAuthorize; -import org.springframework.security.authentication.UsernamePasswordAuthenticationToken; -import org.springframework.security.core.Authentication; -import org.springframework.security.core.context.SecurityContextHolder; -import org.springframework.security.core.userdetails.UserDetailsService; -import org.springframework.stereotype.Controller; -import org.springframework.ui.Model; -import org.springframework.validation.Errors; -import org.springframework.web.bind.annotation.ModelAttribute; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RequestMethod; -import org.springframework.web.bind.annotation.RequestParam; -import org.springframework.web.servlet.ModelAndView; - -@Controller -@RequestMapping(value = "/old") -public class OldRegistrationController { - private final Logger LOGGER = LoggerFactory.getLogger(getClass()); - - @Autowired - private IUserService userService; - - @Autowired - private MessageSource messages; - - @Autowired - private JavaMailSender mailSender; - - @Autowired - private ApplicationEventPublisher eventPublisher; - - @Autowired - private UserDetailsService userDetailsService; - - @Autowired - private Environment env; - - public OldRegistrationController() { - super(); - } - - // API - - @RequestMapping(value = "/user/registration", method = RequestMethod.GET) - public String showRegistrationForm(final HttpServletRequest request, final Model model) { - LOGGER.debug("Rendering registration page."); - final UserDto accountDto = new UserDto(); - model.addAttribute("user", accountDto); - return "registration"; - } - - @RequestMapping(value = "/regitrationConfirm", method = RequestMethod.GET) - public String confirmRegistration(final HttpServletRequest request, final Model model, @RequestParam("token") final String token) { - final Locale locale = request.getLocale(); - - final VerificationToken verificationToken = userService.getVerificationToken(token); - if (verificationToken == null) { - final String message = messages.getMessage("auth.message.invalidToken", null, locale); - model.addAttribute("message", message); - return "redirect:/badUser.html?lang=" + locale.getLanguage(); - } - - final User user = verificationToken.getUser(); - final Calendar cal = Calendar.getInstance(); - if ((verificationToken.getExpiryDate().getTime() - cal.getTime().getTime()) <= 0) { - model.addAttribute("message", messages.getMessage("auth.message.expired", null, locale)); - model.addAttribute("expired", true); - model.addAttribute("token", token); - return "redirect:/badUser.html?lang=" + locale.getLanguage(); - } - - user.setEnabled(true); - userService.saveRegisteredUser(user); - model.addAttribute("message", messages.getMessage("message.accountVerified", null, locale)); - return "redirect:/login.html?lang=" + locale.getLanguage(); - } - - @RequestMapping(value = "/user/registration", method = RequestMethod.POST) - public ModelAndView registerUserAccount(@ModelAttribute("user") @Valid final UserDto userDto, final HttpServletRequest request, final Errors errors) { - LOGGER.debug("Registering user account with information: {}", userDto); - - final User registered = createUserAccount(userDto); - if (registered == null) { - // result.rejectValue("email", "message.regError"); - return new ModelAndView("registration", "user", userDto); - } - try { - final String appUrl = "http://" + request.getServerName() + ":" + request.getServerPort() + request.getContextPath(); - eventPublisher.publishEvent(new OnRegistrationCompleteEvent(registered, request.getLocale(), appUrl)); - } catch (final Exception ex) { - LOGGER.warn("Unable to register user", ex); - return new ModelAndView("emailError", "user", userDto); - } - return new ModelAndView("successRegister", "user", userDto); - } - - @RequestMapping(value = "/user/resendRegistrationToken", method = RequestMethod.GET) - public String resendRegistrationToken(final HttpServletRequest request, final Model model, @RequestParam("token") final String existingToken) { - final Locale locale = request.getLocale(); - final VerificationToken newToken = userService.generateNewVerificationToken(existingToken); - final User user = userService.getUser(newToken.getToken()); - try { - final String appUrl = "http://" + request.getServerName() + ":" + request.getServerPort() + request.getContextPath(); - final SimpleMailMessage email = constructResetVerificationTokenEmail(appUrl, request.getLocale(), newToken, user); - mailSender.send(email); - } catch (final MailAuthenticationException e) { - LOGGER.debug("MailAuthenticationException", e); - return "redirect:/emailError.html?lang=" + locale.getLanguage(); - } catch (final Exception e) { - LOGGER.debug(e.getLocalizedMessage(), e); - model.addAttribute("message", e.getLocalizedMessage()); - return "redirect:/login.html?lang=" + locale.getLanguage(); - } - model.addAttribute("message", messages.getMessage("message.resendToken", null, locale)); - return "redirect:/login.html?lang=" + locale.getLanguage(); - } - - @RequestMapping(value = "/user/resetPassword", method = RequestMethod.POST) - public String resetPassword(final HttpServletRequest request, final Model model, @RequestParam("email") final String userEmail) { - final User user = userService.findUserByEmail(userEmail); - if (user == null) { - model.addAttribute("message", messages.getMessage("message.userNotFound", null, request.getLocale())); - return "redirect:/login.html?lang=" + request.getLocale().getLanguage(); - } - - final String token = UUID.randomUUID().toString(); - userService.createPasswordResetTokenForUser(user, token); - try { - final String appUrl = "http://" + request.getServerName() + ":" + request.getServerPort() + request.getContextPath(); - final SimpleMailMessage email = constructResetTokenEmail(appUrl, request.getLocale(), token, user); - mailSender.send(email); - } catch (final MailAuthenticationException e) { - LOGGER.debug("MailAuthenticationException", e); - return "redirect:/emailError.html?lang=" + request.getLocale().getLanguage(); - } catch (final Exception e) { - LOGGER.debug(e.getLocalizedMessage(), e); - model.addAttribute("message", e.getLocalizedMessage()); - return "redirect:/login.html?lang=" + request.getLocale().getLanguage(); - } - model.addAttribute("message", messages.getMessage("message.resetPasswordEmail", null, request.getLocale())); - return "redirect:/login.html?lang=" + request.getLocale().getLanguage(); - } - - @RequestMapping(value = "/user/changePassword", method = RequestMethod.GET) - public String changePassword(final HttpServletRequest request, final Model model, @RequestParam("id") final long id, @RequestParam("token") final String token) { - final Locale locale = request.getLocale(); - - final PasswordResetToken passToken = userService.getPasswordResetToken(token); - final User user = passToken.getUser(); - if (passToken == null || user.getId() != id) { - final String message = messages.getMessage("auth.message.invalidToken", null, locale); - model.addAttribute("message", message); - return "redirect:/login.html?lang=" + locale.getLanguage(); - } - - final Calendar cal = Calendar.getInstance(); - if ((passToken.getExpiryDate().getTime() - cal.getTime().getTime()) <= 0) { - model.addAttribute("message", messages.getMessage("auth.message.expired", null, locale)); - return "redirect:/login.html?lang=" + locale.getLanguage(); - } - - final Authentication auth = new UsernamePasswordAuthenticationToken(user, null, userDetailsService.loadUserByUsername(user.getEmail()).getAuthorities()); - SecurityContextHolder.getContext().setAuthentication(auth); - - return "redirect:/updatePassword.html?lang=" + locale.getLanguage(); - } - - @RequestMapping(value = "/user/savePassword", method = RequestMethod.POST) - @PreAuthorize("hasRole('READ_PRIVILEGE')") - public String savePassword(final HttpServletRequest request, final Model model, @RequestParam("password") final String password) { - final Locale locale = request.getLocale(); - - final User user = (User) SecurityContextHolder.getContext().getAuthentication().getPrincipal(); - userService.changeUserPassword(user, password); - model.addAttribute("message", messages.getMessage("message.resetPasswordSuc", null, locale)); - return "redirect:/login.html?lang=" + locale; - } - - // NON-API - - private final SimpleMailMessage constructResetVerificationTokenEmail(final String contextPath, final Locale locale, final VerificationToken newToken, final User user) { - final String confirmationUrl = contextPath + "/old/regitrationConfirm.html?token=" + newToken.getToken(); - final String message = messages.getMessage("message.resendToken", null, locale); - final SimpleMailMessage email = new SimpleMailMessage(); - email.setSubject("Resend Registration Token"); - email.setText(message + " \r\n" + confirmationUrl); - email.setTo(user.getEmail()); - email.setFrom(env.getProperty("support.email")); - return email; - } - - private final SimpleMailMessage constructResetTokenEmail(final String contextPath, final Locale locale, final String token, final User user) { - final String url = contextPath + "/old/user/changePassword?id=" + user.getId() + "&token=" + token; - final String message = messages.getMessage("message.resetPassword", null, locale); - final SimpleMailMessage email = new SimpleMailMessage(); - email.setTo(user.getEmail()); - email.setSubject("Reset Password"); - email.setText(message + " \r\n" + url); - email.setFrom(env.getProperty("support.email")); - return email; - } - - private User createUserAccount(final UserDto accountDto) { - User registered = null; - try { - registered = userService.registerNewUserAccount(accountDto); - } catch (final EmailExistsException e) { - return null; - } - return registered; - } -} diff --git a/spring-security-login-and-registration/src/main/java/org/baeldung/web/controller/RegistrationController.java b/spring-security-login-and-registration/src/main/java/org/baeldung/web/controller/RegistrationController.java deleted file mode 100644 index ca13d7f21e..0000000000 --- a/spring-security-login-and-registration/src/main/java/org/baeldung/web/controller/RegistrationController.java +++ /dev/null @@ -1,218 +0,0 @@ -package org.baeldung.web.controller; - -import java.util.Calendar; -import java.util.Locale; -import java.util.UUID; - -import javax.servlet.http.HttpServletRequest; -import javax.validation.Valid; - -import org.baeldung.persistence.model.PasswordResetToken; -import org.baeldung.persistence.model.User; -import org.baeldung.persistence.model.VerificationToken; -import org.baeldung.persistence.service.IUserService; -import org.baeldung.persistence.service.UserDto; -import org.baeldung.registration.OnRegistrationCompleteEvent; -import org.baeldung.validation.EmailExistsException; -import org.baeldung.web.error.InvalidOldPasswordException; -import org.baeldung.web.error.UserAlreadyExistException; -import org.baeldung.web.error.UserNotFoundException; -import org.baeldung.web.util.GenericResponse; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.context.ApplicationEventPublisher; -import org.springframework.context.MessageSource; -import org.springframework.core.env.Environment; -import org.springframework.mail.SimpleMailMessage; -import org.springframework.mail.javamail.JavaMailSender; -import org.springframework.security.access.prepost.PreAuthorize; -import org.springframework.security.authentication.UsernamePasswordAuthenticationToken; -import org.springframework.security.core.Authentication; -import org.springframework.security.core.context.SecurityContextHolder; -import org.springframework.security.core.userdetails.UserDetailsService; -import org.springframework.stereotype.Controller; -import org.springframework.ui.Model; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RequestMethod; -import org.springframework.web.bind.annotation.RequestParam; -import org.springframework.web.bind.annotation.ResponseBody; - -@Controller -public class RegistrationController { - private final Logger LOGGER = LoggerFactory.getLogger(getClass()); - - @Autowired - private IUserService userService; - - @Autowired - private MessageSource messages; - - @Autowired - private JavaMailSender mailSender; - - @Autowired - private ApplicationEventPublisher eventPublisher; - - @Autowired - private UserDetailsService userDetailsService; - - @Autowired - private Environment env; - - public RegistrationController() { - super(); - } - - // Registration - - @RequestMapping(value = "/user/registration", method = RequestMethod.POST) - @ResponseBody - public GenericResponse registerUserAccount(@Valid final UserDto accountDto, final HttpServletRequest request) { - LOGGER.debug("Registering user account with information: {}", accountDto); - - final User registered = createUserAccount(accountDto); - if (registered == null) { - throw new UserAlreadyExistException(); - } - final String appUrl = "http://" + request.getServerName() + ":" + request.getServerPort() + request.getContextPath(); - eventPublisher.publishEvent(new OnRegistrationCompleteEvent(registered, request.getLocale(), appUrl)); - - return new GenericResponse("success"); - } - - @RequestMapping(value = "/regitrationConfirm", method = RequestMethod.GET) - public String confirmRegistration(final Locale locale, final Model model, @RequestParam("token") final String token) { - final VerificationToken verificationToken = userService.getVerificationToken(token); - if (verificationToken == null) { - final String message = messages.getMessage("auth.message.invalidToken", null, locale); - model.addAttribute("message", message); - return "redirect:/badUser.html?lang=" + locale.getLanguage(); - } - - final User user = verificationToken.getUser(); - final Calendar cal = Calendar.getInstance(); - if ((verificationToken.getExpiryDate().getTime() - cal.getTime().getTime()) <= 0) { - model.addAttribute("message", messages.getMessage("auth.message.expired", null, locale)); - model.addAttribute("expired", true); - model.addAttribute("token", token); - return "redirect:/badUser.html?lang=" + locale.getLanguage(); - } - - user.setEnabled(true); - userService.saveRegisteredUser(user); - model.addAttribute("message", messages.getMessage("message.accountVerified", null, locale)); - return "redirect:/login.html?lang=" + locale.getLanguage(); - } - - // user activation - verification - - @RequestMapping(value = "/user/resendRegistrationToken", method = RequestMethod.GET) - @ResponseBody - public GenericResponse resendRegistrationToken(final HttpServletRequest request, @RequestParam("token") final String existingToken) { - final VerificationToken newToken = userService.generateNewVerificationToken(existingToken); - final User user = userService.getUser(newToken.getToken()); - final String appUrl = "http://" + request.getServerName() + ":" + request.getServerPort() + request.getContextPath(); - final SimpleMailMessage email = constructResendVerificationTokenEmail(appUrl, request.getLocale(), newToken, user); - mailSender.send(email); - - return new GenericResponse(messages.getMessage("message.resendToken", null, request.getLocale())); - } - - // Reset password - - @RequestMapping(value = "/user/resetPassword", method = RequestMethod.POST) - @ResponseBody - public GenericResponse resetPassword(final HttpServletRequest request, @RequestParam("email") final String userEmail) { - final User user = userService.findUserByEmail(userEmail); - if (user == null) { - throw new UserNotFoundException(); - } - - final String token = UUID.randomUUID().toString(); - userService.createPasswordResetTokenForUser(user, token); - final String appUrl = "http://" + request.getServerName() + ":" + request.getServerPort() + request.getContextPath(); - final SimpleMailMessage email = constructResetTokenEmail(appUrl, request.getLocale(), token, user); - mailSender.send(email); - return new GenericResponse(messages.getMessage("message.resetPasswordEmail", null, request.getLocale())); - } - - @RequestMapping(value = "/user/changePassword", method = RequestMethod.GET) - public String showChangePasswordPage(final Locale locale, final Model model, @RequestParam("id") final long id, @RequestParam("token") final String token) { - final PasswordResetToken passToken = userService.getPasswordResetToken(token); - final User user = passToken.getUser(); - if (passToken == null || user.getId() != id) { - final String message = messages.getMessage("auth.message.invalidToken", null, locale); - model.addAttribute("message", message); - return "redirect:/login.html?lang=" + locale.getLanguage(); - } - - final Calendar cal = Calendar.getInstance(); - if ((passToken.getExpiryDate().getTime() - cal.getTime().getTime()) <= 0) { - model.addAttribute("message", messages.getMessage("auth.message.expired", null, locale)); - return "redirect:/login.html?lang=" + locale.getLanguage(); - } - - final Authentication auth = new UsernamePasswordAuthenticationToken(user, null, userDetailsService.loadUserByUsername(user.getEmail()).getAuthorities()); - SecurityContextHolder.getContext().setAuthentication(auth); - - return "redirect:/updatePassword.html?lang=" + locale.getLanguage(); - } - - @RequestMapping(value = "/user/savePassword", method = RequestMethod.POST) - @PreAuthorize("hasRole('READ_PRIVILEGE')") - @ResponseBody - public GenericResponse savePassword(final Locale locale, @RequestParam("password") final String password) { - final User user = (User) SecurityContextHolder.getContext().getAuthentication().getPrincipal(); - userService.changeUserPassword(user, password); - return new GenericResponse(messages.getMessage("message.resetPasswordSuc", null, locale)); - } - - // change user password - - @RequestMapping(value = "/user/updatePassword", method = RequestMethod.POST) - @PreAuthorize("hasRole('READ_PRIVILEGE')") - @ResponseBody - public GenericResponse changeUserPassword(final Locale locale, @RequestParam("password") final String password, @RequestParam("oldpassword") final String oldPassword) { - final User user = userService.findUserByEmail(SecurityContextHolder.getContext().getAuthentication().getName()); - if (!userService.checkIfValidOldPassword(user, oldPassword)) { - throw new InvalidOldPasswordException(); - } - userService.changeUserPassword(user, password); - return new GenericResponse(messages.getMessage("message.updatePasswordSuc", null, locale)); - } - - // NON-API - - private final SimpleMailMessage constructResendVerificationTokenEmail(final String contextPath, final Locale locale, final VerificationToken newToken, final User user) { - final String confirmationUrl = contextPath + "/regitrationConfirm.html?token=" + newToken.getToken(); - final String message = messages.getMessage("message.resendToken", null, locale); - final SimpleMailMessage email = new SimpleMailMessage(); - email.setSubject("Resend Registration Token"); - email.setText(message + " \r\n" + confirmationUrl); - email.setTo(user.getEmail()); - email.setFrom(env.getProperty("support.email")); - return email; - } - - private final SimpleMailMessage constructResetTokenEmail(final String contextPath, final Locale locale, final String token, final User user) { - final String url = contextPath + "/user/changePassword?id=" + user.getId() + "&token=" + token; - final String message = messages.getMessage("message.resetPassword", null, locale); - final SimpleMailMessage email = new SimpleMailMessage(); - email.setTo(user.getEmail()); - email.setSubject("Reset Password"); - email.setText(message + " \r\n" + url); - email.setFrom(env.getProperty("support.email")); - return email; - } - - private User createUserAccount(final UserDto accountDto) { - User registered = null; - try { - registered = userService.registerNewUserAccount(accountDto); - } catch (final EmailExistsException e) { - return null; - } - return registered; - } -} diff --git a/spring-security-login-and-registration/src/main/java/org/baeldung/web/error/InvalidOldPasswordException.java b/spring-security-login-and-registration/src/main/java/org/baeldung/web/error/InvalidOldPasswordException.java deleted file mode 100644 index 74b4e04c1a..0000000000 --- a/spring-security-login-and-registration/src/main/java/org/baeldung/web/error/InvalidOldPasswordException.java +++ /dev/null @@ -1,23 +0,0 @@ -package org.baeldung.web.error; - -public final class InvalidOldPasswordException extends RuntimeException { - - private static final long serialVersionUID = 5861310537366287163L; - - public InvalidOldPasswordException() { - super(); - } - - public InvalidOldPasswordException(final String message, final Throwable cause) { - super(message, cause); - } - - public InvalidOldPasswordException(final String message) { - super(message); - } - - public InvalidOldPasswordException(final Throwable cause) { - super(cause); - } - -} diff --git a/spring-security-login-and-registration/src/main/java/org/baeldung/web/error/RestResponseEntityExceptionHandler.java b/spring-security-login-and-registration/src/main/java/org/baeldung/web/error/RestResponseEntityExceptionHandler.java deleted file mode 100644 index c74cf25c2b..0000000000 --- a/spring-security-login-and-registration/src/main/java/org/baeldung/web/error/RestResponseEntityExceptionHandler.java +++ /dev/null @@ -1,85 +0,0 @@ -package org.baeldung.web.error; - -import org.baeldung.web.util.GenericResponse; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.context.MessageSource; -import org.springframework.http.HttpHeaders; -import org.springframework.http.HttpStatus; -import org.springframework.http.ResponseEntity; -import org.springframework.mail.MailAuthenticationException; -import org.springframework.validation.BindException; -import org.springframework.validation.BindingResult; -import org.springframework.web.bind.MethodArgumentNotValidException; -import org.springframework.web.bind.annotation.ControllerAdvice; -import org.springframework.web.bind.annotation.ExceptionHandler; -import org.springframework.web.context.request.WebRequest; -import org.springframework.web.servlet.mvc.method.annotation.ResponseEntityExceptionHandler; - -@ControllerAdvice -public class RestResponseEntityExceptionHandler extends ResponseEntityExceptionHandler { - - @Autowired - private MessageSource messages; - - public RestResponseEntityExceptionHandler() { - super(); - } - - // API - - // 400 - @Override - protected ResponseEntity handleBindException(final BindException ex, final HttpHeaders headers, final HttpStatus status, final WebRequest request) { - logger.error("400 Status Code", ex); - final BindingResult result = ex.getBindingResult(); - final GenericResponse bodyOfResponse = new GenericResponse(result.getFieldErrors(), result.getGlobalErrors()); - return handleExceptionInternal(ex, bodyOfResponse, new HttpHeaders(), HttpStatus.BAD_REQUEST, request); - } - - @Override - protected ResponseEntity handleMethodArgumentNotValid(final MethodArgumentNotValidException ex, final HttpHeaders headers, final HttpStatus status, final WebRequest request) { - logger.error("400 Status Code", ex); - final BindingResult result = ex.getBindingResult(); - final GenericResponse bodyOfResponse = new GenericResponse(result.getFieldErrors(), result.getGlobalErrors()); - return handleExceptionInternal(ex, bodyOfResponse, new HttpHeaders(), HttpStatus.BAD_REQUEST, request); - } - - @ExceptionHandler({ InvalidOldPasswordException.class }) - public ResponseEntity handleInvalidOldPassword(final RuntimeException ex, final WebRequest request) { - logger.error("400 Status Code", ex); - final GenericResponse bodyOfResponse = new GenericResponse(messages.getMessage("message.invalidOldPassword", null, request.getLocale()), "InvalidOldEmail"); - return handleExceptionInternal(ex, bodyOfResponse, new HttpHeaders(), HttpStatus.BAD_REQUEST, request); - } - - // 404 - @ExceptionHandler({ UserNotFoundException.class }) - public ResponseEntity handleUserNotFound(final RuntimeException ex, final WebRequest request) { - logger.error("404 Status Code", ex); - final GenericResponse bodyOfResponse = new GenericResponse(messages.getMessage("message.userNotFound", null, request.getLocale()), "UserNotFound"); - return handleExceptionInternal(ex, bodyOfResponse, new HttpHeaders(), HttpStatus.NOT_FOUND, request); - } - - // 409 - @ExceptionHandler({ UserAlreadyExistException.class }) - public ResponseEntity handleUserAlreadyExist(final RuntimeException ex, final WebRequest request) { - logger.error("409 Status Code", ex); - final GenericResponse bodyOfResponse = new GenericResponse(messages.getMessage("message.regError", null, request.getLocale()), "UserAlreadyExist"); - return handleExceptionInternal(ex, bodyOfResponse, new HttpHeaders(), HttpStatus.CONFLICT, request); - } - - // 500 - @ExceptionHandler({ MailAuthenticationException.class }) - public ResponseEntity handleMail(final RuntimeException ex, final WebRequest request) { - logger.error("500 Status Code", ex); - final GenericResponse bodyOfResponse = new GenericResponse(messages.getMessage("message.email.config.error", null, request.getLocale()), "MailError"); - return new ResponseEntity(bodyOfResponse, new HttpHeaders(), HttpStatus.INTERNAL_SERVER_ERROR); - } - - @ExceptionHandler({ Exception.class }) - public ResponseEntity handleInternal(final RuntimeException ex, final WebRequest request) { - logger.error("500 Status Code", ex); - final GenericResponse bodyOfResponse = new GenericResponse(messages.getMessage("message.error", null, request.getLocale()), "InternalError"); - return new ResponseEntity(bodyOfResponse, new HttpHeaders(), HttpStatus.INTERNAL_SERVER_ERROR); - } - -} diff --git a/spring-security-login-and-registration/src/main/java/org/baeldung/web/error/UserAlreadyExistException.java b/spring-security-login-and-registration/src/main/java/org/baeldung/web/error/UserAlreadyExistException.java deleted file mode 100644 index d9c112c3f5..0000000000 --- a/spring-security-login-and-registration/src/main/java/org/baeldung/web/error/UserAlreadyExistException.java +++ /dev/null @@ -1,23 +0,0 @@ -package org.baeldung.web.error; - -public final class UserAlreadyExistException extends RuntimeException { - - private static final long serialVersionUID = 5861310537366287163L; - - public UserAlreadyExistException() { - super(); - } - - public UserAlreadyExistException(final String message, final Throwable cause) { - super(message, cause); - } - - public UserAlreadyExistException(final String message) { - super(message); - } - - public UserAlreadyExistException(final Throwable cause) { - super(cause); - } - -} diff --git a/spring-security-login-and-registration/src/main/java/org/baeldung/web/error/UserNotFoundException.java b/spring-security-login-and-registration/src/main/java/org/baeldung/web/error/UserNotFoundException.java deleted file mode 100644 index 4f45e0f978..0000000000 --- a/spring-security-login-and-registration/src/main/java/org/baeldung/web/error/UserNotFoundException.java +++ /dev/null @@ -1,23 +0,0 @@ -package org.baeldung.web.error; - -public final class UserNotFoundException extends RuntimeException { - - private static final long serialVersionUID = 5861310537366287163L; - - public UserNotFoundException() { - super(); - } - - public UserNotFoundException(final String message, final Throwable cause) { - super(message, cause); - } - - public UserNotFoundException(final String message) { - super(message); - } - - public UserNotFoundException(final Throwable cause) { - super(cause); - } - -} diff --git a/spring-security-login-and-registration/src/main/java/org/baeldung/web/util/GenericResponse.java b/spring-security-login-and-registration/src/main/java/org/baeldung/web/util/GenericResponse.java deleted file mode 100644 index 076c481580..0000000000 --- a/spring-security-login-and-registration/src/main/java/org/baeldung/web/util/GenericResponse.java +++ /dev/null @@ -1,54 +0,0 @@ -package org.baeldung.web.util; - -import java.util.List; - -import org.springframework.validation.FieldError; -import org.springframework.validation.ObjectError; - -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.ObjectMapper; - -public class GenericResponse { - private String message; - private String error; - - public GenericResponse(final String message) { - super(); - this.message = message; - } - - public GenericResponse(final String message, final String error) { - super(); - this.message = message; - this.error = error; - } - - public GenericResponse(final List fieldErrors, final List globalErrors) { - super(); - final ObjectMapper mapper = new ObjectMapper(); - try { - this.message = mapper.writeValueAsString(fieldErrors); - this.error = mapper.writeValueAsString(globalErrors); - } catch (final JsonProcessingException e) { - this.message = ""; - this.error = ""; - } - } - - public String getMessage() { - return message; - } - - public void setMessage(final String message) { - this.message = message; - } - - public String getError() { - return error; - } - - public void setError(final String error) { - this.error = error; - } - -} diff --git a/spring-security-login-and-registration/src/main/resources/.gitignore b/spring-security-login-and-registration/src/main/resources/.gitignore deleted file mode 100644 index ec4a72ea93..0000000000 --- a/spring-security-login-and-registration/src/main/resources/.gitignore +++ /dev/null @@ -1 +0,0 @@ -email.properties \ No newline at end of file diff --git a/spring-security-login-and-registration/src/main/resources/email.properties.sample b/spring-security-login-and-registration/src/main/resources/email.properties.sample deleted file mode 100644 index 8e8207d7ab..0000000000 --- a/spring-security-login-and-registration/src/main/resources/email.properties.sample +++ /dev/null @@ -1,7 +0,0 @@ -################### JavaMail Configuration ########################## -smtp.host=email-smtp.us-east-1.amazonaws.com -smtp.port=465 -smtp.protocol=smtps -smtp.username=AKIAJIKXZAQFFJDXI4VQ -smtp.password= -support.email=eugen@baeldung.com diff --git a/spring-security-login-and-registration/src/main/resources/logback.xml b/spring-security-login-and-registration/src/main/resources/logback.xml deleted file mode 100644 index 1146dade63..0000000000 --- a/spring-security-login-and-registration/src/main/resources/logback.xml +++ /dev/null @@ -1,20 +0,0 @@ - - - - - web - %date [%thread] %-5level %logger{36} - %message%n - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/spring-security-login-and-registration/src/main/resources/messages_en.properties b/spring-security-login-and-registration/src/main/resources/messages_en.properties deleted file mode 100644 index c522f1305f..0000000000 --- a/spring-security-login-and-registration/src/main/resources/messages_en.properties +++ /dev/null @@ -1,79 +0,0 @@ -message.username=Username required -message.password=Password required -message.unauth=Unauthorized Access !! -message.badCredentials=Invalid Username or Password -message.sessionExpired=Session Timed Out -message.logoutError=Sorry, error logging out -message.logoutSucc=You logged out successfully -message.regSucc=You registered successfully. We will send you a confirmation message to your email account. -message.regError=An account for that username/email already exists. Please enter a different username. -message.lastName=Last name is required -message.firstName=First name required -message.badEmail=Invalid email address -message.email.config.error=Error in java mail configuration -token.message=Your token is: -auth.message.disabled=Your account is disabled please check your mail and click on the confirmation link -auth.message.expired=Your registration token has expired. Please register again. -auth.message.invalidUser=This username is invalid, or does not exist. -auth.message.invalidToken=Invalid account confirmation token. -label.user.email=Email: -label.user.firstName=First name: -label.user.lastName=Last name: -label.user.password=Password: -label.user.confirmPass=Confirm password -label.form.submit=Submit -label.form.title=Registration Form -label.form.loginLink=Back to login -label.login=Login here -label.form.loginTitle=Login -label.form.loginEmail=Email -label.form.loginPass=Password -label.form.loginEnglish=English -label.form.loginSpanish=Spanish -label.form.loginSignUp=Sign up -label.pages.logout=Logout -label.pages.admin=Administrator -label.pages.home.title=Home -label.pages.home.message=Welcome Home -label.pages.admin.message=Welcome Admin -label.pages.user.message=Welcome User -label.successRegister.title=Registration Success -label.badUser.title=Invalid Link -ValidEmail.user.email=Invalid email address! -UniqueUsername.user.username=An account with that username/email already exists -NotNull.user.firstName=First name required -NotEmpty.user.firstName=First name required -NotNull.user.lastName=Last name required -NotEmpty.user.lastName=Last name required -NotNull.user.username=Username(Email) required -NotEmpty.user.username=Username(Email) required -NotNull.user.password=Password required -NotEmpty.user.password=Password required -NotNull.user.matchingPassword=Required -NotEmpty.user.matchingPassword=Required -PasswordMatches.user:Password does not match! -Email.user.email=Invalid Username (Email) -label.form.resendRegistrationToken=Re-send Token -message.resendToken=We will send an email with a new registration token to your email account -message.forgetPassword=Forget Password -message.resetPassword=Reset Password -message.updatePassword=Update Password -message.userNotFound=User Not Found -auth.message.blocked=This ip is blocked for 24 hours -message.accountVerified=Your account verified successfully -message.resetPasswordSuc=Password reset successfully -message.resetYourPassword=Reset your password -message.resetPasswordEmail=You should receive an Password Reset Email shortly -message.error=Error Occurred -message.updatePasswordSuc=Password updated successfully -message.changePassword=Change Password -message.invalidOldPassword=Invalid Old Password -label.user.newPassword=New Password -label.user.oldPassword=Old Password -error.wordLength=Your password is too short -error.wordNotEmail=Do not use your email as your password -error.wordSequences=Your password contains sequences -error.wordLowercase=Use lower case characters -error.wordUppercase=Use upper case characters -error.wordOneNumber=Use numbers -error.wordOneSpecialChar=Use special characters \ No newline at end of file diff --git a/spring-security-login-and-registration/src/main/resources/messages_es_ES.properties b/spring-security-login-and-registration/src/main/resources/messages_es_ES.properties deleted file mode 100644 index 58ed951891..0000000000 --- a/spring-security-login-and-registration/src/main/resources/messages_es_ES.properties +++ /dev/null @@ -1,79 +0,0 @@ -message.username=Por favor ingrese el nombre de usuario -message.password=Por favor ingrese una clave -message.unauth=Acceso denegado !! -message.badCredentials=Usuario o clave invalida -message.sessionExpired=La sesion expiro -message.logoutError=Lo sentimos, hubo problemas al salir -message.logoutSucc=Salida con exito -message.regSucc=Se registro correctamente. Le enviaremos un mensaje de confirmacion a su direccion de email. -message.regError=Ya existe una cuenta con ese nombre de usuario. Ingrese un nombre de usuario diferente. -message.lastName=Por favor ingrese su apellido -message.firstName=Por favor ingrese su nombre -message.badEmail=Direccion de correo no es valida -message.email.config.error=Error en configuracion de java mail -token.message=Su token es: -auth.message.disabled=Su cuenta no esta habilitada. Hemos enviado a su correo un link para habilitar su cuenta. -auth.message.expired=Su ficha de registro ha caducado, por favor registrese de nuevo. -auth.message.invalidUser=Este nombre de usuario es invalido o no existe. -auth.message.invalidToken=Codigo de confirmacion incorrecto. -label.user.email=Correo Electronico: -label.user.firstName=Nombre: -label.user.lastName=Apellido: -label.user.password=Contrasenia: -label.user.confirmPass=Confirme la contrasenia -label.form.submit=Enviar -label.form.title=Formulario de Registro -label.login=Autehtifiquese aqui -label.form.loginTitle=Ingreso -label.form.loginLink=Regrese a autentificacion -label.form.loginEmail=Correo Electronico -label.form.loginPass=Contrasenia -label.form.loginEnglish=Ingles -label.form.loginSpanish=Espaniol -label.form.loginSignUp=Registrese -label.pages.logout=Salir -label.pages.admin=Administrador -label.pages.home.title=Inicio -label.pages.home.message=Bienveni@ a Casa -label.pages.admin.message=Bienvenid@ Admin -label.pages.user.message=Bienvenid@ Usuari@ -label.successRegister.title=Registro Exitoso -label.badUser.title=Enlace Invalido -ValidEmail.user.email=Cuenta correo invlida! -UniqueUsername.user.username=Ya existe una cuenta con ese nombre de usuario -NotNull.user.firstName=Por favor ingrese su nombre -NotEmpty.user.firstName=Por favor ingrese su nombre -NotNull.user.lastName=Por favor ingrese su apellido -NotEmpty.user.lastName=Por favor ingrese su apellido -NotNull.user.username=Por favor ingrese su cuenta de email -NotEmpty.user.username=Por favor ingrese su cuenta de email -NotNull.user.password=Por favor ingrese su clave -NotEmpty.user.password=Por favor ingrese su contraseña -NotNull.user.matchingPassword=Campo obligatirio -NotEmpty.user.matchingPassword=Campo obligatrio -PasswordMatches.user:Las claves no coinciden! -Email.user.email=Email no es valido -label.form.resendRegistrationToken=Reenviar mensaje de emergencia -message.resendToken=Te enviaremos un correo electrónico con un nuevo token de registro en su cuenta de correo electrónico -message.forgetPassword=Olvide la contraseña -message.resetPassword=Restablecer contraseña -message.updatePassword=Actualizar contraseña -message.userNotFound=Usuario no encontrado -auth.message.blocked=Esta IP se bloquea durante 24 horas -message.accountVerified=Su cuenta verificada con éxito -message.resetPasswordSuc=Contraseña reajusta correctamente -message.resetYourPassword=Restablecer su contraseña -message.resetPasswordEmail=Te enviaremos un correo electrónico para restablecer su contraseña -message.error=Se produjo un error -message.updatePasswordSuc=Contraseña actualizado correctamente -message.changePassword=Cambiar La Contraseña -message.invalidOldPassword=Inválida contraseña antigua -label.user.newPassword=Nueva Contraseña -label.user.oldPassword=Contraseña Anterior -error.wordLength=Tu contraseña es demasiado corta -error.wordNotEmail=No utilice su dirección de correo electrónico como contraseña -error.wordSequences=Su contraseña contiene secuencias -error.wordLowercase=Utilice caracteres en minúsculas -error.wordUppercase=Utilice mayúsculas -error.wordOneNumber=Utilice números -error.wordOneSpecialChar=Utilice los caracteres especiales \ No newline at end of file diff --git a/spring-security-login-and-registration/src/main/resources/persistence.properties b/spring-security-login-and-registration/src/main/resources/persistence.properties deleted file mode 100644 index 06b2528f64..0000000000 --- a/spring-security-login-and-registration/src/main/resources/persistence.properties +++ /dev/null @@ -1,10 +0,0 @@ -################### DataSource Configuration ########################## -jdbc.driverClassName=com.mysql.jdbc.Driver -jdbc.url=jdbc:mysql://localhost:3306/registration_02?createDatabaseIfNotExist=true -jdbc.user=tutorialuser -jdbc.pass=tutorialmy5ql -init-db=false -################### Hibernate Configuration ########################## -hibernate.dialect=org.hibernate.dialect.MySQLDialect -hibernate.show_sql=false -hibernate.hbm2ddl.auto=create-drop diff --git a/spring-security-login-and-registration/src/main/resources/webSecurityConfig-basic.xml b/spring-security-login-and-registration/src/main/resources/webSecurityConfig-basic.xml deleted file mode 100644 index bf85a09b62..0000000000 --- a/spring-security-login-and-registration/src/main/resources/webSecurityConfig-basic.xml +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/spring-security-login-and-registration/src/main/resources/webSecurityConfig.xml b/spring-security-login-and-registration/src/main/resources/webSecurityConfig.xml deleted file mode 100644 index 4e67a1200f..0000000000 --- a/spring-security-login-and-registration/src/main/resources/webSecurityConfig.xml +++ /dev/null @@ -1,57 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/spring-security-login-and-registration/src/main/webapp/META-INF/MANIFEST.MF b/spring-security-login-and-registration/src/main/webapp/META-INF/MANIFEST.MF deleted file mode 100644 index 5e9495128c..0000000000 --- a/spring-security-login-and-registration/src/main/webapp/META-INF/MANIFEST.MF +++ /dev/null @@ -1,3 +0,0 @@ -Manifest-Version: 1.0 -Class-Path: - diff --git a/spring-security-login-and-registration/src/main/webapp/WEB-INF/mvc-servlet.xml b/spring-security-login-and-registration/src/main/webapp/WEB-INF/mvc-servlet.xml deleted file mode 100644 index 99e19b0558..0000000000 --- a/spring-security-login-and-registration/src/main/webapp/WEB-INF/mvc-servlet.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - \ No newline at end of file diff --git a/spring-security-login-and-registration/src/main/webapp/WEB-INF/view/admin.jsp b/spring-security-login-and-registration/src/main/webapp/WEB-INF/view/admin.jsp deleted file mode 100644 index ad0a8231ad..0000000000 --- a/spring-security-login-and-registration/src/main/webapp/WEB-INF/view/admin.jsp +++ /dev/null @@ -1,34 +0,0 @@ -<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> -<%@ taglib prefix="sec" - uri="http://www.springframework.org/security/tags"%> -<%@taglib uri="http://www.springframework.org/tags" prefix="spring"%> - - - - -<spring:message code="label.pages.home.title"></spring:message> - - - - -
- - - - -

- -

-
-
- - \ No newline at end of file diff --git a/spring-security-login-and-registration/src/main/webapp/WEB-INF/view/badUser.jsp b/spring-security-login-and-registration/src/main/webapp/WEB-INF/view/badUser.jsp deleted file mode 100644 index c2ad64ec6a..0000000000 --- a/spring-security-login-and-registration/src/main/webapp/WEB-INF/view/badUser.jsp +++ /dev/null @@ -1,54 +0,0 @@ -<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> -<%@ taglib prefix="sec" - uri="http://www.springframework.org/security/tags"%> -<%@taglib uri="http://www.springframework.org/tags" prefix="spring"%> -<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%> - -<%@ page session="true"%> - - - - <spring:message -code="label.badUser.title"></spring:message> - - -
-

- ${param.message} -

-
-"> - - -
-

${label.form.resendRegistrationToken}

- - - - -
-
- - diff --git a/spring-security-login-and-registration/src/main/webapp/WEB-INF/view/changePassword.jsp b/spring-security-login-and-registration/src/main/webapp/WEB-INF/view/changePassword.jsp deleted file mode 100644 index 88836e96f5..0000000000 --- a/spring-security-login-and-registration/src/main/webapp/WEB-INF/view/changePassword.jsp +++ /dev/null @@ -1,70 +0,0 @@ - -<%@ page contentType="text/html;charset=UTF-8" language="java"%> -<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> -<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%> -<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%> -<%@ page session="false"%> - - - - -<spring:message code="message.changePassword"></spring:message> - - - -
-
- -

-
-
- - - - -

- - - -

- - - - -

- -
- -
-
- - - - - \ No newline at end of file diff --git a/spring-security-login-and-registration/src/main/webapp/WEB-INF/view/console.jsp b/spring-security-login-and-registration/src/main/webapp/WEB-INF/view/console.jsp deleted file mode 100644 index e06cdd39f0..0000000000 --- a/spring-security-login-and-registration/src/main/webapp/WEB-INF/view/console.jsp +++ /dev/null @@ -1,42 +0,0 @@ -<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> -<%@ taglib prefix="sec" - uri="http://www.springframework.org/security/tags"%> -<%@taglib uri="http://www.springframework.org/tags" prefix="spring"%> - - - - - - - -
- -
-${param.message} -
-
-

This is the landing page for the admin

- - This text is only visible to a user -
-
- - This text is only visible to an admin -
-
- "> - - "> -
- - - \ No newline at end of file diff --git a/spring-security-login-and-registration/src/main/webapp/WEB-INF/view/emailError.jsp b/spring-security-login-and-registration/src/main/webapp/WEB-INF/view/emailError.jsp deleted file mode 100644 index ed25d1f2cd..0000000000 --- a/spring-security-login-and-registration/src/main/webapp/WEB-INF/view/emailError.jsp +++ /dev/null @@ -1,17 +0,0 @@ -<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> -<%@taglib uri="http://www.springframework.org/tags" prefix="spring"%> - - - -<spring:message code="label.pages.home.title"></spring:message> - - -
-

- -

- -
- - - \ No newline at end of file diff --git a/spring-security-login-and-registration/src/main/webapp/WEB-INF/view/expiredAccount.jsp b/spring-security-login-and-registration/src/main/webapp/WEB-INF/view/expiredAccount.jsp deleted file mode 100644 index e829daaa61..0000000000 --- a/spring-security-login-and-registration/src/main/webapp/WEB-INF/view/expiredAccount.jsp +++ /dev/null @@ -1,24 +0,0 @@ -<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> -<%@ taglib prefix="sec" - uri="http://www.springframework.org/security/tags"%> -<%@taglib uri="http://www.springframework.org/tags" prefix="spring"%> -<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%> - -<%@ page session="true"%> - - - - - <spring:message code="label.pages.home.title"></spring:message> - - -
-

- -

-
-"> -
- - diff --git a/spring-security-login-and-registration/src/main/webapp/WEB-INF/view/forgetPassword.jsp b/spring-security-login-and-registration/src/main/webapp/WEB-INF/view/forgetPassword.jsp deleted file mode 100644 index cff325846d..0000000000 --- a/spring-security-login-and-registration/src/main/webapp/WEB-INF/view/forgetPassword.jsp +++ /dev/null @@ -1,55 +0,0 @@ - -<%@ page contentType="text/html;charset=UTF-8" language="java"%> -<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> -<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%> -<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%> -<%@ taglib prefix="sec" - uri="http://www.springframework.org/security/tags"%> -<%@ page session="false"%> - - - - -<spring:message code="message.resetPassword"></spring:message> - - -
-

-
-
- - - -
- -
-"> -

-"> - -
- - - - - \ No newline at end of file diff --git a/spring-security-login-and-registration/src/main/webapp/WEB-INF/view/home.jsp b/spring-security-login-and-registration/src/main/webapp/WEB-INF/view/home.jsp deleted file mode 100644 index 027f583d61..0000000000 --- a/spring-security-login-and-registration/src/main/webapp/WEB-INF/view/home.jsp +++ /dev/null @@ -1,29 +0,0 @@ -<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%> -<%@ page session="true"%> -<%@taglib uri="http://www.springframework.org/tags" prefix="spring"%> - - - - -<spring:message code="label.pages.home.title"></spring:message> - - - -
-

- -

-
- - - - diff --git a/spring-security-login-and-registration/src/main/webapp/WEB-INF/view/homepage.jsp b/spring-security-login-and-registration/src/main/webapp/WEB-INF/view/homepage.jsp deleted file mode 100644 index af931ac66f..0000000000 --- a/spring-security-login-and-registration/src/main/webapp/WEB-INF/view/homepage.jsp +++ /dev/null @@ -1,38 +0,0 @@ -<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> -<%@ taglib prefix="sec" - uri="http://www.springframework.org/security/tags"%> -<%@taglib uri="http://www.springframework.org/tags" prefix="spring"%> -<%@ page session="true"%> - - - -<spring:message code="label.pages.home.title"></spring:message> - - - - -
- - - -
-
- - - -
-
- ${param.user} - "> -
- - \ No newline at end of file diff --git a/spring-security-login-and-registration/src/main/webapp/WEB-INF/view/invalidSession.jsp b/spring-security-login-and-registration/src/main/webapp/WEB-INF/view/invalidSession.jsp deleted file mode 100644 index 50891a216f..0000000000 --- a/spring-security-login-and-registration/src/main/webapp/WEB-INF/view/invalidSession.jsp +++ /dev/null @@ -1,18 +0,0 @@ -<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> -<%@taglib uri="http://www.springframework.org/tags" prefix="spring"%> - - - -<spring:message code="label.pages.home.title"></spring:message> - - -
-

- -

- "> -
- - - \ No newline at end of file diff --git a/spring-security-login-and-registration/src/main/webapp/WEB-INF/view/login.jsp b/spring-security-login-and-registration/src/main/webapp/WEB-INF/view/login.jsp deleted file mode 100644 index a71fe9dc3a..0000000000 --- a/spring-security-login-and-registration/src/main/webapp/WEB-INF/view/login.jsp +++ /dev/null @@ -1,88 +0,0 @@ -<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> -<%@ taglib prefix="sec" - uri="http://www.springframework.org/security/tags"%> -<%@taglib uri="http://www.springframework.org/tags" prefix="spring"%> -<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%> - -<%@ page session="true"%> - - - - - - - -<spring:message code="label.pages.home.title"></spring:message> - - - - - -
-${param.message} -
-
- - - -
-${SPRING_SECURITY_LAST_EXCEPTION} -
-
- -
-
-

- -

- - | -

- -
- - - - -

- - - -

- /> - -
-
Current Locale : ${pageContext.response.locale}

- "> -

- "> -
-
- - - \ No newline at end of file diff --git a/spring-security-login-and-registration/src/main/webapp/WEB-INF/view/logout.jsp b/spring-security-login-and-registration/src/main/webapp/WEB-INF/view/logout.jsp deleted file mode 100644 index 95602d58a8..0000000000 --- a/spring-security-login-and-registration/src/main/webapp/WEB-INF/view/logout.jsp +++ /dev/null @@ -1,31 +0,0 @@ -<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> -<%@ taglib prefix="sec" - uri="http://www.springframework.org/security/tags"%> -<%@taglib uri="http://www.springframework.org/tags" prefix="spring"%> - - - - - -

- -

-
- -<spring:message code="label.pages.home.title"></spring:message> - - - -
- - -

- -

-
- "> -
- - - \ No newline at end of file diff --git a/spring-security-login-and-registration/src/main/webapp/WEB-INF/view/registration.jsp b/spring-security-login-and-registration/src/main/webapp/WEB-INF/view/registration.jsp deleted file mode 100644 index cf64291be6..0000000000 --- a/spring-security-login-and-registration/src/main/webapp/WEB-INF/view/registration.jsp +++ /dev/null @@ -1,139 +0,0 @@ - -<%@ page contentType="text/html;charset=UTF-8" language="java"%> -<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> -<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%> -<%@ page session="false"%> - - - - - - - -<spring:message code="label.form.title"></spring:message> - - -
-
-

- -

-
-
-
- - - - -
-
- - - - -
-
- - - - -
-
- - - -
-
- - - -
-
- -
-
- "> -
-
- - - - - \ No newline at end of file diff --git a/spring-security-login-and-registration/src/main/webapp/WEB-INF/view/regitrationConfirm.jsp b/spring-security-login-and-registration/src/main/webapp/WEB-INF/view/regitrationConfirm.jsp deleted file mode 100644 index 08d3f4ab70..0000000000 --- a/spring-security-login-and-registration/src/main/webapp/WEB-INF/view/regitrationConfirm.jsp +++ /dev/null @@ -1,23 +0,0 @@ -<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> -<%@ taglib prefix="sec" - uri="http://www.springframework.org/security/tags"%> -<%@taglib uri="http://www.springframework.org/tags" prefix="spring"%> -<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%> - -<%@ page session="true"%> - - - - - - - -<spring:message code="label.pages.home.title"></spring:message> - - -
-

- "> -
- - \ No newline at end of file diff --git a/spring-security-login-and-registration/src/main/webapp/WEB-INF/view/successRegister.jsp b/spring-security-login-and-registration/src/main/webapp/WEB-INF/view/successRegister.jsp deleted file mode 100644 index ea6e031fb9..0000000000 --- a/spring-security-login-and-registration/src/main/webapp/WEB-INF/view/successRegister.jsp +++ /dev/null @@ -1,25 +0,0 @@ -<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> -<%@ taglib prefix="sec" - uri="http://www.springframework.org/security/tags"%> -<%@taglib uri="http://www.springframework.org/tags" prefix="spring"%> -<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%> - -<%@ page session="true"%> - - - - - - -<spring:message code="label.pages.home.title"></spring:message> - - -
-

- -

- "> -
- - \ No newline at end of file diff --git a/spring-security-login-and-registration/src/main/webapp/WEB-INF/view/updatePassword.jsp b/spring-security-login-and-registration/src/main/webapp/WEB-INF/view/updatePassword.jsp deleted file mode 100644 index 859c0a9be4..0000000000 --- a/spring-security-login-and-registration/src/main/webapp/WEB-INF/view/updatePassword.jsp +++ /dev/null @@ -1,60 +0,0 @@ - -<%@ page contentType="text/html;charset=UTF-8" language="java"%> -<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> -<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%> -<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%> -<%@ taglib prefix="sec" - uri="http://www.springframework.org/security/tags"%> -<%@ page session="false"%> - - - - -<spring:message code="message.updatePassword"></spring:message> - - - -
-
-

-
-
- - - - -

- - - - -

- -
- -
-
- - - -
- - - \ No newline at end of file diff --git a/spring-security-login-and-registration/src/main/webapp/WEB-INF/web.xml b/spring-security-login-and-registration/src/main/webapp/WEB-INF/web.xml deleted file mode 100644 index 9ef57810f8..0000000000 --- a/spring-security-login-and-registration/src/main/webapp/WEB-INF/web.xml +++ /dev/null @@ -1,52 +0,0 @@ - - - - - contextClass - org.springframework.web.context.support.AnnotationConfigWebApplicationContext - - - contextConfigLocation - org.baeldung.spring - - - - org.springframework.web.context.ContextLoaderListener - - - - org.springframework.web.context.request.RequestContextListener - - - - mvc - org.springframework.web.servlet.DispatcherServlet - 1 - - - mvc - / - - - - springSecurityFilterChain - org.springframework.web.filter.DelegatingFilterProxy - - - springSecurityFilterChain - /* - - - localizationFilter - org.springframework.web.filter.RequestContextFilter - - - localizationFilter - /* - - - \ No newline at end of file diff --git a/spring-security-login-and-registration/src/main/webapp/resources/bootstrap.css b/spring-security-login-and-registration/src/main/webapp/resources/bootstrap.css deleted file mode 100644 index a5b7ccc211..0000000000 --- a/spring-security-login-and-registration/src/main/webapp/resources/bootstrap.css +++ /dev/null @@ -1,6167 +0,0 @@ -/*! - * Bootstrap v2.3.2 - * - * Copyright 2013 Twitter, Inc - * Licensed under the Apache License v2.0 - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Designed and built with all the love in the world by @mdo and @fat. - */ - -.clearfix { - *zoom: 1; -} - -.clearfix:before, -.clearfix:after { - display: table; - line-height: 0; - content: ""; -} - -.clearfix:after { - clear: both; -} - -.hide-text { - font: 0/0 a; - color: transparent; - text-shadow: none; - background-color: transparent; - border: 0; -} - -.input-block-level { - display: block; - width: 100%; - min-height: 30px; - -webkit-box-sizing: border-box; - -moz-box-sizing: border-box; - box-sizing: border-box; -} - -article, -aside, -details, -figcaption, -figure, -footer, -header, -hgroup, -nav, -section { - display: block; -} - -audio, -canvas, -video { - display: inline-block; - *display: inline; - *zoom: 1; -} - -audio:not([controls]) { - display: none; -} - -html { - font-size: 100%; - -webkit-text-size-adjust: 100%; - -ms-text-size-adjust: 100%; -} - -a:focus { - outline: thin dotted #333; - outline: 5px auto -webkit-focus-ring-color; - outline-offset: -2px; -} - -a:hover, -a:active { - outline: 0; -} - -sub, -sup { - position: relative; - font-size: 75%; - line-height: 0; - vertical-align: baseline; -} - -sup { - top: -0.5em; -} - -sub { - bottom: -0.25em; -} - -img { - width: auto\9; - height: auto; - max-width: 100%; - vertical-align: middle; - border: 0; - -ms-interpolation-mode: bicubic; -} - -#map_canvas img, -.google-maps img { - max-width: none; -} - -button, -input, -select, -textarea { - margin: 0; - font-size: 100%; - vertical-align: middle; -} - -button, -input { - *overflow: visible; - line-height: normal; -} - -button::-moz-focus-inner, -input::-moz-focus-inner { - padding: 0; - border: 0; -} - -button, -html input[type="button"], -input[type="reset"], -input[type="submit"] { - cursor: pointer; - -webkit-appearance: button; -} - -label, -select, -button, -input[type="button"], -input[type="reset"], -input[type="submit"], -input[type="radio"], -input[type="checkbox"] { - cursor: pointer; -} - -input[type="search"] { - -webkit-box-sizing: content-box; - -moz-box-sizing: content-box; - box-sizing: content-box; - -webkit-appearance: textfield; -} - -input[type="search"]::-webkit-search-decoration, -input[type="search"]::-webkit-search-cancel-button { - -webkit-appearance: none; -} - -textarea { - overflow: auto; - vertical-align: top; -} - -@media print { - * { - color: #000 !important; - text-shadow: none !important; - background: transparent !important; - box-shadow: none !important; - } - a, - a:visited { - text-decoration: underline; - } - a[href]:after { - content: " (" attr(href) ")"; - } - abbr[title]:after { - content: " (" attr(title) ")"; - } - .ir a:after, - a[href^="javascript:"]:after, - a[href^="#"]:after { - content: ""; - } - pre, - blockquote { - border: 1px solid #999; - page-break-inside: avoid; - } - thead { - display: table-header-group; - } - tr, - img { - page-break-inside: avoid; - } - img { - max-width: 100% !important; - } - @page { - margin: 0.5cm; - } - p, - h2, - h3 { - orphans: 3; - widows: 3; - } - h2, - h3 { - page-break-after: avoid; - } -} - -body { - margin: 0; - font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; - font-size: 14px; - line-height: 20px; - color: #333333; - background-color: #ffffff; -} - -a { - color: #0088cc; - text-decoration: none; -} - -a:hover, -a:focus { - color: #005580; - text-decoration: underline; -} - -.img-rounded { - -webkit-border-radius: 6px; - -moz-border-radius: 6px; - border-radius: 6px; -} - -.img-polaroid { - padding: 4px; - background-color: #fff; - border: 1px solid #ccc; - border: 1px solid rgba(0, 0, 0, 0.2); - -webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); - -moz-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); - box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); -} - -.img-circle { - -webkit-border-radius: 500px; - -moz-border-radius: 500px; - border-radius: 500px; -} - -.row { - margin-left: -20px; - *zoom: 1; -} - -.row:before, -.row:after { - display: table; - line-height: 0; - content: ""; -} - -.row:after { - clear: both; -} - -[class*="span"] { - float: left; - min-height: 1px; - margin-left: 20px; -} - -.container, -.navbar-static-top .container, -.navbar-fixed-top .container, -.navbar-fixed-bottom .container { - width: 940px; -} - -.span12 { - width: 940px; -} - -.span11 { - width: 860px; -} - -.span10 { - width: 780px; -} - -.span9 { - width: 700px; -} - -.span8 { - width: 620px; -} - -.span7 { - width: 540px; -} - -.span6 { - width: 460px; -} - -.span5 { - width: 380px; -} - -.span4 { - width: 300px; -} - -.span3 { - width: 220px; -} - -.span2 { - width: 140px; -} - -.span1 { - width: 60px; -} - -.offset12 { - margin-left: 980px; -} - -.offset11 { - margin-left: 900px; -} - -.offset10 { - margin-left: 820px; -} - -.offset9 { - margin-left: 740px; -} - -.offset8 { - margin-left: 660px; -} - -.offset7 { - margin-left: 580px; -} - -.offset6 { - margin-left: 500px; -} - -.offset5 { - margin-left: 420px; -} - -.offset4 { - margin-left: 340px; -} - -.offset3 { - margin-left: 260px; -} - -.offset2 { - margin-left: 180px; -} - -.offset1 { - margin-left: 100px; -} - -.row-fluid { - width: 100%; - *zoom: 1; -} - -.row-fluid:before, -.row-fluid:after { - display: table; - line-height: 0; - content: ""; -} - -.row-fluid:after { - clear: both; -} - -.row-fluid [class*="span"] { - display: block; - float: left; - width: 100%; - min-height: 30px; - margin-left: 2.127659574468085%; - *margin-left: 2.074468085106383%; - -webkit-box-sizing: border-box; - -moz-box-sizing: border-box; - box-sizing: border-box; -} - -.row-fluid [class*="span"]:first-child { - margin-left: 0; -} - -.row-fluid .controls-row [class*="span"] + [class*="span"] { - margin-left: 2.127659574468085%; -} - -.row-fluid .span12 { - width: 100%; - *width: 99.94680851063829%; -} - -.row-fluid .span11 { - width: 91.48936170212765%; - *width: 91.43617021276594%; -} - -.row-fluid .span10 { - width: 82.97872340425532%; - *width: 82.92553191489361%; -} - -.row-fluid .span9 { - width: 74.46808510638297%; - *width: 74.41489361702126%; -} - -.row-fluid .span8 { - width: 65.95744680851064%; - *width: 65.90425531914893%; -} - -.row-fluid .span7 { - width: 57.44680851063829%; - *width: 57.39361702127659%; -} - -.row-fluid .span6 { - width: 48.93617021276595%; - *width: 48.88297872340425%; -} - -.row-fluid .span5 { - width: 40.42553191489362%; - *width: 40.37234042553192%; -} - -.row-fluid .span4 { - width: 31.914893617021278%; - *width: 31.861702127659576%; -} - -.row-fluid .span3 { - width: 23.404255319148934%; - *width: 23.351063829787233%; -} - -.row-fluid .span2 { - width: 14.893617021276595%; - *width: 14.840425531914894%; -} - -.row-fluid .span1 { - width: 6.382978723404255%; - *width: 6.329787234042553%; -} - -.row-fluid .offset12 { - margin-left: 104.25531914893617%; - *margin-left: 104.14893617021275%; -} - -.row-fluid .offset12:first-child { - margin-left: 102.12765957446808%; - *margin-left: 102.02127659574467%; -} - -.row-fluid .offset11 { - margin-left: 95.74468085106382%; - *margin-left: 95.6382978723404%; -} - -.row-fluid .offset11:first-child { - margin-left: 93.61702127659574%; - *margin-left: 93.51063829787232%; -} - -.row-fluid .offset10 { - margin-left: 87.23404255319149%; - *margin-left: 87.12765957446807%; -} - -.row-fluid .offset10:first-child { - margin-left: 85.1063829787234%; - *margin-left: 84.99999999999999%; -} - -.row-fluid .offset9 { - margin-left: 78.72340425531914%; - *margin-left: 78.61702127659572%; -} - -.row-fluid .offset9:first-child { - margin-left: 76.59574468085106%; - *margin-left: 76.48936170212764%; -} - -.row-fluid .offset8 { - margin-left: 70.2127659574468%; - *margin-left: 70.10638297872339%; -} - -.row-fluid .offset8:first-child { - margin-left: 68.08510638297872%; - *margin-left: 67.9787234042553%; -} - -.row-fluid .offset7 { - margin-left: 61.70212765957446%; - *margin-left: 61.59574468085106%; -} - -.row-fluid .offset7:first-child { - margin-left: 59.574468085106375%; - *margin-left: 59.46808510638297%; -} - -.row-fluid .offset6 { - margin-left: 53.191489361702125%; - *margin-left: 53.085106382978715%; -} - -.row-fluid .offset6:first-child { - margin-left: 51.063829787234035%; - *margin-left: 50.95744680851063%; -} - -.row-fluid .offset5 { - margin-left: 44.68085106382979%; - *margin-left: 44.57446808510638%; -} - -.row-fluid .offset5:first-child { - margin-left: 42.5531914893617%; - *margin-left: 42.4468085106383%; -} - -.row-fluid .offset4 { - margin-left: 36.170212765957444%; - *margin-left: 36.06382978723405%; -} - -.row-fluid .offset4:first-child { - margin-left: 34.04255319148936%; - *margin-left: 33.93617021276596%; -} - -.row-fluid .offset3 { - margin-left: 27.659574468085104%; - *margin-left: 27.5531914893617%; -} - -.row-fluid .offset3:first-child { - margin-left: 25.53191489361702%; - *margin-left: 25.425531914893618%; -} - -.row-fluid .offset2 { - margin-left: 19.148936170212764%; - *margin-left: 19.04255319148936%; -} - -.row-fluid .offset2:first-child { - margin-left: 17.02127659574468%; - *margin-left: 16.914893617021278%; -} - -.row-fluid .offset1 { - margin-left: 10.638297872340425%; - *margin-left: 10.53191489361702%; -} - -.row-fluid .offset1:first-child { - margin-left: 8.51063829787234%; - *margin-left: 8.404255319148938%; -} - -[class*="span"].hide, -.row-fluid [class*="span"].hide { - display: none; -} - -[class*="span"].pull-right, -.row-fluid [class*="span"].pull-right { - float: right; -} - -.container { - margin-right: auto; - margin-left: auto; - *zoom: 1; -} - -.container:before, -.container:after { - display: table; - line-height: 0; - content: ""; -} - -.container:after { - clear: both; -} - -.container-fluid { - padding-right: 20px; - padding-left: 20px; - *zoom: 1; -} - -.container-fluid:before, -.container-fluid:after { - display: table; - line-height: 0; - content: ""; -} - -.container-fluid:after { - clear: both; -} - -p { - margin: 0 0 10px; -} - -.lead { - margin-bottom: 20px; - font-size: 21px; - font-weight: 200; - line-height: 30px; -} - -small { - font-size: 85%; -} - -strong { - font-weight: bold; -} - -em { - font-style: italic; -} - -cite { - font-style: normal; -} - -.muted { - color: #999999; -} - -a.muted:hover, -a.muted:focus { - color: #808080; -} - -.text-warning { - color: #c09853; -} - -a.text-warning:hover, -a.text-warning:focus { - color: #a47e3c; -} - -.text-error { - color: #b94a48; -} - -a.text-error:hover, -a.text-error:focus { - color: #953b39; -} - -.text-info { - color: #3a87ad; -} - -a.text-info:hover, -a.text-info:focus { - color: #2d6987; -} - -.text-success { - color: #468847; -} - -a.text-success:hover, -a.text-success:focus { - color: #356635; -} - -.text-left { - text-align: left; -} - -.text-right { - text-align: right; -} - -.text-center { - text-align: center; -} - -h1, -h2, -h3, -h4, -h5, -h6 { - margin: 10px 0; - font-family: inherit; - font-weight: bold; - line-height: 20px; - color: inherit; - text-rendering: optimizelegibility; -} - -h1 small, -h2 small, -h3 small, -h4 small, -h5 small, -h6 small { - font-weight: normal; - line-height: 1; - color: #999999; -} - -h1, -h2, -h3 { - line-height: 40px; -} - -h1 { - font-size: 38.5px; -} - -h2 { - font-size: 31.5px; -} - -h3 { - font-size: 24.5px; -} - -h4 { - font-size: 17.5px; -} - -h5 { - font-size: 14px; -} - -h6 { - font-size: 11.9px; -} - -h1 small { - font-size: 24.5px; -} - -h2 small { - font-size: 17.5px; -} - -h3 small { - font-size: 14px; -} - -h4 small { - font-size: 14px; -} - -.page-header { - padding-bottom: 9px; - margin: 20px 0 30px; - border-bottom: 1px solid #eeeeee; -} - -ul, -ol { - padding: 0; - margin: 0 0 10px 25px; -} - -ul ul, -ul ol, -ol ol, -ol ul { - margin-bottom: 0; -} - -li { - line-height: 20px; -} - -ul.unstyled, -ol.unstyled { - margin-left: 0; - list-style: none; -} - -ul.inline, -ol.inline { - margin-left: 0; - list-style: none; -} - -ul.inline > li, -ol.inline > li { - display: inline-block; - *display: inline; - padding-right: 5px; - padding-left: 5px; - *zoom: 1; -} - -dl { - margin-bottom: 20px; -} - -dt, -dd { - line-height: 20px; -} - -dt { - font-weight: bold; -} - -dd { - margin-left: 10px; -} - -.dl-horizontal { - *zoom: 1; -} - -.dl-horizontal:before, -.dl-horizontal:after { - display: table; - line-height: 0; - content: ""; -} - -.dl-horizontal:after { - clear: both; -} - -.dl-horizontal dt { - float: left; - width: 160px; - overflow: hidden; - clear: left; - text-align: right; - text-overflow: ellipsis; - white-space: nowrap; -} - -.dl-horizontal dd { - margin-left: 180px; -} - -hr { - margin: 20px 0; - border: 0; - border-top: 1px solid #eeeeee; - border-bottom: 1px solid #ffffff; -} - -abbr[title], -abbr[data-original-title] { - cursor: help; - border-bottom: 1px dotted #999999; -} - -abbr.initialism { - font-size: 90%; - text-transform: uppercase; -} - -blockquote { - padding: 0 0 0 15px; - margin: 0 0 20px; - border-left: 5px solid #eeeeee; -} - -blockquote p { - margin-bottom: 0; - font-size: 17.5px; - font-weight: 300; - line-height: 1.25; -} - -blockquote small { - display: block; - line-height: 20px; - color: #999999; -} - -blockquote small:before { - content: '\2014 \00A0'; -} - -blockquote.pull-right { - float: right; - padding-right: 15px; - padding-left: 0; - border-right: 5px solid #eeeeee; - border-left: 0; -} - -blockquote.pull-right p, -blockquote.pull-right small { - text-align: right; -} - -blockquote.pull-right small:before { - content: ''; -} - -blockquote.pull-right small:after { - content: '\00A0 \2014'; -} - -q:before, -q:after, -blockquote:before, -blockquote:after { - content: ""; -} - -address { - display: block; - margin-bottom: 20px; - font-style: normal; - line-height: 20px; -} - -code, -pre { - padding: 0 3px 2px; - font-family: Monaco, Menlo, Consolas, "Courier New", monospace; - font-size: 12px; - color: #333333; - -webkit-border-radius: 3px; - -moz-border-radius: 3px; - border-radius: 3px; -} - -code { - padding: 2px 4px; - color: #d14; - white-space: nowrap; - background-color: #f7f7f9; - border: 1px solid #e1e1e8; -} - -pre { - display: block; - padding: 9.5px; - margin: 0 0 10px; - font-size: 13px; - line-height: 20px; - word-break: break-all; - word-wrap: break-word; - white-space: pre; - white-space: pre-wrap; - background-color: #f5f5f5; - border: 1px solid #ccc; - border: 1px solid rgba(0, 0, 0, 0.15); - -webkit-border-radius: 4px; - -moz-border-radius: 4px; - border-radius: 4px; -} - -pre.prettyprint { - margin-bottom: 20px; -} - -pre code { - padding: 0; - color: inherit; - white-space: pre; - white-space: pre-wrap; - background-color: transparent; - border: 0; -} - -.pre-scrollable { - max-height: 340px; - overflow-y: scroll; -} - -form { - margin: 0 0 20px; -} - -fieldset { - padding: 0; - margin: 0; - border: 0; -} - -legend { - display: block; - width: 100%; - padding: 0; - margin-bottom: 20px; - font-size: 21px; - line-height: 40px; - color: #333333; - border: 0; - border-bottom: 1px solid #e5e5e5; -} - -legend small { - font-size: 15px; - color: #999999; -} - -label, -input, -button, -select, -textarea { - font-size: 14px; - font-weight: normal; - line-height: 20px; -} - -input, -button, -select, -textarea { - font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; -} - -label { - display: block; - margin-bottom: 5px; -} - -select, -textarea, -input[type="text"], -input[type="password"], -input[type="datetime"], -input[type="datetime-local"], -input[type="date"], -input[type="month"], -input[type="time"], -input[type="week"], -input[type="number"], -input[type="email"], -input[type="url"], -input[type="search"], -input[type="tel"], -input[type="color"], -.uneditable-input { - display: inline-block; - height: 30px; - padding: 4px 6px; - margin-bottom: 10px; - font-size: 14px; - line-height: 20px; - color: #555555; - vertical-align: middle; - -webkit-border-radius: 4px; - -moz-border-radius: 4px; - border-radius: 4px; -} - -input, -textarea, -.uneditable-input { - width: 206px; -} - -textarea { - height: auto; -} - -textarea, -input[type="text"], -input[type="password"], -input[type="datetime"], -input[type="datetime-local"], -input[type="date"], -input[type="month"], -input[type="time"], -input[type="week"], -input[type="number"], -input[type="email"], -input[type="url"], -input[type="search"], -input[type="tel"], -input[type="color"], -.uneditable-input { - background-color: #ffffff; - border: 1px solid #cccccc; - -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); - -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); - box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); - -webkit-transition: border linear 0.2s, box-shadow linear 0.2s; - -moz-transition: border linear 0.2s, box-shadow linear 0.2s; - -o-transition: border linear 0.2s, box-shadow linear 0.2s; - transition: border linear 0.2s, box-shadow linear 0.2s; -} - -textarea:focus, -input[type="text"]:focus, -input[type="password"]:focus, -input[type="datetime"]:focus, -input[type="datetime-local"]:focus, -input[type="date"]:focus, -input[type="month"]:focus, -input[type="time"]:focus, -input[type="week"]:focus, -input[type="number"]:focus, -input[type="email"]:focus, -input[type="url"]:focus, -input[type="search"]:focus, -input[type="tel"]:focus, -input[type="color"]:focus, -.uneditable-input:focus { - border-color: rgba(82, 168, 236, 0.8); - outline: 0; - outline: thin dotted \9; - /* IE6-9 */ - - -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(82, 168, 236, 0.6); - -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(82, 168, 236, 0.6); - box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(82, 168, 236, 0.6); -} - -input[type="radio"], -input[type="checkbox"] { - margin: 4px 0 0; - margin-top: 1px \9; - *margin-top: 0; - line-height: normal; -} - -input[type="file"], -input[type="image"], -input[type="submit"], -input[type="reset"], -input[type="button"], -input[type="radio"], -input[type="checkbox"] { - width: auto; -} - -select, -input[type="file"] { - height: 30px; - /* In IE7, the height of the select element cannot be changed by height, only font-size */ - - *margin-top: 4px; - /* For IE7, add top margin to align select with labels */ - - line-height: 30px; -} - -select { - width: 220px; - background-color: #ffffff; - border: 1px solid #cccccc; -} - -select[multiple], -select[size] { - height: auto; -} - -select:focus, -input[type="file"]:focus, -input[type="radio"]:focus, -input[type="checkbox"]:focus { - outline: thin dotted #333; - outline: 5px auto -webkit-focus-ring-color; - outline-offset: -2px; -} - -.uneditable-input, -.uneditable-textarea { - color: #999999; - cursor: not-allowed; - background-color: #fcfcfc; - border-color: #cccccc; - -webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.025); - -moz-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.025); - box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.025); -} - -.uneditable-input { - overflow: hidden; - white-space: nowrap; -} - -.uneditable-textarea { - width: auto; - height: auto; -} - -input:-moz-placeholder, -textarea:-moz-placeholder { - color: #999999; -} - -input:-ms-input-placeholder, -textarea:-ms-input-placeholder { - color: #999999; -} - -input::-webkit-input-placeholder, -textarea::-webkit-input-placeholder { - color: #999999; -} - -.radio, -.checkbox { - min-height: 20px; - padding-left: 20px; -} - -.radio input[type="radio"], -.checkbox input[type="checkbox"] { - float: left; - margin-left: -20px; -} - -.controls > .radio:first-child, -.controls > .checkbox:first-child { - padding-top: 5px; -} - -.radio.inline, -.checkbox.inline { - display: inline-block; - padding-top: 5px; - margin-bottom: 0; - vertical-align: middle; -} - -.radio.inline + .radio.inline, -.checkbox.inline + .checkbox.inline { - margin-left: 10px; -} - -.input-mini { - width: 60px; -} - -.input-small { - width: 90px; -} - -.input-medium { - width: 150px; -} - -.input-large { - width: 210px; -} - -.input-xlarge { - width: 270px; -} - -.input-xxlarge { - width: 530px; -} - -input[class*="span"], -select[class*="span"], -textarea[class*="span"], -.uneditable-input[class*="span"], -.row-fluid input[class*="span"], -.row-fluid select[class*="span"], -.row-fluid textarea[class*="span"], -.row-fluid .uneditable-input[class*="span"] { - float: none; - margin-left: 0; -} - -.input-append input[class*="span"], -.input-append .uneditable-input[class*="span"], -.input-prepend input[class*="span"], -.input-prepend .uneditable-input[class*="span"], -.row-fluid input[class*="span"], -.row-fluid select[class*="span"], -.row-fluid textarea[class*="span"], -.row-fluid .uneditable-input[class*="span"], -.row-fluid .input-prepend [class*="span"], -.row-fluid .input-append [class*="span"] { - display: inline-block; -} - -input, -textarea, -.uneditable-input { - margin-left: 0; -} - -.controls-row [class*="span"] + [class*="span"] { - margin-left: 20px; -} - -input.span12, -textarea.span12, -.uneditable-input.span12 { - width: 926px; -} - -input.span11, -textarea.span11, -.uneditable-input.span11 { - width: 846px; -} - -input.span10, -textarea.span10, -.uneditable-input.span10 { - width: 766px; -} - -input.span9, -textarea.span9, -.uneditable-input.span9 { - width: 686px; -} - -input.span8, -textarea.span8, -.uneditable-input.span8 { - width: 606px; -} - -input.span7, -textarea.span7, -.uneditable-input.span7 { - width: 526px; -} - -input.span6, -textarea.span6, -.uneditable-input.span6 { - width: 446px; -} - -input.span5, -textarea.span5, -.uneditable-input.span5 { - width: 366px; -} - -input.span4, -textarea.span4, -.uneditable-input.span4 { - width: 286px; -} - -input.span3, -textarea.span3, -.uneditable-input.span3 { - width: 206px; -} - -input.span2, -textarea.span2, -.uneditable-input.span2 { - width: 126px; -} - -input.span1, -textarea.span1, -.uneditable-input.span1 { - width: 46px; -} - -.controls-row { - *zoom: 1; -} - -.controls-row:before, -.controls-row:after { - display: table; - line-height: 0; - content: ""; -} - -.controls-row:after { - clear: both; -} - -.controls-row [class*="span"], -.row-fluid .controls-row [class*="span"] { - float: left; -} - -.controls-row .checkbox[class*="span"], -.controls-row .radio[class*="span"] { - padding-top: 5px; -} - -input[disabled], -select[disabled], -textarea[disabled], -input[readonly], -select[readonly], -textarea[readonly] { - cursor: not-allowed; - background-color: #eeeeee; -} - -input[type="radio"][disabled], -input[type="checkbox"][disabled], -input[type="radio"][readonly], -input[type="checkbox"][readonly] { - background-color: transparent; -} - -.control-group.warning .control-label, -.control-group.warning .help-block, -.control-group.warning .help-inline { - color: #c09853; -} - -.control-group.warning .checkbox, -.control-group.warning .radio, -.control-group.warning input, -.control-group.warning select, -.control-group.warning textarea { - color: #c09853; -} - -.control-group.warning input, -.control-group.warning select, -.control-group.warning textarea { - border-color: #c09853; - -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); - -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); - box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); -} - -.control-group.warning input:focus, -.control-group.warning select:focus, -.control-group.warning textarea:focus { - border-color: #a47e3c; - -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #dbc59e; - -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #dbc59e; - box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #dbc59e; -} - -.control-group.warning .input-prepend .add-on, -.control-group.warning .input-append .add-on { - color: #c09853; - background-color: #fcf8e3; - border-color: #c09853; -} - -.control-group.error .control-label, -.control-group.error .help-block, -.control-group.error .help-inline { - color: #b94a48; -} - -.control-group.error .checkbox, -.control-group.error .radio, -.control-group.error input, -.control-group.error select, -.control-group.error textarea { - color: #b94a48; -} - -.control-group.error input, -.control-group.error select, -.control-group.error textarea { - border-color: #b94a48; - -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); - -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); - box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); -} - -.control-group.error input:focus, -.control-group.error select:focus, -.control-group.error textarea:focus { - border-color: #953b39; - -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #d59392; - -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #d59392; - box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #d59392; -} - -.control-group.error .input-prepend .add-on, -.control-group.error .input-append .add-on { - color: #b94a48; - background-color: #f2dede; - border-color: #b94a48; -} - -.control-group.success .control-label, -.control-group.success .help-block, -.control-group.success .help-inline { - color: #468847; -} - -.control-group.success .checkbox, -.control-group.success .radio, -.control-group.success input, -.control-group.success select, -.control-group.success textarea { - color: #468847; -} - -.control-group.success input, -.control-group.success select, -.control-group.success textarea { - border-color: #468847; - -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); - -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); - box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); -} - -.control-group.success input:focus, -.control-group.success select:focus, -.control-group.success textarea:focus { - border-color: #356635; - -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #7aba7b; - -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #7aba7b; - box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #7aba7b; -} - -.control-group.success .input-prepend .add-on, -.control-group.success .input-append .add-on { - color: #468847; - background-color: #dff0d8; - border-color: #468847; -} - -.control-group.info .control-label, -.control-group.info .help-block, -.control-group.info .help-inline { - color: #3a87ad; -} - -.control-group.info .checkbox, -.control-group.info .radio, -.control-group.info input, -.control-group.info select, -.control-group.info textarea { - color: #3a87ad; -} - -.control-group.info input, -.control-group.info select, -.control-group.info textarea { - border-color: #3a87ad; - -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); - -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); - box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); -} - -.control-group.info input:focus, -.control-group.info select:focus, -.control-group.info textarea:focus { - border-color: #2d6987; - -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #7ab5d3; - -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #7ab5d3; - box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #7ab5d3; -} - -.control-group.info .input-prepend .add-on, -.control-group.info .input-append .add-on { - color: #3a87ad; - background-color: #d9edf7; - border-color: #3a87ad; -} - -input:focus:invalid, -textarea:focus:invalid, -select:focus:invalid { - color: #b94a48; - border-color: #ee5f5b; -} - -input:focus:invalid:focus, -textarea:focus:invalid:focus, -select:focus:invalid:focus { - border-color: #e9322d; - -webkit-box-shadow: 0 0 6px #f8b9b7; - -moz-box-shadow: 0 0 6px #f8b9b7; - box-shadow: 0 0 6px #f8b9b7; -} - -.form-actions { - padding: 19px 20px 20px; - margin-top: 20px; - margin-bottom: 20px; - background-color: #f5f5f5; - border-top: 1px solid #e5e5e5; - *zoom: 1; -} - -.form-actions:before, -.form-actions:after { - display: table; - line-height: 0; - content: ""; -} - -.form-actions:after { - clear: both; -} - -.help-block, -.help-inline { - color: #595959; -} - -.help-block { - display: block; - margin-bottom: 10px; -} - -.help-inline { - display: inline-block; - *display: inline; - padding-left: 5px; - vertical-align: middle; - *zoom: 1; -} - -.input-append, -.input-prepend { - display: inline-block; - margin-bottom: 10px; - font-size: 0; - white-space: nowrap; - vertical-align: middle; -} - -.input-append input, -.input-prepend input, -.input-append select, -.input-prepend select, -.input-append .uneditable-input, -.input-prepend .uneditable-input, -.input-append .dropdown-menu, -.input-prepend .dropdown-menu, -.input-append .popover, -.input-prepend .popover { - font-size: 14px; -} - -.input-append input, -.input-prepend input, -.input-append select, -.input-prepend select, -.input-append .uneditable-input, -.input-prepend .uneditable-input { - position: relative; - margin-bottom: 0; - *margin-left: 0; - vertical-align: top; - -webkit-border-radius: 0 4px 4px 0; - -moz-border-radius: 0 4px 4px 0; - border-radius: 0 4px 4px 0; -} - -.input-append input:focus, -.input-prepend input:focus, -.input-append select:focus, -.input-prepend select:focus, -.input-append .uneditable-input:focus, -.input-prepend .uneditable-input:focus { - z-index: 2; -} - -.input-append .add-on, -.input-prepend .add-on { - display: inline-block; - width: auto; - height: 20px; - min-width: 16px; - padding: 4px 5px; - font-size: 14px; - font-weight: normal; - line-height: 20px; - text-align: center; - text-shadow: 0 1px 0 #ffffff; - background-color: #eeeeee; - border: 1px solid #ccc; -} - -.input-append .add-on, -.input-prepend .add-on, -.input-append .btn, -.input-prepend .btn, -.input-append .btn-group > .dropdown-toggle, -.input-prepend .btn-group > .dropdown-toggle { - vertical-align: top; - -webkit-border-radius: 0; - -moz-border-radius: 0; - border-radius: 0; -} - -.input-append .active, -.input-prepend .active { - background-color: #a9dba9; - border-color: #46a546; -} - -.input-prepend .add-on, -.input-prepend .btn { - margin-right: -1px; -} - -.input-prepend .add-on:first-child, -.input-prepend .btn:first-child { - -webkit-border-radius: 4px 0 0 4px; - -moz-border-radius: 4px 0 0 4px; - border-radius: 4px 0 0 4px; -} - -.input-append input, -.input-append select, -.input-append .uneditable-input { - -webkit-border-radius: 4px 0 0 4px; - -moz-border-radius: 4px 0 0 4px; - border-radius: 4px 0 0 4px; -} - -.input-append input + .btn-group .btn:last-child, -.input-append select + .btn-group .btn:last-child, -.input-append .uneditable-input + .btn-group .btn:last-child { - -webkit-border-radius: 0 4px 4px 0; - -moz-border-radius: 0 4px 4px 0; - border-radius: 0 4px 4px 0; -} - -.input-append .add-on, -.input-append .btn, -.input-append .btn-group { - margin-left: -1px; -} - -.input-append .add-on:last-child, -.input-append .btn:last-child, -.input-append .btn-group:last-child > .dropdown-toggle { - -webkit-border-radius: 0 4px 4px 0; - -moz-border-radius: 0 4px 4px 0; - border-radius: 0 4px 4px 0; -} - -.input-prepend.input-append input, -.input-prepend.input-append select, -.input-prepend.input-append .uneditable-input { - -webkit-border-radius: 0; - -moz-border-radius: 0; - border-radius: 0; -} - -.input-prepend.input-append input + .btn-group .btn, -.input-prepend.input-append select + .btn-group .btn, -.input-prepend.input-append .uneditable-input + .btn-group .btn { - -webkit-border-radius: 0 4px 4px 0; - -moz-border-radius: 0 4px 4px 0; - border-radius: 0 4px 4px 0; -} - -.input-prepend.input-append .add-on:first-child, -.input-prepend.input-append .btn:first-child { - margin-right: -1px; - -webkit-border-radius: 4px 0 0 4px; - -moz-border-radius: 4px 0 0 4px; - border-radius: 4px 0 0 4px; -} - -.input-prepend.input-append .add-on:last-child, -.input-prepend.input-append .btn:last-child { - margin-left: -1px; - -webkit-border-radius: 0 4px 4px 0; - -moz-border-radius: 0 4px 4px 0; - border-radius: 0 4px 4px 0; -} - -.input-prepend.input-append .btn-group:first-child { - margin-left: 0; -} - -input.search-query { - padding-right: 14px; - padding-right: 4px \9; - padding-left: 14px; - padding-left: 4px \9; - /* IE7-8 doesn't have border-radius, so don't indent the padding */ - - margin-bottom: 0; - -webkit-border-radius: 15px; - -moz-border-radius: 15px; - border-radius: 15px; -} - -/* Allow for input prepend/append in search forms */ - -.form-search .input-append .search-query, -.form-search .input-prepend .search-query { - -webkit-border-radius: 0; - -moz-border-radius: 0; - border-radius: 0; -} - -.form-search .input-append .search-query { - -webkit-border-radius: 14px 0 0 14px; - -moz-border-radius: 14px 0 0 14px; - border-radius: 14px 0 0 14px; -} - -.form-search .input-append .btn { - -webkit-border-radius: 0 14px 14px 0; - -moz-border-radius: 0 14px 14px 0; - border-radius: 0 14px 14px 0; -} - -.form-search .input-prepend .search-query { - -webkit-border-radius: 0 14px 14px 0; - -moz-border-radius: 0 14px 14px 0; - border-radius: 0 14px 14px 0; -} - -.form-search .input-prepend .btn { - -webkit-border-radius: 14px 0 0 14px; - -moz-border-radius: 14px 0 0 14px; - border-radius: 14px 0 0 14px; -} - -.form-search input, -.form-inline input, -.form-horizontal input, -.form-search textarea, -.form-inline textarea, -.form-horizontal textarea, -.form-search select, -.form-inline select, -.form-horizontal select, -.form-search .help-inline, -.form-inline .help-inline, -.form-horizontal .help-inline, -.form-search .uneditable-input, -.form-inline .uneditable-input, -.form-horizontal .uneditable-input, -.form-search .input-prepend, -.form-inline .input-prepend, -.form-horizontal .input-prepend, -.form-search .input-append, -.form-inline .input-append, -.form-horizontal .input-append { - display: inline-block; - *display: inline; - margin-bottom: 0; - vertical-align: middle; - *zoom: 1; -} - -.form-search .hide, -.form-inline .hide, -.form-horizontal .hide { - display: none; -} - -.form-search label, -.form-inline label, -.form-search .btn-group, -.form-inline .btn-group { - display: inline-block; -} - -.form-search .input-append, -.form-inline .input-append, -.form-search .input-prepend, -.form-inline .input-prepend { - margin-bottom: 0; -} - -.form-search .radio, -.form-search .checkbox, -.form-inline .radio, -.form-inline .checkbox { - padding-left: 0; - margin-bottom: 0; - vertical-align: middle; -} - -.form-search .radio input[type="radio"], -.form-search .checkbox input[type="checkbox"], -.form-inline .radio input[type="radio"], -.form-inline .checkbox input[type="checkbox"] { - float: left; - margin-right: 3px; - margin-left: 0; -} - -.control-group { - margin-bottom: 10px; -} - -legend + .control-group { - margin-top: 20px; - -webkit-margin-top-collapse: separate; -} - -.form-horizontal .control-group { - margin-bottom: 20px; - *zoom: 1; -} - -.form-horizontal .control-group:before, -.form-horizontal .control-group:after { - display: table; - line-height: 0; - content: ""; -} - -.form-horizontal .control-group:after { - clear: both; -} - -.form-horizontal .control-label { - float: left; - width: 160px; - padding-top: 5px; - text-align: right; -} - -.form-horizontal .controls { - *display: inline-block; - *padding-left: 20px; - margin-left: 180px; - *margin-left: 0; -} - -.form-horizontal .controls:first-child { - *padding-left: 180px; -} - -.form-horizontal .help-block { - margin-bottom: 0; -} - -.form-horizontal input + .help-block, -.form-horizontal select + .help-block, -.form-horizontal textarea + .help-block, -.form-horizontal .uneditable-input + .help-block, -.form-horizontal .input-prepend + .help-block, -.form-horizontal .input-append + .help-block { - margin-top: 10px; -} - -.form-horizontal .form-actions { - padding-left: 180px; -} - -table { - max-width: 100%; - background-color: transparent; - border-collapse: collapse; - border-spacing: 0; -} - -.table { - width: 100%; - margin-bottom: 20px; -} - -.table th, -.table td { - padding: 8px; - line-height: 20px; - text-align: left; - vertical-align: top; - border-top: 1px solid #dddddd; -} - -.table th { - font-weight: bold; -} - -.table thead th { - vertical-align: bottom; -} - -.table caption + thead tr:first-child th, -.table caption + thead tr:first-child td, -.table colgroup + thead tr:first-child th, -.table colgroup + thead tr:first-child td, -.table thead:first-child tr:first-child th, -.table thead:first-child tr:first-child td { - border-top: 0; -} - -.table tbody + tbody { - border-top: 2px solid #dddddd; -} - -.table .table { - background-color: #ffffff; -} - -.table-condensed th, -.table-condensed td { - padding: 4px 5px; -} - -.table-bordered { - border: 1px solid #dddddd; - border-collapse: separate; - *border-collapse: collapse; - border-left: 0; - -webkit-border-radius: 4px; - -moz-border-radius: 4px; - border-radius: 4px; -} - -.table-bordered th, -.table-bordered td { - border-left: 1px solid #dddddd; -} - -.table-bordered caption + thead tr:first-child th, -.table-bordered caption + tbody tr:first-child th, -.table-bordered caption + tbody tr:first-child td, -.table-bordered colgroup + thead tr:first-child th, -.table-bordered colgroup + tbody tr:first-child th, -.table-bordered colgroup + tbody tr:first-child td, -.table-bordered thead:first-child tr:first-child th, -.table-bordered tbody:first-child tr:first-child th, -.table-bordered tbody:first-child tr:first-child td { - border-top: 0; -} - -.table-bordered thead:first-child tr:first-child > th:first-child, -.table-bordered tbody:first-child tr:first-child > td:first-child, -.table-bordered tbody:first-child tr:first-child > th:first-child { - -webkit-border-top-left-radius: 4px; - border-top-left-radius: 4px; - -moz-border-radius-topleft: 4px; -} - -.table-bordered thead:first-child tr:first-child > th:last-child, -.table-bordered tbody:first-child tr:first-child > td:last-child, -.table-bordered tbody:first-child tr:first-child > th:last-child { - -webkit-border-top-right-radius: 4px; - border-top-right-radius: 4px; - -moz-border-radius-topright: 4px; -} - -.table-bordered thead:last-child tr:last-child > th:first-child, -.table-bordered tbody:last-child tr:last-child > td:first-child, -.table-bordered tbody:last-child tr:last-child > th:first-child, -.table-bordered tfoot:last-child tr:last-child > td:first-child, -.table-bordered tfoot:last-child tr:last-child > th:first-child { - -webkit-border-bottom-left-radius: 4px; - border-bottom-left-radius: 4px; - -moz-border-radius-bottomleft: 4px; -} - -.table-bordered thead:last-child tr:last-child > th:last-child, -.table-bordered tbody:last-child tr:last-child > td:last-child, -.table-bordered tbody:last-child tr:last-child > th:last-child, -.table-bordered tfoot:last-child tr:last-child > td:last-child, -.table-bordered tfoot:last-child tr:last-child > th:last-child { - -webkit-border-bottom-right-radius: 4px; - border-bottom-right-radius: 4px; - -moz-border-radius-bottomright: 4px; -} - -.table-bordered tfoot + tbody:last-child tr:last-child td:first-child { - -webkit-border-bottom-left-radius: 0; - border-bottom-left-radius: 0; - -moz-border-radius-bottomleft: 0; -} - -.table-bordered tfoot + tbody:last-child tr:last-child td:last-child { - -webkit-border-bottom-right-radius: 0; - border-bottom-right-radius: 0; - -moz-border-radius-bottomright: 0; -} - -.table-bordered caption + thead tr:first-child th:first-child, -.table-bordered caption + tbody tr:first-child td:first-child, -.table-bordered colgroup + thead tr:first-child th:first-child, -.table-bordered colgroup + tbody tr:first-child td:first-child { - -webkit-border-top-left-radius: 4px; - border-top-left-radius: 4px; - -moz-border-radius-topleft: 4px; -} - -.table-bordered caption + thead tr:first-child th:last-child, -.table-bordered caption + tbody tr:first-child td:last-child, -.table-bordered colgroup + thead tr:first-child th:last-child, -.table-bordered colgroup + tbody tr:first-child td:last-child { - -webkit-border-top-right-radius: 4px; - border-top-right-radius: 4px; - -moz-border-radius-topright: 4px; -} - -.table-striped tbody > tr:nth-child(odd) > td, -.table-striped tbody > tr:nth-child(odd) > th { - background-color: #f9f9f9; -} - -.table-hover tbody tr:hover > td, -.table-hover tbody tr:hover > th { - background-color: #f5f5f5; -} - -table td[class*="span"], -table th[class*="span"], -.row-fluid table td[class*="span"], -.row-fluid table th[class*="span"] { - display: table-cell; - float: none; - margin-left: 0; -} - -.table td.span1, -.table th.span1 { - float: none; - width: 44px; - margin-left: 0; -} - -.table td.span2, -.table th.span2 { - float: none; - width: 124px; - margin-left: 0; -} - -.table td.span3, -.table th.span3 { - float: none; - width: 204px; - margin-left: 0; -} - -.table td.span4, -.table th.span4 { - float: none; - width: 284px; - margin-left: 0; -} - -.table td.span5, -.table th.span5 { - float: none; - width: 364px; - margin-left: 0; -} - -.table td.span6, -.table th.span6 { - float: none; - width: 444px; - margin-left: 0; -} - -.table td.span7, -.table th.span7 { - float: none; - width: 524px; - margin-left: 0; -} - -.table td.span8, -.table th.span8 { - float: none; - width: 604px; - margin-left: 0; -} - -.table td.span9, -.table th.span9 { - float: none; - width: 684px; - margin-left: 0; -} - -.table td.span10, -.table th.span10 { - float: none; - width: 764px; - margin-left: 0; -} - -.table td.span11, -.table th.span11 { - float: none; - width: 844px; - margin-left: 0; -} - -.table td.span12, -.table th.span12 { - float: none; - width: 924px; - margin-left: 0; -} - -.table tbody tr.success > td { - background-color: #dff0d8; -} - -.table tbody tr.error > td { - background-color: #f2dede; -} - -.table tbody tr.warning > td { - background-color: #fcf8e3; -} - -.table tbody tr.info > td { - background-color: #d9edf7; -} - -.table-hover tbody tr.success:hover > td { - background-color: #d0e9c6; -} - -.table-hover tbody tr.error:hover > td { - background-color: #ebcccc; -} - -.table-hover tbody tr.warning:hover > td { - background-color: #faf2cc; -} - -.table-hover tbody tr.info:hover > td { - background-color: #c4e3f3; -} - -[class^="icon-"], -[class*=" icon-"] { - display: inline-block; - width: 14px; - height: 14px; - margin-top: 1px; - *margin-right: .3em; - line-height: 14px; - vertical-align: text-top; - background-image: url("../img/glyphicons-halflings.png"); - background-position: 14px 14px; - background-repeat: no-repeat; -} - -/* White icons with optional class, or on hover/focus/active states of certain elements */ - -.icon-white, -.nav-pills > .active > a > [class^="icon-"], -.nav-pills > .active > a > [class*=" icon-"], -.nav-list > .active > a > [class^="icon-"], -.nav-list > .active > a > [class*=" icon-"], -.navbar-inverse .nav > .active > a > [class^="icon-"], -.navbar-inverse .nav > .active > a > [class*=" icon-"], -.dropdown-menu > li > a:hover > [class^="icon-"], -.dropdown-menu > li > a:focus > [class^="icon-"], -.dropdown-menu > li > a:hover > [class*=" icon-"], -.dropdown-menu > li > a:focus > [class*=" icon-"], -.dropdown-menu > .active > a > [class^="icon-"], -.dropdown-menu > .active > a > [class*=" icon-"], -.dropdown-submenu:hover > a > [class^="icon-"], -.dropdown-submenu:focus > a > [class^="icon-"], -.dropdown-submenu:hover > a > [class*=" icon-"], -.dropdown-submenu:focus > a > [class*=" icon-"] { - background-image: url("../img/glyphicons-halflings-white.png"); -} - -.icon-glass { - background-position: 0 0; -} - -.icon-music { - background-position: -24px 0; -} - -.icon-search { - background-position: -48px 0; -} - -.icon-envelope { - background-position: -72px 0; -} - -.icon-heart { - background-position: -96px 0; -} - -.icon-star { - background-position: -120px 0; -} - -.icon-star-empty { - background-position: -144px 0; -} - -.icon-user { - background-position: -168px 0; -} - -.icon-film { - background-position: -192px 0; -} - -.icon-th-large { - background-position: -216px 0; -} - -.icon-th { - background-position: -240px 0; -} - -.icon-th-list { - background-position: -264px 0; -} - -.icon-ok { - background-position: -288px 0; -} - -.icon-remove { - background-position: -312px 0; -} - -.icon-zoom-in { - background-position: -336px 0; -} - -.icon-zoom-out { - background-position: -360px 0; -} - -.icon-off { - background-position: -384px 0; -} - -.icon-signal { - background-position: -408px 0; -} - -.icon-cog { - background-position: -432px 0; -} - -.icon-trash { - background-position: -456px 0; -} - -.icon-home { - background-position: 0 -24px; -} - -.icon-file { - background-position: -24px -24px; -} - -.icon-time { - background-position: -48px -24px; -} - -.icon-road { - background-position: -72px -24px; -} - -.icon-download-alt { - background-position: -96px -24px; -} - -.icon-download { - background-position: -120px -24px; -} - -.icon-upload { - background-position: -144px -24px; -} - -.icon-inbox { - background-position: -168px -24px; -} - -.icon-play-circle { - background-position: -192px -24px; -} - -.icon-repeat { - background-position: -216px -24px; -} - -.icon-refresh { - background-position: -240px -24px; -} - -.icon-list-alt { - background-position: -264px -24px; -} - -.icon-lock { - background-position: -287px -24px; -} - -.icon-flag { - background-position: -312px -24px; -} - -.icon-headphones { - background-position: -336px -24px; -} - -.icon-volume-off { - background-position: -360px -24px; -} - -.icon-volume-down { - background-position: -384px -24px; -} - -.icon-volume-up { - background-position: -408px -24px; -} - -.icon-qrcode { - background-position: -432px -24px; -} - -.icon-barcode { - background-position: -456px -24px; -} - -.icon-tag { - background-position: 0 -48px; -} - -.icon-tags { - background-position: -25px -48px; -} - -.icon-book { - background-position: -48px -48px; -} - -.icon-bookmark { - background-position: -72px -48px; -} - -.icon-print { - background-position: -96px -48px; -} - -.icon-camera { - background-position: -120px -48px; -} - -.icon-font { - background-position: -144px -48px; -} - -.icon-bold { - background-position: -167px -48px; -} - -.icon-italic { - background-position: -192px -48px; -} - -.icon-text-height { - background-position: -216px -48px; -} - -.icon-text-width { - background-position: -240px -48px; -} - -.icon-align-left { - background-position: -264px -48px; -} - -.icon-align-center { - background-position: -288px -48px; -} - -.icon-align-right { - background-position: -312px -48px; -} - -.icon-align-justify { - background-position: -336px -48px; -} - -.icon-list { - background-position: -360px -48px; -} - -.icon-indent-left { - background-position: -384px -48px; -} - -.icon-indent-right { - background-position: -408px -48px; -} - -.icon-facetime-video { - background-position: -432px -48px; -} - -.icon-picture { - background-position: -456px -48px; -} - -.icon-pencil { - background-position: 0 -72px; -} - -.icon-map-marker { - background-position: -24px -72px; -} - -.icon-adjust { - background-position: -48px -72px; -} - -.icon-tint { - background-position: -72px -72px; -} - -.icon-edit { - background-position: -96px -72px; -} - -.icon-share { - background-position: -120px -72px; -} - -.icon-check { - background-position: -144px -72px; -} - -.icon-move { - background-position: -168px -72px; -} - -.icon-step-backward { - background-position: -192px -72px; -} - -.icon-fast-backward { - background-position: -216px -72px; -} - -.icon-backward { - background-position: -240px -72px; -} - -.icon-play { - background-position: -264px -72px; -} - -.icon-pause { - background-position: -288px -72px; -} - -.icon-stop { - background-position: -312px -72px; -} - -.icon-forward { - background-position: -336px -72px; -} - -.icon-fast-forward { - background-position: -360px -72px; -} - -.icon-step-forward { - background-position: -384px -72px; -} - -.icon-eject { - background-position: -408px -72px; -} - -.icon-chevron-left { - background-position: -432px -72px; -} - -.icon-chevron-right { - background-position: -456px -72px; -} - -.icon-plus-sign { - background-position: 0 -96px; -} - -.icon-minus-sign { - background-position: -24px -96px; -} - -.icon-remove-sign { - background-position: -48px -96px; -} - -.icon-ok-sign { - background-position: -72px -96px; -} - -.icon-question-sign { - background-position: -96px -96px; -} - -.icon-info-sign { - background-position: -120px -96px; -} - -.icon-screenshot { - background-position: -144px -96px; -} - -.icon-remove-circle { - background-position: -168px -96px; -} - -.icon-ok-circle { - background-position: -192px -96px; -} - -.icon-ban-circle { - background-position: -216px -96px; -} - -.icon-arrow-left { - background-position: -240px -96px; -} - -.icon-arrow-right { - background-position: -264px -96px; -} - -.icon-arrow-up { - background-position: -289px -96px; -} - -.icon-arrow-down { - background-position: -312px -96px; -} - -.icon-share-alt { - background-position: -336px -96px; -} - -.icon-resize-full { - background-position: -360px -96px; -} - -.icon-resize-small { - background-position: -384px -96px; -} - -.icon-plus { - background-position: -408px -96px; -} - -.icon-minus { - background-position: -433px -96px; -} - -.icon-asterisk { - background-position: -456px -96px; -} - -.icon-exclamation-sign { - background-position: 0 -120px; -} - -.icon-gift { - background-position: -24px -120px; -} - -.icon-leaf { - background-position: -48px -120px; -} - -.icon-fire { - background-position: -72px -120px; -} - -.icon-eye-open { - background-position: -96px -120px; -} - -.icon-eye-close { - background-position: -120px -120px; -} - -.icon-warning-sign { - background-position: -144px -120px; -} - -.icon-plane { - background-position: -168px -120px; -} - -.icon-calendar { - background-position: -192px -120px; -} - -.icon-random { - width: 16px; - background-position: -216px -120px; -} - -.icon-comment { - background-position: -240px -120px; -} - -.icon-magnet { - background-position: -264px -120px; -} - -.icon-chevron-up { - background-position: -288px -120px; -} - -.icon-chevron-down { - background-position: -313px -119px; -} - -.icon-retweet { - background-position: -336px -120px; -} - -.icon-shopping-cart { - background-position: -360px -120px; -} - -.icon-folder-close { - width: 16px; - background-position: -384px -120px; -} - -.icon-folder-open { - width: 16px; - background-position: -408px -120px; -} - -.icon-resize-vertical { - background-position: -432px -119px; -} - -.icon-resize-horizontal { - background-position: -456px -118px; -} - -.icon-hdd { - background-position: 0 -144px; -} - -.icon-bullhorn { - background-position: -24px -144px; -} - -.icon-bell { - background-position: -48px -144px; -} - -.icon-certificate { - background-position: -72px -144px; -} - -.icon-thumbs-up { - background-position: -96px -144px; -} - -.icon-thumbs-down { - background-position: -120px -144px; -} - -.icon-hand-right { - background-position: -144px -144px; -} - -.icon-hand-left { - background-position: -168px -144px; -} - -.icon-hand-up { - background-position: -192px -144px; -} - -.icon-hand-down { - background-position: -216px -144px; -} - -.icon-circle-arrow-right { - background-position: -240px -144px; -} - -.icon-circle-arrow-left { - background-position: -264px -144px; -} - -.icon-circle-arrow-up { - background-position: -288px -144px; -} - -.icon-circle-arrow-down { - background-position: -312px -144px; -} - -.icon-globe { - background-position: -336px -144px; -} - -.icon-wrench { - background-position: -360px -144px; -} - -.icon-tasks { - background-position: -384px -144px; -} - -.icon-filter { - background-position: -408px -144px; -} - -.icon-briefcase { - background-position: -432px -144px; -} - -.icon-fullscreen { - background-position: -456px -144px; -} - -.dropup, -.dropdown { - position: relative; -} - -.dropdown-toggle { - *margin-bottom: -3px; -} - -.dropdown-toggle:active, -.open .dropdown-toggle { - outline: 0; -} - -.caret { - display: inline-block; - width: 0; - height: 0; - vertical-align: top; - border-top: 4px solid #000000; - border-right: 4px solid transparent; - border-left: 4px solid transparent; - content: ""; -} - -.dropdown .caret { - margin-top: 8px; - margin-left: 2px; -} - -.dropdown-menu { - position: absolute; - top: 100%; - left: 0; - z-index: 1000; - display: none; - float: left; - min-width: 160px; - padding: 5px 0; - margin: 2px 0 0; - list-style: none; - background-color: #ffffff; - border: 1px solid #ccc; - border: 1px solid rgba(0, 0, 0, 0.2); - *border-right-width: 2px; - *border-bottom-width: 2px; - -webkit-border-radius: 6px; - -moz-border-radius: 6px; - border-radius: 6px; - -webkit-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2); - -moz-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2); - box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2); - -webkit-background-clip: padding-box; - -moz-background-clip: padding; - background-clip: padding-box; -} - -.dropdown-menu.pull-right { - right: 0; - left: auto; -} - -.dropdown-menu .divider { - *width: 100%; - height: 1px; - margin: 9px 1px; - *margin: -5px 0 5px; - overflow: hidden; - background-color: #e5e5e5; - border-bottom: 1px solid #ffffff; -} - -.dropdown-menu > li > a { - display: block; - padding: 3px 20px; - clear: both; - font-weight: normal; - line-height: 20px; - color: #333333; - white-space: nowrap; -} - -.dropdown-menu > li > a:hover, -.dropdown-menu > li > a:focus, -.dropdown-submenu:hover > a, -.dropdown-submenu:focus > a { - color: #ffffff; - text-decoration: none; - background-color: #0081c2; - background-image: -moz-linear-gradient(top, #0088cc, #0077b3); - background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#0088cc), to(#0077b3)); - background-image: -webkit-linear-gradient(top, #0088cc, #0077b3); - background-image: -o-linear-gradient(top, #0088cc, #0077b3); - background-image: linear-gradient(to bottom, #0088cc, #0077b3); - background-repeat: repeat-x; - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0088cc', endColorstr='#ff0077b3', GradientType=0); -} - -.dropdown-menu > .active > a, -.dropdown-menu > .active > a:hover, -.dropdown-menu > .active > a:focus { - color: #ffffff; - text-decoration: none; - background-color: #0081c2; - background-image: -moz-linear-gradient(top, #0088cc, #0077b3); - background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#0088cc), to(#0077b3)); - background-image: -webkit-linear-gradient(top, #0088cc, #0077b3); - background-image: -o-linear-gradient(top, #0088cc, #0077b3); - background-image: linear-gradient(to bottom, #0088cc, #0077b3); - background-repeat: repeat-x; - outline: 0; - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0088cc', endColorstr='#ff0077b3', GradientType=0); -} - -.dropdown-menu > .disabled > a, -.dropdown-menu > .disabled > a:hover, -.dropdown-menu > .disabled > a:focus { - color: #999999; -} - -.dropdown-menu > .disabled > a:hover, -.dropdown-menu > .disabled > a:focus { - text-decoration: none; - cursor: default; - background-color: transparent; - background-image: none; - filter: progid:DXImageTransform.Microsoft.gradient(enabled=false); -} - -.open { - *z-index: 1000; -} - -.open > .dropdown-menu { - display: block; -} - -.dropdown-backdrop { - position: fixed; - top: 0; - right: 0; - bottom: 0; - left: 0; - z-index: 990; -} - -.pull-right > .dropdown-menu { - right: 0; - left: auto; -} - -.dropup .caret, -.navbar-fixed-bottom .dropdown .caret { - border-top: 0; - border-bottom: 4px solid #000000; - content: ""; -} - -.dropup .dropdown-menu, -.navbar-fixed-bottom .dropdown .dropdown-menu { - top: auto; - bottom: 100%; - margin-bottom: 1px; -} - -.dropdown-submenu { - position: relative; -} - -.dropdown-submenu > .dropdown-menu { - top: 0; - left: 100%; - margin-top: -6px; - margin-left: -1px; - -webkit-border-radius: 0 6px 6px 6px; - -moz-border-radius: 0 6px 6px 6px; - border-radius: 0 6px 6px 6px; -} - -.dropdown-submenu:hover > .dropdown-menu { - display: block; -} - -.dropup .dropdown-submenu > .dropdown-menu { - top: auto; - bottom: 0; - margin-top: 0; - margin-bottom: -2px; - -webkit-border-radius: 5px 5px 5px 0; - -moz-border-radius: 5px 5px 5px 0; - border-radius: 5px 5px 5px 0; -} - -.dropdown-submenu > a:after { - display: block; - float: right; - width: 0; - height: 0; - margin-top: 5px; - margin-right: -10px; - border-color: transparent; - border-left-color: #cccccc; - border-style: solid; - border-width: 5px 0 5px 5px; - content: " "; -} - -.dropdown-submenu:hover > a:after { - border-left-color: #ffffff; -} - -.dropdown-submenu.pull-left { - float: none; -} - -.dropdown-submenu.pull-left > .dropdown-menu { - left: -100%; - margin-left: 10px; - -webkit-border-radius: 6px 0 6px 6px; - -moz-border-radius: 6px 0 6px 6px; - border-radius: 6px 0 6px 6px; -} - -.dropdown .dropdown-menu .nav-header { - padding-right: 20px; - padding-left: 20px; -} - -.typeahead { - z-index: 1051; - margin-top: 2px; - -webkit-border-radius: 4px; - -moz-border-radius: 4px; - border-radius: 4px; -} - -.well { - min-height: 20px; - padding: 19px; - margin-bottom: 20px; - background-color: #f5f5f5; - border: 1px solid #e3e3e3; - -webkit-border-radius: 4px; - -moz-border-radius: 4px; - border-radius: 4px; - -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05); - -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05); - box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05); -} - -.well blockquote { - border-color: #ddd; - border-color: rgba(0, 0, 0, 0.15); -} - -.well-large { - padding: 24px; - -webkit-border-radius: 6px; - -moz-border-radius: 6px; - border-radius: 6px; -} - -.well-small { - padding: 9px; - -webkit-border-radius: 3px; - -moz-border-radius: 3px; - border-radius: 3px; -} - -.fade { - opacity: 0; - -webkit-transition: opacity 0.15s linear; - -moz-transition: opacity 0.15s linear; - -o-transition: opacity 0.15s linear; - transition: opacity 0.15s linear; -} - -.fade.in { - opacity: 1; -} - -.collapse { - position: relative; - height: 0; - overflow: hidden; - -webkit-transition: height 0.35s ease; - -moz-transition: height 0.35s ease; - -o-transition: height 0.35s ease; - transition: height 0.35s ease; -} - -.collapse.in { - height: auto; -} - -.close { - float: right; - font-size: 20px; - font-weight: bold; - line-height: 20px; - color: #000000; - text-shadow: 0 1px 0 #ffffff; - opacity: 0.2; - filter: alpha(opacity=20); -} - -.close:hover, -.close:focus { - color: #000000; - text-decoration: none; - cursor: pointer; - opacity: 0.4; - filter: alpha(opacity=40); -} - -button.close { - padding: 0; - cursor: pointer; - background: transparent; - border: 0; - -webkit-appearance: none; -} - -.btn { - display: inline-block; - *display: inline; - padding: 4px 12px; - margin-bottom: 0; - *margin-left: .3em; - font-size: 14px; - line-height: 20px; - color: #333333; - text-align: center; - text-shadow: 0 1px 1px rgba(255, 255, 255, 0.75); - vertical-align: middle; - cursor: pointer; - background-color: #f5f5f5; - *background-color: #e6e6e6; - background-image: -moz-linear-gradient(top, #ffffff, #e6e6e6); - background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), to(#e6e6e6)); - background-image: -webkit-linear-gradient(top, #ffffff, #e6e6e6); - background-image: -o-linear-gradient(top, #ffffff, #e6e6e6); - background-image: linear-gradient(to bottom, #ffffff, #e6e6e6); - background-repeat: repeat-x; - border: 1px solid #cccccc; - *border: 0; - border-color: #e6e6e6 #e6e6e6 #bfbfbf; - border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); - border-bottom-color: #b3b3b3; - -webkit-border-radius: 4px; - -moz-border-radius: 4px; - border-radius: 4px; - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#ffe6e6e6', GradientType=0); - filter: progid:DXImageTransform.Microsoft.gradient(enabled=false); - *zoom: 1; - -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05); - -moz-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05); - box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05); -} - -.btn:hover, -.btn:focus, -.btn:active, -.btn.active, -.btn.disabled, -.btn[disabled] { - color: #333333; - background-color: #e6e6e6; - *background-color: #d9d9d9; -} - -.btn:active, -.btn.active { - background-color: #cccccc \9; -} - -.btn:first-child { - *margin-left: 0; -} - -.btn:hover, -.btn:focus { - color: #333333; - text-decoration: none; - background-position: 0 -15px; - -webkit-transition: background-position 0.1s linear; - -moz-transition: background-position 0.1s linear; - -o-transition: background-position 0.1s linear; - transition: background-position 0.1s linear; -} - -.btn:focus { - outline: thin dotted #333; - outline: 5px auto -webkit-focus-ring-color; - outline-offset: -2px; -} - -.btn.active, -.btn:active { - background-image: none; - outline: 0; - -webkit-box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05); - -moz-box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05); - box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05); -} - -.btn.disabled, -.btn[disabled] { - cursor: default; - background-image: none; - opacity: 0.65; - filter: alpha(opacity=65); - -webkit-box-shadow: none; - -moz-box-shadow: none; - box-shadow: none; -} - -.btn-large { - padding: 11px 19px; - font-size: 17.5px; - -webkit-border-radius: 6px; - -moz-border-radius: 6px; - border-radius: 6px; -} - -.btn-large [class^="icon-"], -.btn-large [class*=" icon-"] { - margin-top: 4px; -} - -.btn-small { - padding: 2px 10px; - font-size: 11.9px; - -webkit-border-radius: 3px; - -moz-border-radius: 3px; - border-radius: 3px; -} - -.btn-small [class^="icon-"], -.btn-small [class*=" icon-"] { - margin-top: 0; -} - -.btn-mini [class^="icon-"], -.btn-mini [class*=" icon-"] { - margin-top: -1px; -} - -.btn-mini { - padding: 0 6px; - font-size: 10.5px; - -webkit-border-radius: 3px; - -moz-border-radius: 3px; - border-radius: 3px; -} - -.btn-block { - display: block; - width: 100%; - padding-right: 0; - padding-left: 0; - -webkit-box-sizing: border-box; - -moz-box-sizing: border-box; - box-sizing: border-box; -} - -.btn-block + .btn-block { - margin-top: 5px; -} - -input[type="submit"].btn-block, -input[type="reset"].btn-block, -input[type="button"].btn-block { - width: 100%; -} - -.btn-primary.active, -.btn-warning.active, -.btn-danger.active, -.btn-success.active, -.btn-info.active, -.btn-inverse.active { - color: rgba(255, 255, 255, 0.75); -} - -.btn-primary { - color: #ffffff; - text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); - background-color: #006dcc; - *background-color: #0044cc; - background-image: -moz-linear-gradient(top, #0088cc, #0044cc); - background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#0088cc), to(#0044cc)); - background-image: -webkit-linear-gradient(top, #0088cc, #0044cc); - background-image: -o-linear-gradient(top, #0088cc, #0044cc); - background-image: linear-gradient(to bottom, #0088cc, #0044cc); - background-repeat: repeat-x; - border-color: #0044cc #0044cc #002a80; - border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0088cc', endColorstr='#ff0044cc', GradientType=0); - filter: progid:DXImageTransform.Microsoft.gradient(enabled=false); -} - -.btn-primary:hover, -.btn-primary:focus, -.btn-primary:active, -.btn-primary.active, -.btn-primary.disabled, -.btn-primary[disabled] { - color: #ffffff; - background-color: #0044cc; - *background-color: #003bb3; -} - -.btn-primary:active, -.btn-primary.active { - background-color: #003399 \9; -} - -.btn-warning { - color: #ffffff; - text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); - background-color: #faa732; - *background-color: #f89406; - background-image: -moz-linear-gradient(top, #fbb450, #f89406); - background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#fbb450), to(#f89406)); - background-image: -webkit-linear-gradient(top, #fbb450, #f89406); - background-image: -o-linear-gradient(top, #fbb450, #f89406); - background-image: linear-gradient(to bottom, #fbb450, #f89406); - background-repeat: repeat-x; - border-color: #f89406 #f89406 #ad6704; - border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffbb450', endColorstr='#fff89406', GradientType=0); - filter: progid:DXImageTransform.Microsoft.gradient(enabled=false); -} - -.btn-warning:hover, -.btn-warning:focus, -.btn-warning:active, -.btn-warning.active, -.btn-warning.disabled, -.btn-warning[disabled] { - color: #ffffff; - background-color: #f89406; - *background-color: #df8505; -} - -.btn-warning:active, -.btn-warning.active { - background-color: #c67605 \9; -} - -.btn-danger { - color: #ffffff; - text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); - background-color: #da4f49; - *background-color: #bd362f; - background-image: -moz-linear-gradient(top, #ee5f5b, #bd362f); - background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ee5f5b), to(#bd362f)); - background-image: -webkit-linear-gradient(top, #ee5f5b, #bd362f); - background-image: -o-linear-gradient(top, #ee5f5b, #bd362f); - background-image: linear-gradient(to bottom, #ee5f5b, #bd362f); - background-repeat: repeat-x; - border-color: #bd362f #bd362f #802420; - border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffee5f5b', endColorstr='#ffbd362f', GradientType=0); - filter: progid:DXImageTransform.Microsoft.gradient(enabled=false); -} - -.btn-danger:hover, -.btn-danger:focus, -.btn-danger:active, -.btn-danger.active, -.btn-danger.disabled, -.btn-danger[disabled] { - color: #ffffff; - background-color: #bd362f; - *background-color: #a9302a; -} - -.btn-danger:active, -.btn-danger.active { - background-color: #942a25 \9; -} - -.btn-success { - color: #ffffff; - text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); - background-color: #5bb75b; - *background-color: #51a351; - background-image: -moz-linear-gradient(top, #62c462, #51a351); - background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#62c462), to(#51a351)); - background-image: -webkit-linear-gradient(top, #62c462, #51a351); - background-image: -o-linear-gradient(top, #62c462, #51a351); - background-image: linear-gradient(to bottom, #62c462, #51a351); - background-repeat: repeat-x; - border-color: #51a351 #51a351 #387038; - border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff62c462', endColorstr='#ff51a351', GradientType=0); - filter: progid:DXImageTransform.Microsoft.gradient(enabled=false); -} - -.btn-success:hover, -.btn-success:focus, -.btn-success:active, -.btn-success.active, -.btn-success.disabled, -.btn-success[disabled] { - color: #ffffff; - background-color: #51a351; - *background-color: #499249; -} - -.btn-success:active, -.btn-success.active { - background-color: #408140 \9; -} - -.btn-info { - color: #ffffff; - text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); - background-color: #49afcd; - *background-color: #2f96b4; - background-image: -moz-linear-gradient(top, #5bc0de, #2f96b4); - background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#5bc0de), to(#2f96b4)); - background-image: -webkit-linear-gradient(top, #5bc0de, #2f96b4); - background-image: -o-linear-gradient(top, #5bc0de, #2f96b4); - background-image: linear-gradient(to bottom, #5bc0de, #2f96b4); - background-repeat: repeat-x; - border-color: #2f96b4 #2f96b4 #1f6377; - border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff2f96b4', GradientType=0); - filter: progid:DXImageTransform.Microsoft.gradient(enabled=false); -} - -.btn-info:hover, -.btn-info:focus, -.btn-info:active, -.btn-info.active, -.btn-info.disabled, -.btn-info[disabled] { - color: #ffffff; - background-color: #2f96b4; - *background-color: #2a85a0; -} - -.btn-info:active, -.btn-info.active { - background-color: #24748c \9; -} - -.btn-inverse { - color: #ffffff; - text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); - background-color: #363636; - *background-color: #222222; - background-image: -moz-linear-gradient(top, #444444, #222222); - background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#444444), to(#222222)); - background-image: -webkit-linear-gradient(top, #444444, #222222); - background-image: -o-linear-gradient(top, #444444, #222222); - background-image: linear-gradient(to bottom, #444444, #222222); - background-repeat: repeat-x; - border-color: #222222 #222222 #000000; - border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff444444', endColorstr='#ff222222', GradientType=0); - filter: progid:DXImageTransform.Microsoft.gradient(enabled=false); -} - -.btn-inverse:hover, -.btn-inverse:focus, -.btn-inverse:active, -.btn-inverse.active, -.btn-inverse.disabled, -.btn-inverse[disabled] { - color: #ffffff; - background-color: #222222; - *background-color: #151515; -} - -.btn-inverse:active, -.btn-inverse.active { - background-color: #080808 \9; -} - -button.btn, -input[type="submit"].btn { - *padding-top: 3px; - *padding-bottom: 3px; -} - -button.btn::-moz-focus-inner, -input[type="submit"].btn::-moz-focus-inner { - padding: 0; - border: 0; -} - -button.btn.btn-large, -input[type="submit"].btn.btn-large { - *padding-top: 7px; - *padding-bottom: 7px; -} - -button.btn.btn-small, -input[type="submit"].btn.btn-small { - *padding-top: 3px; - *padding-bottom: 3px; -} - -button.btn.btn-mini, -input[type="submit"].btn.btn-mini { - *padding-top: 1px; - *padding-bottom: 1px; -} - -.btn-link, -.btn-link:active, -.btn-link[disabled] { - background-color: transparent; - background-image: none; - -webkit-box-shadow: none; - -moz-box-shadow: none; - box-shadow: none; -} - -.btn-link { - color: #0088cc; - cursor: pointer; - border-color: transparent; - -webkit-border-radius: 0; - -moz-border-radius: 0; - border-radius: 0; -} - -.btn-link:hover, -.btn-link:focus { - color: #005580; - text-decoration: underline; - background-color: transparent; -} - -.btn-link[disabled]:hover, -.btn-link[disabled]:focus { - color: #333333; - text-decoration: none; -} - -.btn-group { - position: relative; - display: inline-block; - *display: inline; - *margin-left: .3em; - font-size: 0; - white-space: nowrap; - vertical-align: middle; - *zoom: 1; -} - -.btn-group:first-child { - *margin-left: 0; -} - -.btn-group + .btn-group { - margin-left: 5px; -} - -.btn-toolbar { - margin-top: 10px; - margin-bottom: 10px; - font-size: 0; -} - -.btn-toolbar > .btn + .btn, -.btn-toolbar > .btn-group + .btn, -.btn-toolbar > .btn + .btn-group { - margin-left: 5px; -} - -.btn-group > .btn { - position: relative; - -webkit-border-radius: 0; - -moz-border-radius: 0; - border-radius: 0; -} - -.btn-group > .btn + .btn { - margin-left: -1px; -} - -.btn-group > .btn, -.btn-group > .dropdown-menu, -.btn-group > .popover { - font-size: 14px; -} - -.btn-group > .btn-mini { - font-size: 10.5px; -} - -.btn-group > .btn-small { - font-size: 11.9px; -} - -.btn-group > .btn-large { - font-size: 17.5px; -} - -.btn-group > .btn:first-child { - margin-left: 0; - -webkit-border-bottom-left-radius: 4px; - border-bottom-left-radius: 4px; - -webkit-border-top-left-radius: 4px; - border-top-left-radius: 4px; - -moz-border-radius-bottomleft: 4px; - -moz-border-radius-topleft: 4px; -} - -.btn-group > .btn:last-child, -.btn-group > .dropdown-toggle { - -webkit-border-top-right-radius: 4px; - border-top-right-radius: 4px; - -webkit-border-bottom-right-radius: 4px; - border-bottom-right-radius: 4px; - -moz-border-radius-topright: 4px; - -moz-border-radius-bottomright: 4px; -} - -.btn-group > .btn.large:first-child { - margin-left: 0; - -webkit-border-bottom-left-radius: 6px; - border-bottom-left-radius: 6px; - -webkit-border-top-left-radius: 6px; - border-top-left-radius: 6px; - -moz-border-radius-bottomleft: 6px; - -moz-border-radius-topleft: 6px; -} - -.btn-group > .btn.large:last-child, -.btn-group > .large.dropdown-toggle { - -webkit-border-top-right-radius: 6px; - border-top-right-radius: 6px; - -webkit-border-bottom-right-radius: 6px; - border-bottom-right-radius: 6px; - -moz-border-radius-topright: 6px; - -moz-border-radius-bottomright: 6px; -} - -.btn-group > .btn:hover, -.btn-group > .btn:focus, -.btn-group > .btn:active, -.btn-group > .btn.active { - z-index: 2; -} - -.btn-group .dropdown-toggle:active, -.btn-group.open .dropdown-toggle { - outline: 0; -} - -.btn-group > .btn + .dropdown-toggle { - *padding-top: 5px; - padding-right: 8px; - *padding-bottom: 5px; - padding-left: 8px; - -webkit-box-shadow: inset 1px 0 0 rgba(255, 255, 255, 0.125), inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05); - -moz-box-shadow: inset 1px 0 0 rgba(255, 255, 255, 0.125), inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05); - box-shadow: inset 1px 0 0 rgba(255, 255, 255, 0.125), inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05); -} - -.btn-group > .btn-mini + .dropdown-toggle { - *padding-top: 2px; - padding-right: 5px; - *padding-bottom: 2px; - padding-left: 5px; -} - -.btn-group > .btn-small + .dropdown-toggle { - *padding-top: 5px; - *padding-bottom: 4px; -} - -.btn-group > .btn-large + .dropdown-toggle { - *padding-top: 7px; - padding-right: 12px; - *padding-bottom: 7px; - padding-left: 12px; -} - -.btn-group.open .dropdown-toggle { - background-image: none; - -webkit-box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05); - -moz-box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05); - box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05); -} - -.btn-group.open .btn.dropdown-toggle { - background-color: #e6e6e6; -} - -.btn-group.open .btn-primary.dropdown-toggle { - background-color: #0044cc; -} - -.btn-group.open .btn-warning.dropdown-toggle { - background-color: #f89406; -} - -.btn-group.open .btn-danger.dropdown-toggle { - background-color: #bd362f; -} - -.btn-group.open .btn-success.dropdown-toggle { - background-color: #51a351; -} - -.btn-group.open .btn-info.dropdown-toggle { - background-color: #2f96b4; -} - -.btn-group.open .btn-inverse.dropdown-toggle { - background-color: #222222; -} - -.btn .caret { - margin-top: 8px; - margin-left: 0; -} - -.btn-large .caret { - margin-top: 6px; -} - -.btn-large .caret { - border-top-width: 5px; - border-right-width: 5px; - border-left-width: 5px; -} - -.btn-mini .caret, -.btn-small .caret { - margin-top: 8px; -} - -.dropup .btn-large .caret { - border-bottom-width: 5px; -} - -.btn-primary .caret, -.btn-warning .caret, -.btn-danger .caret, -.btn-info .caret, -.btn-success .caret, -.btn-inverse .caret { - border-top-color: #ffffff; - border-bottom-color: #ffffff; -} - -.btn-group-vertical { - display: inline-block; - *display: inline; - /* IE7 inline-block hack */ - - *zoom: 1; -} - -.btn-group-vertical > .btn { - display: block; - float: none; - max-width: 100%; - -webkit-border-radius: 0; - -moz-border-radius: 0; - border-radius: 0; -} - -.btn-group-vertical > .btn + .btn { - margin-top: -1px; - margin-left: 0; -} - -.btn-group-vertical > .btn:first-child { - -webkit-border-radius: 4px 4px 0 0; - -moz-border-radius: 4px 4px 0 0; - border-radius: 4px 4px 0 0; -} - -.btn-group-vertical > .btn:last-child { - -webkit-border-radius: 0 0 4px 4px; - -moz-border-radius: 0 0 4px 4px; - border-radius: 0 0 4px 4px; -} - -.btn-group-vertical > .btn-large:first-child { - -webkit-border-radius: 6px 6px 0 0; - -moz-border-radius: 6px 6px 0 0; - border-radius: 6px 6px 0 0; -} - -.btn-group-vertical > .btn-large:last-child { - -webkit-border-radius: 0 0 6px 6px; - -moz-border-radius: 0 0 6px 6px; - border-radius: 0 0 6px 6px; -} - -.alert { - padding: 8px 35px 8px 14px; - margin-bottom: 20px; - text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5); - background-color: #fcf8e3; - border: 1px solid #fbeed5; - -webkit-border-radius: 4px; - -moz-border-radius: 4px; - border-radius: 4px; -} - -.alert, -.alert h4 { - color: #c09853; -} - -.alert h4 { - margin: 0; -} - -.alert .close { - position: relative; - top: -2px; - right: -21px; - line-height: 20px; -} - -.alert-success { - color: #468847; - background-color: #dff0d8; - border-color: #d6e9c6; -} - -.alert-success h4 { - color: #468847; -} - -.alert-danger, -.alert-error { - color: #b94a48; - background-color: #f2dede; - border-color: #eed3d7; -} - -.alert-danger h4, -.alert-error h4 { - color: #b94a48; -} - -.alert-info { - color: #3a87ad; - background-color: #d9edf7; - border-color: #bce8f1; -} - -.alert-info h4 { - color: #3a87ad; -} - -.alert-block { - padding-top: 14px; - padding-bottom: 14px; -} - -.alert-block > p, -.alert-block > ul { - margin-bottom: 0; -} - -.alert-block p + p { - margin-top: 5px; -} - -.nav { - margin-bottom: 20px; - margin-left: 0; - list-style: none; -} - -.nav > li > a { - display: block; -} - -.nav > li > a:hover, -.nav > li > a:focus { - text-decoration: none; - background-color: #eeeeee; -} - -.nav > li > a > img { - max-width: none; -} - -.nav > .pull-right { - float: right; -} - -.nav-header { - display: block; - padding: 3px 15px; - font-size: 11px; - font-weight: bold; - line-height: 20px; - color: #999999; - text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5); - text-transform: uppercase; -} - -.nav li + .nav-header { - margin-top: 9px; -} - -.nav-list { - padding-right: 15px; - padding-left: 15px; - margin-bottom: 0; -} - -.nav-list > li > a, -.nav-list .nav-header { - margin-right: -15px; - margin-left: -15px; - text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5); -} - -.nav-list > li > a { - padding: 3px 15px; -} - -.nav-list > .active > a, -.nav-list > .active > a:hover, -.nav-list > .active > a:focus { - color: #ffffff; - text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.2); - background-color: #0088cc; -} - -.nav-list [class^="icon-"], -.nav-list [class*=" icon-"] { - margin-right: 2px; -} - -.nav-list .divider { - *width: 100%; - height: 1px; - margin: 9px 1px; - *margin: -5px 0 5px; - overflow: hidden; - background-color: #e5e5e5; - border-bottom: 1px solid #ffffff; -} - -.nav-tabs, -.nav-pills { - *zoom: 1; -} - -.nav-tabs:before, -.nav-pills:before, -.nav-tabs:after, -.nav-pills:after { - display: table; - line-height: 0; - content: ""; -} - -.nav-tabs:after, -.nav-pills:after { - clear: both; -} - -.nav-tabs > li, -.nav-pills > li { - float: left; -} - -.nav-tabs > li > a, -.nav-pills > li > a { - padding-right: 12px; - padding-left: 12px; - margin-right: 2px; - line-height: 14px; -} - -.nav-tabs { - border-bottom: 1px solid #ddd; -} - -.nav-tabs > li { - margin-bottom: -1px; -} - -.nav-tabs > li > a { - padding-top: 8px; - padding-bottom: 8px; - line-height: 20px; - border: 1px solid transparent; - -webkit-border-radius: 4px 4px 0 0; - -moz-border-radius: 4px 4px 0 0; - border-radius: 4px 4px 0 0; -} - -.nav-tabs > li > a:hover, -.nav-tabs > li > a:focus { - border-color: #eeeeee #eeeeee #dddddd; -} - -.nav-tabs > .active > a, -.nav-tabs > .active > a:hover, -.nav-tabs > .active > a:focus { - color: #555555; - cursor: default; - background-color: #ffffff; - border: 1px solid #ddd; - border-bottom-color: transparent; -} - -.nav-pills > li > a { - padding-top: 8px; - padding-bottom: 8px; - margin-top: 2px; - margin-bottom: 2px; - -webkit-border-radius: 5px; - -moz-border-radius: 5px; - border-radius: 5px; -} - -.nav-pills > .active > a, -.nav-pills > .active > a:hover, -.nav-pills > .active > a:focus { - color: #ffffff; - background-color: #0088cc; -} - -.nav-stacked > li { - float: none; -} - -.nav-stacked > li > a { - margin-right: 0; -} - -.nav-tabs.nav-stacked { - border-bottom: 0; -} - -.nav-tabs.nav-stacked > li > a { - border: 1px solid #ddd; - -webkit-border-radius: 0; - -moz-border-radius: 0; - border-radius: 0; -} - -.nav-tabs.nav-stacked > li:first-child > a { - -webkit-border-top-right-radius: 4px; - border-top-right-radius: 4px; - -webkit-border-top-left-radius: 4px; - border-top-left-radius: 4px; - -moz-border-radius-topright: 4px; - -moz-border-radius-topleft: 4px; -} - -.nav-tabs.nav-stacked > li:last-child > a { - -webkit-border-bottom-right-radius: 4px; - border-bottom-right-radius: 4px; - -webkit-border-bottom-left-radius: 4px; - border-bottom-left-radius: 4px; - -moz-border-radius-bottomright: 4px; - -moz-border-radius-bottomleft: 4px; -} - -.nav-tabs.nav-stacked > li > a:hover, -.nav-tabs.nav-stacked > li > a:focus { - z-index: 2; - border-color: #ddd; -} - -.nav-pills.nav-stacked > li > a { - margin-bottom: 3px; -} - -.nav-pills.nav-stacked > li:last-child > a { - margin-bottom: 1px; -} - -.nav-tabs .dropdown-menu { - -webkit-border-radius: 0 0 6px 6px; - -moz-border-radius: 0 0 6px 6px; - border-radius: 0 0 6px 6px; -} - -.nav-pills .dropdown-menu { - -webkit-border-radius: 6px; - -moz-border-radius: 6px; - border-radius: 6px; -} - -.nav .dropdown-toggle .caret { - margin-top: 6px; - border-top-color: #0088cc; - border-bottom-color: #0088cc; -} - -.nav .dropdown-toggle:hover .caret, -.nav .dropdown-toggle:focus .caret { - border-top-color: #005580; - border-bottom-color: #005580; -} - -/* move down carets for tabs */ - -.nav-tabs .dropdown-toggle .caret { - margin-top: 8px; -} - -.nav .active .dropdown-toggle .caret { - border-top-color: #fff; - border-bottom-color: #fff; -} - -.nav-tabs .active .dropdown-toggle .caret { - border-top-color: #555555; - border-bottom-color: #555555; -} - -.nav > .dropdown.active > a:hover, -.nav > .dropdown.active > a:focus { - cursor: pointer; -} - -.nav-tabs .open .dropdown-toggle, -.nav-pills .open .dropdown-toggle, -.nav > li.dropdown.open.active > a:hover, -.nav > li.dropdown.open.active > a:focus { - color: #ffffff; - background-color: #999999; - border-color: #999999; -} - -.nav li.dropdown.open .caret, -.nav li.dropdown.open.active .caret, -.nav li.dropdown.open a:hover .caret, -.nav li.dropdown.open a:focus .caret { - border-top-color: #ffffff; - border-bottom-color: #ffffff; - opacity: 1; - filter: alpha(opacity=100); -} - -.tabs-stacked .open > a:hover, -.tabs-stacked .open > a:focus { - border-color: #999999; -} - -.tabbable { - *zoom: 1; -} - -.tabbable:before, -.tabbable:after { - display: table; - line-height: 0; - content: ""; -} - -.tabbable:after { - clear: both; -} - -.tab-content { - overflow: auto; -} - -.tabs-below > .nav-tabs, -.tabs-right > .nav-tabs, -.tabs-left > .nav-tabs { - border-bottom: 0; -} - -.tab-content > .tab-pane, -.pill-content > .pill-pane { - display: none; -} - -.tab-content > .active, -.pill-content > .active { - display: block; -} - -.tabs-below > .nav-tabs { - border-top: 1px solid #ddd; -} - -.tabs-below > .nav-tabs > li { - margin-top: -1px; - margin-bottom: 0; -} - -.tabs-below > .nav-tabs > li > a { - -webkit-border-radius: 0 0 4px 4px; - -moz-border-radius: 0 0 4px 4px; - border-radius: 0 0 4px 4px; -} - -.tabs-below > .nav-tabs > li > a:hover, -.tabs-below > .nav-tabs > li > a:focus { - border-top-color: #ddd; - border-bottom-color: transparent; -} - -.tabs-below > .nav-tabs > .active > a, -.tabs-below > .nav-tabs > .active > a:hover, -.tabs-below > .nav-tabs > .active > a:focus { - border-color: transparent #ddd #ddd #ddd; -} - -.tabs-left > .nav-tabs > li, -.tabs-right > .nav-tabs > li { - float: none; -} - -.tabs-left > .nav-tabs > li > a, -.tabs-right > .nav-tabs > li > a { - min-width: 74px; - margin-right: 0; - margin-bottom: 3px; -} - -.tabs-left > .nav-tabs { - float: left; - margin-right: 19px; - border-right: 1px solid #ddd; -} - -.tabs-left > .nav-tabs > li > a { - margin-right: -1px; - -webkit-border-radius: 4px 0 0 4px; - -moz-border-radius: 4px 0 0 4px; - border-radius: 4px 0 0 4px; -} - -.tabs-left > .nav-tabs > li > a:hover, -.tabs-left > .nav-tabs > li > a:focus { - border-color: #eeeeee #dddddd #eeeeee #eeeeee; -} - -.tabs-left > .nav-tabs .active > a, -.tabs-left > .nav-tabs .active > a:hover, -.tabs-left > .nav-tabs .active > a:focus { - border-color: #ddd transparent #ddd #ddd; - *border-right-color: #ffffff; -} - -.tabs-right > .nav-tabs { - float: right; - margin-left: 19px; - border-left: 1px solid #ddd; -} - -.tabs-right > .nav-tabs > li > a { - margin-left: -1px; - -webkit-border-radius: 0 4px 4px 0; - -moz-border-radius: 0 4px 4px 0; - border-radius: 0 4px 4px 0; -} - -.tabs-right > .nav-tabs > li > a:hover, -.tabs-right > .nav-tabs > li > a:focus { - border-color: #eeeeee #eeeeee #eeeeee #dddddd; -} - -.tabs-right > .nav-tabs .active > a, -.tabs-right > .nav-tabs .active > a:hover, -.tabs-right > .nav-tabs .active > a:focus { - border-color: #ddd #ddd #ddd transparent; - *border-left-color: #ffffff; -} - -.nav > .disabled > a { - color: #999999; -} - -.nav > .disabled > a:hover, -.nav > .disabled > a:focus { - text-decoration: none; - cursor: default; - background-color: transparent; -} - -.navbar { - *position: relative; - *z-index: 2; - margin-bottom: 20px; - overflow: visible; -} - -.navbar-inner { - min-height: 40px; - padding-right: 20px; - padding-left: 20px; - background-color: #fafafa; - background-image: -moz-linear-gradient(top, #ffffff, #f2f2f2); - background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), to(#f2f2f2)); - background-image: -webkit-linear-gradient(top, #ffffff, #f2f2f2); - background-image: -o-linear-gradient(top, #ffffff, #f2f2f2); - background-image: linear-gradient(to bottom, #ffffff, #f2f2f2); - background-repeat: repeat-x; - border: 1px solid #d4d4d4; - -webkit-border-radius: 4px; - -moz-border-radius: 4px; - border-radius: 4px; - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#fff2f2f2', GradientType=0); - *zoom: 1; - -webkit-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.065); - -moz-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.065); - box-shadow: 0 1px 4px rgba(0, 0, 0, 0.065); -} - -.navbar-inner:before, -.navbar-inner:after { - display: table; - line-height: 0; - content: ""; -} - -.navbar-inner:after { - clear: both; -} - -.navbar .container { - width: auto; -} - -.nav-collapse.collapse { - height: auto; - overflow: visible; -} - -.navbar .brand { - display: block; - float: left; - padding: 10px 20px 10px; - margin-left: -20px; - font-size: 20px; - font-weight: 200; - color: #777777; - text-shadow: 0 1px 0 #ffffff; -} - -.navbar .brand:hover, -.navbar .brand:focus { - text-decoration: none; -} - -.navbar-text { - margin-bottom: 0; - line-height: 40px; - color: #777777; -} - -.navbar-link { - color: #777777; -} - -.navbar-link:hover, -.navbar-link:focus { - color: #333333; -} - -.navbar .divider-vertical { - height: 40px; - margin: 0 9px; - border-right: 1px solid #ffffff; - border-left: 1px solid #f2f2f2; -} - -.navbar .btn, -.navbar .btn-group { - margin-top: 5px; -} - -.navbar .btn-group .btn, -.navbar .input-prepend .btn, -.navbar .input-append .btn, -.navbar .input-prepend .btn-group, -.navbar .input-append .btn-group { - margin-top: 0; -} - -.navbar-form { - margin-bottom: 0; - *zoom: 1; -} - -.navbar-form:before, -.navbar-form:after { - display: table; - line-height: 0; - content: ""; -} - -.navbar-form:after { - clear: both; -} - -.navbar-form input, -.navbar-form select, -.navbar-form .radio, -.navbar-form .checkbox { - margin-top: 5px; -} - -.navbar-form input, -.navbar-form select, -.navbar-form .btn { - display: inline-block; - margin-bottom: 0; -} - -.navbar-form input[type="image"], -.navbar-form input[type="checkbox"], -.navbar-form input[type="radio"] { - margin-top: 3px; -} - -.navbar-form .input-append, -.navbar-form .input-prepend { - margin-top: 5px; - white-space: nowrap; -} - -.navbar-form .input-append input, -.navbar-form .input-prepend input { - margin-top: 0; -} - -.navbar-search { - position: relative; - float: left; - margin-top: 5px; - margin-bottom: 0; -} - -.navbar-search .search-query { - padding: 4px 14px; - margin-bottom: 0; - font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; - font-size: 13px; - font-weight: normal; - line-height: 1; - -webkit-border-radius: 15px; - -moz-border-radius: 15px; - border-radius: 15px; -} - -.navbar-static-top { - position: static; - margin-bottom: 0; -} - -.navbar-static-top .navbar-inner { - -webkit-border-radius: 0; - -moz-border-radius: 0; - border-radius: 0; -} - -.navbar-fixed-top, -.navbar-fixed-bottom { - position: fixed; - right: 0; - left: 0; - z-index: 1030; - margin-bottom: 0; -} - -.navbar-fixed-top .navbar-inner, -.navbar-static-top .navbar-inner { - border-width: 0 0 1px; -} - -.navbar-fixed-bottom .navbar-inner { - border-width: 1px 0 0; -} - -.navbar-fixed-top .navbar-inner, -.navbar-fixed-bottom .navbar-inner { - padding-right: 0; - padding-left: 0; - -webkit-border-radius: 0; - -moz-border-radius: 0; - border-radius: 0; -} - -.navbar-static-top .container, -.navbar-fixed-top .container, -.navbar-fixed-bottom .container { - width: 940px; -} - -.navbar-fixed-top { - top: 0; -} - -.navbar-fixed-top .navbar-inner, -.navbar-static-top .navbar-inner { - -webkit-box-shadow: 0 1px 10px rgba(0, 0, 0, 0.1); - -moz-box-shadow: 0 1px 10px rgba(0, 0, 0, 0.1); - box-shadow: 0 1px 10px rgba(0, 0, 0, 0.1); -} - -.navbar-fixed-bottom { - bottom: 0; -} - -.navbar-fixed-bottom .navbar-inner { - -webkit-box-shadow: 0 -1px 10px rgba(0, 0, 0, 0.1); - -moz-box-shadow: 0 -1px 10px rgba(0, 0, 0, 0.1); - box-shadow: 0 -1px 10px rgba(0, 0, 0, 0.1); -} - -.navbar .nav { - position: relative; - left: 0; - display: block; - float: left; - margin: 0 10px 0 0; -} - -.navbar .nav.pull-right { - float: right; - margin-right: 0; -} - -.navbar .nav > li { - float: left; -} - -.navbar .nav > li > a { - float: none; - padding: 10px 15px 10px; - color: #777777; - text-decoration: none; - text-shadow: 0 1px 0 #ffffff; -} - -.navbar .nav .dropdown-toggle .caret { - margin-top: 8px; -} - -.navbar .nav > li > a:focus, -.navbar .nav > li > a:hover { - color: #333333; - text-decoration: none; - background-color: transparent; -} - -.navbar .nav > .active > a, -.navbar .nav > .active > a:hover, -.navbar .nav > .active > a:focus { - color: #555555; - text-decoration: none; - background-color: #e5e5e5; - -webkit-box-shadow: inset 0 3px 8px rgba(0, 0, 0, 0.125); - -moz-box-shadow: inset 0 3px 8px rgba(0, 0, 0, 0.125); - box-shadow: inset 0 3px 8px rgba(0, 0, 0, 0.125); -} - -.navbar .btn-navbar { - display: none; - float: right; - padding: 7px 10px; - margin-right: 5px; - margin-left: 5px; - color: #ffffff; - text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); - background-color: #ededed; - *background-color: #e5e5e5; - background-image: -moz-linear-gradient(top, #f2f2f2, #e5e5e5); - background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#f2f2f2), to(#e5e5e5)); - background-image: -webkit-linear-gradient(top, #f2f2f2, #e5e5e5); - background-image: -o-linear-gradient(top, #f2f2f2, #e5e5e5); - background-image: linear-gradient(to bottom, #f2f2f2, #e5e5e5); - background-repeat: repeat-x; - border-color: #e5e5e5 #e5e5e5 #bfbfbf; - border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2f2f2', endColorstr='#ffe5e5e5', GradientType=0); - filter: progid:DXImageTransform.Microsoft.gradient(enabled=false); - -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.075); - -moz-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.075); - box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.075); -} - -.navbar .btn-navbar:hover, -.navbar .btn-navbar:focus, -.navbar .btn-navbar:active, -.navbar .btn-navbar.active, -.navbar .btn-navbar.disabled, -.navbar .btn-navbar[disabled] { - color: #ffffff; - background-color: #e5e5e5; - *background-color: #d9d9d9; -} - -.navbar .btn-navbar:active, -.navbar .btn-navbar.active { - background-color: #cccccc \9; -} - -.navbar .btn-navbar .icon-bar { - display: block; - width: 18px; - height: 2px; - background-color: #f5f5f5; - -webkit-border-radius: 1px; - -moz-border-radius: 1px; - border-radius: 1px; - -webkit-box-shadow: 0 1px 0 rgba(0, 0, 0, 0.25); - -moz-box-shadow: 0 1px 0 rgba(0, 0, 0, 0.25); - box-shadow: 0 1px 0 rgba(0, 0, 0, 0.25); -} - -.btn-navbar .icon-bar + .icon-bar { - margin-top: 3px; -} - -.navbar .nav > li > .dropdown-menu:before { - position: absolute; - top: -7px; - left: 9px; - display: inline-block; - border-right: 7px solid transparent; - border-bottom: 7px solid #ccc; - border-left: 7px solid transparent; - border-bottom-color: rgba(0, 0, 0, 0.2); - content: ''; -} - -.navbar .nav > li > .dropdown-menu:after { - position: absolute; - top: -6px; - left: 10px; - display: inline-block; - border-right: 6px solid transparent; - border-bottom: 6px solid #ffffff; - border-left: 6px solid transparent; - content: ''; -} - -.navbar-fixed-bottom .nav > li > .dropdown-menu:before { - top: auto; - bottom: -7px; - border-top: 7px solid #ccc; - border-bottom: 0; - border-top-color: rgba(0, 0, 0, 0.2); -} - -.navbar-fixed-bottom .nav > li > .dropdown-menu:after { - top: auto; - bottom: -6px; - border-top: 6px solid #ffffff; - border-bottom: 0; -} - -.navbar .nav li.dropdown > a:hover .caret, -.navbar .nav li.dropdown > a:focus .caret { - border-top-color: #333333; - border-bottom-color: #333333; -} - -.navbar .nav li.dropdown.open > .dropdown-toggle, -.navbar .nav li.dropdown.active > .dropdown-toggle, -.navbar .nav li.dropdown.open.active > .dropdown-toggle { - color: #555555; - background-color: #e5e5e5; -} - -.navbar .nav li.dropdown > .dropdown-toggle .caret { - border-top-color: #777777; - border-bottom-color: #777777; -} - -.navbar .nav li.dropdown.open > .dropdown-toggle .caret, -.navbar .nav li.dropdown.active > .dropdown-toggle .caret, -.navbar .nav li.dropdown.open.active > .dropdown-toggle .caret { - border-top-color: #555555; - border-bottom-color: #555555; -} - -.navbar .pull-right > li > .dropdown-menu, -.navbar .nav > li > .dropdown-menu.pull-right { - right: 0; - left: auto; -} - -.navbar .pull-right > li > .dropdown-menu:before, -.navbar .nav > li > .dropdown-menu.pull-right:before { - right: 12px; - left: auto; -} - -.navbar .pull-right > li > .dropdown-menu:after, -.navbar .nav > li > .dropdown-menu.pull-right:after { - right: 13px; - left: auto; -} - -.navbar .pull-right > li > .dropdown-menu .dropdown-menu, -.navbar .nav > li > .dropdown-menu.pull-right .dropdown-menu { - right: 100%; - left: auto; - margin-right: -1px; - margin-left: 0; - -webkit-border-radius: 6px 0 6px 6px; - -moz-border-radius: 6px 0 6px 6px; - border-radius: 6px 0 6px 6px; -} - -.navbar-inverse .navbar-inner { - background-color: #1b1b1b; - background-image: -moz-linear-gradient(top, #222222, #111111); - background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#222222), to(#111111)); - background-image: -webkit-linear-gradient(top, #222222, #111111); - background-image: -o-linear-gradient(top, #222222, #111111); - background-image: linear-gradient(to bottom, #222222, #111111); - background-repeat: repeat-x; - border-color: #252525; - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff222222', endColorstr='#ff111111', GradientType=0); -} - -.navbar-inverse .brand, -.navbar-inverse .nav > li > a { - color: #999999; - text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); -} - -.navbar-inverse .brand:hover, -.navbar-inverse .nav > li > a:hover, -.navbar-inverse .brand:focus, -.navbar-inverse .nav > li > a:focus { - color: #ffffff; -} - -.navbar-inverse .brand { - color: #999999; -} - -.navbar-inverse .navbar-text { - color: #999999; -} - -.navbar-inverse .nav > li > a:focus, -.navbar-inverse .nav > li > a:hover { - color: #ffffff; - background-color: transparent; -} - -.navbar-inverse .nav .active > a, -.navbar-inverse .nav .active > a:hover, -.navbar-inverse .nav .active > a:focus { - color: #ffffff; - background-color: #111111; -} - -.navbar-inverse .navbar-link { - color: #999999; -} - -.navbar-inverse .navbar-link:hover, -.navbar-inverse .navbar-link:focus { - color: #ffffff; -} - -.navbar-inverse .divider-vertical { - border-right-color: #222222; - border-left-color: #111111; -} - -.navbar-inverse .nav li.dropdown.open > .dropdown-toggle, -.navbar-inverse .nav li.dropdown.active > .dropdown-toggle, -.navbar-inverse .nav li.dropdown.open.active > .dropdown-toggle { - color: #ffffff; - background-color: #111111; -} - -.navbar-inverse .nav li.dropdown > a:hover .caret, -.navbar-inverse .nav li.dropdown > a:focus .caret { - border-top-color: #ffffff; - border-bottom-color: #ffffff; -} - -.navbar-inverse .nav li.dropdown > .dropdown-toggle .caret { - border-top-color: #999999; - border-bottom-color: #999999; -} - -.navbar-inverse .nav li.dropdown.open > .dropdown-toggle .caret, -.navbar-inverse .nav li.dropdown.active > .dropdown-toggle .caret, -.navbar-inverse .nav li.dropdown.open.active > .dropdown-toggle .caret { - border-top-color: #ffffff; - border-bottom-color: #ffffff; -} - -.navbar-inverse .navbar-search .search-query { - color: #ffffff; - background-color: #515151; - border-color: #111111; - -webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1), 0 1px 0 rgba(255, 255, 255, 0.15); - -moz-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1), 0 1px 0 rgba(255, 255, 255, 0.15); - box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1), 0 1px 0 rgba(255, 255, 255, 0.15); - -webkit-transition: none; - -moz-transition: none; - -o-transition: none; - transition: none; -} - -.navbar-inverse .navbar-search .search-query:-moz-placeholder { - color: #cccccc; -} - -.navbar-inverse .navbar-search .search-query:-ms-input-placeholder { - color: #cccccc; -} - -.navbar-inverse .navbar-search .search-query::-webkit-input-placeholder { - color: #cccccc; -} - -.navbar-inverse .navbar-search .search-query:focus, -.navbar-inverse .navbar-search .search-query.focused { - padding: 5px 15px; - color: #333333; - text-shadow: 0 1px 0 #ffffff; - background-color: #ffffff; - border: 0; - outline: 0; - -webkit-box-shadow: 0 0 3px rgba(0, 0, 0, 0.15); - -moz-box-shadow: 0 0 3px rgba(0, 0, 0, 0.15); - box-shadow: 0 0 3px rgba(0, 0, 0, 0.15); -} - -.navbar-inverse .btn-navbar { - color: #ffffff; - text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); - background-color: #0e0e0e; - *background-color: #040404; - background-image: -moz-linear-gradient(top, #151515, #040404); - background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#151515), to(#040404)); - background-image: -webkit-linear-gradient(top, #151515, #040404); - background-image: -o-linear-gradient(top, #151515, #040404); - background-image: linear-gradient(to bottom, #151515, #040404); - background-repeat: repeat-x; - border-color: #040404 #040404 #000000; - border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff151515', endColorstr='#ff040404', GradientType=0); - filter: progid:DXImageTransform.Microsoft.gradient(enabled=false); -} - -.navbar-inverse .btn-navbar:hover, -.navbar-inverse .btn-navbar:focus, -.navbar-inverse .btn-navbar:active, -.navbar-inverse .btn-navbar.active, -.navbar-inverse .btn-navbar.disabled, -.navbar-inverse .btn-navbar[disabled] { - color: #ffffff; - background-color: #040404; - *background-color: #000000; -} - -.navbar-inverse .btn-navbar:active, -.navbar-inverse .btn-navbar.active { - background-color: #000000 \9; -} - -.breadcrumb { - padding: 8px 15px; - margin: 0 0 20px; - list-style: none; - background-color: #f5f5f5; - -webkit-border-radius: 4px; - -moz-border-radius: 4px; - border-radius: 4px; -} - -.breadcrumb > li { - display: inline-block; - *display: inline; - text-shadow: 0 1px 0 #ffffff; - *zoom: 1; -} - -.breadcrumb > li > .divider { - padding: 0 5px; - color: #ccc; -} - -.breadcrumb > .active { - color: #999999; -} - -.pagination { - margin: 20px 0; -} - -.pagination ul { - display: inline-block; - *display: inline; - margin-bottom: 0; - margin-left: 0; - -webkit-border-radius: 4px; - -moz-border-radius: 4px; - border-radius: 4px; - *zoom: 1; - -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05); - -moz-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05); - box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05); -} - -.pagination ul > li { - display: inline; -} - -.pagination ul > li > a, -.pagination ul > li > span { - float: left; - padding: 4px 12px; - line-height: 20px; - text-decoration: none; - background-color: #ffffff; - border: 1px solid #dddddd; - border-left-width: 0; -} - -.pagination ul > li > a:hover, -.pagination ul > li > a:focus, -.pagination ul > .active > a, -.pagination ul > .active > span { - background-color: #f5f5f5; -} - -.pagination ul > .active > a, -.pagination ul > .active > span { - color: #999999; - cursor: default; -} - -.pagination ul > .disabled > span, -.pagination ul > .disabled > a, -.pagination ul > .disabled > a:hover, -.pagination ul > .disabled > a:focus { - color: #999999; - cursor: default; - background-color: transparent; -} - -.pagination ul > li:first-child > a, -.pagination ul > li:first-child > span { - border-left-width: 1px; - -webkit-border-bottom-left-radius: 4px; - border-bottom-left-radius: 4px; - -webkit-border-top-left-radius: 4px; - border-top-left-radius: 4px; - -moz-border-radius-bottomleft: 4px; - -moz-border-radius-topleft: 4px; -} - -.pagination ul > li:last-child > a, -.pagination ul > li:last-child > span { - -webkit-border-top-right-radius: 4px; - border-top-right-radius: 4px; - -webkit-border-bottom-right-radius: 4px; - border-bottom-right-radius: 4px; - -moz-border-radius-topright: 4px; - -moz-border-radius-bottomright: 4px; -} - -.pagination-centered { - text-align: center; -} - -.pagination-right { - text-align: right; -} - -.pagination-large ul > li > a, -.pagination-large ul > li > span { - padding: 11px 19px; - font-size: 17.5px; -} - -.pagination-large ul > li:first-child > a, -.pagination-large ul > li:first-child > span { - -webkit-border-bottom-left-radius: 6px; - border-bottom-left-radius: 6px; - -webkit-border-top-left-radius: 6px; - border-top-left-radius: 6px; - -moz-border-radius-bottomleft: 6px; - -moz-border-radius-topleft: 6px; -} - -.pagination-large ul > li:last-child > a, -.pagination-large ul > li:last-child > span { - -webkit-border-top-right-radius: 6px; - border-top-right-radius: 6px; - -webkit-border-bottom-right-radius: 6px; - border-bottom-right-radius: 6px; - -moz-border-radius-topright: 6px; - -moz-border-radius-bottomright: 6px; -} - -.pagination-mini ul > li:first-child > a, -.pagination-small ul > li:first-child > a, -.pagination-mini ul > li:first-child > span, -.pagination-small ul > li:first-child > span { - -webkit-border-bottom-left-radius: 3px; - border-bottom-left-radius: 3px; - -webkit-border-top-left-radius: 3px; - border-top-left-radius: 3px; - -moz-border-radius-bottomleft: 3px; - -moz-border-radius-topleft: 3px; -} - -.pagination-mini ul > li:last-child > a, -.pagination-small ul > li:last-child > a, -.pagination-mini ul > li:last-child > span, -.pagination-small ul > li:last-child > span { - -webkit-border-top-right-radius: 3px; - border-top-right-radius: 3px; - -webkit-border-bottom-right-radius: 3px; - border-bottom-right-radius: 3px; - -moz-border-radius-topright: 3px; - -moz-border-radius-bottomright: 3px; -} - -.pagination-small ul > li > a, -.pagination-small ul > li > span { - padding: 2px 10px; - font-size: 11.9px; -} - -.pagination-mini ul > li > a, -.pagination-mini ul > li > span { - padding: 0 6px; - font-size: 10.5px; -} - -.pager { - margin: 20px 0; - text-align: center; - list-style: none; - *zoom: 1; -} - -.pager:before, -.pager:after { - display: table; - line-height: 0; - content: ""; -} - -.pager:after { - clear: both; -} - -.pager li { - display: inline; -} - -.pager li > a, -.pager li > span { - display: inline-block; - padding: 5px 14px; - background-color: #fff; - border: 1px solid #ddd; - -webkit-border-radius: 15px; - -moz-border-radius: 15px; - border-radius: 15px; -} - -.pager li > a:hover, -.pager li > a:focus { - text-decoration: none; - background-color: #f5f5f5; -} - -.pager .next > a, -.pager .next > span { - float: right; -} - -.pager .previous > a, -.pager .previous > span { - float: left; -} - -.pager .disabled > a, -.pager .disabled > a:hover, -.pager .disabled > a:focus, -.pager .disabled > span { - color: #999999; - cursor: default; - background-color: #fff; -} - -.modal-backdrop { - position: fixed; - top: 0; - right: 0; - bottom: 0; - left: 0; - z-index: 1040; - background-color: #000000; -} - -.modal-backdrop.fade { - opacity: 0; -} - -.modal-backdrop, -.modal-backdrop.fade.in { - opacity: 0.8; - filter: alpha(opacity=80); -} - -.modal { - position: fixed; - top: 10%; - left: 50%; - z-index: 1050; - width: 560px; - margin-left: -280px; - background-color: #ffffff; - border: 1px solid #999; - border: 1px solid rgba(0, 0, 0, 0.3); - *border: 1px solid #999; - -webkit-border-radius: 6px; - -moz-border-radius: 6px; - border-radius: 6px; - outline: none; - -webkit-box-shadow: 0 3px 7px rgba(0, 0, 0, 0.3); - -moz-box-shadow: 0 3px 7px rgba(0, 0, 0, 0.3); - box-shadow: 0 3px 7px rgba(0, 0, 0, 0.3); - -webkit-background-clip: padding-box; - -moz-background-clip: padding-box; - background-clip: padding-box; -} - -.modal.fade { - top: -25%; - -webkit-transition: opacity 0.3s linear, top 0.3s ease-out; - -moz-transition: opacity 0.3s linear, top 0.3s ease-out; - -o-transition: opacity 0.3s linear, top 0.3s ease-out; - transition: opacity 0.3s linear, top 0.3s ease-out; -} - -.modal.fade.in { - top: 10%; -} - -.modal-header { - padding: 9px 15px; - border-bottom: 1px solid #eee; -} - -.modal-header .close { - margin-top: 2px; -} - -.modal-header h3 { - margin: 0; - line-height: 30px; -} - -.modal-body { - position: relative; - max-height: 400px; - padding: 15px; - overflow-y: auto; -} - -.modal-form { - margin-bottom: 0; -} - -.modal-footer { - padding: 14px 15px 15px; - margin-bottom: 0; - text-align: right; - background-color: #f5f5f5; - border-top: 1px solid #ddd; - -webkit-border-radius: 0 0 6px 6px; - -moz-border-radius: 0 0 6px 6px; - border-radius: 0 0 6px 6px; - *zoom: 1; - -webkit-box-shadow: inset 0 1px 0 #ffffff; - -moz-box-shadow: inset 0 1px 0 #ffffff; - box-shadow: inset 0 1px 0 #ffffff; -} - -.modal-footer:before, -.modal-footer:after { - display: table; - line-height: 0; - content: ""; -} - -.modal-footer:after { - clear: both; -} - -.modal-footer .btn + .btn { - margin-bottom: 0; - margin-left: 5px; -} - -.modal-footer .btn-group .btn + .btn { - margin-left: -1px; -} - -.modal-footer .btn-block + .btn-block { - margin-left: 0; -} - -.tooltip { - position: absolute; - z-index: 1030; - display: block; - font-size: 11px; - line-height: 1.4; - opacity: 0; - filter: alpha(opacity=0); - visibility: visible; -} - -.tooltip.in { - opacity: 0.8; - filter: alpha(opacity=80); -} - -.tooltip.top { - padding: 5px 0; - margin-top: -3px; -} - -.tooltip.right { - padding: 0 5px; - margin-left: 3px; -} - -.tooltip.bottom { - padding: 5px 0; - margin-top: 3px; -} - -.tooltip.left { - padding: 0 5px; - margin-left: -3px; -} - -.tooltip-inner { - max-width: 200px; - padding: 8px; - color: #ffffff; - text-align: center; - text-decoration: none; - background-color: #000000; - -webkit-border-radius: 4px; - -moz-border-radius: 4px; - border-radius: 4px; -} - -.tooltip-arrow { - position: absolute; - width: 0; - height: 0; - border-color: transparent; - border-style: solid; -} - -.tooltip.top .tooltip-arrow { - bottom: 0; - left: 50%; - margin-left: -5px; - border-top-color: #000000; - border-width: 5px 5px 0; -} - -.tooltip.right .tooltip-arrow { - top: 50%; - left: 0; - margin-top: -5px; - border-right-color: #000000; - border-width: 5px 5px 5px 0; -} - -.tooltip.left .tooltip-arrow { - top: 50%; - right: 0; - margin-top: -5px; - border-left-color: #000000; - border-width: 5px 0 5px 5px; -} - -.tooltip.bottom .tooltip-arrow { - top: 0; - left: 50%; - margin-left: -5px; - border-bottom-color: #000000; - border-width: 0 5px 5px; -} - -.popover { - position: absolute; - top: 0; - left: 0; - z-index: 1010; - display: none; - max-width: 276px; - padding: 1px; - text-align: left; - white-space: normal; - background-color: #ffffff; - border: 1px solid #ccc; - border: 1px solid rgba(0, 0, 0, 0.2); - -webkit-border-radius: 6px; - -moz-border-radius: 6px; - border-radius: 6px; - -webkit-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2); - -moz-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2); - box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2); - -webkit-background-clip: padding-box; - -moz-background-clip: padding; - background-clip: padding-box; -} - -.popover.top { - margin-top: -10px; -} - -.popover.right { - margin-left: 10px; -} - -.popover.bottom { - margin-top: 10px; -} - -.popover.left { - margin-left: -10px; -} - -.popover-title { - padding: 8px 14px; - margin: 0; - font-size: 14px; - font-weight: normal; - line-height: 18px; - background-color: #f7f7f7; - border-bottom: 1px solid #ebebeb; - -webkit-border-radius: 5px 5px 0 0; - -moz-border-radius: 5px 5px 0 0; - border-radius: 5px 5px 0 0; -} - -.popover-title:empty { - display: none; -} - -.popover-content { - padding: 9px 14px; -} - -.popover .arrow, -.popover .arrow:after { - position: absolute; - display: block; - width: 0; - height: 0; - border-color: transparent; - border-style: solid; -} - -.popover .arrow { - border-width: 11px; -} - -.popover .arrow:after { - border-width: 10px; - content: ""; -} - -.popover.top .arrow { - bottom: -11px; - left: 50%; - margin-left: -11px; - border-top-color: #999; - border-top-color: rgba(0, 0, 0, 0.25); - border-bottom-width: 0; -} - -.popover.top .arrow:after { - bottom: 1px; - margin-left: -10px; - border-top-color: #ffffff; - border-bottom-width: 0; -} - -.popover.right .arrow { - top: 50%; - left: -11px; - margin-top: -11px; - border-right-color: #999; - border-right-color: rgba(0, 0, 0, 0.25); - border-left-width: 0; -} - -.popover.right .arrow:after { - bottom: -10px; - left: 1px; - border-right-color: #ffffff; - border-left-width: 0; -} - -.popover.bottom .arrow { - top: -11px; - left: 50%; - margin-left: -11px; - border-bottom-color: #999; - border-bottom-color: rgba(0, 0, 0, 0.25); - border-top-width: 0; -} - -.popover.bottom .arrow:after { - top: 1px; - margin-left: -10px; - border-bottom-color: #ffffff; - border-top-width: 0; -} - -.popover.left .arrow { - top: 50%; - right: -11px; - margin-top: -11px; - border-left-color: #999; - border-left-color: rgba(0, 0, 0, 0.25); - border-right-width: 0; -} - -.popover.left .arrow:after { - right: 1px; - bottom: -10px; - border-left-color: #ffffff; - border-right-width: 0; -} - -.thumbnails { - margin-left: -20px; - list-style: none; - *zoom: 1; -} - -.thumbnails:before, -.thumbnails:after { - display: table; - line-height: 0; - content: ""; -} - -.thumbnails:after { - clear: both; -} - -.row-fluid .thumbnails { - margin-left: 0; -} - -.thumbnails > li { - float: left; - margin-bottom: 20px; - margin-left: 20px; -} - -.thumbnail { - display: block; - padding: 4px; - line-height: 20px; - border: 1px solid #ddd; - -webkit-border-radius: 4px; - -moz-border-radius: 4px; - border-radius: 4px; - -webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.055); - -moz-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.055); - box-shadow: 0 1px 3px rgba(0, 0, 0, 0.055); - -webkit-transition: all 0.2s ease-in-out; - -moz-transition: all 0.2s ease-in-out; - -o-transition: all 0.2s ease-in-out; - transition: all 0.2s ease-in-out; -} - -a.thumbnail:hover, -a.thumbnail:focus { - border-color: #0088cc; - -webkit-box-shadow: 0 1px 4px rgba(0, 105, 214, 0.25); - -moz-box-shadow: 0 1px 4px rgba(0, 105, 214, 0.25); - box-shadow: 0 1px 4px rgba(0, 105, 214, 0.25); -} - -.thumbnail > img { - display: block; - max-width: 100%; - margin-right: auto; - margin-left: auto; -} - -.thumbnail .caption { - padding: 9px; - color: #555555; -} - -.media, -.media-body { - overflow: hidden; - *overflow: visible; - zoom: 1; -} - -.media, -.media .media { - margin-top: 15px; -} - -.media:first-child { - margin-top: 0; -} - -.media-object { - display: block; -} - -.media-heading { - margin: 0 0 5px; -} - -.media > .pull-left { - margin-right: 10px; -} - -.media > .pull-right { - margin-left: 10px; -} - -.media-list { - margin-left: 0; - list-style: none; -} - -.label, -.badge { - display: inline-block; - padding: 2px 4px; - font-size: 11.844px; - font-weight: bold; - line-height: 14px; - color: #ffffff; - text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); - white-space: nowrap; - vertical-align: baseline; - background-color: #999999; -} - -.label { - -webkit-border-radius: 3px; - -moz-border-radius: 3px; - border-radius: 3px; -} - -.badge { - padding-right: 9px; - padding-left: 9px; - -webkit-border-radius: 9px; - -moz-border-radius: 9px; - border-radius: 9px; -} - -.label:empty, -.badge:empty { - display: none; -} - -a.label:hover, -a.label:focus, -a.badge:hover, -a.badge:focus { - color: #ffffff; - text-decoration: none; - cursor: pointer; -} - -.label-important, -.badge-important { - background-color: #b94a48; -} - -.label-important[href], -.badge-important[href] { - background-color: #953b39; -} - -.label-warning, -.badge-warning { - background-color: #f89406; -} - -.label-warning[href], -.badge-warning[href] { - background-color: #c67605; -} - -.label-success, -.badge-success { - background-color: #468847; -} - -.label-success[href], -.badge-success[href] { - background-color: #356635; -} - -.label-info, -.badge-info { - background-color: #3a87ad; -} - -.label-info[href], -.badge-info[href] { - background-color: #2d6987; -} - -.label-inverse, -.badge-inverse { - background-color: #333333; -} - -.label-inverse[href], -.badge-inverse[href] { - background-color: #1a1a1a; -} - -.btn .label, -.btn .badge { - position: relative; - top: -1px; -} - -.btn-mini .label, -.btn-mini .badge { - top: 0; -} - -@-webkit-keyframes progress-bar-stripes { - from { - background-position: 40px 0; - } - to { - background-position: 0 0; - } -} - -@-moz-keyframes progress-bar-stripes { - from { - background-position: 40px 0; - } - to { - background-position: 0 0; - } -} - -@-ms-keyframes progress-bar-stripes { - from { - background-position: 40px 0; - } - to { - background-position: 0 0; - } -} - -@-o-keyframes progress-bar-stripes { - from { - background-position: 0 0; - } - to { - background-position: 40px 0; - } -} - -@keyframes progress-bar-stripes { - from { - background-position: 40px 0; - } - to { - background-position: 0 0; - } -} - -.progress { - height: 20px; - margin-bottom: 20px; - overflow: hidden; - background-color: #f7f7f7; - background-image: -moz-linear-gradient(top, #f5f5f5, #f9f9f9); - background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#f5f5f5), to(#f9f9f9)); - background-image: -webkit-linear-gradient(top, #f5f5f5, #f9f9f9); - background-image: -o-linear-gradient(top, #f5f5f5, #f9f9f9); - background-image: linear-gradient(to bottom, #f5f5f5, #f9f9f9); - background-repeat: repeat-x; - -webkit-border-radius: 4px; - -moz-border-radius: 4px; - border-radius: 4px; - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff5f5f5', endColorstr='#fff9f9f9', GradientType=0); - -webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1); - -moz-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1); - box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1); -} - -.progress .bar { - float: left; - width: 0; - height: 100%; - font-size: 12px; - color: #ffffff; - text-align: center; - text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); - background-color: #0e90d2; - background-image: -moz-linear-gradient(top, #149bdf, #0480be); - background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#149bdf), to(#0480be)); - background-image: -webkit-linear-gradient(top, #149bdf, #0480be); - background-image: -o-linear-gradient(top, #149bdf, #0480be); - background-image: linear-gradient(to bottom, #149bdf, #0480be); - background-repeat: repeat-x; - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff149bdf', endColorstr='#ff0480be', GradientType=0); - -webkit-box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.15); - -moz-box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.15); - box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.15); - -webkit-box-sizing: border-box; - -moz-box-sizing: border-box; - box-sizing: border-box; - -webkit-transition: width 0.6s ease; - -moz-transition: width 0.6s ease; - -o-transition: width 0.6s ease; - transition: width 0.6s ease; -} - -.progress .bar + .bar { - -webkit-box-shadow: inset 1px 0 0 rgba(0, 0, 0, 0.15), inset 0 -1px 0 rgba(0, 0, 0, 0.15); - -moz-box-shadow: inset 1px 0 0 rgba(0, 0, 0, 0.15), inset 0 -1px 0 rgba(0, 0, 0, 0.15); - box-shadow: inset 1px 0 0 rgba(0, 0, 0, 0.15), inset 0 -1px 0 rgba(0, 0, 0, 0.15); -} - -.progress-striped .bar { - background-color: #149bdf; - background-image: -webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent)); - background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); - background-image: -moz-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); - background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); - background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); - -webkit-background-size: 40px 40px; - -moz-background-size: 40px 40px; - -o-background-size: 40px 40px; - background-size: 40px 40px; -} - -.progress.active .bar { - -webkit-animation: progress-bar-stripes 2s linear infinite; - -moz-animation: progress-bar-stripes 2s linear infinite; - -ms-animation: progress-bar-stripes 2s linear infinite; - -o-animation: progress-bar-stripes 2s linear infinite; - animation: progress-bar-stripes 2s linear infinite; -} - -.progress-danger .bar, -.progress .bar-danger { - background-color: #dd514c; - background-image: -moz-linear-gradient(top, #ee5f5b, #c43c35); - background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ee5f5b), to(#c43c35)); - background-image: -webkit-linear-gradient(top, #ee5f5b, #c43c35); - background-image: -o-linear-gradient(top, #ee5f5b, #c43c35); - background-image: linear-gradient(to bottom, #ee5f5b, #c43c35); - background-repeat: repeat-x; - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffee5f5b', endColorstr='#ffc43c35', GradientType=0); -} - -.progress-danger.progress-striped .bar, -.progress-striped .bar-danger { - background-color: #ee5f5b; - background-image: -webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent)); - background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); - background-image: -moz-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); - background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); - background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); -} - -.progress-success .bar, -.progress .bar-success { - background-color: #5eb95e; - background-image: -moz-linear-gradient(top, #62c462, #57a957); - background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#62c462), to(#57a957)); - background-image: -webkit-linear-gradient(top, #62c462, #57a957); - background-image: -o-linear-gradient(top, #62c462, #57a957); - background-image: linear-gradient(to bottom, #62c462, #57a957); - background-repeat: repeat-x; - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff62c462', endColorstr='#ff57a957', GradientType=0); -} - -.progress-success.progress-striped .bar, -.progress-striped .bar-success { - background-color: #62c462; - background-image: -webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent)); - background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); - background-image: -moz-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); - background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); - background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); -} - -.progress-info .bar, -.progress .bar-info { - background-color: #4bb1cf; - background-image: -moz-linear-gradient(top, #5bc0de, #339bb9); - background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#5bc0de), to(#339bb9)); - background-image: -webkit-linear-gradient(top, #5bc0de, #339bb9); - background-image: -o-linear-gradient(top, #5bc0de, #339bb9); - background-image: linear-gradient(to bottom, #5bc0de, #339bb9); - background-repeat: repeat-x; - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff339bb9', GradientType=0); -} - -.progress-info.progress-striped .bar, -.progress-striped .bar-info { - background-color: #5bc0de; - background-image: -webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent)); - background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); - background-image: -moz-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); - background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); - background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); -} - -.progress-warning .bar, -.progress .bar-warning { - background-color: #faa732; - background-image: -moz-linear-gradient(top, #fbb450, #f89406); - background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#fbb450), to(#f89406)); - background-image: -webkit-linear-gradient(top, #fbb450, #f89406); - background-image: -o-linear-gradient(top, #fbb450, #f89406); - background-image: linear-gradient(to bottom, #fbb450, #f89406); - background-repeat: repeat-x; - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffbb450', endColorstr='#fff89406', GradientType=0); -} - -.progress-warning.progress-striped .bar, -.progress-striped .bar-warning { - background-color: #fbb450; - background-image: -webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent)); - background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); - background-image: -moz-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); - background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); - background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); -} - -.accordion { - margin-bottom: 20px; -} - -.accordion-group { - margin-bottom: 2px; - border: 1px solid #e5e5e5; - -webkit-border-radius: 4px; - -moz-border-radius: 4px; - border-radius: 4px; -} - -.accordion-heading { - border-bottom: 0; -} - -.accordion-heading .accordion-toggle { - display: block; - padding: 8px 15px; -} - -.accordion-toggle { - cursor: pointer; -} - -.accordion-inner { - padding: 9px 15px; - border-top: 1px solid #e5e5e5; -} - -.carousel { - position: relative; - margin-bottom: 20px; - line-height: 1; -} - -.carousel-inner { - position: relative; - width: 100%; - overflow: hidden; -} - -.carousel-inner > .item { - position: relative; - display: none; - -webkit-transition: 0.6s ease-in-out left; - -moz-transition: 0.6s ease-in-out left; - -o-transition: 0.6s ease-in-out left; - transition: 0.6s ease-in-out left; -} - -.carousel-inner > .item > img, -.carousel-inner > .item > a > img { - display: block; - line-height: 1; -} - -.carousel-inner > .active, -.carousel-inner > .next, -.carousel-inner > .prev { - display: block; -} - -.carousel-inner > .active { - left: 0; -} - -.carousel-inner > .next, -.carousel-inner > .prev { - position: absolute; - top: 0; - width: 100%; -} - -.carousel-inner > .next { - left: 100%; -} - -.carousel-inner > .prev { - left: -100%; -} - -.carousel-inner > .next.left, -.carousel-inner > .prev.right { - left: 0; -} - -.carousel-inner > .active.left { - left: -100%; -} - -.carousel-inner > .active.right { - left: 100%; -} - -.carousel-control { - position: absolute; - top: 40%; - left: 15px; - width: 40px; - height: 40px; - margin-top: -20px; - font-size: 60px; - font-weight: 100; - line-height: 30px; - color: #ffffff; - text-align: center; - background: #222222; - border: 3px solid #ffffff; - -webkit-border-radius: 23px; - -moz-border-radius: 23px; - border-radius: 23px; - opacity: 0.5; - filter: alpha(opacity=50); -} - -.carousel-control.right { - right: 15px; - left: auto; -} - -.carousel-control:hover, -.carousel-control:focus { - color: #ffffff; - text-decoration: none; - opacity: 0.9; - filter: alpha(opacity=90); -} - -.carousel-indicators { - position: absolute; - top: 15px; - right: 15px; - z-index: 5; - margin: 0; - list-style: none; -} - -.carousel-indicators li { - display: block; - float: left; - width: 10px; - height: 10px; - margin-left: 5px; - text-indent: -999px; - background-color: #ccc; - background-color: rgba(255, 255, 255, 0.25); - border-radius: 5px; -} - -.carousel-indicators .active { - background-color: #fff; -} - -.carousel-caption { - position: absolute; - right: 0; - bottom: 0; - left: 0; - padding: 15px; - background: #333333; - background: rgba(0, 0, 0, 0.75); -} - -.carousel-caption h4, -.carousel-caption p { - line-height: 20px; - color: #ffffff; -} - -.carousel-caption h4 { - margin: 0 0 5px; -} - -.carousel-caption p { - margin-bottom: 0; -} - -.hero-unit { - padding: 60px; - margin-bottom: 30px; - font-size: 18px; - font-weight: 200; - line-height: 30px; - color: inherit; - background-color: #eeeeee; - -webkit-border-radius: 6px; - -moz-border-radius: 6px; - border-radius: 6px; -} - -.hero-unit h1 { - margin-bottom: 0; - font-size: 60px; - line-height: 1; - letter-spacing: -1px; - color: inherit; -} - -.hero-unit li { - line-height: 30px; -} - -.pull-right { - float: right; -} - -.pull-left { - float: left; -} - -.hide { - display: none; -} - -.show { - display: block; -} - -.invisible { - visibility: hidden; -} - -.affix { - position: fixed; -} diff --git a/spring-security-login-and-registration/src/main/webapp/resources/pwstrength.js b/spring-security-login-and-registration/src/main/webapp/resources/pwstrength.js deleted file mode 100644 index 0a08b4d065..0000000000 --- a/spring-security-login-and-registration/src/main/webapp/resources/pwstrength.js +++ /dev/null @@ -1,4 +0,0 @@ -/* pwstrength-bootstrap 2015-02-07 - GPLv3 & MIT License */ - -!function(a){var b={};try{if(!a&&module&&module.exports){var a=require("jquery"),c=require("jsdom").jsdom;a=a(c().parentWindow)}}catch(d){}!function(a,b){"use strict";var c={};b.forbiddenSequences=["0123456789","abcdefghijklmnopqrstuvwxyz","qwertyuiop","asdfghjkl","zxcvbnm","!@#$%^&*()_+"],c.wordNotEmail=function(a,b,c){return b.match(/^([\w\!\#$\%\&\'\*\+\-\/\=\?\^\`{\|\}\~]+\.)*[\w\!\#$\%\&\'\*\+\-\/\=\?\^\`{\|\}\~]+@((((([a-z0-9]{1}[a-z0-9\-]{0,62}[a-z0-9]{1})|[a-z])\.)+[a-z]{2,6})|(\d{1,3}\.){3}\d{1,3}(\:\d{1,5})?)$/i)?c:0},c.wordLength=function(a,b,c){var d=b.length,e=Math.pow(d,a.rules.raisePower);return d2&&(a.each(b.forbiddenSequences,function(b,c){var e=[c,c.split("").reverse().join("")];a.each(e,function(a,b){for(f=0;f-1&&(g=!0)})}),g)?e:0},c.wordLowercase=function(a,b,c){return b.match(/[a-z]/)&&c},c.wordUppercase=function(a,b,c){return b.match(/[A-Z]/)&&c},c.wordOneNumber=function(a,b,c){return b.match(/\d+/)&&c},c.wordThreeNumbers=function(a,b,c){return b.match(/(.*[0-9].*[0-9].*[0-9])/)&&c},c.wordOneSpecialChar=function(a,b,c){return b.match(/[!,@,#,$,%,\^,&,*,?,_,~]/)&&c},c.wordTwoSpecialChar=function(a,b,c){return b.match(/(.*[!,@,#,$,%,\^,&,*,?,_,~].*[!,@,#,$,%,\^,&,*,?,_,~])/)&&c},c.wordUpperLowerCombo=function(a,b,c){return b.match(/([a-z].*[A-Z])|([A-Z].*[a-z])/)&&c},c.wordLetterNumberCombo=function(a,b,c){return b.match(/([a-zA-Z])/)&&b.match(/([0-9])/)&&c},c.wordLetterNumberCharCombo=function(a,b,c){return b.match(/([a-zA-Z0-9].*[!,@,#,$,%,\^,&,*,?,_,~])|([!,@,#,$,%,\^,&,*,?,_,~].*[a-zA-Z0-9])/)&&c},b.validation=c,b.executeRules=function(c,d){var e=0;return a.each(c.rules.activated,function(f,g){if(g){var h,i,j=c.rules.scores[f],k=b.validation[f];a.isFunction(k)||(k=c.rules.extra[f]),a.isFunction(k)&&(h=k(c,d,j),h&&(e+=h),(0>h||!a.isNumeric(h)&&!h)&&(i=c.ui.spanError(c,f),i.length>0&&c.instances.errors.push(i)))}}),e}}(a,b);try{module&&module.exports&&(module.exports=b)}catch(d){}var e={};e.common={},e.common.minChar=6,e.common.usernameField="#username",e.common.userInputs=[],e.common.onLoad=void 0,e.common.onKeyUp=void 0,e.common.zxcvbn=!1,e.common.zxcvbnTerms=[],e.common.debug=!1,e.rules={},e.rules.extra={},e.rules.scores={wordNotEmail:-100,wordLength:-50,wordSimilarToUsername:-100,wordSequences:-50,wordTwoCharacterClasses:2,wordRepetitions:-25,wordLowercase:1,wordUppercase:3,wordOneNumber:3,wordThreeNumbers:5,wordOneSpecialChar:3,wordTwoSpecialChar:5,wordUpperLowerCombo:2,wordLetterNumberCombo:2,wordLetterNumberCharCombo:2},e.rules.activated={wordNotEmail:!0,wordLength:!0,wordSimilarToUsername:!0,wordSequences:!0,wordTwoCharacterClasses:!1,wordRepetitions:!1,wordLowercase:!0,wordUppercase:!0,wordOneNumber:!0,wordThreeNumbers:!0,wordOneSpecialChar:!0,wordTwoSpecialChar:!0,wordUpperLowerCombo:!0,wordLetterNumberCombo:!0,wordLetterNumberCharCombo:!0},e.rules.raisePower=1.4,e.ui={},e.ui.bootstrap2=!1,e.ui.showProgressBar=!0,e.ui.showPopover=!1,e.ui.showStatus=!1,e.ui.spanError=function(a,b){"use strict";var c=a.ui.errorMessages[b];return c?''+c+"":""},e.ui.popoverError=function(b){"use strict";var c="
Errors:
    ";return a.each(b,function(a,b){c+="
  • "+b+"
  • "}),c+="
"},e.ui.errorMessages={wordLength:"Your password is too short",wordNotEmail:"Do not use your email as your password",wordSimilarToUsername:"Your password cannot contain your username",wordTwoCharacterClasses:"Use different character classes",wordRepetitions:"Too many repetitions",wordSequences:"Your password contains sequences"},e.ui.verdicts=["Weak","Normal","Medium","Strong","Very Strong"],e.ui.showVerdicts=!0,e.ui.showVerdictsInsideProgressBar=!1,e.ui.useVerdictCssClass=!1,e.ui.showErrors=!1,e.ui.container=void 0,e.ui.viewports={progress:void 0,verdict:void 0,errors:void 0},e.ui.scores=[14,26,38,50];var f={};!function(a,b){"use strict";var c=["danger","warning","success"],d=["error","warning","success"];b.getContainer=function(b,c){var d;return d=a(b.ui.container),d&&1===d.length||(d=c.parent()),d},b.findElement=function(a,b,c){return b?a.find(b).find(c):a.find(c)},b.getUIElements=function(a,c){var d,e;return a.instances.viewports?a.instances.viewports:(d=b.getContainer(a,c),e={},e.$progressbar=b.findElement(d,a.ui.viewports.progress,"div.progress"),a.ui.showVerdictsInsideProgressBar&&(e.$verdict=e.$progressbar.find("span.password-verdict")),a.ui.showPopover||(a.ui.showVerdictsInsideProgressBar||(e.$verdict=b.findElement(d,a.ui.viewports.verdict,"span.password-verdict")),e.$errors=b.findElement(d,a.ui.viewports.errors,"ul.error-list")),a.instances.viewports=e,e)},b.initProgressBar=function(c,d){var e=b.getContainer(c,d),f="
",c.ui.showVerdictsInsideProgressBar&&(f+=""),f+="
",c.ui.viewports.progress?e.find(c.ui.viewports.progress).append(f):a(f).insertAfter(d)},b.initHelper=function(c,d,e,f){var g=b.getContainer(c,d);f?g.find(f).append(e):a(e).insertAfter(d)},b.initVerdict=function(a,c){b.initHelper(a,c,"",a.ui.viewports.verdict)},b.initErrorList=function(a,c){b.initHelper(a,c,"
    ",a.ui.viewports.errors)},b.initPopover=function(a,b){b.popover("destroy"),b.popover({html:!0,placement:"bottom",trigger:"manual",content:" "})},b.initUI=function(a,c){a.ui.showPopover?b.initPopover(a,c):(a.ui.showErrors&&b.initErrorList(a,c),a.ui.showVerdicts&&!a.ui.showVerdictsInsideProgressBar&&b.initVerdict(a,c)),a.ui.showProgressBar&&b.initProgressBar(a,c)},b.possibleProgressBarClasses=["danger","warning","success"],b.updateProgressBar=function(d,e,f,g){var h=b.getUIElements(d,e).$progressbar,i=h.find(".progress-bar"),j="progress-";d.ui.bootstrap2&&(i=h.find(".bar"),j=""),a.each(b.possibleProgressBarClasses,function(a,b){i.removeClass(j+"bar-"+b)}),i.addClass(j+"bar-"+c[f]),i.css("width",g+"%")},b.updateVerdict=function(a,d,e,f){var g=b.getUIElements(a,d).$verdict;g.removeClass(c.join(" ")),e>-1&&g.addClass(c[e]),g.html(f)},b.updateErrors=function(c,d){var e=b.getUIElements(c,d).$errors,f="";a.each(c.instances.errors,function(a,b){f+="
  • "+b+"
  • "}),e.html(f)},b.updatePopover=function(a,b,c){var d=b.data("bs.popover"),e="",f=!0;return a.ui.showVerdicts&&!a.ui.showVerdictsInsideProgressBar&&c.length>0&&(e="
    "+c+"
    ",f=!1),a.ui.showErrors&&(a.instances.errors.length>0&&(f=!1),e+=a.ui.popoverError(a.instances.errors)),f?void b.popover("hide"):(a.ui.bootstrap2&&(d=b.data("popover")),void(d.$arrow&&d.$arrow.parents("body").length>0?b.find("+ .popover .popover-content").html(e):(d.options.content=e,b.popover("show"))))},b.updateFieldStatus=function(b,c,e){var f=b.ui.bootstrap2?".control-group":".form-group",g=c.parents(f).first();a.each(d,function(a,c){b.ui.bootstrap2||(c="has-"+c),g.removeClass(c)}),e=d[e],b.ui.bootstrap2||(e="has-"+e),g.addClass(e)},b.percentage=function(a,b){var c=Math.floor(100*a/b);return c=0>c?1:c,c=c>100?100:c},b.getVerdictAndCssClass=function(a,b){var c,d,e;return 0>=b?(c=0,e=-1,d=a.ui.verdicts[0]):b params = new HashMap(); - params.put("oldpassword", "test"); - params.put("password", "newtest"); - - final Response response = request.with().params(params).post(URL); - - assertEquals(200, response.statusCode()); - assertTrue(response.body().asString().contains("Password updated successfully")); - } - - @Test - public void givenWrongOldPassword_whenChangingPassword_thenBadRequest() { - final RequestSpecification request = RestAssured.given().auth().form("test@test.com", "test", formConfig); - - final Map params = new HashMap(); - params.put("oldpassword", "abc"); - params.put("password", "newtest"); - - final Response response = request.with().params(params).post(URL); - - assertEquals(400, response.statusCode()); - assertTrue(response.body().asString().contains("Invalid Old Password")); - } - - @Test - public void givenNotAuthenticatedUser_whenChangingPassword_thenRedirect() { - final Map params = new HashMap(); - params.put("oldpassword", "abc"); - params.put("password", "xyz"); - - final Response response = RestAssured.with().params(params).post(URL); - - assertEquals(302, response.statusCode()); - assertFalse(response.body().asString().contains("Password updated successfully")); - } - -} diff --git a/spring-security-login-and-registration/src/test/java/org/baeldung/test/SpringSecurityRolesIntegrationTest.java b/spring-security-login-and-registration/src/test/java/org/baeldung/test/SpringSecurityRolesIntegrationTest.java deleted file mode 100644 index 978497fabd..0000000000 --- a/spring-security-login-and-registration/src/test/java/org/baeldung/test/SpringSecurityRolesIntegrationTest.java +++ /dev/null @@ -1,121 +0,0 @@ -package org.baeldung.test; - -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertNull; - -import java.util.ArrayList; -import java.util.Arrays; - -import org.baeldung.persistence.dao.PrivilegeRepository; -import org.baeldung.persistence.dao.RoleRepository; -import org.baeldung.persistence.dao.UserRepository; -import org.baeldung.persistence.model.Privilege; -import org.baeldung.persistence.model.Role; -import org.baeldung.persistence.model.User; -import org.junit.Test; -import org.junit.runner.RunWith; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.security.crypto.password.PasswordEncoder; -import org.springframework.test.context.ContextConfiguration; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; -import org.springframework.test.context.support.AnnotationConfigContextLoader; -import org.springframework.test.context.transaction.TransactionConfiguration; -import org.springframework.transaction.annotation.Transactional; - -@RunWith(SpringJUnit4ClassRunner.class) -@ContextConfiguration(classes = { TestConfig.class }, loader = AnnotationConfigContextLoader.class) -@Transactional -@TransactionConfiguration -public class SpringSecurityRolesIntegrationTest { - - @Autowired - private UserRepository userRepository; - - @Autowired - private RoleRepository roleRepository; - - @Autowired - private PrivilegeRepository privilegeRepository; - - @Autowired - private PasswordEncoder passwordEncoder; - - private User user; - private Role role; - private Privilege privilege; - - // tests - - @Test - public void testDeleteUser() { - role = new Role("TEST_ROLE"); - roleRepository.save(role); - - user = new User(); - user.setFirstName("John"); - user.setLastName("Doe"); - user.setPassword(passwordEncoder.encode("123")); - user.setEmail("john@doe.com"); - user.setRoles(Arrays.asList(role)); - user.setEnabled(true); - userRepository.save(user); - - assertNotNull(userRepository.findByEmail(user.getEmail())); - assertNotNull(roleRepository.findByName(role.getName())); - user.setRoles(null); - userRepository.delete(user); - - assertNull(userRepository.findByEmail(user.getEmail())); - assertNotNull(roleRepository.findByName(role.getName())); - } - - @Test - public void testDeleteRole() { - privilege = new Privilege("TEST_PRIVILEGE"); - privilegeRepository.save(privilege); - - role = new Role("TEST_ROLE"); - role.setPrivileges(Arrays.asList(privilege)); - roleRepository.save(role); - - user = new User(); - user.setFirstName("John"); - user.setLastName("Doe"); - user.setPassword(passwordEncoder.encode("123")); - user.setEmail("john@doe.com"); - user.setRoles(Arrays.asList(role)); - user.setEnabled(true); - userRepository.save(user); - - assertNotNull(privilegeRepository.findByName(privilege.getName())); - assertNotNull(userRepository.findByEmail(user.getEmail())); - assertNotNull(roleRepository.findByName(role.getName())); - - user.setRoles(new ArrayList()); - role.setPrivileges(new ArrayList()); - roleRepository.delete(role); - - assertNull(roleRepository.findByName(role.getName())); - assertNotNull(privilegeRepository.findByName(privilege.getName())); - assertNotNull(userRepository.findByEmail(user.getEmail())); - } - - @Test - public void testDeletePrivilege() { - privilege = new Privilege("TEST_PRIVILEGE"); - privilegeRepository.save(privilege); - - role = new Role("TEST_ROLE"); - role.setPrivileges(Arrays.asList(privilege)); - roleRepository.save(role); - - assertNotNull(roleRepository.findByName(role.getName())); - assertNotNull(privilegeRepository.findByName(privilege.getName())); - - role.setPrivileges(new ArrayList()); - privilegeRepository.delete(privilege); - - assertNull(privilegeRepository.findByName(privilege.getName())); - assertNotNull(roleRepository.findByName(role.getName())); - } -} diff --git a/spring-security-mvc-custom/pom.xml b/spring-security-mvc-custom/pom.xml index b5f71847f5..ca9b3423cc 100644 --- a/spring-security-mvc-custom/pom.xml +++ b/spring-security-mvc-custom/pom.xml @@ -1,6 +1,6 @@ 4.0.0 - org.baeldung + com.baeldung spring-security-mvc-custom 0.1-SNAPSHOT @@ -230,12 +230,12 @@ - 4.2.4.RELEASE - 4.0.3.RELEASE + 4.2.5.RELEASE + 4.0.4.RELEASE 4.3.11.Final - 5.1.37 + 5.1.38 1.7.13 @@ -258,14 +258,14 @@ 4.5 4.4.1 - 2.4.1 + 2.9.0 - 3.3 + 3.5.1 2.6 - 2.18.1 + 2.19.1 2.7 - 1.4.15 + 1.4.18 diff --git a/spring-security-mvc-digest-auth/pom.xml b/spring-security-mvc-digest-auth/pom.xml index dc2c4d80a5..c292eb6b54 100644 --- a/spring-security-mvc-digest-auth/pom.xml +++ b/spring-security-mvc-digest-auth/pom.xml @@ -1,6 +1,6 @@ 4.0.0 - org.baeldung + com.baeldung spring-security-mvc-digest-auth 0.1-SNAPSHOT @@ -225,12 +225,12 @@ - 4.2.4.RELEASE - 4.0.3.RELEASE + 4.2.5.RELEASE + 4.0.4.RELEASE 4.3.11.Final - 5.1.37 + 5.1.38 1.7.13 @@ -253,14 +253,14 @@ 4.4.1 4.5 - 2.4.1 + 2.9.0 - 3.3 + 3.5.1 2.6 - 2.18.1 + 2.19.1 2.7 - 1.4.15 + 1.4.18 diff --git a/spring-security-mvc-ldap/pom.xml b/spring-security-mvc-ldap/pom.xml index 317c8dfb73..b001a86955 100644 --- a/spring-security-mvc-ldap/pom.xml +++ b/spring-security-mvc-ldap/pom.xml @@ -1,6 +1,6 @@ 4.0.0 - org.baeldung + com.baeldung spring-security-mvc-ldap 0.1-SNAPSHOT @@ -10,7 +10,7 @@ org.springframework.boot spring-boot-starter-parent - 1.3.2.RELEASE + 1.3.3.RELEASE diff --git a/spring-security-mvc-login/pom.xml b/spring-security-mvc-login/pom.xml index ee6b37743b..943eeaa197 100644 --- a/spring-security-mvc-login/pom.xml +++ b/spring-security-mvc-login/pom.xml @@ -1,6 +1,6 @@ 4.0.0 - org.baeldung + com.baeldung spring-security-mvc-login 0.1-SNAPSHOT @@ -222,12 +222,12 @@ - 4.2.4.RELEASE - 4.0.3.RELEASE + 4.2.5.RELEASE + 4.0.4.RELEASE 4.3.11.Final - 5.1.37 + 5.1.38 1.7.13 @@ -250,14 +250,14 @@ 4.4.1 4.5 - 2.4.1 + 2.9.0 - 3.3 + 3.5.1 2.6 - 2.18.1 + 2.19.1 2.7 - 1.4.15 + 1.4.18 diff --git a/spring-security-mvc-login/src/main/java/org/baeldung/spring/SecSecurityConfig.java b/spring-security-mvc-login/src/main/java/org/baeldung/spring/SecSecurityConfig.java index 4da114c78b..08cb09384b 100644 --- a/spring-security-mvc-login/src/main/java/org/baeldung/spring/SecSecurityConfig.java +++ b/spring-security-mvc-login/src/main/java/org/baeldung/spring/SecSecurityConfig.java @@ -1,14 +1,59 @@ package org.baeldung.spring; +import org.baeldung.security.CustomLogoutSuccessHandler; +import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; -import org.springframework.context.annotation.ImportResource; +import org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder; +import org.springframework.security.config.annotation.web.builders.HttpSecurity; +import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity; +import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter; +import org.springframework.security.web.authentication.logout.LogoutSuccessHandler; @Configuration -@ImportResource({ "classpath:webSecurityConfig.xml" }) -public class SecSecurityConfig { +// @ImportResource({ "classpath:webSecurityConfig.xml" }) +@EnableWebSecurity +public class SecSecurityConfig extends WebSecurityConfigurerAdapter { public SecSecurityConfig() { super(); } + @Override + protected void configure(final AuthenticationManagerBuilder auth) throws Exception { + // @formatter:off + auth.inMemoryAuthentication() + .withUser("user1").password("user1Pass").roles("USER") + .and() + .withUser("user2").password("user2Pass").roles("USER"); + // @formatter:on + } + + @Override + protected void configure(final HttpSecurity http) throws Exception { + // @formatter:off + http + .csrf().disable() + .authorizeRequests() + .antMatchers("/anonymous*").anonymous() + .antMatchers("/login*").permitAll() + .anyRequest().authenticated() + .and() + .formLogin() + .loginPage("/login.html") + .loginProcessingUrl("/perform_login") + .defaultSuccessUrl("/homepage.html",true) + .failureUrl("/login.html?error=true") + .and() + .logout() + .logoutUrl("/perform_logout") + .deleteCookies("JSESSIONID") + .logoutSuccessHandler(logoutSuccessHandler()); + // @formatter:on + } + + @Bean + public LogoutSuccessHandler logoutSuccessHandler() { + return new CustomLogoutSuccessHandler(); + } + } diff --git a/spring-security-mvc-login/src/main/webapp/WEB-INF/web.xml b/spring-security-mvc-login/src/main/webapp/WEB-INF/web.xml index f13ae48c7e..0a0a340995 100644 --- a/spring-security-mvc-login/src/main/webapp/WEB-INF/web.xml +++ b/spring-security-mvc-login/src/main/webapp/WEB-INF/web.xml @@ -1,9 +1,8 @@ - + Spring MVC Application diff --git a/spring-security-mvc-persisted-remember-me/pom.xml b/spring-security-mvc-persisted-remember-me/pom.xml index 1691f10f43..3f1d78f8ea 100644 --- a/spring-security-mvc-persisted-remember-me/pom.xml +++ b/spring-security-mvc-persisted-remember-me/pom.xml @@ -1,7 +1,7 @@ 4.0.0 - org.baeldung + com.baeldung spring-security-mvc-persisted-remember-me 0.1-SNAPSHOT @@ -260,12 +260,12 @@ - 4.2.4.RELEASE - 4.0.3.RELEASE + 4.2.5.RELEASE + 4.0.4.RELEASE 4.3.11.Final - 5.1.37 + 5.1.38 1.4.190 9.1-901.jdbc4 @@ -291,14 +291,14 @@ 4.5 4.4.1 - 2.4.1 + 2.9.0 - 3.3 - 2.5 - 2.18.1 + 3.5.1 + 2.6 + 2.19.1 2.7 - 1.4.11 + 1.4.18 diff --git a/spring-security-mvc-persisted-remember-me/src/main/java/org/baeldung/service/MyUserDetailsService.java b/spring-security-mvc-persisted-remember-me/src/main/java/org/baeldung/service/MyUserDetailsService.java index ac2aa6beb6..2baf88a62d 100644 --- a/spring-security-mvc-persisted-remember-me/src/main/java/org/baeldung/service/MyUserDetailsService.java +++ b/spring-security-mvc-persisted-remember-me/src/main/java/org/baeldung/service/MyUserDetailsService.java @@ -25,7 +25,7 @@ public class MyUserDetailsService implements UserDetailsService { private final Log logger = LogFactory.getLog(this.getClass()); - private Map availableUsers = new HashMap(); + private final Map availableUsers = new HashMap(); public MyUserDetailsService() { @@ -33,12 +33,13 @@ public class MyUserDetailsService implements UserDetailsService { } - @Override - public UserDetails loadUserByUsername(String username) throws UsernameNotFoundException { + // + @Override + public UserDetails loadUserByUsername(final String username) throws UsernameNotFoundException { logger.info("Load user by username " + username); - UserDetails user = availableUsers.get(username); + final UserDetails user = availableUsers.get(username); if (user == null) { throw new UsernameNotFoundException("Username not found"); } else { @@ -52,7 +53,6 @@ public class MyUserDetailsService implements UserDetailsService { * in database or retrieved from another system). */ private void populateDemoUsers() { - logger.info("Populate demo users"); availableUsers.put("user", createUser("user", "password", Arrays.asList(SecurityRole.ROLE_USER))); @@ -70,12 +70,11 @@ public class MyUserDetailsService implements UserDetailsService { * Role names user is assigned to * @return User */ - private User createUser(String username, String password, List roles) { - + private User createUser(final String username, final String password, final List roles) { logger.info("Create user " + username); - List authorities = new ArrayList(); - for (SecurityRole role : roles) { + final List authorities = new ArrayList(); + for (final SecurityRole role : roles) { authorities.add(new SimpleGrantedAuthority(role.toString())); } return new User(username, password, true, true, true, true, authorities); diff --git a/spring-security-mvc-persisted-remember-me/src/main/java/org/baeldung/spring/DatabaseConfig.java b/spring-security-mvc-persisted-remember-me/src/main/java/org/baeldung/spring/PersistenceConfig.java similarity index 96% rename from spring-security-mvc-persisted-remember-me/src/main/java/org/baeldung/spring/DatabaseConfig.java rename to spring-security-mvc-persisted-remember-me/src/main/java/org/baeldung/spring/PersistenceConfig.java index 7f0428df77..02308e64fb 100644 --- a/spring-security-mvc-persisted-remember-me/src/main/java/org/baeldung/spring/DatabaseConfig.java +++ b/spring-security-mvc-persisted-remember-me/src/main/java/org/baeldung/spring/PersistenceConfig.java @@ -18,11 +18,13 @@ import com.google.common.base.Preconditions; @Configuration @EnableTransactionManagement @PropertySource({ "classpath:persistence-h2.properties" }) -public class DatabaseConfig { +public class PersistenceConfig { @Autowired private Environment env; + // + @Bean public DataSource dataSource() { final DriverManagerDataSource dataSource = new DriverManagerDataSource(); @@ -32,4 +34,5 @@ public class DatabaseConfig { dataSource.setPassword(Preconditions.checkNotNull(env.getProperty("jdbc.pass"))); return dataSource; } + } diff --git a/spring-security-mvc-persisted-remember-me/src/main/java/org/baeldung/spring/SecurityConfig.java b/spring-security-mvc-persisted-remember-me/src/main/java/org/baeldung/spring/SecurityConfig.java index b3549511fc..2d9bb8e731 100644 --- a/spring-security-mvc-persisted-remember-me/src/main/java/org/baeldung/spring/SecurityConfig.java +++ b/spring-security-mvc-persisted-remember-me/src/main/java/org/baeldung/spring/SecurityConfig.java @@ -1,11 +1,9 @@ package org.baeldung.spring; -import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.ImportResource; import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity; import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter; -import org.springframework.security.web.authentication.AuthenticationSuccessHandler; /** * Spring Security Configuration. @@ -15,9 +13,6 @@ import org.springframework.security.web.authentication.AuthenticationSuccessHand @ImportResource({ "classpath:webSecurityConfig.xml" }) public class SecurityConfig extends WebSecurityConfigurerAdapter { - @Autowired - private AuthenticationSuccessHandler mySimpleUrlAuthenticationSuccessHandler; - public SecurityConfig() { super(); } diff --git a/spring-security-mvc-persisted-remember-me/src/main/resources/webSecurityConfig.xml b/spring-security-mvc-persisted-remember-me/src/main/resources/webSecurityConfig.xml index a11f13c9ab..d1f081cb9b 100644 --- a/spring-security-mvc-persisted-remember-me/src/main/resources/webSecurityConfig.xml +++ b/spring-security-mvc-persisted-remember-me/src/main/resources/webSecurityConfig.xml @@ -1,55 +1,51 @@ - + http://www.springframework.org/schema/jdbc http://www.springframework.org/schema/jdbc/spring-jdbc-4.2.xsd" +> - - - + + + - + - + - + - + - - + + - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/spring-security-mvc-session/pom.xml b/spring-security-mvc-session/pom.xml index fd90be6cc8..e330825bf2 100644 --- a/spring-security-mvc-session/pom.xml +++ b/spring-security-mvc-session/pom.xml @@ -1,6 +1,6 @@ 4.0.0 - org.baeldung + com.baeldung spring-security-mvc-session 0.1-SNAPSHOT @@ -230,12 +230,12 @@ - 4.2.4.RELEASE - 4.0.3.RELEASE + 4.2.5.RELEASE + 4.0.4.RELEASE 4.3.11.Final - 5.1.37 + 5.1.38 1.7.13 @@ -259,14 +259,14 @@ 4.5 4.4.1 - 2.4.1 + 2.9.0 - 3.3 + 3.5.1 2.6 - 2.18.1 + 2.19.1 2.7 - 1.4.15 + 1.4.18 diff --git a/spring-security-mvc-session/src/main/java/org/baeldung/security/MySimpleUrlAuthenticationSuccessHandler.java b/spring-security-mvc-session/src/main/java/org/baeldung/security/MySimpleUrlAuthenticationSuccessHandler.java index 19f1ca76a6..19f49ea59d 100644 --- a/spring-security-mvc-session/src/main/java/org/baeldung/security/MySimpleUrlAuthenticationSuccessHandler.java +++ b/spring-security-mvc-session/src/main/java/org/baeldung/security/MySimpleUrlAuthenticationSuccessHandler.java @@ -21,7 +21,7 @@ public class MySimpleUrlAuthenticationSuccessHandler implements AuthenticationSu private RedirectStrategy redirectStrategy = new DefaultRedirectStrategy(); - protected MySimpleUrlAuthenticationSuccessHandler() { + public MySimpleUrlAuthenticationSuccessHandler() { super(); } diff --git a/spring-security-mvc-session/src/main/java/org/baeldung/spring/SecSecurityConfig.java b/spring-security-mvc-session/src/main/java/org/baeldung/spring/SecSecurityConfig.java index 4da114c78b..c62b795e01 100644 --- a/spring-security-mvc-session/src/main/java/org/baeldung/spring/SecSecurityConfig.java +++ b/spring-security-mvc-session/src/main/java/org/baeldung/spring/SecSecurityConfig.java @@ -1,14 +1,66 @@ package org.baeldung.spring; +import org.baeldung.security.MySimpleUrlAuthenticationSuccessHandler; +import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; -import org.springframework.context.annotation.ImportResource; +import org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder; +import org.springframework.security.config.annotation.web.builders.HttpSecurity; +import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity; +import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter; +import org.springframework.security.web.authentication.AuthenticationSuccessHandler; +import org.springframework.security.web.session.HttpSessionEventPublisher; @Configuration -@ImportResource({ "classpath:webSecurityConfig.xml" }) -public class SecSecurityConfig { +// @ImportResource({ "classpath:webSecurityConfig.xml" }) +@EnableWebSecurity +public class SecSecurityConfig extends WebSecurityConfigurerAdapter { public SecSecurityConfig() { super(); } + @Override + protected void configure(final AuthenticationManagerBuilder auth) throws Exception { + // @formatter:off + auth.inMemoryAuthentication() + .withUser("user1").password("user1Pass").roles("USER") + .and() + .withUser("admin1").password("admin1Pass").roles("ADMIN"); + // @formatter:on + } + + @Override + protected void configure(final HttpSecurity http) throws Exception { + // @formatter:off + http + .csrf().disable() + .authorizeRequests() + .antMatchers("/anonymous*").anonymous() + .antMatchers("/login*").permitAll() + .anyRequest().authenticated() + .and() + .formLogin() + .loginPage("/login.html") + .loginProcessingUrl("/login") + .successHandler(successHandler()) + .failureUrl("/login.html?error=true") + .and() + .logout().deleteCookies("JSESSIONID") + .and() + .rememberMe().key("uniqueAndSecret").tokenValiditySeconds(86400) + .and() + .sessionManagement().invalidSessionUrl("/invalidSession.html").maximumSessions(2).expiredUrl("/sessionExpired.html"); + + // @formatter:on + } + + private AuthenticationSuccessHandler successHandler() { + return new MySimpleUrlAuthenticationSuccessHandler(); + } + + @Bean + public HttpSessionEventPublisher httpSessionEventPublisher() { + return new HttpSessionEventPublisher(); + } + } diff --git a/spring-security-mvc-session/src/main/webapp/WEB-INF/web.xml b/spring-security-mvc-session/src/main/webapp/WEB-INF/web.xml index 45b49b2a91..57826fadac 100644 --- a/spring-security-mvc-session/src/main/webapp/WEB-INF/web.xml +++ b/spring-security-mvc-session/src/main/webapp/WEB-INF/web.xml @@ -1,9 +1,8 @@ - + Spring MVC Session Application @@ -13,9 +12,9 @@ org.baeldung.web.SessionListenerWithMetrics - + diff --git a/spring-security-oauth/README.md b/spring-security-oauth/README.md deleted file mode 100644 index 6baa0a1824..0000000000 --- a/spring-security-oauth/README.md +++ /dev/null @@ -1,17 +0,0 @@ -## Spring Security OAuth - -### Relevant Articles: -- [Spring REST API + OAuth2 + AngularJS](http://www.baeldung.com/rest-api-spring-oauth2-angularjs) - -### Build the Project -``` -mvn clean install -``` - -### Notes -- Make sure to run the project on port 8081 -- Run 4 sub-modules simultaneously - - spring-security-oauth-server - - spring-security-oauth-resource - - spring-security-oauth-ui-implicit - - spring-security-oauth-ui-password diff --git a/spring-security-oauth/pom.xml b/spring-security-oauth/pom.xml deleted file mode 100644 index 7bb7aa86c8..0000000000 --- a/spring-security-oauth/pom.xml +++ /dev/null @@ -1,104 +0,0 @@ - - 4.0.0 - org.baeldung - spring-security-oauth - 1.0.0-SNAPSHOT - - spring-security-oauth - pom - - - org.springframework.boot - spring-boot-starter-parent - 1.3.1.RELEASE - - - - spring-security-oauth-server - spring-security-oauth-resource - spring-security-oauth-ui-implicit - spring-security-oauth-ui-password - - - - spring-security-oauth - - - - - org.apache.maven.plugins - maven-compiler-plugin - ${maven-compiler-plugin.version} - - 1.8 - 1.8 - - - - - org.apache.maven.plugins - maven-war-plugin - ${maven-war-plugin.version} - - false - - - - - org.apache.maven.plugins - maven-surefire-plugin - ${maven-surefire-plugin.version} - - true - - **/*IntegrationTest.java - **/*LiveTest.java - - - - - - - - - - - - - - - 4.2.2.RELEASE - 4.0.3.RELEASE - 2.0.7.RELEASE - - - - 2.5.1 - - - 1.7.12 - 1.1.3 - - - 18.0 - 3.3.2 - - - 1.3 - 4.11 - 1.10.19 - - 4.4 - 4.4 - - 2.4.0 - - - 3.3 - 2.6 - 2.19 - 1.4.16 - - - - \ No newline at end of file diff --git a/spring-security-oauth/spring-security-oauth-resource/pom.xml b/spring-security-oauth/spring-security-oauth-resource/pom.xml deleted file mode 100644 index 84a5027cb5..0000000000 --- a/spring-security-oauth/spring-security-oauth-resource/pom.xml +++ /dev/null @@ -1,55 +0,0 @@ - - 4.0.0 - spring-security-oauth-resource - spring-security-oauth-resource - war - - - org.baeldung - spring-security-oauth - 1.0.0-SNAPSHOT - - - - - org.springframework.boot - spring-boot-starter-web - - - - org.springframework - spring-jdbc - - - - mysql - mysql-connector-java - runtime - - - - org.springframework.security.oauth - spring-security-oauth2 - ${oauth.version} - - - - org.apache.commons - commons-lang3 - ${commons-lang3.version} - - - - - - spring-security-oauth-resource - - - src/main/resources - true - - - - - \ No newline at end of file diff --git a/spring-security-oauth/spring-security-oauth-resource/src/main/java/org/baeldung/config/OAuth2ResourceServerConfig.java b/spring-security-oauth/spring-security-oauth-resource/src/main/java/org/baeldung/config/OAuth2ResourceServerConfig.java deleted file mode 100644 index c5e33739ae..0000000000 --- a/spring-security-oauth/spring-security-oauth-resource/src/main/java/org/baeldung/config/OAuth2ResourceServerConfig.java +++ /dev/null @@ -1,48 +0,0 @@ -package org.baeldung.config; - -import javax.sql.DataSource; - -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.context.annotation.Bean; -import org.springframework.context.annotation.Configuration; -import org.springframework.context.annotation.PropertySource; -import org.springframework.core.env.Environment; -import org.springframework.jdbc.datasource.DriverManagerDataSource; -import org.springframework.security.access.expression.method.MethodSecurityExpressionHandler; -import org.springframework.security.config.annotation.method.configuration.EnableGlobalMethodSecurity; -import org.springframework.security.config.annotation.method.configuration.GlobalMethodSecurityConfiguration; -import org.springframework.security.oauth2.config.annotation.web.configuration.EnableResourceServer; -import org.springframework.security.oauth2.provider.expression.OAuth2MethodSecurityExpressionHandler; -import org.springframework.security.oauth2.provider.token.TokenStore; -import org.springframework.security.oauth2.provider.token.store.JdbcTokenStore; - -@Configuration -@PropertySource({ "classpath:persistence.properties" }) -@EnableResourceServer -@EnableGlobalMethodSecurity(prePostEnabled = true) -public class OAuth2ResourceServerConfig extends GlobalMethodSecurityConfiguration { - - @Autowired - private Environment env; - - @Override - protected MethodSecurityExpressionHandler createExpressionHandler() { - return new OAuth2MethodSecurityExpressionHandler(); - } - - @Bean - public DataSource dataSource() { - final DriverManagerDataSource dataSource = new DriverManagerDataSource(); - dataSource.setDriverClassName(env.getProperty("jdbc.driverClassName")); - dataSource.setUrl(env.getProperty("jdbc.url")); - dataSource.setUsername(env.getProperty("jdbc.user")); - dataSource.setPassword(env.getProperty("jdbc.pass")); - return dataSource; - } - - @Bean - public TokenStore tokenStore() { - return new JdbcTokenStore(dataSource()); - } - -} diff --git a/spring-security-oauth/spring-security-oauth-resource/src/main/java/org/baeldung/config/ResourceServerApplication.java b/spring-security-oauth/spring-security-oauth-resource/src/main/java/org/baeldung/config/ResourceServerApplication.java deleted file mode 100644 index 1e35eff551..0000000000 --- a/spring-security-oauth/spring-security-oauth-resource/src/main/java/org/baeldung/config/ResourceServerApplication.java +++ /dev/null @@ -1,14 +0,0 @@ -package org.baeldung.config; - -import org.springframework.boot.SpringApplication; -import org.springframework.boot.autoconfigure.SpringBootApplication; -import org.springframework.boot.context.web.SpringBootServletInitializer; - -@SpringBootApplication -public class ResourceServerApplication extends SpringBootServletInitializer { - - public static void main(String[] args) { - SpringApplication.run(ResourceServerApplication.class, args); - } - -} \ No newline at end of file diff --git a/spring-security-oauth/spring-security-oauth-resource/src/main/java/org/baeldung/config/ResourceServerWebConfig.java b/spring-security-oauth/spring-security-oauth-resource/src/main/java/org/baeldung/config/ResourceServerWebConfig.java deleted file mode 100644 index c040c8ac42..0000000000 --- a/spring-security-oauth/spring-security-oauth-resource/src/main/java/org/baeldung/config/ResourceServerWebConfig.java +++ /dev/null @@ -1,13 +0,0 @@ -package org.baeldung.config; - -import org.springframework.context.annotation.ComponentScan; -import org.springframework.context.annotation.Configuration; -import org.springframework.web.servlet.config.annotation.EnableWebMvc; -import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter; - -@Configuration -@EnableWebMvc -@ComponentScan({ "org.baeldung.web.controller" }) -public class ResourceServerWebConfig extends WebMvcConfigurerAdapter { - -} diff --git a/spring-security-oauth/spring-security-oauth-resource/src/main/java/org/baeldung/web/controller/FooController.java b/spring-security-oauth/spring-security-oauth-resource/src/main/java/org/baeldung/web/controller/FooController.java deleted file mode 100644 index 8dfa19bd84..0000000000 --- a/spring-security-oauth/spring-security-oauth-resource/src/main/java/org/baeldung/web/controller/FooController.java +++ /dev/null @@ -1,29 +0,0 @@ -package org.baeldung.web.controller; - -import static org.apache.commons.lang3.RandomStringUtils.randomAlphabetic; -import static org.apache.commons.lang3.RandomStringUtils.randomNumeric; - -import org.baeldung.web.dto.Foo; -import org.springframework.security.access.prepost.PreAuthorize; -import org.springframework.stereotype.Controller; -import org.springframework.web.bind.annotation.PathVariable; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RequestMethod; -import org.springframework.web.bind.annotation.ResponseBody; - -@Controller -public class FooController { - - public FooController() { - super(); - } - - // API - read - @PreAuthorize("#oauth2.hasScope('read')") - @RequestMapping(method = RequestMethod.GET, value = "/foos/{id}") - @ResponseBody - public Foo findById(@PathVariable final long id) { - return new Foo(Long.parseLong(randomNumeric(2)), randomAlphabetic(4)); - } - -} diff --git a/spring-security-oauth/spring-security-oauth-resource/src/main/java/org/baeldung/web/dto/Foo.java b/spring-security-oauth/spring-security-oauth-resource/src/main/java/org/baeldung/web/dto/Foo.java deleted file mode 100644 index 9d26618e7f..0000000000 --- a/spring-security-oauth/spring-security-oauth-resource/src/main/java/org/baeldung/web/dto/Foo.java +++ /dev/null @@ -1,36 +0,0 @@ -package org.baeldung.web.dto; - -public class Foo { - private long id; - private String name; - - public Foo() { - super(); - } - - public Foo(final long id, final String name) { - super(); - - this.id = id; - this.name = name; - } - - // - - public long getId() { - return id; - } - - public void setId(final long id) { - this.id = id; - } - - public String getName() { - return name; - } - - public void setName(final String name) { - this.name = name; - } - -} \ No newline at end of file diff --git a/spring-security-oauth/spring-security-oauth-resource/src/main/resources/application.properties b/spring-security-oauth/spring-security-oauth-resource/src/main/resources/application.properties deleted file mode 100644 index 62a10d1751..0000000000 --- a/spring-security-oauth/spring-security-oauth-resource/src/main/resources/application.properties +++ /dev/null @@ -1,2 +0,0 @@ -server.contextPath=/spring-security-oauth-resource -server.port=8081 \ No newline at end of file diff --git a/spring-security-oauth/spring-security-oauth-resource/src/main/resources/persistence.properties b/spring-security-oauth/spring-security-oauth-resource/src/main/resources/persistence.properties deleted file mode 100644 index b975b10e9f..0000000000 --- a/spring-security-oauth/spring-security-oauth-resource/src/main/resources/persistence.properties +++ /dev/null @@ -1,6 +0,0 @@ -################### DataSource Configuration ########################## -jdbc.driverClassName=com.mysql.jdbc.Driver -jdbc.url=jdbc:mysql://localhost:3306/oauth2?createDatabaseIfNotExist=true -jdbc.user=tutorialuser -jdbc.pass=tutorialmy5ql - diff --git a/spring-security-oauth/spring-security-oauth-server/pom.xml b/spring-security-oauth/spring-security-oauth-server/pom.xml deleted file mode 100644 index ebbaa993f1..0000000000 --- a/spring-security-oauth/spring-security-oauth-server/pom.xml +++ /dev/null @@ -1,64 +0,0 @@ - - 4.0.0 - spring-security-oauth-server - - spring-security-oauth-server - war - - - org.baeldung - spring-security-oauth - 1.0.0-SNAPSHOT - - - - - - - - org.springframework.boot - spring-boot-starter-web - - - - org.springframework - spring-jdbc - - - - mysql - mysql-connector-java - runtime - - - - - - - org.springframework.security.oauth - spring-security-oauth2 - ${oauth.version} - - - - - - - spring-security-oauth-server - - - src/main/resources - true - - - - - org.springframework.boot - spring-boot-maven-plugin - - - - - - - \ No newline at end of file diff --git a/spring-security-oauth/spring-security-oauth-server/src/main/java/org/baeldung/config/OAuth2AuthorizationServerConfig.java b/spring-security-oauth/spring-security-oauth-server/src/main/java/org/baeldung/config/OAuth2AuthorizationServerConfig.java deleted file mode 100644 index c2f6ca41ae..0000000000 --- a/spring-security-oauth/spring-security-oauth-server/src/main/java/org/baeldung/config/OAuth2AuthorizationServerConfig.java +++ /dev/null @@ -1,96 +0,0 @@ -package org.baeldung.config; - -import javax.sql.DataSource; - -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.beans.factory.annotation.Qualifier; -import org.springframework.beans.factory.annotation.Value; -import org.springframework.context.annotation.Bean; -import org.springframework.context.annotation.Configuration; -import org.springframework.context.annotation.PropertySource; -import org.springframework.core.env.Environment; -import org.springframework.core.io.Resource; -import org.springframework.jdbc.datasource.DriverManagerDataSource; -import org.springframework.jdbc.datasource.init.DataSourceInitializer; -import org.springframework.jdbc.datasource.init.DatabasePopulator; -import org.springframework.jdbc.datasource.init.ResourceDatabasePopulator; -import org.springframework.security.authentication.AuthenticationManager; -import org.springframework.security.oauth2.config.annotation.configurers.ClientDetailsServiceConfigurer; -import org.springframework.security.oauth2.config.annotation.web.configuration.AuthorizationServerConfigurerAdapter; -import org.springframework.security.oauth2.config.annotation.web.configuration.EnableAuthorizationServer; -import org.springframework.security.oauth2.config.annotation.web.configurers.AuthorizationServerEndpointsConfigurer; -import org.springframework.security.oauth2.config.annotation.web.configurers.AuthorizationServerSecurityConfigurer; -import org.springframework.security.oauth2.provider.token.TokenStore; -import org.springframework.security.oauth2.provider.token.store.JdbcTokenStore; - -@Configuration -@PropertySource({ "classpath:persistence.properties" }) -@EnableAuthorizationServer -public class OAuth2AuthorizationServerConfig extends AuthorizationServerConfigurerAdapter { - - @Autowired - private Environment env; - - @Autowired - @Qualifier("authenticationManagerBean") - private AuthenticationManager authenticationManager; - - @Value("classpath:schema.sql") - private Resource schemaScript; - - @Override - public void configure(AuthorizationServerSecurityConfigurer oauthServer) throws Exception { - oauthServer.tokenKeyAccess("permitAll()").checkTokenAccess("isAuthenticated()"); - } - - @Override - public void configure(ClientDetailsServiceConfigurer clients) throws Exception { - // @formatter:off - clients.jdbc(dataSource()) - .withClient("clientId") - .authorizedGrantTypes("implicit") - .scopes("read") - .autoApprove(true) - .and() - .withClient("clientIdPassword") - .secret("secret") - .authorizedGrantTypes("password","authorization_code", "refresh_token") - .scopes("read"); - - // @formatter:on - } - - @Override - public void configure(AuthorizationServerEndpointsConfigurer endpoints) throws Exception { - endpoints.tokenStore(tokenStore()).authenticationManager(authenticationManager); - } - - @Bean - public DataSourceInitializer dataSourceInitializer(final DataSource dataSource) { - final DataSourceInitializer initializer = new DataSourceInitializer(); - initializer.setDataSource(dataSource); - initializer.setDatabasePopulator(databasePopulator()); - return initializer; - } - - private DatabasePopulator databasePopulator() { - final ResourceDatabasePopulator populator = new ResourceDatabasePopulator(); - populator.addScript(schemaScript); - return populator; - } - - @Bean - public DataSource dataSource() { - final DriverManagerDataSource dataSource = new DriverManagerDataSource(); - dataSource.setDriverClassName(env.getProperty("jdbc.driverClassName")); - dataSource.setUrl(env.getProperty("jdbc.url")); - dataSource.setUsername(env.getProperty("jdbc.user")); - dataSource.setPassword(env.getProperty("jdbc.pass")); - return dataSource; - } - - @Bean - public TokenStore tokenStore() { - return new JdbcTokenStore(dataSource()); - } -} diff --git a/spring-security-oauth/spring-security-oauth-server/src/main/resources/application.properties b/spring-security-oauth/spring-security-oauth-server/src/main/resources/application.properties deleted file mode 100644 index e33e7dabf6..0000000000 --- a/spring-security-oauth/spring-security-oauth-server/src/main/resources/application.properties +++ /dev/null @@ -1,2 +0,0 @@ -server.contextPath=/spring-security-oauth-server -server.port=8081 \ No newline at end of file diff --git a/spring-security-oauth/spring-security-oauth-server/src/main/resources/persistence.properties b/spring-security-oauth/spring-security-oauth-server/src/main/resources/persistence.properties deleted file mode 100644 index b975b10e9f..0000000000 --- a/spring-security-oauth/spring-security-oauth-server/src/main/resources/persistence.properties +++ /dev/null @@ -1,6 +0,0 @@ -################### DataSource Configuration ########################## -jdbc.driverClassName=com.mysql.jdbc.Driver -jdbc.url=jdbc:mysql://localhost:3306/oauth2?createDatabaseIfNotExist=true -jdbc.user=tutorialuser -jdbc.pass=tutorialmy5ql - diff --git a/spring-security-oauth/spring-security-oauth-server/src/main/resources/schema.sql b/spring-security-oauth/spring-security-oauth-server/src/main/resources/schema.sql deleted file mode 100644 index 9c0b504a42..0000000000 --- a/spring-security-oauth/spring-security-oauth-server/src/main/resources/schema.sql +++ /dev/null @@ -1,71 +0,0 @@ -drop table if exists oauth_client_details; -create table oauth_client_details ( - client_id VARCHAR(255) PRIMARY KEY, - resource_ids VARCHAR(255), - client_secret VARCHAR(255), - scope VARCHAR(255), - authorized_grant_types VARCHAR(255), - web_server_redirect_uri VARCHAR(255), - authorities VARCHAR(255), - access_token_validity INTEGER, - refresh_token_validity INTEGER, - additional_information VARCHAR(4096), - autoapprove VARCHAR(255) -); - -drop table if exists oauth_client_token; -create table oauth_client_token ( - token_id VARCHAR(255), - token LONG VARBINARY, - authentication_id VARCHAR(255) PRIMARY KEY, - user_name VARCHAR(255), - client_id VARCHAR(255) -); - -drop table if exists oauth_access_token; -create table oauth_access_token ( - token_id VARCHAR(255), - token LONG VARBINARY, - authentication_id VARCHAR(255) PRIMARY KEY, - user_name VARCHAR(255), - client_id VARCHAR(255), - authentication LONG VARBINARY, - refresh_token VARCHAR(255) -); - -drop table if exists oauth_refresh_token; -create table oauth_refresh_token ( - token_id VARCHAR(255), - token LONG VARBINARY, - authentication LONG VARBINARY -); - -drop table if exists oauth_code; -create table oauth_code ( - code VARCHAR(255), authentication LONG VARBINARY -); - -drop table if exists oauth_approvals; -create table oauth_approvals ( - userId VARCHAR(255), - clientId VARCHAR(255), - scope VARCHAR(255), - status VARCHAR(10), - expiresAt TIMESTAMP, - lastModifiedAt TIMESTAMP -); - -drop table if exists ClientDetails; -create table ClientDetails ( - appId VARCHAR(255) PRIMARY KEY, - resourceIds VARCHAR(255), - appSecret VARCHAR(255), - scope VARCHAR(255), - grantTypes VARCHAR(255), - redirectUrl VARCHAR(255), - authorities VARCHAR(255), - access_token_validity INTEGER, - refresh_token_validity INTEGER, - additionalInformation VARCHAR(4096), - autoApproveScopes VARCHAR(255) -); diff --git a/spring-security-oauth/spring-security-oauth-ui-implicit/.project b/spring-security-oauth/spring-security-oauth-ui-implicit/.project deleted file mode 100644 index c9fc2aa8f0..0000000000 --- a/spring-security-oauth/spring-security-oauth-ui-implicit/.project +++ /dev/null @@ -1,53 +0,0 @@ - - - spring-security-oauth-ui-implicit - - - - - - org.eclipse.ui.externaltools.ExternalToolBuilder - full,incremental, - - - LaunchConfigHandle - <project>/.externalToolBuilders/org.eclipse.wst.jsdt.core.javascriptValidator (1).launch - - - - - org.eclipse.jdt.core.javabuilder - - - - - org.eclipse.wst.common.project.facet.core.builder - - - - - org.eclipse.m2e.core.maven2Builder - - - - - org.springframework.ide.eclipse.core.springbuilder - - - - - org.eclipse.wst.validation.validationbuilder - - - - - - org.eclipse.jem.workbench.JavaEMFNature - org.eclipse.wst.common.modulecore.ModuleCoreNature - org.springframework.ide.eclipse.core.springnature - org.eclipse.jdt.core.javanature - org.eclipse.m2e.core.maven2Nature - org.eclipse.wst.common.project.facet.core.nature - org.eclipse.wst.jsdt.core.jsNature - - diff --git a/spring-security-oauth/spring-security-oauth-ui-implicit/pom.xml b/spring-security-oauth/spring-security-oauth-ui-implicit/pom.xml deleted file mode 100644 index aaa2900d48..0000000000 --- a/spring-security-oauth/spring-security-oauth-ui-implicit/pom.xml +++ /dev/null @@ -1,36 +0,0 @@ - - 4.0.0 - spring-security-oauth-ui-implicit - - spring-security-oauth-ui-implicit - war - - - org.baeldung - spring-security-oauth - 1.0.0-SNAPSHOT - - - - - - org.springframework.boot - spring-boot-starter-web - - - - org.springframework.boot - spring-boot-starter-thymeleaf - - - - - spring-security-oauth-ui-implicit - - - src/main/resources - true - - - - \ No newline at end of file diff --git a/spring-security-oauth/spring-security-oauth-ui-implicit/src/main/resources/application.properties b/spring-security-oauth/spring-security-oauth-ui-implicit/src/main/resources/application.properties deleted file mode 100644 index 33de0adb88..0000000000 --- a/spring-security-oauth/spring-security-oauth-ui-implicit/src/main/resources/application.properties +++ /dev/null @@ -1,2 +0,0 @@ -server.contextPath=/spring-security-oauth-ui-implicit -server.port=8081 \ No newline at end of file diff --git a/spring-security-oauth/spring-security-oauth-ui-implicit/src/main/resources/oauth-ng.js b/spring-security-oauth/spring-security-oauth-ui-implicit/src/main/resources/oauth-ng.js deleted file mode 100644 index 333070b935..0000000000 --- a/spring-security-oauth/spring-security-oauth-ui-implicit/src/main/resources/oauth-ng.js +++ /dev/null @@ -1,539 +0,0 @@ -/* oauth-ng - v0.4.2 - 2015-08-27 */ - -'use strict'; - -// App libraries -angular.module('oauth', [ - 'oauth.directive', // login directive - 'oauth.accessToken', // access token service - 'oauth.endpoint', // oauth endpoint service - 'oauth.profile', // profile model - 'oauth.storage', // storage - 'oauth.interceptor', // bearer token interceptor - 'oauth.configuration' // token appender -]) - .config(['$locationProvider','$httpProvider', - function($locationProvider, $httpProvider) { - $httpProvider.interceptors.push('ExpiredInterceptor'); - }]); - -'use strict'; - -var accessTokenService = angular.module('oauth.accessToken', []); - -accessTokenService.factory('AccessToken', ['Storage', '$rootScope', '$location', '$interval', function(Storage, $rootScope, $location, $interval){ - - var service = { - token: null - }, - oAuth2HashTokens = [ //per http://tools.ietf.org/html/rfc6749#section-4.2.2 - 'access_token', 'token_type', 'expires_in', 'scope', 'state', - 'error','error_description' - ]; - - /** - * Returns the access token. - */ - service.get = function(){ - return this.token; - }; - - /** - * Sets and returns the access token. It tries (in order) the following strategies: - * - takes the token from the fragment URI - * - takes the token from the sessionStorage - */ - service.set = function(){ - this.setTokenFromString($location.hash()); - - //If hash is present in URL always use it, cuz its coming from oAuth2 provider redirect - if(null === service.token){ - setTokenFromSession(); - } - - return this.token; - }; - - /** - * Delete the access token and remove the session. - * @returns {null} - */ - service.destroy = function(){ - Storage.delete('token'); - this.token = null; - return this.token; - }; - - /** - * Tells if the access token is expired. - */ - service.expired = function(){ - return (this.token && this.token.expires_at && new Date(this.token.expires_at) < new Date()); - }; - - /** - * Get the access token from a string and save it - * @param hash - */ - service.setTokenFromString = function(hash){ - var params = getTokenFromString(hash); - - if(params){ - removeFragment(); - setToken(params); - setExpiresAt(); - // We have to save it again to make sure expires_at is set - // and the expiry event is set up properly - setToken(this.token); - $rootScope.$broadcast('oauth:login', service.token); - } - }; - - /* * * * * * * * * * - * PRIVATE METHODS * - * * * * * * * * * */ - - /** - * Set the access token from the sessionStorage. - */ - var setTokenFromSession = function(){ - var params = Storage.get('token'); - if (params) { - setToken(params); - } - }; - - /** - * Set the access token. - * - * @param params - * @returns {*|{}} - */ - var setToken = function(params){ - service.token = service.token || {}; // init the token - angular.extend(service.token, params); // set the access token params - setTokenInSession(); // save the token into the session - setExpiresAtEvent(); // event to fire when the token expires - - return service.token; - }; - - /** - * Parse the fragment URI and return an object - * @param hash - * @returns {{}} - */ - var getTokenFromString = function(hash){ - var params = {}, - regex = /([^&=]+)=([^&]*)/g, - m; - - while ((m = regex.exec(hash)) !== null) { - params[decodeURIComponent(m[1])] = decodeURIComponent(m[2]); - } - - if(params.access_token || params.error){ - return params; - } - }; - - /** - * Save the access token into the session - */ - var setTokenInSession = function(){ - Storage.set('token', service.token); - }; - - /** - * Set the access token expiration date (useful for refresh logics) - */ - var setExpiresAt = function(){ - if (!service.token) { - return; - } - if(typeof(service.token.expires_in) !== 'undefined' && service.token.expires_in !== null) { - var expires_at = new Date(); - expires_at.setSeconds(expires_at.getSeconds() + parseInt(service.token.expires_in)-60); // 60 seconds less to secure browser and response latency - service.token.expires_at = expires_at; - } - else { - service.token.expires_at = null; - } - }; - - - /** - * Set the timeout at which the expired event is fired - */ - var setExpiresAtEvent = function(){ - // Don't bother if there's no expires token - if (typeof(service.token.expires_at) === 'undefined' || service.token.expires_at === null) { - return; - } - var time = (new Date(service.token.expires_at))-(new Date()); - if(time && time > 0){ - $interval(function(){ - $rootScope.$broadcast('oauth:expired', service.token); - }, time, 1); - } - }; - - /** - * Remove the oAuth2 pieces from the hash fragment - */ - var removeFragment = function(){ - var curHash = $location.hash(); - angular.forEach(oAuth2HashTokens,function(hashKey){ - var re = new RegExp('&'+hashKey+'(=[^&]*)?|^'+hashKey+'(=[^&]*)?&?'); - curHash = curHash.replace(re,''); - }); - - $location.hash(curHash); - }; - - return service; - -}]); - -'use strict'; - -var endpointClient = angular.module('oauth.endpoint', []); - -endpointClient.factory('Endpoint', function() { - - var service = {}; - - /* - * Defines the authorization URL - */ - - service.set = function(configuration) { - this.config = configuration; - return this.get(); - }; - - /* - * Returns the authorization URL - */ - - service.get = function( overrides ) { - var params = angular.extend( {}, service.config, overrides); - var oAuthScope = (params.scope) ? encodeURIComponent(params.scope) : '', - state = (params.state) ? encodeURIComponent(params.state) : '', - authPathHasQuery = (params.authorizePath.indexOf('?') === -1) ? false : true, - appendChar = (authPathHasQuery) ? '&' : '?', //if authorizePath has ? already append OAuth2 params - responseType = (params.responseType) ? encodeURIComponent(params.responseType) : ''; - - var url = params.site + - params.authorizePath + - appendChar + 'response_type=' + responseType + '&' + - 'client_id=' + encodeURIComponent(params.clientId) + '&' + - 'redirect_uri=' + encodeURIComponent(params.redirectUri) + '&' + - 'scope=' + oAuthScope + '&' + - 'state=' + state; - - if( params.nonce ) { - url = url + '&nonce=' + params.nonce; - } - return url; - }; - - /* - * Redirects the app to the authorization URL - */ - - service.redirect = function( overrides ) { - var targetLocation = this.get( overrides ); - window.location.replace(targetLocation); - }; - - return service; -}); - -'use strict'; - -var profileClient = angular.module('oauth.profile', []); - -profileClient.factory('Profile', ['$http', 'AccessToken', '$rootScope', function($http, AccessToken, $rootScope) { - var service = {}; - var profile; - - service.find = function(uri) { - var promise = $http.get(uri, { headers: headers() }); - promise.success(function(response) { - profile = response; - $rootScope.$broadcast('oauth:profile', profile); - }); - return promise; - }; - - service.get = function() { - return profile; - }; - - service.set = function(resource) { - profile = resource; - return profile; - }; - - var headers = function() { - return { Authorization: 'Bearer ' + AccessToken.get().access_token }; - }; - - return service; -}]); - -'use strict'; - -var storageService = angular.module('oauth.storage', ['ngStorage']); - -storageService.factory('Storage', ['$rootScope', '$sessionStorage', '$localStorage', function($rootScope, $sessionStorage, $localStorage){ - - var service = { - storage: $sessionStorage // By default - }; - - /** - * Deletes the item from storage, - * Returns the item's previous value - */ - service.delete = function (name) { - var stored = this.get(name); - delete this.storage[name]; - return stored; - }; - - /** - * Returns the item from storage - */ - service.get = function (name) { - return this.storage[name]; - }; - - /** - * Sets the item in storage to the value specified - * Returns the item's value - */ - service.set = function (name, value) { - this.storage[name] = value; - return this.get(name); - }; - - /** - * Change the storage service being used - */ - service.use = function (storage) { - if (storage === 'sessionStorage') { - this.storage = $sessionStorage; - } else if (storage === 'localStorage') { - this.storage = $localStorage; - } - }; - - return service; -}]); -'use strict'; - -var oauthConfigurationService = angular.module('oauth.configuration', []); - -oauthConfigurationService.provider('OAuthConfiguration', function() { - var _config = {}; - - this.init = function(config, httpProvider) { - _config.protectedResources = config.protectedResources || []; - httpProvider.interceptors.push('AuthInterceptor'); - }; - - this.$get = function() { - return { - getConfig: function() { - return _config; - } - }; - }; -}) -.factory('AuthInterceptor', function($q, $rootScope, OAuthConfiguration, AccessToken) { - return { - 'request': function(config) { - OAuthConfiguration.getConfig().protectedResources.forEach(function(resource) { - // If the url is one of the protected resources, we want to see if there's a token and then - // add the token if it exists. - if (config.url.indexOf(resource) > -1) { - var token = AccessToken.get(); - if (token) { - config.headers.Authorization = 'Bearer ' + token.access_token; - } - } - }); - - return config; - } - }; -}); -'use strict'; - -var interceptorService = angular.module('oauth.interceptor', []); - -interceptorService.factory('ExpiredInterceptor', ['Storage', '$rootScope', function (Storage, $rootScope) { - - var service = {}; - - service.request = function(config) { - var token = Storage.get('token'); - - if (token && expired(token)) { - $rootScope.$broadcast('oauth:expired', token); - } - - return config; - }; - - var expired = function(token) { - return (token && token.expires_at && new Date(token.expires_at) < new Date()); - }; - - return service; -}]); - -'use strict'; - -var directives = angular.module('oauth.directive', []); - -directives.directive('oauth', [ - 'AccessToken', - 'Endpoint', - 'Profile', - 'Storage', - '$location', - '$rootScope', - '$compile', - '$http', - '$templateCache', - function(AccessToken, Endpoint, Profile, Storage, $location, $rootScope, $compile, $http, $templateCache) { - - var definition = { - restrict: 'AE', - replace: true, - scope: { - site: '@', // (required) set the oauth server host (e.g. http://oauth.example.com) - clientId: '@', // (required) client id - redirectUri: '@', // (required) client redirect uri - responseType: '@', // (optional) response type, defaults to token (use 'token' for implicit flow and 'code' for authorization code flow - scope: '@', // (optional) scope - profileUri: '@', // (optional) user profile uri (e.g http://example.com/me) - template: '@', // (optional) template to render (e.g bower_components/oauth-ng/dist/views/templates/default.html) - text: '@', // (optional) login text - authorizePath: '@', // (optional) authorization url - state: '@', // (optional) An arbitrary unique string created by your app to guard against Cross-site Request Forgery - storage: '@' // (optional) Store token in 'sessionStorage' or 'localStorage', defaults to 'sessionStorage' - } - }; - - definition.link = function postLink(scope, element) { - scope.show = 'none'; - - scope.$watch('clientId', function() { - init(); - }); - - var init = function() { - initAttributes(); // sets defaults - Storage.use(scope.storage);// set storage - compile(); // compiles the desired layout - Endpoint.set(scope); // sets the oauth authorization url - AccessToken.set(scope); // sets the access token object (if existing, from fragment or session) - initProfile(scope); // gets the profile resource (if existing the access token) - initView(); // sets the view (logged in or out) - }; - - var initAttributes = function() { - scope.authorizePath = scope.authorizePath || '/oauth/authorize'; - scope.tokenPath = scope.tokenPath || '/oauth/token'; - scope.template = scope.template || 'bower_components/oauth-ng/dist/views/templates/default.html'; - scope.responseType = scope.responseType || 'token'; - scope.text = scope.text || 'Sign In'; - scope.state = scope.state || undefined; - scope.scope = scope.scope || undefined; - scope.storage = scope.storage || 'sessionStorage'; - }; - - var compile = function() { - $http.get(scope.template, { cache: $templateCache }).success(function(html) { - element.html(html); - $compile(element.contents())(scope); - }); - }; - - var initProfile = function(scope) { - var token = AccessToken.get(); - - if (token && token.access_token && scope.profileUri) { - Profile.find(scope.profileUri).success(function(response) { - scope.profile = response; - }); - } - }; - - var initView = function() { - var token = AccessToken.get(); - - if (!token) { - return loggedOut(); // without access token it's logged out - } - if (token.access_token) { - return authorized(); // if there is the access token we are done - } - if (token.error) { - return denied(); // if the request has been denied we fire the denied event - } - }; - - scope.login = function() { - Endpoint.redirect(); - }; - - scope.logout = function() { - AccessToken.destroy(scope); - $rootScope.$broadcast('oauth:logout'); - loggedOut(); - }; - - scope.$on('oauth:expired', function() { - AccessToken.destroy(scope); - scope.show = 'logged-out'; - }); - - // user is authorized - var authorized = function() { - $rootScope.$broadcast('oauth:authorized', AccessToken.get()); - scope.show = 'logged-in'; - }; - - // set the oauth directive to the logged-out status - var loggedOut = function() { - $rootScope.$broadcast('oauth:loggedOut'); - scope.show = 'logged-out'; - }; - - // set the oauth directive to the denied status - var denied = function() { - scope.show = 'denied'; - $rootScope.$broadcast('oauth:denied'); - }; - - // Updates the template at runtime - scope.$on('oauth:template:update', function(event, template) { - scope.template = template; - compile(scope); - }); - - // Hack to update the directive content on logout - // TODO think to a cleaner solution - scope.$on('$routeChangeSuccess', function () { - init(); - }); - }; - - return definition; - } -]); diff --git a/spring-security-oauth/spring-security-oauth-ui-implicit/src/main/resources/templates/header.html b/spring-security-oauth/spring-security-oauth-ui-implicit/src/main/resources/templates/header.html deleted file mode 100644 index a62bce9747..0000000000 --- a/spring-security-oauth/spring-security-oauth-ui-implicit/src/main/resources/templates/header.html +++ /dev/null @@ -1,56 +0,0 @@ -
    - - - - - - - - - - - - - - -
    \ No newline at end of file diff --git a/spring-security-oauth/spring-security-oauth-ui-implicit/src/main/resources/templates/index.html b/spring-security-oauth/spring-security-oauth-ui-implicit/src/main/resources/templates/index.html deleted file mode 100755 index c98ed493bd..0000000000 --- a/spring-security-oauth/spring-security-oauth-ui-implicit/src/main/resources/templates/index.html +++ /dev/null @@ -1,29 +0,0 @@ - - - - -Spring Security OAuth - - - - -
    - -
    -

    Foo Details

    -
    - - {{foo.id}} -
    - -
    - -{{foo.name}} -
    - - -
    - - \ No newline at end of file diff --git a/spring-security-oauth/spring-security-oauth-ui-implicit/src/main/resources/templates/oauthTemp.html b/spring-security-oauth/spring-security-oauth-ui-implicit/src/main/resources/templates/oauthTemp.html deleted file mode 100644 index 1efc1eed3c..0000000000 --- a/spring-security-oauth/spring-security-oauth-ui-implicit/src/main/resources/templates/oauthTemp.html +++ /dev/null @@ -1,6 +0,0 @@ - \ No newline at end of file diff --git a/spring-security-oauth/spring-security-oauth-ui-implicit/src/main/webapp/resources/oauth-ng.js b/spring-security-oauth/spring-security-oauth-ui-implicit/src/main/webapp/resources/oauth-ng.js deleted file mode 100644 index 333070b935..0000000000 --- a/spring-security-oauth/spring-security-oauth-ui-implicit/src/main/webapp/resources/oauth-ng.js +++ /dev/null @@ -1,539 +0,0 @@ -/* oauth-ng - v0.4.2 - 2015-08-27 */ - -'use strict'; - -// App libraries -angular.module('oauth', [ - 'oauth.directive', // login directive - 'oauth.accessToken', // access token service - 'oauth.endpoint', // oauth endpoint service - 'oauth.profile', // profile model - 'oauth.storage', // storage - 'oauth.interceptor', // bearer token interceptor - 'oauth.configuration' // token appender -]) - .config(['$locationProvider','$httpProvider', - function($locationProvider, $httpProvider) { - $httpProvider.interceptors.push('ExpiredInterceptor'); - }]); - -'use strict'; - -var accessTokenService = angular.module('oauth.accessToken', []); - -accessTokenService.factory('AccessToken', ['Storage', '$rootScope', '$location', '$interval', function(Storage, $rootScope, $location, $interval){ - - var service = { - token: null - }, - oAuth2HashTokens = [ //per http://tools.ietf.org/html/rfc6749#section-4.2.2 - 'access_token', 'token_type', 'expires_in', 'scope', 'state', - 'error','error_description' - ]; - - /** - * Returns the access token. - */ - service.get = function(){ - return this.token; - }; - - /** - * Sets and returns the access token. It tries (in order) the following strategies: - * - takes the token from the fragment URI - * - takes the token from the sessionStorage - */ - service.set = function(){ - this.setTokenFromString($location.hash()); - - //If hash is present in URL always use it, cuz its coming from oAuth2 provider redirect - if(null === service.token){ - setTokenFromSession(); - } - - return this.token; - }; - - /** - * Delete the access token and remove the session. - * @returns {null} - */ - service.destroy = function(){ - Storage.delete('token'); - this.token = null; - return this.token; - }; - - /** - * Tells if the access token is expired. - */ - service.expired = function(){ - return (this.token && this.token.expires_at && new Date(this.token.expires_at) < new Date()); - }; - - /** - * Get the access token from a string and save it - * @param hash - */ - service.setTokenFromString = function(hash){ - var params = getTokenFromString(hash); - - if(params){ - removeFragment(); - setToken(params); - setExpiresAt(); - // We have to save it again to make sure expires_at is set - // and the expiry event is set up properly - setToken(this.token); - $rootScope.$broadcast('oauth:login', service.token); - } - }; - - /* * * * * * * * * * - * PRIVATE METHODS * - * * * * * * * * * */ - - /** - * Set the access token from the sessionStorage. - */ - var setTokenFromSession = function(){ - var params = Storage.get('token'); - if (params) { - setToken(params); - } - }; - - /** - * Set the access token. - * - * @param params - * @returns {*|{}} - */ - var setToken = function(params){ - service.token = service.token || {}; // init the token - angular.extend(service.token, params); // set the access token params - setTokenInSession(); // save the token into the session - setExpiresAtEvent(); // event to fire when the token expires - - return service.token; - }; - - /** - * Parse the fragment URI and return an object - * @param hash - * @returns {{}} - */ - var getTokenFromString = function(hash){ - var params = {}, - regex = /([^&=]+)=([^&]*)/g, - m; - - while ((m = regex.exec(hash)) !== null) { - params[decodeURIComponent(m[1])] = decodeURIComponent(m[2]); - } - - if(params.access_token || params.error){ - return params; - } - }; - - /** - * Save the access token into the session - */ - var setTokenInSession = function(){ - Storage.set('token', service.token); - }; - - /** - * Set the access token expiration date (useful for refresh logics) - */ - var setExpiresAt = function(){ - if (!service.token) { - return; - } - if(typeof(service.token.expires_in) !== 'undefined' && service.token.expires_in !== null) { - var expires_at = new Date(); - expires_at.setSeconds(expires_at.getSeconds() + parseInt(service.token.expires_in)-60); // 60 seconds less to secure browser and response latency - service.token.expires_at = expires_at; - } - else { - service.token.expires_at = null; - } - }; - - - /** - * Set the timeout at which the expired event is fired - */ - var setExpiresAtEvent = function(){ - // Don't bother if there's no expires token - if (typeof(service.token.expires_at) === 'undefined' || service.token.expires_at === null) { - return; - } - var time = (new Date(service.token.expires_at))-(new Date()); - if(time && time > 0){ - $interval(function(){ - $rootScope.$broadcast('oauth:expired', service.token); - }, time, 1); - } - }; - - /** - * Remove the oAuth2 pieces from the hash fragment - */ - var removeFragment = function(){ - var curHash = $location.hash(); - angular.forEach(oAuth2HashTokens,function(hashKey){ - var re = new RegExp('&'+hashKey+'(=[^&]*)?|^'+hashKey+'(=[^&]*)?&?'); - curHash = curHash.replace(re,''); - }); - - $location.hash(curHash); - }; - - return service; - -}]); - -'use strict'; - -var endpointClient = angular.module('oauth.endpoint', []); - -endpointClient.factory('Endpoint', function() { - - var service = {}; - - /* - * Defines the authorization URL - */ - - service.set = function(configuration) { - this.config = configuration; - return this.get(); - }; - - /* - * Returns the authorization URL - */ - - service.get = function( overrides ) { - var params = angular.extend( {}, service.config, overrides); - var oAuthScope = (params.scope) ? encodeURIComponent(params.scope) : '', - state = (params.state) ? encodeURIComponent(params.state) : '', - authPathHasQuery = (params.authorizePath.indexOf('?') === -1) ? false : true, - appendChar = (authPathHasQuery) ? '&' : '?', //if authorizePath has ? already append OAuth2 params - responseType = (params.responseType) ? encodeURIComponent(params.responseType) : ''; - - var url = params.site + - params.authorizePath + - appendChar + 'response_type=' + responseType + '&' + - 'client_id=' + encodeURIComponent(params.clientId) + '&' + - 'redirect_uri=' + encodeURIComponent(params.redirectUri) + '&' + - 'scope=' + oAuthScope + '&' + - 'state=' + state; - - if( params.nonce ) { - url = url + '&nonce=' + params.nonce; - } - return url; - }; - - /* - * Redirects the app to the authorization URL - */ - - service.redirect = function( overrides ) { - var targetLocation = this.get( overrides ); - window.location.replace(targetLocation); - }; - - return service; -}); - -'use strict'; - -var profileClient = angular.module('oauth.profile', []); - -profileClient.factory('Profile', ['$http', 'AccessToken', '$rootScope', function($http, AccessToken, $rootScope) { - var service = {}; - var profile; - - service.find = function(uri) { - var promise = $http.get(uri, { headers: headers() }); - promise.success(function(response) { - profile = response; - $rootScope.$broadcast('oauth:profile', profile); - }); - return promise; - }; - - service.get = function() { - return profile; - }; - - service.set = function(resource) { - profile = resource; - return profile; - }; - - var headers = function() { - return { Authorization: 'Bearer ' + AccessToken.get().access_token }; - }; - - return service; -}]); - -'use strict'; - -var storageService = angular.module('oauth.storage', ['ngStorage']); - -storageService.factory('Storage', ['$rootScope', '$sessionStorage', '$localStorage', function($rootScope, $sessionStorage, $localStorage){ - - var service = { - storage: $sessionStorage // By default - }; - - /** - * Deletes the item from storage, - * Returns the item's previous value - */ - service.delete = function (name) { - var stored = this.get(name); - delete this.storage[name]; - return stored; - }; - - /** - * Returns the item from storage - */ - service.get = function (name) { - return this.storage[name]; - }; - - /** - * Sets the item in storage to the value specified - * Returns the item's value - */ - service.set = function (name, value) { - this.storage[name] = value; - return this.get(name); - }; - - /** - * Change the storage service being used - */ - service.use = function (storage) { - if (storage === 'sessionStorage') { - this.storage = $sessionStorage; - } else if (storage === 'localStorage') { - this.storage = $localStorage; - } - }; - - return service; -}]); -'use strict'; - -var oauthConfigurationService = angular.module('oauth.configuration', []); - -oauthConfigurationService.provider('OAuthConfiguration', function() { - var _config = {}; - - this.init = function(config, httpProvider) { - _config.protectedResources = config.protectedResources || []; - httpProvider.interceptors.push('AuthInterceptor'); - }; - - this.$get = function() { - return { - getConfig: function() { - return _config; - } - }; - }; -}) -.factory('AuthInterceptor', function($q, $rootScope, OAuthConfiguration, AccessToken) { - return { - 'request': function(config) { - OAuthConfiguration.getConfig().protectedResources.forEach(function(resource) { - // If the url is one of the protected resources, we want to see if there's a token and then - // add the token if it exists. - if (config.url.indexOf(resource) > -1) { - var token = AccessToken.get(); - if (token) { - config.headers.Authorization = 'Bearer ' + token.access_token; - } - } - }); - - return config; - } - }; -}); -'use strict'; - -var interceptorService = angular.module('oauth.interceptor', []); - -interceptorService.factory('ExpiredInterceptor', ['Storage', '$rootScope', function (Storage, $rootScope) { - - var service = {}; - - service.request = function(config) { - var token = Storage.get('token'); - - if (token && expired(token)) { - $rootScope.$broadcast('oauth:expired', token); - } - - return config; - }; - - var expired = function(token) { - return (token && token.expires_at && new Date(token.expires_at) < new Date()); - }; - - return service; -}]); - -'use strict'; - -var directives = angular.module('oauth.directive', []); - -directives.directive('oauth', [ - 'AccessToken', - 'Endpoint', - 'Profile', - 'Storage', - '$location', - '$rootScope', - '$compile', - '$http', - '$templateCache', - function(AccessToken, Endpoint, Profile, Storage, $location, $rootScope, $compile, $http, $templateCache) { - - var definition = { - restrict: 'AE', - replace: true, - scope: { - site: '@', // (required) set the oauth server host (e.g. http://oauth.example.com) - clientId: '@', // (required) client id - redirectUri: '@', // (required) client redirect uri - responseType: '@', // (optional) response type, defaults to token (use 'token' for implicit flow and 'code' for authorization code flow - scope: '@', // (optional) scope - profileUri: '@', // (optional) user profile uri (e.g http://example.com/me) - template: '@', // (optional) template to render (e.g bower_components/oauth-ng/dist/views/templates/default.html) - text: '@', // (optional) login text - authorizePath: '@', // (optional) authorization url - state: '@', // (optional) An arbitrary unique string created by your app to guard against Cross-site Request Forgery - storage: '@' // (optional) Store token in 'sessionStorage' or 'localStorage', defaults to 'sessionStorage' - } - }; - - definition.link = function postLink(scope, element) { - scope.show = 'none'; - - scope.$watch('clientId', function() { - init(); - }); - - var init = function() { - initAttributes(); // sets defaults - Storage.use(scope.storage);// set storage - compile(); // compiles the desired layout - Endpoint.set(scope); // sets the oauth authorization url - AccessToken.set(scope); // sets the access token object (if existing, from fragment or session) - initProfile(scope); // gets the profile resource (if existing the access token) - initView(); // sets the view (logged in or out) - }; - - var initAttributes = function() { - scope.authorizePath = scope.authorizePath || '/oauth/authorize'; - scope.tokenPath = scope.tokenPath || '/oauth/token'; - scope.template = scope.template || 'bower_components/oauth-ng/dist/views/templates/default.html'; - scope.responseType = scope.responseType || 'token'; - scope.text = scope.text || 'Sign In'; - scope.state = scope.state || undefined; - scope.scope = scope.scope || undefined; - scope.storage = scope.storage || 'sessionStorage'; - }; - - var compile = function() { - $http.get(scope.template, { cache: $templateCache }).success(function(html) { - element.html(html); - $compile(element.contents())(scope); - }); - }; - - var initProfile = function(scope) { - var token = AccessToken.get(); - - if (token && token.access_token && scope.profileUri) { - Profile.find(scope.profileUri).success(function(response) { - scope.profile = response; - }); - } - }; - - var initView = function() { - var token = AccessToken.get(); - - if (!token) { - return loggedOut(); // without access token it's logged out - } - if (token.access_token) { - return authorized(); // if there is the access token we are done - } - if (token.error) { - return denied(); // if the request has been denied we fire the denied event - } - }; - - scope.login = function() { - Endpoint.redirect(); - }; - - scope.logout = function() { - AccessToken.destroy(scope); - $rootScope.$broadcast('oauth:logout'); - loggedOut(); - }; - - scope.$on('oauth:expired', function() { - AccessToken.destroy(scope); - scope.show = 'logged-out'; - }); - - // user is authorized - var authorized = function() { - $rootScope.$broadcast('oauth:authorized', AccessToken.get()); - scope.show = 'logged-in'; - }; - - // set the oauth directive to the logged-out status - var loggedOut = function() { - $rootScope.$broadcast('oauth:loggedOut'); - scope.show = 'logged-out'; - }; - - // set the oauth directive to the denied status - var denied = function() { - scope.show = 'denied'; - $rootScope.$broadcast('oauth:denied'); - }; - - // Updates the template at runtime - scope.$on('oauth:template:update', function(event, template) { - scope.template = template; - compile(scope); - }); - - // Hack to update the directive content on logout - // TODO think to a cleaner solution - scope.$on('$routeChangeSuccess', function () { - init(); - }); - }; - - return definition; - } -]); diff --git a/spring-security-oauth/spring-security-oauth-ui-password/pom.xml b/spring-security-oauth/spring-security-oauth-ui-password/pom.xml deleted file mode 100644 index a2bf3d07bb..0000000000 --- a/spring-security-oauth/spring-security-oauth-ui-password/pom.xml +++ /dev/null @@ -1,36 +0,0 @@ - - 4.0.0 - spring-security-oauth-ui-password - - spring-security-oauth-ui-password - war - - - org.baeldung - spring-security-oauth - 1.0.0-SNAPSHOT - - - - - - org.springframework.boot - spring-boot-starter-web - - - - org.springframework.boot - spring-boot-starter-thymeleaf - - - - - spring-security-oauth-ui-password - - - src/main/resources - true - - - - \ No newline at end of file diff --git a/spring-security-oauth/spring-security-oauth-ui-password/src/main/resources/application.properties b/spring-security-oauth/spring-security-oauth-ui-password/src/main/resources/application.properties deleted file mode 100644 index e76a587680..0000000000 --- a/spring-security-oauth/spring-security-oauth-ui-password/src/main/resources/application.properties +++ /dev/null @@ -1,2 +0,0 @@ -server.contextPath=/spring-security-oauth-ui-password -server.port=8081 \ No newline at end of file diff --git a/spring-security-oauth/spring-security-oauth-ui-password/src/main/resources/templates/header.html b/spring-security-oauth/spring-security-oauth-ui-password/src/main/resources/templates/header.html deleted file mode 100644 index 0bfe086bf1..0000000000 --- a/spring-security-oauth/spring-security-oauth-ui-password/src/main/resources/templates/header.html +++ /dev/null @@ -1,73 +0,0 @@ -
    - - - - - - - - - - - -
    \ No newline at end of file diff --git a/spring-security-oauth/spring-security-oauth-ui-password/src/main/resources/templates/index.html b/spring-security-oauth/spring-security-oauth-ui-password/src/main/resources/templates/index.html deleted file mode 100755 index e2458c2940..0000000000 --- a/spring-security-oauth/spring-security-oauth-ui-password/src/main/resources/templates/index.html +++ /dev/null @@ -1,30 +0,0 @@ - - - - -Spring Security OAuth - - - - -
    - -
    -

    Foo Details

    -
    - - {{foo.id}} -
    - -
    - -{{foo.name}} -
    - - - -
    - - \ No newline at end of file diff --git a/spring-security-oauth/spring-security-oauth-ui-password/src/main/resources/templates/login.html b/spring-security-oauth/spring-security-oauth-ui-password/src/main/resources/templates/login.html deleted file mode 100755 index 4d105cec6c..0000000000 --- a/spring-security-oauth/spring-security-oauth-ui-password/src/main/resources/templates/login.html +++ /dev/null @@ -1,34 +0,0 @@ - - - - -Spring Security OAuth - - - - -
    - -
    - -

    Login

    -
    -
    - - -
    - -
    - - -
    - -
    -Login -
    - -
    - -
    - - \ No newline at end of file diff --git a/spring-security-oauth/spring-security-oauth-ui-password/src/main/webapp/resources/angular-utf8-base64.min.js b/spring-security-oauth/spring-security-oauth-ui-password/src/main/webapp/resources/angular-utf8-base64.min.js deleted file mode 100644 index 24af57d020..0000000000 --- a/spring-security-oauth/spring-security-oauth-ui-password/src/main/webapp/resources/angular-utf8-base64.min.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";angular.module("ab-base64",[]).constant("base64",function(){var a={alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",lookup:null,ie:/MSIE /.test(navigator.userAgent),ieo:/MSIE [67]/.test(navigator.userAgent),encode:function(b){var c,d,e,f,g=a.toUtf8(b),h=-1,i=g.length,j=[,,,];if(a.ie){for(c=[];++h>2,j[1]=(3&d)<<4|e>>4,isNaN(e)?j[2]=j[3]=64:(f=g[++h],j[2]=(15&e)<<2|f>>6,j[3]=isNaN(f)?64:63&f),c.push(a.alphabet.charAt(j[0]),a.alphabet.charAt(j[1]),a.alphabet.charAt(j[2]),a.alphabet.charAt(j[3]));return c.join("")}for(c="";++h>2,j[1]=(3&d)<<4|e>>4,isNaN(e)?j[2]=j[3]=64:(f=g[++h],j[2]=(15&e)<<2|f>>6,j[3]=isNaN(f)?64:63&f),c+=a.alphabet[j[0]]+a.alphabet[j[1]]+a.alphabet[j[2]]+a.alphabet[j[3]];return c},decode:function(b){if(b=b.replace(/\s/g,""),b.length%4)throw new Error("InvalidLengthError: decode failed: The string to be decoded is not the correct length for a base64 encoded string.");if(/[^A-Za-z0-9+\/=\s]/g.test(b))throw new Error("InvalidCharacterError: decode failed: The string contains characters invalid in a base64 encoded string.");var c,d=a.fromUtf8(b),e=0,f=d.length;if(a.ieo){for(c=[];f>e;)c.push(d[e]<128?String.fromCharCode(d[e++]):d[e]>191&&d[e]<224?String.fromCharCode((31&d[e++])<<6|63&d[e++]):String.fromCharCode((15&d[e++])<<12|(63&d[e++])<<6|63&d[e++]));return c.join("")}for(c="";f>e;)c+=String.fromCharCode(d[e]<128?d[e++]:d[e]>191&&d[e]<224?(31&d[e++])<<6|63&d[e++]:(15&d[e++])<<12|(63&d[e++])<<6|63&d[e++]);return c},toUtf8:function(a){var b,c=-1,d=a.length,e=[];if(/^[\x00-\x7f]*$/.test(a))for(;++cb?e.push(b):2048>b?e.push(b>>6|192,63&b|128):e.push(b>>12|224,b>>6&63|128,63&b|128);return e},fromUtf8:function(b){var c,d=-1,e=[],f=[,,,];if(!a.lookup){for(c=a.alphabet.length,a.lookup={};++d>4),f[2]=a.lookup[b.charAt(++d)],64!==f[2])&&(e.push((15&f[1])<<4|f[2]>>2),f[3]=a.lookup[b.charAt(++d)],64!==f[3]);)e.push((3&f[2])<<6|f[3]);return e}},b={decode:function(b){b=b.replace(/-/g,"+").replace(/_/g,"/");var c=b.length%4;if(c){if(1===c)throw new Error("InvalidLengthError: Input base64url string is the wrong length to determine padding");b+=new Array(5-c).join("=")}return a.decode(b)},encode:function(b){var c=a.encode(b);return c.replace(/\+/g,"-").replace(/\//g,"_").split("=",1)[0]}};return{decode:a.decode,encode:a.encode,urldecode:b.decode,urlencode:b.encode}}()); \ No newline at end of file diff --git a/spring-security-rest-basic-auth/pom.xml b/spring-security-rest-basic-auth/pom.xml index 767edb7778..854bbb70be 100644 --- a/spring-security-rest-basic-auth/pom.xml +++ b/spring-security-rest-basic-auth/pom.xml @@ -1,6 +1,6 @@ 4.0.0 - org.baeldung + com.baeldung spring-security-rest-basic-auth 0.2-SNAPSHOT @@ -287,12 +287,12 @@ - 4.2.4.RELEASE - 4.0.3.RELEASE + 4.2.5.RELEASE + 4.0.4.RELEASE 4.3.11.Final - 5.1.37 + 5.1.38 4.4.4 @@ -317,13 +317,13 @@ 4.12 1.10.19 - 2.8.0 + 2.9.0 - 3.3 + 3.5.1 2.6 - 2.19 - 1.4.17 + 2.19.1 + 1.4.18 diff --git a/spring-security-rest-custom/pom.xml b/spring-security-rest-custom/pom.xml index df936353d9..071fa14b71 100644 --- a/spring-security-rest-custom/pom.xml +++ b/spring-security-rest-custom/pom.xml @@ -1,6 +1,6 @@ 4.0.0 - org.baeldung + com.baeldung spring-security-rest-custom 0.1-SNAPSHOT @@ -10,7 +10,7 @@ org.springframework.boot spring-boot-starter-parent - 1.3.2.RELEASE + 1.3.3.RELEASE @@ -254,12 +254,12 @@ - 4.2.4.RELEASE - 4.0.3.RELEASE + 4.2.5.RELEASE + 4.0.4.RELEASE 4.3.11.Final - 5.1.37 + 5.1.38 1.7.13 @@ -280,13 +280,13 @@ 4.4.1 4.5 - 2.4.1 + 2.9.0 - 3.3 + 3.5.1 2.6 - 2.18.1 - 1.4.15 + 2.19.1 + 1.4.18 diff --git a/spring-security-rest-custom/src/main/java/org/baeldung/config/parent/SecurityConfig.java b/spring-security-rest-custom/src/main/java/org/baeldung/config/parent/SecurityConfig.java index ee9b0868e7..67d9abbae5 100644 --- a/spring-security-rest-custom/src/main/java/org/baeldung/config/parent/SecurityConfig.java +++ b/spring-security-rest-custom/src/main/java/org/baeldung/config/parent/SecurityConfig.java @@ -1,16 +1,41 @@ package org.baeldung.config.parent; +import org.baeldung.security.CustomAuthenticationProvider; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.annotation.ComponentScan; import org.springframework.context.annotation.Configuration; -import org.springframework.context.annotation.ImportResource; +import org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder; +import org.springframework.security.config.annotation.web.builders.HttpSecurity; +import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity; +import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter; @Configuration -@ImportResource({ "classpath:webSecurityConfig.xml" }) +// @ImportResource({ "classpath:webSecurityConfig.xml" }) +@EnableWebSecurity @ComponentScan("org.baeldung.security") -public class SecurityConfig { +public class SecurityConfig extends WebSecurityConfigurerAdapter { + + @Autowired + private CustomAuthenticationProvider authProvider; public SecurityConfig() { super(); } + @Override + protected void configure(final AuthenticationManagerBuilder auth) throws Exception { + auth.authenticationProvider(authProvider); + } + + @Override + protected void configure(final HttpSecurity http) throws Exception { + // @formatter:off + http + .authorizeRequests().anyRequest().authenticated() + .and() + .httpBasic(); + // @formatter:on + } + + } diff --git a/spring-security-rest-digest-auth/.classpath b/spring-security-rest-digest-auth/.classpath index 5778c9435e..fa5dbd4c0e 100644 --- a/spring-security-rest-digest-auth/.classpath +++ b/spring-security-rest-digest-auth/.classpath @@ -25,7 +25,6 @@ - diff --git a/spring-security-rest-digest-auth/pom.xml b/spring-security-rest-digest-auth/pom.xml index 88e760458b..406c52e7e1 100644 --- a/spring-security-rest-digest-auth/pom.xml +++ b/spring-security-rest-digest-auth/pom.xml @@ -1,6 +1,6 @@ 4.0.0 - org.baeldung + com.baeldung spring-security-rest-digest-auth 0.1-SNAPSHOT @@ -274,12 +274,12 @@ - 4.2.4.RELEASE - 4.0.3.RELEASE + 4.2.5.RELEASE + 4.0.4.RELEASE 4.3.11.Final - 5.1.37 + 5.1.38 4.4.4 @@ -290,7 +290,7 @@ 1.1.3 - 2.5.5 + 2.7.2 5.2.2.Final @@ -306,13 +306,13 @@ 4.12 1.10.19 - 2.8.0 + 2.9.0 - 3.3 + 3.5.1 2.6 - 2.19 - 1.4.17 + 2.19.1 + 1.4.18 diff --git a/spring-security-rest-full/pom.xml b/spring-security-rest-full/pom.xml index 270774ee13..bc415d0455 100644 --- a/spring-security-rest-full/pom.xml +++ b/spring-security-rest-full/pom.xml @@ -1,6 +1,6 @@ 4.0.0 - org.baeldung + com.baeldung spring-security-rest-full 0.1-SNAPSHOT @@ -10,7 +10,7 @@ org.springframework.boot spring-boot-starter-parent - 1.3.2.RELEASE + 1.3.3.RELEASE @@ -427,19 +427,19 @@ - 4.2.4.RELEASE - 4.0.3.RELEASE + 4.2.5.RELEASE + 4.0.4.RELEASE 4.3.11.Final - 5.1.37 + 5.1.38 1.8.2.RELEASE 2.0.0 3.6.2 - 2.5.5 + 2.7.2 1.4.01 @@ -462,13 +462,13 @@ 4.4.1 4.5 - 2.4.1 + 2.9.0 - 3.3 + 3.5.1 2.6 - 2.18.1 - 1.4.15 + 2.19.1 + 1.4.18 1.1.3 diff --git a/spring-security-rest-full/src/main/java/org/baeldung/web/metric/ActuatorMetricService.java b/spring-security-rest-full/src/main/java/org/baeldung/web/metric/ActuatorMetricService.java index fec03d1ddb..89e3a22d45 100644 --- a/spring-security-rest-full/src/main/java/org/baeldung/web/metric/ActuatorMetricService.java +++ b/spring-security-rest-full/src/main/java/org/baeldung/web/metric/ActuatorMetricService.java @@ -17,13 +17,13 @@ public class ActuatorMetricService implements IActuatorMetricService { @Autowired private MetricReaderPublicMetrics publicMetrics; - private final List> statusMetric; + private final List> statusMetricsByMinute; private final List statusList; private static final SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm"); public ActuatorMetricService() { super(); - statusMetric = new ArrayList>(); + statusMetricsByMinute = new ArrayList>(); statusList = new ArrayList(); } @@ -31,7 +31,7 @@ public class ActuatorMetricService implements IActuatorMetricService { public Object[][] getGraphData() { final Date current = new Date(); final int colCount = statusList.size() + 1; - final int rowCount = statusMetric.size() + 1; + final int rowCount = statusMetricsByMinute.size() + 1; final Object[][] result = new Object[rowCount][colCount]; result[0][0] = "Time"; int j = 1; @@ -41,19 +41,23 @@ public class ActuatorMetricService implements IActuatorMetricService { j++; } - List temp; - List last = new ArrayList(); for (int i = 1; i < rowCount; i++) { - temp = statusMetric.get(i - 1); result[i][0] = dateFormat.format(new Date(current.getTime() - (60000 * (rowCount - i)))); - for (j = 1; j <= temp.size(); j++) { - result[i][j] = temp.get(j - 1) - (last.size() >= j ? last.get(j - 1) : 0); + } + + List minuteOfStatuses; + List last = new ArrayList(); + + for (int i = 1; i < rowCount; i++) { + minuteOfStatuses = statusMetricsByMinute.get(i - 1); + for (j = 1; j <= minuteOfStatuses.size(); j++) { + result[i][j] = minuteOfStatuses.get(j - 1) - (last.size() >= j ? last.get(j - 1) : 0); } while (j < colCount) { result[i][j] = 0; j++; } - last = temp; + last = minuteOfStatuses; } return result; } @@ -62,16 +66,16 @@ public class ActuatorMetricService implements IActuatorMetricService { @Scheduled(fixedDelay = 60000) private void exportMetrics() { - final ArrayList statusCount = initializeCounterList(statusList.size()); + final ArrayList lastMinuteStatuses = initializeStatuses(statusList.size()); for (final Metric counterMetric : publicMetrics.metrics()) { - updateStatusCount(counterMetric, statusCount); + updateMetrics(counterMetric, lastMinuteStatuses); } - statusMetric.add(statusCount); + statusMetricsByMinute.add(lastMinuteStatuses); } - private ArrayList initializeCounterList(final int size) { + private ArrayList initializeStatuses(final int size) { final ArrayList counterList = new ArrayList(); for (int i = 0; i < size; i++) { counterList.add(0); @@ -79,22 +83,26 @@ public class ActuatorMetricService implements IActuatorMetricService { return counterList; } - private void updateStatusCount(final Metric counterMetric, final ArrayList statusCount) { + private void updateMetrics(final Metric counterMetric, final ArrayList statusCount) { String status = ""; int index = -1; int oldCount = 0; if (counterMetric.getName().contains("counter.status.")) { status = counterMetric.getName().substring(15, 18); // example 404, 200 - if (!statusList.contains(status)) { - statusList.add(status); - statusCount.add(0); - } + appendStatusIfNotExist(status, statusCount); index = statusList.indexOf(status); oldCount = statusCount.get(index) == null ? 0 : statusCount.get(index); statusCount.set(index, counterMetric.getValue().intValue() + oldCount); } } + private void appendStatusIfNotExist(final String status, final ArrayList statusCount) { + if (!statusList.contains(status)) { + statusList.add(status); + statusCount.add(0); + } + } + // } \ No newline at end of file diff --git a/spring-security-rest-full/src/main/java/org/baeldung/web/metric/CustomActuatorMetricService.java b/spring-security-rest-full/src/main/java/org/baeldung/web/metric/CustomActuatorMetricService.java index 7df7e199b4..852a9fae99 100644 --- a/spring-security-rest-full/src/main/java/org/baeldung/web/metric/CustomActuatorMetricService.java +++ b/spring-security-rest-full/src/main/java/org/baeldung/web/metric/CustomActuatorMetricService.java @@ -21,14 +21,14 @@ public class CustomActuatorMetricService implements ICustomActuatorMetricService @Autowired private CounterService counter; - private final List> statusMetric; + private final List> statusMetricsByMinute; private final List statusList; private static final SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm"); public CustomActuatorMetricService() { super(); repo = new InMemoryMetricRepository(); - statusMetric = new ArrayList>(); + statusMetricsByMinute = new ArrayList>(); statusList = new ArrayList(); } @@ -46,7 +46,7 @@ public class CustomActuatorMetricService implements ICustomActuatorMetricService public Object[][] getGraphData() { final Date current = new Date(); final int colCount = statusList.size() + 1; - final int rowCount = statusMetric.size() + 1; + final int rowCount = statusMetricsByMinute.size() + 1; final Object[][] result = new Object[rowCount][colCount]; result[0][0] = "Time"; @@ -56,12 +56,15 @@ public class CustomActuatorMetricService implements ICustomActuatorMetricService j++; } - List temp; for (int i = 1; i < rowCount; i++) { - temp = statusMetric.get(i - 1); result[i][0] = dateFormat.format(new Date(current.getTime() - (60000 * (rowCount - i)))); - for (j = 1; j <= temp.size(); j++) { - result[i][j] = temp.get(j - 1); + } + + List minuteOfStatuses; + for (int i = 1; i < rowCount; i++) { + minuteOfStatuses = statusMetricsByMinute.get(i - 1); + for (j = 1; j <= minuteOfStatuses.size(); j++) { + result[i][j] = minuteOfStatuses.get(j - 1); } while (j < colCount) { result[i][j] = 0; @@ -87,6 +90,6 @@ public class CustomActuatorMetricService implements ICustomActuatorMetricService } } - statusMetric.add(statusCount); + statusMetricsByMinute.add(statusCount); } } \ No newline at end of file diff --git a/spring-security-rest/pom.xml b/spring-security-rest/pom.xml index 265da0bbcd..48791a83c1 100644 --- a/spring-security-rest/pom.xml +++ b/spring-security-rest/pom.xml @@ -1,6 +1,6 @@ 4.0.0 - org.baeldung + com.baeldung spring-security-rest 0.1-SNAPSHOT @@ -283,12 +283,12 @@ - 4.2.4.RELEASE - 4.0.3.RELEASE + 4.2.5.RELEASE + 4.0.4.RELEASE 4.3.11.Final - 5.1.37 + 5.1.38 1.7.13 @@ -310,7 +310,7 @@ 1.3 4.12 1.10.19 - 2.4.1 + 2.9.0 2.2.2 @@ -319,13 +319,13 @@ 4.4.1 4.5 - 2.4.1 + 2.9.0 - 3.3 + 3.5.1 2.6 - 2.18.1 - 1.4.15 + 2.19.1 + 1.4.18 diff --git a/spring-thymeleaf/.classpath b/spring-thymeleaf/.classpath new file mode 100644 index 0000000000..c0f4868f56 --- /dev/null +++ b/spring-thymeleaf/.classpath @@ -0,0 +1,32 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/spring-mvc-xml/.project b/spring-thymeleaf/.project similarity index 88% rename from spring-mvc-xml/.project rename to spring-thymeleaf/.project index de41bcaace..7f02bebd0d 100644 --- a/spring-mvc-xml/.project +++ b/spring-thymeleaf/.project @@ -1,6 +1,6 @@ - spring-mvc-xml + spring-thymeleaf @@ -33,11 +33,9 @@ org.springframework.ide.eclipse.core.springnature - org.eclipse.jem.workbench.JavaEMFNature - org.eclipse.wst.common.modulecore.ModuleCoreNature org.eclipse.jdt.core.javanature org.eclipse.m2e.core.maven2Nature org.eclipse.wst.common.project.facet.core.nature - org.eclipse.wst.jsdt.core.jsNature + org.eclipse.wst.common.modulecore.ModuleCoreNature diff --git a/spring-thymeleaf/pom.xml b/spring-thymeleaf/pom.xml index 16e6849f93..51e26fdfdd 100644 --- a/spring-thymeleaf/pom.xml +++ b/spring-thymeleaf/pom.xml @@ -18,12 +18,14 @@ 1.1.0.Final 5.1.2.Final + - 3.3 + 3.5.1 2.6 - 2.18.1 - 1.4.15 + 2.19.1 + 1.4.18 + diff --git a/spring-zuul/pom.xml b/spring-zuul/pom.xml index 6ad1d0be34..75ff467527 100644 --- a/spring-zuul/pom.xml +++ b/spring-zuul/pom.xml @@ -1,6 +1,6 @@ 4.0.0 - org.baeldung + com.baeldung spring-zuul 1.0.0-SNAPSHOT @@ -10,7 +10,7 @@ org.springframework.boot spring-boot-starter-parent - 1.3.1.RELEASE + 1.3.3.RELEASE @@ -65,19 +65,19 @@ - 4.2.2.RELEASE - 4.0.3.RELEASE + 4.2.5.RELEASE + 4.0.4.RELEASE - 2.5.1 + 2.7.2 1.7.12 1.1.3 - 18.0 + 19.0 3.3.2 @@ -88,13 +88,13 @@ 4.4 4.4 - 2.4.0 + 2.9.0 - 3.3 + 3.5.1 2.6 - 2.19 - 1.4.16 + 2.19.1 + 1.4.18 diff --git a/spring-zuul/spring-zuul-foos-resource/pom.xml b/spring-zuul/spring-zuul-foos-resource/pom.xml index 6d5e0e52cf..56ca1959ca 100644 --- a/spring-zuul/spring-zuul-foos-resource/pom.xml +++ b/spring-zuul/spring-zuul-foos-resource/pom.xml @@ -6,7 +6,7 @@ war - org.baeldung + com.baeldung spring-zuul 1.0.0-SNAPSHOT diff --git a/spring-zuul/spring-zuul-ui/.project b/spring-zuul/spring-zuul-ui/.project index ec0f2cde81..d87aec6bec 100644 --- a/spring-zuul/spring-zuul-ui/.project +++ b/spring-zuul/spring-zuul-ui/.project @@ -20,11 +20,6 @@ - - org.eclipse.m2e.core.maven2Builder - - - org.springframework.ide.eclipse.core.springbuilder @@ -35,6 +30,11 @@ + + org.eclipse.m2e.core.maven2Builder + + + org.eclipse.jem.workbench.JavaEMFNature diff --git a/spring-zuul/spring-zuul-ui/pom.xml b/spring-zuul/spring-zuul-ui/pom.xml index 65a025f849..9eaf4b7c45 100644 --- a/spring-zuul/spring-zuul-ui/pom.xml +++ b/spring-zuul/spring-zuul-ui/pom.xml @@ -6,7 +6,7 @@ war - org.baeldung + com.baeldung spring-zuul 1.0.0-SNAPSHOT diff --git a/src/main/java/org/baeldung/event/OnRegistrationCompleteEvent.java b/src/main/java/org/baeldung/event/OnRegistrationCompleteEvent.java deleted file mode 100644 index 9094099ecc..0000000000 --- a/src/main/java/org/baeldung/event/OnRegistrationCompleteEvent.java +++ /dev/null @@ -1,33 +0,0 @@ -package org.baeldung.event; - -import java.util.Locale; - -import org.baeldung.persistence.model.User; -import org.springframework.context.ApplicationEvent; - -@SuppressWarnings("serial") -public class OnRegistrationCompleteEvent extends ApplicationEvent { - - private final String appUrl; - private final Locale locale; - private final User user; - - public OnRegistrationCompleteEvent(User user, Locale locale, String appUrl) { - super(user); - this.user = user; - this.locale = locale; - this.appUrl = appUrl; - } - - public String getAppUrl() { - return appUrl; - } - - public Locale getLocale() { - return locale; - } - - public User getUser() { - return user; - } -} diff --git a/src/main/java/org/baeldung/event/listener/RegistrationListener.java b/src/main/java/org/baeldung/event/listener/RegistrationListener.java deleted file mode 100644 index 5c848c7433..0000000000 --- a/src/main/java/org/baeldung/event/listener/RegistrationListener.java +++ /dev/null @@ -1,46 +0,0 @@ -package org.baeldung.event.listener; - -import java.util.UUID; - -import org.baeldung.event.OnRegistrationCompleteEvent; -import org.baeldung.persistence.model.User; -import org.baeldung.persistence.service.IUserService; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.context.ApplicationListener; -import org.springframework.context.MessageSource; -import org.springframework.mail.SimpleMailMessage; -import org.springframework.mail.javamail.JavaMailSender; -import org.springframework.stereotype.Component; - -@Component -public class RegistrationListener implements ApplicationListener { - @Autowired - private IUserService service; - - @Autowired - private MessageSource messages; - - @Autowired - private JavaMailSender mailSender; - - @Override - public void onApplicationEvent(OnRegistrationCompleteEvent event) { - this.confirmRegistration(event); - } - - private void confirmRegistration(OnRegistrationCompleteEvent event) { - User user = event.getUser(); - String token = UUID.randomUUID().toString(); - service.createVerificationTokenForUser(user, token); - - String recipientAddress = user.getEmail(); - String subject = "Registration Confirmation"; - String confirmationUrl = event.getAppUrl() + "/regitrationConfirm.html?token=" + token; - String message = messages.getMessage("message.regSucc", null, event.getLocale()); - SimpleMailMessage email = new SimpleMailMessage(); - email.setTo(recipientAddress); - email.setSubject(subject); - email.setText(message + " \r\n" + "http://localhost:8080" + confirmationUrl); - mailSender.send(email); - } -} diff --git a/src/main/java/org/baeldung/hashing/HashGenerator.java b/src/main/java/org/baeldung/hashing/HashGenerator.java deleted file mode 100644 index bf9620a052..0000000000 --- a/src/main/java/org/baeldung/hashing/HashGenerator.java +++ /dev/null @@ -1,12 +0,0 @@ -package org.baeldung.hashing; - -import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder; - -public class HashGenerator { - - public String getHashedPassword(String password) { - BCryptPasswordEncoder passwordEncoder = new BCryptPasswordEncoder(); - String hashedPassword = passwordEncoder.encode(password); - return hashedPassword; - } -} diff --git a/src/main/java/org/baeldung/persistence/dao/UserRepository.java b/src/main/java/org/baeldung/persistence/dao/UserRepository.java deleted file mode 100644 index 12f07d8692..0000000000 --- a/src/main/java/org/baeldung/persistence/dao/UserRepository.java +++ /dev/null @@ -1,11 +0,0 @@ -package org.baeldung.persistence.dao; - -import org.springframework.data.jpa.repository.JpaRepository; -import org.baeldung.persistence.model.User; - -public interface UserRepository extends JpaRepository { - public User findByEmail(String email); - - public void delete(User user); - -} diff --git a/src/main/java/org/baeldung/persistence/dao/VerificationTokenRepository.java b/src/main/java/org/baeldung/persistence/dao/VerificationTokenRepository.java deleted file mode 100644 index f9fc850d41..0000000000 --- a/src/main/java/org/baeldung/persistence/dao/VerificationTokenRepository.java +++ /dev/null @@ -1,12 +0,0 @@ -package org.baeldung.persistence.dao; - -import org.baeldung.persistence.model.User; -import org.baeldung.persistence.model.VerificationToken; -import org.springframework.data.jpa.repository.JpaRepository; - -public interface VerificationTokenRepository extends JpaRepository { - - public VerificationToken findByToken(String token); - - public VerificationToken findByUser(User user); -} diff --git a/src/main/java/org/baeldung/persistence/model/Role.java b/src/main/java/org/baeldung/persistence/model/Role.java deleted file mode 100644 index b6d495a266..0000000000 --- a/src/main/java/org/baeldung/persistence/model/Role.java +++ /dev/null @@ -1,94 +0,0 @@ -package org.baeldung.persistence.model; - -import javax.persistence.CascadeType; -import javax.persistence.Entity; -import javax.persistence.FetchType; -import javax.persistence.GeneratedValue; -import javax.persistence.GenerationType; -import javax.persistence.Id; -import javax.persistence.JoinColumn; -import javax.persistence.OneToOne; -import javax.persistence.Table; - -@Entity -@Table -public class Role { - - @Id - @GeneratedValue(strategy = GenerationType.AUTO) - private Long id; - - @OneToOne(targetEntity = User.class, fetch = FetchType.EAGER, cascade = CascadeType.ALL) - @JoinColumn(name = "user_id") - private User user; - - private Integer role; - - public Role() { - super(); - } - - public Role(Integer role) { - super(); - this.role = role; - } - - public Role(Integer role, User user) { - super(); - this.role = role; - this.user = user; - } - - public Long getId() { - return id; - } - - public void setId(Long id) { - this.id = id; - } - - public User getUser() { - return user; - } - - public void setUser(User user) { - this.user = user; - } - - public Integer getRole() { - return role; - } - - public void setRole(Integer role) { - this.role = role; - } - - @Override - public int hashCode() { - final int prime = 31; - int result = 1; - result = prime * result + ((role == null) ? 0 : role.hashCode()); - return result; - } - - @Override - public boolean equals(final Object obj) { - if (this == obj) - return true; - if (obj == null) - return false; - if (getClass() != obj.getClass()) - return false; - final Role role = (Role) obj; - if (!role.equals(role.role)) - return false; - return true; - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(); - builder.append("Role [role=").append(role).append("]").append("[id=").append(id).append("]"); - return builder.toString(); - } -} \ No newline at end of file diff --git a/src/main/java/org/baeldung/persistence/model/User.java b/src/main/java/org/baeldung/persistence/model/User.java deleted file mode 100644 index d2d56cec53..0000000000 --- a/src/main/java/org/baeldung/persistence/model/User.java +++ /dev/null @@ -1,140 +0,0 @@ -package org.baeldung.persistence.model; - -import javax.persistence.CascadeType; -//ERASE -import javax.persistence.Column; -import javax.persistence.Entity; -import javax.persistence.FetchType; -import javax.persistence.GeneratedValue; -import javax.persistence.GenerationType; -import javax.persistence.Id; -import javax.persistence.OneToOne; - -@Entity -public class User { - - @Id - @GeneratedValue(strategy = GenerationType.AUTO) - private Long id; - - private String firstName; - - private String lastName; - - private String email; - - private String password; - - private boolean enabled; - - // ERASE - @Column(name = "token_expired") - private boolean tokenExpired; - - @OneToOne(mappedBy = "user", fetch = FetchType.EAGER, cascade = CascadeType.ALL) - private Role role; - - public User() { - super(); - this.enabled = false; - this.tokenExpired = false; - } - - // - - public Long getId() { - return id; - } - - public void setId(Long id) { - this.id = id; - } - - public String getFirstName() { - return firstName; - } - - public void setFirstName(String firstName) { - this.firstName = firstName; - } - - public String getLastName() { - return lastName; - } - - public void setLastName(String lastName) { - this.lastName = lastName; - } - - public String getEmail() { - return email; - } - - public void setEmail(String username) { - this.email = username; - } - - public String getPassword() { - return password; - } - - public void setPassword(String password) { - this.password = password; - } - - public Role getRole() { - return role; - } - - public void setRole(Role role) { - this.role = role; - } - - public boolean isEnabled() { - return enabled; - } - - public void setEnabled(boolean enabled) { - this.enabled = enabled; - } - - public boolean isTokenExpired() { - return tokenExpired; - } - - public void setTokenExpired(boolean expired) { - this.tokenExpired = expired; - } - - // - - @Override - public int hashCode() { - final int prime = 31; - int result = 1; - result = prime * result + ((email == null) ? 0 : email.hashCode()); - return result; - } - - @Override - public boolean equals(final Object obj) { - if (this == obj) - return true; - if (obj == null) - return false; - if (getClass() != obj.getClass()) - return false; - final User user = (User) obj; - if (!email.equals(user.email)) - return false; - return true; - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(); - builder.append("User [firstName=").append(firstName).append("]").append("[lastName=").append(lastName).append("]").append("[username").append(email).append("]"); - return builder.toString(); - } - -} \ No newline at end of file diff --git a/src/main/java/org/baeldung/persistence/model/VerificationToken.java b/src/main/java/org/baeldung/persistence/model/VerificationToken.java deleted file mode 100644 index d7556fdf5b..0000000000 --- a/src/main/java/org/baeldung/persistence/model/VerificationToken.java +++ /dev/null @@ -1,132 +0,0 @@ -package org.baeldung.persistence.model; - -import java.util.Calendar; -import java.sql.Date; -import java.sql.Timestamp; - -import javax.persistence.Column; -import javax.persistence.Entity; -import javax.persistence.FetchType; -import javax.persistence.GeneratedValue; -import javax.persistence.GenerationType; -import javax.persistence.Id; -import javax.persistence.JoinColumn; -import javax.persistence.OneToOne; - -@Entity -public class VerificationToken { - - private static final int EXPIRATION = 60 * 24; - - @Id - @GeneratedValue(strategy = GenerationType.AUTO) - private Long id; - - private String token; - - @OneToOne(targetEntity = User.class, fetch = FetchType.EAGER) - @JoinColumn(nullable = false, name = "user_id") - private User user; - - @Column(name = "expiry_date") - private Date expiryDate; - - public VerificationToken() { - super(); - } - - public VerificationToken(String token) { - super(); - - this.token = token; - this.expiryDate = calculateExpiryDate(EXPIRATION); - } - - public VerificationToken(String token, User user) { - super(); - - this.token = token; - this.user = user; - this.expiryDate = calculateExpiryDate(EXPIRATION); - } - - // - - public String getToken() { - return token; - } - - public void setToken(String token) { - this.token = token; - } - - public User getUser() { - return user; - } - - public void setUser(User user) { - this.user = user; - } - - public Date getExpiryDate() { - return expiryDate; - } - - public void setExpiryDate(Date expiryDate) { - this.expiryDate = expiryDate; - } - - private Date calculateExpiryDate(int expiryTimeInMinutes) { - Calendar cal = Calendar.getInstance(); - cal.setTime(new Timestamp(cal.getTime().getTime())); - cal.add(Calendar.MINUTE, expiryTimeInMinutes); - return new Date(cal.getTime().getTime()); - } - - // - - @Override - public int hashCode() { - final int prime = 31; - int result = 1; - result = prime * result + ((expiryDate == null) ? 0 : expiryDate.hashCode()); - result = prime * result + ((token == null) ? 0 : token.hashCode()); - result = prime * result + ((user == null) ? 0 : user.hashCode()); - return result; - } - - @Override - public boolean equals(Object obj) { - if (this == obj) - return true; - if (obj == null) - return false; - if (getClass() != obj.getClass()) - return false; - VerificationToken other = (VerificationToken) obj; - if (expiryDate == null) { - if (other.expiryDate != null) - return false; - } else if (!expiryDate.equals(other.expiryDate)) - return false; - if (token == null) { - if (other.token != null) - return false; - } else if (!token.equals(other.token)) - return false; - if (user == null) { - if (other.user != null) - return false; - } else if (!user.equals(other.user)) - return false; - return true; - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(); - builder.append("Token [String=").append(token).append("]").append("[Expires").append(expiryDate).append("]"); - return builder.toString(); - } - -} diff --git a/src/main/java/org/baeldung/persistence/service/IUserService.java b/src/main/java/org/baeldung/persistence/service/IUserService.java deleted file mode 100644 index bc1c9bc9a3..0000000000 --- a/src/main/java/org/baeldung/persistence/service/IUserService.java +++ /dev/null @@ -1,21 +0,0 @@ -package org.baeldung.persistence.service; - -import org.baeldung.persistence.model.User; -import org.baeldung.persistence.model.VerificationToken; -import org.baeldung.validation.service.EmailExistsException; - -public interface IUserService { - - User registerNewUserAccount(UserDto accountDto) throws EmailExistsException; - - User getUser(String verificationToken); - - void saveRegisteredUser(User user); - - void deleteUser(User user); - - void createVerificationTokenForUser(User user, String token); - - VerificationToken getVerificationToken(String VerificationToken); - -} diff --git a/src/main/java/org/baeldung/persistence/service/UserDto.java b/src/main/java/org/baeldung/persistence/service/UserDto.java deleted file mode 100644 index 29a59be2fc..0000000000 --- a/src/main/java/org/baeldung/persistence/service/UserDto.java +++ /dev/null @@ -1,88 +0,0 @@ -package org.baeldung.persistence.service; - -import javax.validation.constraints.NotNull; - -import org.baeldung.validation.service.PasswordMatches; -import org.baeldung.validation.service.ValidEmail; -import org.hibernate.validator.constraints.NotEmpty; - -@PasswordMatches -public class UserDto { - @NotNull - @NotEmpty - private String firstName; - - @NotNull - @NotEmpty - private String lastName; - - @NotNull - @NotEmpty - private String password; - - @NotNull - @NotEmpty - private String matchingPassword; - - @ValidEmail - @NotNull - @NotEmpty - private String email; - - public String getEmail() { - return email; - } - - public void setEmail(String email) { - this.email = email; - } - - private Integer role; - - public Integer getRole() { - return role; - } - - public void setRole(Integer role) { - this.role = role; - } - - public String getFirstName() { - return firstName; - } - - public void setFirstName(String firstName) { - this.firstName = firstName; - } - - public String getLastName() { - return lastName; - } - - public void setLastName(String lastName) { - this.lastName = lastName; - } - - public String getPassword() { - return password; - } - - public void setPassword(String password) { - this.password = password; - } - - public String getMatchingPassword() { - return matchingPassword; - } - - public void setMatchingPassword(String matchingPassword) { - this.matchingPassword = matchingPassword; - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(); - builder.append("User [firstName=").append(firstName).append("]").append("[lastName=").append(lastName).append("]").append("[email").append(email).append("]").append("[password").append(password).append("]"); - return builder.toString(); - } -} diff --git a/src/main/java/org/baeldung/persistence/service/UserService.java b/src/main/java/org/baeldung/persistence/service/UserService.java deleted file mode 100644 index a0b8ed4a4b..0000000000 --- a/src/main/java/org/baeldung/persistence/service/UserService.java +++ /dev/null @@ -1,77 +0,0 @@ -package org.baeldung.persistence.service; - -import javax.transaction.Transactional; - -import org.baeldung.hashing.HashGenerator; -import org.baeldung.persistence.dao.UserRepository; -import org.baeldung.persistence.dao.VerificationTokenRepository; -import org.baeldung.persistence.model.Role; -import org.baeldung.persistence.model.User; -import org.baeldung.persistence.model.VerificationToken; -import org.baeldung.validation.service.EmailExistsException; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Service; - -@Service -@Transactional -public class UserService implements IUserService { - @Autowired - private UserRepository repository; - - @Autowired - private VerificationTokenRepository tokenRepository; - - @Autowired - private HashGenerator hashGenerator; - - @Override - public User registerNewUserAccount(UserDto accountDto) throws EmailExistsException { - if (emailExist(accountDto.getEmail())) { - throw new EmailExistsException("There is an account with that email adress: " + accountDto.getEmail()); - } - User user = new User(); - user.setFirstName(accountDto.getFirstName()); - user.setLastName(accountDto.getLastName()); - String hashedPassword = hashGenerator.getHashedPassword(accountDto.getPassword()); - user.setPassword(hashedPassword); - user.setEmail(accountDto.getEmail()); - user.setRole(new Role(Integer.valueOf(1), user)); - return repository.save(user); - } - - @Override - public User getUser(String verificationToken) { - User user = tokenRepository.findByToken(verificationToken).getUser(); - return user; - } - - @Override - public VerificationToken getVerificationToken(String VerificationToken) { - return tokenRepository.findByToken(VerificationToken); - } - - @Override - public void saveRegisteredUser(User user) { - repository.save(user); - } - - @Override - public void deleteUser(User user) { - repository.delete(user); - } - - @Override - public void createVerificationTokenForUser(User user, String token) { - VerificationToken myToken = new VerificationToken(token, user); - tokenRepository.save(myToken); - } - - private boolean emailExist(String email) { - User user = repository.findByEmail(email); - if (user != null) { - return true; - } - return false; - } - -} diff --git a/src/main/java/org/baeldung/security/MySimpleUrlAuthenticationSuccessHandler.java b/src/main/java/org/baeldung/security/MySimpleUrlAuthenticationSuccessHandler.java deleted file mode 100644 index a4cdc708d9..0000000000 --- a/src/main/java/org/baeldung/security/MySimpleUrlAuthenticationSuccessHandler.java +++ /dev/null @@ -1,81 +0,0 @@ -package org.baeldung.security; - -import java.io.IOException; -import java.util.Collection; - -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; -import javax.servlet.http.HttpSession; - -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.springframework.security.core.Authentication; -import org.springframework.security.core.GrantedAuthority; -import org.springframework.security.web.DefaultRedirectStrategy; -import org.springframework.security.web.RedirectStrategy; -import org.springframework.security.web.WebAttributes; -import org.springframework.security.web.authentication.AuthenticationSuccessHandler; - -public class MySimpleUrlAuthenticationSuccessHandler implements AuthenticationSuccessHandler { - private final Logger logger = LoggerFactory.getLogger(getClass()); - - private RedirectStrategy redirectStrategy = new DefaultRedirectStrategy(); - - public void onAuthenticationSuccess(HttpServletRequest request, HttpServletResponse response, Authentication authentication) throws IOException { - handle(request, response, authentication); - HttpSession session = request.getSession(false); - if (session != null) { - session.setMaxInactiveInterval(30); - } - clearAuthenticationAttributes(request); - } - - protected void handle(HttpServletRequest request, HttpServletResponse response, Authentication authentication) throws IOException { - String targetUrl = determineTargetUrl(authentication); - - if (response.isCommitted()) { - logger.debug("Response has already been committed. Unable to redirect to " + targetUrl); - return; - } - - redirectStrategy.sendRedirect(request, response, targetUrl); - } - - protected String determineTargetUrl(Authentication authentication) { - boolean isUser = false; - boolean isAdmin = false; - Collection authorities = authentication.getAuthorities(); - for (GrantedAuthority grantedAuthority : authorities) { - if (grantedAuthority.getAuthority().equals("ROLE_USER")) { - isUser = true; - break; - } else if (grantedAuthority.getAuthority().equals("ROLE_ADMIN")) { - isAdmin = true; - break; - } - } - if (isUser) { - return "/homepage.html?user=" + authentication.getName(); - } else if (isAdmin) { - return "/console.html"; - } else { - throw new IllegalStateException(); - } - } - - protected void clearAuthenticationAttributes(HttpServletRequest request) { - HttpSession session = request.getSession(false); - if (session == null) { - return; - } - session.removeAttribute(WebAttributes.AUTHENTICATION_EXCEPTION); - } - - public void setRedirectStrategy(RedirectStrategy redirectStrategy) { - this.redirectStrategy = redirectStrategy; - } - - protected RedirectStrategy getRedirectStrategy() { - return redirectStrategy; - } -} \ No newline at end of file diff --git a/src/main/java/org/baeldung/security/MyUserDetailsService.java b/src/main/java/org/baeldung/security/MyUserDetailsService.java deleted file mode 100644 index a103504055..0000000000 --- a/src/main/java/org/baeldung/security/MyUserDetailsService.java +++ /dev/null @@ -1,74 +0,0 @@ -package org.baeldung.security; - -import java.util.ArrayList; -import java.util.Collection; -import java.util.List; - -import org.springframework.security.core.userdetails.UserDetails; -import org.springframework.security.core.userdetails.UserDetailsService; -import org.springframework.security.core.userdetails.UsernameNotFoundException; -import org.baeldung.persistence.dao.UserRepository; -import org.baeldung.persistence.model.User; -import org.baeldung.persistence.service.IUserService; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.context.MessageSource; -import org.springframework.security.core.GrantedAuthority; -import org.springframework.security.core.authority.SimpleGrantedAuthority; -import org.springframework.stereotype.Service; -import org.springframework.transaction.annotation.Transactional; - -@Service -@Transactional -public class MyUserDetailsService implements UserDetailsService { - - @Autowired - private UserRepository userRepository; - @Autowired - private IUserService service; - @Autowired - private MessageSource messages; - - public MyUserDetailsService() { - - } - - public UserDetails loadUserByUsername(String email) throws UsernameNotFoundException { - boolean enabled = true; - boolean accountNonExpired = true; - boolean credentialsNonExpired = true; - boolean accountNonLocked = true; - try { - User user = userRepository.findByEmail(email); - if (user == null) { - return new org.springframework.security.core.userdetails.User(" ", " ", enabled, true, true, true, getAuthorities(new Integer(1))); - } - - return new org.springframework.security.core.userdetails.User(user.getEmail(), user.getPassword(), user.isEnabled(), accountNonExpired, credentialsNonExpired, accountNonLocked, getAuthorities(user.getRole().getRole())); - } catch (Exception e) { - throw new RuntimeException(e); - } - } - - private Collection getAuthorities(Integer role) { - List authList = getGrantedAuthorities(getRoles(role)); - return authList; - } - - public List getRoles(Integer role) { - List roles = new ArrayList(); - if (role.intValue() == 2) { - roles.add("ROLE_ADMIN"); - } else if (role.intValue() == 1) { - roles.add("ROLE_USER"); - } - return roles; - } - - private static List getGrantedAuthorities(List roles) { - List authorities = new ArrayList(); - for (String role : roles) { - authorities.add(new SimpleGrantedAuthority(role)); - } - return authorities; - } -} diff --git a/src/main/java/org/baeldung/spring/AppConfig.java b/src/main/java/org/baeldung/spring/AppConfig.java deleted file mode 100644 index 4708c53a14..0000000000 --- a/src/main/java/org/baeldung/spring/AppConfig.java +++ /dev/null @@ -1,43 +0,0 @@ -package org.baeldung.spring; - -import java.util.Properties; - -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.context.annotation.Bean; -import org.springframework.context.annotation.ComponentScan; -import org.springframework.context.annotation.Configuration; -import org.springframework.context.annotation.Import; -import org.springframework.context.annotation.PropertySource; -import org.springframework.context.support.PropertySourcesPlaceholderConfigurer; -import org.springframework.core.env.Environment; -import org.springframework.mail.javamail.JavaMailSenderImpl; - -@Configuration -@ComponentScan(basePackages = { "org.baeldung.event.service", "org.baeldung.event", "org.baeldung.persistence.service", "org.baeldung.persistence.dao" }) -@Import({ MvcConfig.class, PersistenceJPAConfig.class, SecSecurityConfig.class }) -@PropertySource("classpath:application.properties") -public class AppConfig { - @Autowired - private Environment env; - - @Bean - public static PropertySourcesPlaceholderConfigurer propertyPlaceHolderConfigurer() { - return new PropertySourcesPlaceholderConfigurer(); - } - - @Bean - public JavaMailSenderImpl javaMailSenderImpl() { - JavaMailSenderImpl mailSenderImpl = new JavaMailSenderImpl(); - mailSenderImpl.setHost(env.getProperty("smtp.host")); - mailSenderImpl.setPort(env.getProperty("smtp.port", Integer.class)); - mailSenderImpl.setProtocol(env.getProperty("smtp.protocol")); - mailSenderImpl.setUsername(env.getProperty("smtp.username")); - mailSenderImpl.setPassword(env.getProperty("smtp.password")); - Properties javaMailProps = new Properties(); - javaMailProps.put("mail.smtp.auth", true); - javaMailProps.put("mail.smtp.starttls.enable", true); - mailSenderImpl.setJavaMailProperties(javaMailProps); - return mailSenderImpl; - } - -} \ No newline at end of file diff --git a/src/main/java/org/baeldung/spring/MvcConfig.java b/src/main/java/org/baeldung/spring/MvcConfig.java deleted file mode 100644 index 3294ac2788..0000000000 --- a/src/main/java/org/baeldung/spring/MvcConfig.java +++ /dev/null @@ -1,111 +0,0 @@ -package org.baeldung.spring; - -import java.util.Locale; - -import org.baeldung.hashing.HashGenerator; -import org.baeldung.validation.service.EmailValidator; -import org.baeldung.validation.service.PasswordMatchesValidator; -import org.springframework.context.MessageSource; -import org.springframework.context.annotation.Bean; -import org.springframework.context.annotation.ComponentScan; -import org.springframework.context.annotation.Configuration; -import org.springframework.context.support.ReloadableResourceBundleMessageSource; -import org.springframework.web.servlet.LocaleResolver; -import org.springframework.web.servlet.ViewResolver; -import org.springframework.web.servlet.config.annotation.EnableWebMvc; -import org.springframework.web.servlet.config.annotation.InterceptorRegistry; -import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry; -import org.springframework.web.servlet.config.annotation.ViewControllerRegistry; -import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter; -import org.springframework.web.servlet.i18n.CookieLocaleResolver; -import org.springframework.web.servlet.i18n.LocaleChangeInterceptor; -import org.springframework.web.servlet.view.InternalResourceViewResolver; -import org.springframework.web.servlet.view.JstlView; - -@Configuration -@ComponentScan(basePackages = { "org.baeldung.web.controller", "org.baeldung.persistence.service", "org.baeldung.persistence.dao" }) -@EnableWebMvc -public class MvcConfig extends WebMvcConfigurerAdapter { - - public MvcConfig() { - super(); - } - - // API - - @Override - public void addViewControllers(final ViewControllerRegistry registry) { - super.addViewControllers(registry); - registry.addViewController("/login.html"); - registry.addViewController("/logout.html"); - registry.addViewController("/homepage.html"); - registry.addViewController("/expiredAccount.html"); - registry.addViewController("/regitrationConfirm.html"); - registry.addViewController("/badUser.html"); - registry.addViewController("/emailError.html"); - registry.addViewController("/home.html"); - registry.addViewController("/invalidSession.html"); - registry.addViewController("/console.html"); - registry.addViewController("/admin.html"); - registry.addViewController("/registration.html"); - registry.addViewController("/successRegister.html"); - } - - @Bean - public ViewResolver viewResolver() { - final InternalResourceViewResolver bean = new InternalResourceViewResolver(); - bean.setViewClass(JstlView.class); - bean.setPrefix("/WEB-INF/view/"); - bean.setSuffix(".jsp"); - return bean; - } - - @Override - public void addResourceHandlers(ResourceHandlerRegistry registry) { - registry.addResourceHandler("/resources/**").addResourceLocations("/", "/resources/"); - } - - @Override - public void addInterceptors(InterceptorRegistry registry) { - LocaleChangeInterceptor localeChangeInterceptor = new LocaleChangeInterceptor(); - localeChangeInterceptor.setParamName("lang"); - registry.addInterceptor(localeChangeInterceptor); - } - - @Bean - public LocaleResolver localeResolver() { - CookieLocaleResolver cookieLocaleResolver = new CookieLocaleResolver(); - cookieLocaleResolver.setDefaultLocale(Locale.ENGLISH); - return cookieLocaleResolver; - } - - @Bean - public MessageSource messageSource() { - ReloadableResourceBundleMessageSource messageSource = new ReloadableResourceBundleMessageSource(); - messageSource.setBasename("classpath:messages"); - messageSource.setUseCodeAsDefaultMessage(true); - messageSource.setDefaultEncoding("UTF-8"); - messageSource.setCacheSeconds(0); - return messageSource; - } - - @Bean - public EmailValidator usernameValidator() { - EmailValidator userNameValidator = new EmailValidator(); - return userNameValidator; - } - - @Bean - public PasswordMatchesValidator passwordMatchesValidator() { - PasswordMatchesValidator passwordMatchesValidator = new PasswordMatchesValidator(); - return passwordMatchesValidator; - } - - // DIC 7 - @Bean - public HashGenerator hashGenerator() { - HashGenerator hashGenerator = new HashGenerator(); - return hashGenerator; - } - -} \ No newline at end of file diff --git a/src/main/java/org/baeldung/spring/PersistenceJPAConfig.java b/src/main/java/org/baeldung/spring/PersistenceJPAConfig.java deleted file mode 100644 index 0baac30ec1..0000000000 --- a/src/main/java/org/baeldung/spring/PersistenceJPAConfig.java +++ /dev/null @@ -1,73 +0,0 @@ -package org.baeldung.spring; - -import java.util.Properties; -import javax.sql.DataSource; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.context.annotation.Bean; -import org.springframework.context.annotation.ComponentScan; -import org.springframework.context.annotation.Configuration; -import org.springframework.context.annotation.PropertySource; -import org.springframework.core.env.Environment; -import org.springframework.dao.annotation.PersistenceExceptionTranslationPostProcessor; -import org.springframework.data.jpa.repository.config.EnableJpaRepositories; -import org.springframework.jdbc.datasource.DriverManagerDataSource; -import org.springframework.orm.jpa.JpaTransactionManager; -import org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean; -import org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter; -import org.springframework.transaction.annotation.EnableTransactionManagement; - -@Configuration -@EnableTransactionManagement -@PropertySource({ "classpath:application.properties" }) -@ComponentScan({ "org.baeldung.persistence.model" }) -@EnableJpaRepositories(basePackages = "org.baeldung.persistence.dao") -public class PersistenceJPAConfig { - - @Autowired - private Environment env; - - public PersistenceJPAConfig() { - super(); - } - - @Bean - public LocalContainerEntityManagerFactoryBean entityManagerFactory() { - final LocalContainerEntityManagerFactoryBean em = new LocalContainerEntityManagerFactoryBean(); - em.setDataSource(dataSource()); - em.setPackagesToScan(new String[] { "org.baeldung.persistence.model" }); - final HibernateJpaVendorAdapter vendorAdapter = new HibernateJpaVendorAdapter(); - em.setJpaVendorAdapter(vendorAdapter); - em.setJpaProperties(additionalProperties()); - return em; - } - - @Bean - public DataSource dataSource() { - final DriverManagerDataSource dataSource = new DriverManagerDataSource(); - dataSource.setDriverClassName(env.getProperty("jdbc.driverClassName")); - dataSource.setUrl(env.getProperty("jdbc.url")); - dataSource.setUsername(env.getProperty("jdbc.user")); - dataSource.setPassword(env.getProperty("jdbc.pass")); - return dataSource; - } - - @Bean - public JpaTransactionManager transactionManager() { - JpaTransactionManager transactionManager = new JpaTransactionManager(); - transactionManager.setEntityManagerFactory(entityManagerFactory().getObject()); - return transactionManager; - } - - @Bean - public PersistenceExceptionTranslationPostProcessor exceptionTranslation() { - return new PersistenceExceptionTranslationPostProcessor(); - } - - final Properties additionalProperties() { - final Properties hibernateProperties = new Properties(); - hibernateProperties.setProperty("hibernate.hbm2ddl.auto", env.getProperty("hibernate.hbm2ddl.auto")); - hibernateProperties.setProperty("hibernate.dialect", env.getProperty("hibernate.dialect")); - return hibernateProperties; - } - -} diff --git a/src/main/java/org/baeldung/spring/SecSecurityConfig.java b/src/main/java/org/baeldung/spring/SecSecurityConfig.java deleted file mode 100644 index 4da114c78b..0000000000 --- a/src/main/java/org/baeldung/spring/SecSecurityConfig.java +++ /dev/null @@ -1,14 +0,0 @@ -package org.baeldung.spring; - -import org.springframework.context.annotation.Configuration; -import org.springframework.context.annotation.ImportResource; - -@Configuration -@ImportResource({ "classpath:webSecurityConfig.xml" }) -public class SecSecurityConfig { - - public SecSecurityConfig() { - super(); - } - -} diff --git a/src/main/java/org/baeldung/validation/service/EmailExistsException.java b/src/main/java/org/baeldung/validation/service/EmailExistsException.java deleted file mode 100644 index 7b60bb9f08..0000000000 --- a/src/main/java/org/baeldung/validation/service/EmailExistsException.java +++ /dev/null @@ -1,9 +0,0 @@ -package org.baeldung.validation.service; - -@SuppressWarnings("serial") -public class EmailExistsException extends Throwable { - - public EmailExistsException(String message) { - super(message); - } -} diff --git a/src/main/java/org/baeldung/validation/service/EmailValidator.java b/src/main/java/org/baeldung/validation/service/EmailValidator.java deleted file mode 100644 index 1ff8c4251f..0000000000 --- a/src/main/java/org/baeldung/validation/service/EmailValidator.java +++ /dev/null @@ -1,28 +0,0 @@ -package org.baeldung.validation.service; - -import java.util.regex.Matcher; -import java.util.regex.Pattern; - -import javax.validation.ConstraintValidator; -import javax.validation.ConstraintValidatorContext; - -public class EmailValidator implements ConstraintValidator { - private Pattern pattern; - private Matcher matcher; - private static final String EMAIL_PATTERN = "^[_A-Za-z0-9-\\+]+(\\.[_A-Za-z0-9-]+)*@" + "[A-Za-z0-9-]+(\\.[A-Za-z0-9]+)*(\\.[A-Za-z]{2,})$"; - - @Override - public void initialize(ValidEmail constraintAnnotation) { - } - - @Override - public boolean isValid(String username, ConstraintValidatorContext context) { - return (validateEmail(username)); - } - - private boolean validateEmail(String email) { - pattern = Pattern.compile(EMAIL_PATTERN); - matcher = pattern.matcher(email); - return matcher.matches(); - } -} diff --git a/src/main/java/org/baeldung/validation/service/PasswordMatches.java b/src/main/java/org/baeldung/validation/service/PasswordMatches.java deleted file mode 100644 index 63cfb297f0..0000000000 --- a/src/main/java/org/baeldung/validation/service/PasswordMatches.java +++ /dev/null @@ -1,24 +0,0 @@ -package org.baeldung.validation.service; - -import javax.validation.Constraint; -import javax.validation.Payload; - -import java.lang.annotation.Documented; -import java.lang.annotation.Retention; -import java.lang.annotation.Target; -import static java.lang.annotation.ElementType.ANNOTATION_TYPE; -import static java.lang.annotation.ElementType.TYPE; -import static java.lang.annotation.RetentionPolicy.RUNTIME; - -@Target({ TYPE, ANNOTATION_TYPE }) -@Retention(RUNTIME) -@Constraint(validatedBy = PasswordMatchesValidator.class) -@Documented -public @interface PasswordMatches { - - String message() default "Passwords don't match"; - - Class[] groups() default {}; - - Class[] payload() default {}; -} diff --git a/src/main/java/org/baeldung/validation/service/PasswordMatchesValidator.java b/src/main/java/org/baeldung/validation/service/PasswordMatchesValidator.java deleted file mode 100644 index 99f569957b..0000000000 --- a/src/main/java/org/baeldung/validation/service/PasswordMatchesValidator.java +++ /dev/null @@ -1,19 +0,0 @@ -package org.baeldung.validation.service; - -import javax.validation.ConstraintValidator; -import javax.validation.ConstraintValidatorContext; - -import org.baeldung.persistence.service.UserDto; - -public class PasswordMatchesValidator implements ConstraintValidator { - - @Override - public void initialize(PasswordMatches constraintAnnotation) { - } - - @Override - public boolean isValid(Object obj, ConstraintValidatorContext context) { - UserDto user = (UserDto) obj; - return user.getPassword().equals(user.getMatchingPassword()); - } -} diff --git a/src/main/java/org/baeldung/validation/service/UserValidator.java b/src/main/java/org/baeldung/validation/service/UserValidator.java deleted file mode 100644 index 45de9e3a94..0000000000 --- a/src/main/java/org/baeldung/validation/service/UserValidator.java +++ /dev/null @@ -1,23 +0,0 @@ -package org.baeldung.validation.service; - -import org.baeldung.persistence.service.UserDto; -import org.springframework.validation.Errors; -import org.springframework.validation.ValidationUtils; -import org.springframework.validation.Validator; - -public class UserValidator implements Validator { - - @Override - public boolean supports(Class clazz) { - return UserDto.class.isAssignableFrom(clazz); - } - - @Override - public void validate(Object obj, Errors errors) { - ValidationUtils.rejectIfEmptyOrWhitespace(errors, "firstName", "message.firstName", "Firstname is required."); - ValidationUtils.rejectIfEmptyOrWhitespace(errors, "lastName", "message.lastName", "LastName is required."); - ValidationUtils.rejectIfEmptyOrWhitespace(errors, "password", "message.password", "LastName is required."); - ValidationUtils.rejectIfEmptyOrWhitespace(errors, "username", "message.username", "UserName is required."); - } - -} diff --git a/src/main/java/org/baeldung/validation/service/ValidEmail.java b/src/main/java/org/baeldung/validation/service/ValidEmail.java deleted file mode 100644 index df852351c3..0000000000 --- a/src/main/java/org/baeldung/validation/service/ValidEmail.java +++ /dev/null @@ -1,24 +0,0 @@ -package org.baeldung.validation.service; - -import javax.validation.Constraint; -import javax.validation.Payload; -import java.lang.annotation.Documented; -import java.lang.annotation.Retention; -import java.lang.annotation.Target; -import static java.lang.annotation.ElementType.FIELD; -import static java.lang.annotation.ElementType.ANNOTATION_TYPE; -import static java.lang.annotation.ElementType.TYPE; -import static java.lang.annotation.RetentionPolicy.RUNTIME; - -@Target({ TYPE, FIELD, ANNOTATION_TYPE }) -@Retention(RUNTIME) -@Constraint(validatedBy = EmailValidator.class) -@Documented -public @interface ValidEmail { - - String message() default "Invalid Email"; - - Class[] groups() default {}; - - Class[] payload() default {}; -} diff --git a/src/main/java/org/baeldung/web/controller/RegistrationController.java b/src/main/java/org/baeldung/web/controller/RegistrationController.java deleted file mode 100644 index 69709c9190..0000000000 --- a/src/main/java/org/baeldung/web/controller/RegistrationController.java +++ /dev/null @@ -1,112 +0,0 @@ -package org.baeldung.web.controller; - -import java.util.Calendar; -import java.util.Locale; - -import javax.validation.Valid; - -import org.baeldung.persistence.model.User; -import org.baeldung.persistence.model.VerificationToken; -import org.baeldung.persistence.service.UserDto; -import org.baeldung.persistence.service.IUserService; -import org.baeldung.event.OnRegistrationCompleteEvent; -import org.baeldung.validation.service.EmailExistsException; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.context.ApplicationEventPublisher; -import org.springframework.context.MessageSource; -import org.springframework.mail.javamail.JavaMailSender; -import org.springframework.stereotype.Controller; -import org.springframework.ui.Model; -import org.springframework.validation.BindingResult; -import org.springframework.validation.Errors; -import org.springframework.web.bind.annotation.ModelAttribute; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RequestMethod; -import org.springframework.web.bind.annotation.RequestParam; -import org.springframework.web.context.request.WebRequest; -import org.springframework.web.servlet.ModelAndView; - -@Controller -public class RegistrationController { - - private final Logger LOGGER = LoggerFactory.getLogger(getClass()); - - @Autowired - private IUserService service; - - @Autowired - private MessageSource messages; - - @Autowired - private JavaMailSender mailSender; - - @Autowired - private ApplicationEventPublisher eventPublisher; - - public RegistrationController() { - - } - - @RequestMapping(value = "/user/registration", method = RequestMethod.GET) - public String showRegistrationForm(WebRequest request, Model model) { - LOGGER.debug("Rendering registration page."); - UserDto accountDto = new UserDto(); - model.addAttribute("user", accountDto); - return "registration"; - } - - @RequestMapping(value = "/regitrationConfirm", method = RequestMethod.GET) - public String confirmRegistration(WebRequest request, Model model, @RequestParam("token") String token) { - Locale locale = request.getLocale(); - - VerificationToken verificationToken = service.getVerificationToken(token); - if (verificationToken == null) { - String message = messages.getMessage("auth.message.invalidToken", null, locale); - model.addAttribute("message", message); - return "redirect:/badUser.html?lang=" + locale.getLanguage(); - } - - User user = verificationToken.getUser(); - Calendar cal = Calendar.getInstance(); - if ((verificationToken.getExpiryDate().getTime() - cal.getTime().getTime()) <= 0) { - model.addAttribute("message", messages.getMessage("auth.message.expired", null, locale)); - return "redirect:/badUser.html?lang=" + locale.getLanguage(); - } - - user.setEnabled(true); - service.saveRegisteredUser(user); - return "redirect:/login.html?lang=" + locale.getLanguage(); - } - - @RequestMapping(value = "/user/registration", method = RequestMethod.POST) - public ModelAndView registerUserAccount(@ModelAttribute("user") @Valid UserDto accountDto, BindingResult result, WebRequest request, Errors errors) { - LOGGER.debug("Registering user account with information: {}", accountDto); - if (result.hasErrors()) { - return new ModelAndView("registration", "user", accountDto); - } - - User registered = createUserAccount(accountDto); - if (registered == null) { - result.rejectValue("email", "message.regError"); - } - try { - String appUrl = request.getContextPath(); - eventPublisher.publishEvent(new OnRegistrationCompleteEvent(registered, request.getLocale(), appUrl)); - } catch (Exception me) { - return new ModelAndView("emailError", "user", accountDto); - } - return new ModelAndView("successRegister", "user", accountDto); - } - - private User createUserAccount(UserDto accountDto) { - User registered = null; - try { - registered = service.registerNewUserAccount(accountDto); - } catch (EmailExistsException e) { - return null; - } - return registered; - } -} diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties deleted file mode 100644 index b4b219646e..0000000000 --- a/src/main/resources/application.properties +++ /dev/null @@ -1,17 +0,0 @@ -################### DataSource Configuration ########################## -jdbc.driverClassName=com.mysql.jdbc.Driver -jdbc.url=jdbc:mysql://localhost:3306/AUTHDATA -jdbc.user=root -###jdbc.pass=admin### -init-db=false -################### Hibernate Configuration ########################## -hibernate.dialect=org.hibernate.dialect.MySQLDialect -hibernate.show_sql=true -hibernate.hbm2ddl.auto=validate -################### JavaMail Configuration ########################## -smtp.host=smtp.gmail.com -smtp.port=465 -smtp.protocol=smtps -smtp.username=egmp777@gmail.com -smtp.password=biiikupozvjvistz -support.email=egmp777@gmail.com diff --git a/src/main/resources/logback.xml b/src/main/resources/logback.xml deleted file mode 100644 index 1146dade63..0000000000 --- a/src/main/resources/logback.xml +++ /dev/null @@ -1,20 +0,0 @@ - - - - - web - %date [%thread] %-5level %logger{36} - %message%n - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/main/resources/messages_en.properties b/src/main/resources/messages_en.properties deleted file mode 100644 index 1a66bbc0f4..0000000000 --- a/src/main/resources/messages_en.properties +++ /dev/null @@ -1,55 +0,0 @@ -message.username=Username required -message.password=Password required -message.unauth=Unauthorized Access !! -message.badCredentials=Invalid Username or Password -message.sessionExpired=Session Timed Out -message.logoutError=Sorry, error logging out -message.logoutSucc=You logged out successfully -message.regSucc=You registered successfully. We will send you a confirmation message to your email account. -message.regError=An account for that username/email already exists. Please enter a different username. -message.lastName=Last name is required -message.firstName=First name required -message.badEmail=Invalid email address -message.email.config.error=Error in java mail configuration -token.message=Your token is: -auth.message.disabled=Your account is disabled please check your mail and click on the confirmation link -auth.message.expired=Your registration token has expired. Please register again. -auth.message.invalidUser=This username is invalid, or does not exist. -auth.message.invalidToken=Invalid account confirmation token. -label.user.email=Email: -label.user.firstName=First name: -label.user.lastName=Last name: -label.user.password=Password: -label.user.confirmPass=Confirm password -label.form.submit=Submit -label.form.title=Registration Form -label.form.loginLink=Back to login -label.login=Login here -label.form.loginTitle=Login -label.form.loginEmail=Email -label.form.loginPass=Password -label.form.loginEnglish=English -label.form.loginSpanish=Spanish -label.form.loginSignUp=Sign up -label.pages.logout=Logout -label.pages.admin=Administrator -label.pages.home.title=Home -label.pages.home.message=Welcome Home -label.pages.admin.message=Welcome Admin -label.pages.user.message=Welcome User -label.successRegister.title=Registration Success -label.badUser.title=Invalid Link -ValidEmail.user.email=Invalid email address! -UniqueUsername.user.username=An account with that username/email already exists -NotNull.user.firstName=First name required -NotEmpty.user.firstName=First name required -NotNull.user.lastName=Last name required -NotEmpty.user.lastName=Last name required -NotNull.user.username=Username(Email) required -NotEmpty.user.username=Username(Email) required -NotNull.user.password=Password required -NotEmpty.user.password=Password required -NotNull.user.matchingPassword=Required -NotEmpty.user.matchingPassword=Required -PasswordMatches.user:Password does not match! -Email.user.email=Invalid Username (Email) \ No newline at end of file diff --git a/src/main/resources/messages_es_ES.properties b/src/main/resources/messages_es_ES.properties deleted file mode 100644 index a22263b9ba..0000000000 --- a/src/main/resources/messages_es_ES.properties +++ /dev/null @@ -1,55 +0,0 @@ -message.username=Por favor ingrese el nombre de usuario -message.password=Por favor ingrese una clave -message.unauth=Acceso denegado !! -message.badCredentials=Usuario o clave invalida -message.sessionExpired=La sesion expiro -message.logoutError=Lo sentimos, hubo problemas al salir -message.logoutSucc=Salida con exito -message.regSucc=Se registro correctamente. Le enviaremos un mensaje de confirmacion a su direccion de email. -message.regError=Ya existe una cuenta con ese nombre de usuario. Ingrese un nombre de usuario diferente. -message.lastName=Por favor ingrese su apellido -message.firstName=Por favor ingrese su nombre -message.badEmail=Direccion de correo no es valida -message.email.config.error=Error en configuracion de java mail -token.message=Su token es: -auth.message.disabled=Su cuenta no esta habilitada. Hemos enviado a su correo un link para habilitar su cuenta. -auth.message.expired=Su ficha de registro ha caducado, por favor registrese de nuevo. -auth.message.invalidUser=Este nombre de usuario es invalido o no existe. -auth.message.invalidToken=Codigo de confirmacion incorrecto. -label.user.email=Correo Electronico: -label.user.firstName=Nombre: -label.user.lastName=Apellido: -label.user.password=Contrasenia: -label.user.confirmPass=Confirme la contrasenia -label.form.submit=Enviar -label.form.title=Formulario de Registro -label.login=Autehtifiquese aqui -label.form.loginTitle=Ingreso -label.form.loginLink=Regrese a autentificacion -label.form.loginEmail=Correo Electronico -label.form.loginPass=Contrasenia -label.form.loginEnglish=Ingles -label.form.loginSpanish=Espaniol -label.form.loginSignUp=Registrese -label.pages.logout=Salir -label.pages.admin=Administrador -label.pages.home.title=Inicio -label.pages.home.message=Bienveni@ a Casa -label.pages.admin.message=Bienvenid@ Admin -label.pages.user.message=Bienvenid@ Usuari@ -label.successRegister.title=Registro Exitoso -label.badUser.title=Enlace Invalido -ValidEmail.user.email=Cuenta correo invlida! -UniqueUsername.user.username=Ya existe una cuenta con ese nombre de usuario -NotNull.user.firstName=Por favor ingrese su nombre -NotEmpty.user.firstName=Por favor ingrese su nombre -NotNull.user.lastName=Por favor ingrese su apellido -NotEmpty.user.lastName=Por favor ingrese su apellido -NotNull.user.username=Por favor ingrese su cuenta de email -NotEmpty.user.username=Por favor ingrese su cuenta de email -NotNull.user.password=Por favor ingrese su clave -NotEmpty.user.password=Por favor ingrese su contraseña -NotNull.user.matchingPassword=Campo obligatirio -NotEmpty.user.matchingPassword=Campo obligatrio -PasswordMatches.user:Las claves no coinciden! -Email.user.email=Email no es valido diff --git a/src/main/resources/webSecurityConfig.xml b/src/main/resources/webSecurityConfig.xml deleted file mode 100644 index 0a05c24026..0000000000 --- a/src/main/resources/webSecurityConfig.xml +++ /dev/null @@ -1,46 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/main/webapp/META-INF/MANIFEST.MF b/src/main/webapp/META-INF/MANIFEST.MF deleted file mode 100644 index 5e9495128c..0000000000 --- a/src/main/webapp/META-INF/MANIFEST.MF +++ /dev/null @@ -1,3 +0,0 @@ -Manifest-Version: 1.0 -Class-Path: - diff --git a/src/main/webapp/WEB-INF/mvc-servlet.xml b/src/main/webapp/WEB-INF/mvc-servlet.xml deleted file mode 100644 index 94bd63e068..0000000000 --- a/src/main/webapp/WEB-INF/mvc-servlet.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/view/admin.jsp b/src/main/webapp/WEB-INF/view/admin.jsp deleted file mode 100644 index 7456f2ebae..0000000000 --- a/src/main/webapp/WEB-INF/view/admin.jsp +++ /dev/null @@ -1,29 +0,0 @@ -<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> -<%@ taglib prefix="sec" - uri="http://www.springframework.org/security/tags"%> -<%@taglib uri="http://www.springframework.org/tags" prefix="spring"%> - - - -" rel="stylesheet"> -<spring:message code="label.pages.home.title"></spring:message> - - -
    -
    - - - - -

    - -

    -
    - "> "> -
    -
    - - diff --git a/src/main/webapp/WEB-INF/view/badUser.jsp b/src/main/webapp/WEB-INF/view/badUser.jsp deleted file mode 100644 index 348caac58a..0000000000 --- a/src/main/webapp/WEB-INF/view/badUser.jsp +++ /dev/null @@ -1,24 +0,0 @@ -<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> -<%@ taglib prefix="sec" - uri="http://www.springframework.org/security/tags"%> -<%@taglib uri="http://www.springframework.org/tags" prefix="spring"%> -<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%> - -<%@ page session="true"%> - - -" rel="stylesheet"> - <spring:message -code="label.badUser.title"></spring:message> - - -

    -
    - ${param.message} -

    -
    -"> - - - diff --git a/src/main/webapp/WEB-INF/view/console.jsp b/src/main/webapp/WEB-INF/view/console.jsp deleted file mode 100644 index da04eac57d..0000000000 --- a/src/main/webapp/WEB-INF/view/console.jsp +++ /dev/null @@ -1,29 +0,0 @@ -<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> -<%@ taglib prefix="sec" - uri="http://www.springframework.org/security/tags"%> -<%@taglib uri="http://www.springframework.org/tags" prefix="spring"%> - - -" rel="stylesheet"> - - -
    -
    -

    This is the landing page for the admin

    - - This text is only visible to a user -
    -
    - - This text is only visible to an admin -
    -
    - "> "> -
    -
    - - - \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/view/emailError.jsp b/src/main/webapp/WEB-INF/view/emailError.jsp deleted file mode 100644 index ca94dbdfb0..0000000000 --- a/src/main/webapp/WEB-INF/view/emailError.jsp +++ /dev/null @@ -1,19 +0,0 @@ -<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> -<%@taglib uri="http://www.springframework.org/tags" prefix="spring"%> - - -" rel="stylesheet"> -<spring:message code="label.pages.home.title"></spring:message> - - -
    -
    -

    - -

    - -
    -
    - - - diff --git a/src/main/webapp/WEB-INF/view/expiredAccount.jsp b/src/main/webapp/WEB-INF/view/expiredAccount.jsp deleted file mode 100644 index a8f732c312..0000000000 --- a/src/main/webapp/WEB-INF/view/expiredAccount.jsp +++ /dev/null @@ -1,23 +0,0 @@ -<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> -<%@ taglib prefix="sec" - uri="http://www.springframework.org/security/tags"%> -<%@taglib uri="http://www.springframework.org/tags" prefix="spring"%> -<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%> - -<%@ page session="true"%> - - - -" rel="stylesheet"> - <spring:message code="label.pages.home.title"></spring:message> - - -

    - -

    -
    -"> - - - diff --git a/src/main/webapp/WEB-INF/view/home.jsp b/src/main/webapp/WEB-INF/view/home.jsp deleted file mode 100644 index 68819f09f4..0000000000 --- a/src/main/webapp/WEB-INF/view/home.jsp +++ /dev/null @@ -1,22 +0,0 @@ -<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%> -<%@ page session="true"%> -<%@taglib uri="http://www.springframework.org/tags" prefix="spring"%> - - - -" rel="stylesheet"> -<spring:message code="label.pages.home.title"></spring:message> - - -
    -
    -

    - -

    - "> -
    -
    - - - diff --git a/src/main/webapp/WEB-INF/view/homepage.jsp b/src/main/webapp/WEB-INF/view/homepage.jsp deleted file mode 100644 index 2d2942b44e..0000000000 --- a/src/main/webapp/WEB-INF/view/homepage.jsp +++ /dev/null @@ -1,35 +0,0 @@ -<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> -<%@ taglib prefix="sec" - uri="http://www.springframework.org/security/tags"%> -<%@taglib uri="http://www.springframework.org/tags" prefix="spring"%> -<%@ page session="true"%> - - -" rel="stylesheet"> -<spring:message code="label.pages.home.title"></spring:message> - - - -
    - -
    - - -
    -
    - - - -
    -
    - ${param.user} - "> "> "> -
    -
    - - \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/view/invalidSession.jsp b/src/main/webapp/WEB-INF/view/invalidSession.jsp deleted file mode 100644 index 4e62083a52..0000000000 --- a/src/main/webapp/WEB-INF/view/invalidSession.jsp +++ /dev/null @@ -1,20 +0,0 @@ -<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> -<%@taglib uri="http://www.springframework.org/tags" prefix="spring"%> - - -" rel="stylesheet"> -<spring:message code="label.pages.home.title"></spring:message> - - -
    -
    -

    - -

    - "> -
    -
    - - - diff --git a/src/main/webapp/WEB-INF/view/login.jsp b/src/main/webapp/WEB-INF/view/login.jsp deleted file mode 100644 index 7ffa78c777..0000000000 --- a/src/main/webapp/WEB-INF/view/login.jsp +++ /dev/null @@ -1,94 +0,0 @@ -<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> -<%@ taglib prefix="sec" - uri="http://www.springframework.org/security/tags"%> -<%@taglib uri="http://www.springframework.org/tags" prefix="spring"%> -<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%> - -<%@ page session="true"%> - - - - - -
    - -
    -
    - -
    - -
    -
    - -
    - - -
    -
    -
    -
    - - - -" rel="stylesheet"> -<spring:message code="label.pages.home.title"></spring:message> - - - -
    -
    -

    - -

    - - | -
    - - - - - - - - - - - - -
    />
    - -
    -
    Current Locale : ${pageContext.response.locale}
    "> -
    -
    - - - \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/view/logout.jsp b/src/main/webapp/WEB-INF/view/logout.jsp deleted file mode 100644 index b83c558577..0000000000 --- a/src/main/webapp/WEB-INF/view/logout.jsp +++ /dev/null @@ -1,32 +0,0 @@ -<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> -<%@ taglib prefix="sec" - uri="http://www.springframework.org/security/tags"%> -<%@taglib uri="http://www.springframework.org/tags" prefix="spring"%> - - - -" rel="stylesheet"> - -
    - -
    -
    - -<spring:message code="label.pages.home.title"></spring:message> - - - -
    -
    - -
    - -
    -
    - "> -
    -
    - - - \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/view/registration.jsp b/src/main/webapp/WEB-INF/view/registration.jsp deleted file mode 100644 index 0d6781a5db..0000000000 --- a/src/main/webapp/WEB-INF/view/registration.jsp +++ /dev/null @@ -1,64 +0,0 @@ - -<%@ page contentType="text/html;charset=UTF-8" language="java"%> -<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> -<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%> -<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%> -<%@ taglib prefix="sec" - uri="http://www.springframework.org/security/tags"%> -<%@ page session="false"%> - - -" rel="stylesheet"> - -<spring:message code="label.form.title"></spring:message> - - -
    -
    -

    - -

    - -
    - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -
    "> -
    -
    - - - \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/view/regitrationConfirm.jsp b/src/main/webapp/WEB-INF/view/regitrationConfirm.jsp deleted file mode 100644 index cdbeea5169..0000000000 --- a/src/main/webapp/WEB-INF/view/regitrationConfirm.jsp +++ /dev/null @@ -1,22 +0,0 @@ -<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> -<%@ taglib prefix="sec" - uri="http://www.springframework.org/security/tags"%> -<%@taglib uri="http://www.springframework.org/tags" prefix="spring"%> -<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%> - -<%@ page session="true"%> - - - - - -" rel="stylesheet"> - -<spring:message code="label.pages.home.title"></spring:message> - - - - - "> - - \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/view/successRegister.jsp b/src/main/webapp/WEB-INF/view/successRegister.jsp deleted file mode 100644 index d6ae764618..0000000000 --- a/src/main/webapp/WEB-INF/view/successRegister.jsp +++ /dev/null @@ -1,27 +0,0 @@ -<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> -<%@ taglib prefix="sec" - uri="http://www.springframework.org/security/tags"%> -<%@taglib uri="http://www.springframework.org/tags" prefix="spring"%> -<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%> - -<%@ page session="true"%> - - - - -" rel="stylesheet"> - -<spring:message code="label.pages.home.title"></spring:message> - - -
    -
    -
    - -
    - "> -
    -
    - - \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/web.xml b/src/main/webapp/WEB-INF/web.xml deleted file mode 100644 index 26ac5be1e0..0000000000 --- a/src/main/webapp/WEB-INF/web.xml +++ /dev/null @@ -1,49 +0,0 @@ - - - - - contextClass - - org.springframework.web.context.support.AnnotationConfigWebApplicationContext - - - - contextConfigLocation - org.baeldung.spring - - - - org.springframework.web.context.ContextLoaderListener - - - - mvc - org.springframework.web.servlet.DispatcherServlet - 1 - - - mvc - / - - - - springSecurityFilterChain - org.springframework.web.filter.DelegatingFilterProxy - - - springSecurityFilterChain - /* - - - localizationFilter - org.springframework.web.filter.RequestContextFilter - - - localizationFilter - /* - - - \ No newline at end of file diff --git a/src/main/webapp/resources/bootstrap.css b/src/main/webapp/resources/bootstrap.css deleted file mode 100644 index a5b7ccc211..0000000000 --- a/src/main/webapp/resources/bootstrap.css +++ /dev/null @@ -1,6167 +0,0 @@ -/*! - * Bootstrap v2.3.2 - * - * Copyright 2013 Twitter, Inc - * Licensed under the Apache License v2.0 - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Designed and built with all the love in the world by @mdo and @fat. - */ - -.clearfix { - *zoom: 1; -} - -.clearfix:before, -.clearfix:after { - display: table; - line-height: 0; - content: ""; -} - -.clearfix:after { - clear: both; -} - -.hide-text { - font: 0/0 a; - color: transparent; - text-shadow: none; - background-color: transparent; - border: 0; -} - -.input-block-level { - display: block; - width: 100%; - min-height: 30px; - -webkit-box-sizing: border-box; - -moz-box-sizing: border-box; - box-sizing: border-box; -} - -article, -aside, -details, -figcaption, -figure, -footer, -header, -hgroup, -nav, -section { - display: block; -} - -audio, -canvas, -video { - display: inline-block; - *display: inline; - *zoom: 1; -} - -audio:not([controls]) { - display: none; -} - -html { - font-size: 100%; - -webkit-text-size-adjust: 100%; - -ms-text-size-adjust: 100%; -} - -a:focus { - outline: thin dotted #333; - outline: 5px auto -webkit-focus-ring-color; - outline-offset: -2px; -} - -a:hover, -a:active { - outline: 0; -} - -sub, -sup { - position: relative; - font-size: 75%; - line-height: 0; - vertical-align: baseline; -} - -sup { - top: -0.5em; -} - -sub { - bottom: -0.25em; -} - -img { - width: auto\9; - height: auto; - max-width: 100%; - vertical-align: middle; - border: 0; - -ms-interpolation-mode: bicubic; -} - -#map_canvas img, -.google-maps img { - max-width: none; -} - -button, -input, -select, -textarea { - margin: 0; - font-size: 100%; - vertical-align: middle; -} - -button, -input { - *overflow: visible; - line-height: normal; -} - -button::-moz-focus-inner, -input::-moz-focus-inner { - padding: 0; - border: 0; -} - -button, -html input[type="button"], -input[type="reset"], -input[type="submit"] { - cursor: pointer; - -webkit-appearance: button; -} - -label, -select, -button, -input[type="button"], -input[type="reset"], -input[type="submit"], -input[type="radio"], -input[type="checkbox"] { - cursor: pointer; -} - -input[type="search"] { - -webkit-box-sizing: content-box; - -moz-box-sizing: content-box; - box-sizing: content-box; - -webkit-appearance: textfield; -} - -input[type="search"]::-webkit-search-decoration, -input[type="search"]::-webkit-search-cancel-button { - -webkit-appearance: none; -} - -textarea { - overflow: auto; - vertical-align: top; -} - -@media print { - * { - color: #000 !important; - text-shadow: none !important; - background: transparent !important; - box-shadow: none !important; - } - a, - a:visited { - text-decoration: underline; - } - a[href]:after { - content: " (" attr(href) ")"; - } - abbr[title]:after { - content: " (" attr(title) ")"; - } - .ir a:after, - a[href^="javascript:"]:after, - a[href^="#"]:after { - content: ""; - } - pre, - blockquote { - border: 1px solid #999; - page-break-inside: avoid; - } - thead { - display: table-header-group; - } - tr, - img { - page-break-inside: avoid; - } - img { - max-width: 100% !important; - } - @page { - margin: 0.5cm; - } - p, - h2, - h3 { - orphans: 3; - widows: 3; - } - h2, - h3 { - page-break-after: avoid; - } -} - -body { - margin: 0; - font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; - font-size: 14px; - line-height: 20px; - color: #333333; - background-color: #ffffff; -} - -a { - color: #0088cc; - text-decoration: none; -} - -a:hover, -a:focus { - color: #005580; - text-decoration: underline; -} - -.img-rounded { - -webkit-border-radius: 6px; - -moz-border-radius: 6px; - border-radius: 6px; -} - -.img-polaroid { - padding: 4px; - background-color: #fff; - border: 1px solid #ccc; - border: 1px solid rgba(0, 0, 0, 0.2); - -webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); - -moz-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); - box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); -} - -.img-circle { - -webkit-border-radius: 500px; - -moz-border-radius: 500px; - border-radius: 500px; -} - -.row { - margin-left: -20px; - *zoom: 1; -} - -.row:before, -.row:after { - display: table; - line-height: 0; - content: ""; -} - -.row:after { - clear: both; -} - -[class*="span"] { - float: left; - min-height: 1px; - margin-left: 20px; -} - -.container, -.navbar-static-top .container, -.navbar-fixed-top .container, -.navbar-fixed-bottom .container { - width: 940px; -} - -.span12 { - width: 940px; -} - -.span11 { - width: 860px; -} - -.span10 { - width: 780px; -} - -.span9 { - width: 700px; -} - -.span8 { - width: 620px; -} - -.span7 { - width: 540px; -} - -.span6 { - width: 460px; -} - -.span5 { - width: 380px; -} - -.span4 { - width: 300px; -} - -.span3 { - width: 220px; -} - -.span2 { - width: 140px; -} - -.span1 { - width: 60px; -} - -.offset12 { - margin-left: 980px; -} - -.offset11 { - margin-left: 900px; -} - -.offset10 { - margin-left: 820px; -} - -.offset9 { - margin-left: 740px; -} - -.offset8 { - margin-left: 660px; -} - -.offset7 { - margin-left: 580px; -} - -.offset6 { - margin-left: 500px; -} - -.offset5 { - margin-left: 420px; -} - -.offset4 { - margin-left: 340px; -} - -.offset3 { - margin-left: 260px; -} - -.offset2 { - margin-left: 180px; -} - -.offset1 { - margin-left: 100px; -} - -.row-fluid { - width: 100%; - *zoom: 1; -} - -.row-fluid:before, -.row-fluid:after { - display: table; - line-height: 0; - content: ""; -} - -.row-fluid:after { - clear: both; -} - -.row-fluid [class*="span"] { - display: block; - float: left; - width: 100%; - min-height: 30px; - margin-left: 2.127659574468085%; - *margin-left: 2.074468085106383%; - -webkit-box-sizing: border-box; - -moz-box-sizing: border-box; - box-sizing: border-box; -} - -.row-fluid [class*="span"]:first-child { - margin-left: 0; -} - -.row-fluid .controls-row [class*="span"] + [class*="span"] { - margin-left: 2.127659574468085%; -} - -.row-fluid .span12 { - width: 100%; - *width: 99.94680851063829%; -} - -.row-fluid .span11 { - width: 91.48936170212765%; - *width: 91.43617021276594%; -} - -.row-fluid .span10 { - width: 82.97872340425532%; - *width: 82.92553191489361%; -} - -.row-fluid .span9 { - width: 74.46808510638297%; - *width: 74.41489361702126%; -} - -.row-fluid .span8 { - width: 65.95744680851064%; - *width: 65.90425531914893%; -} - -.row-fluid .span7 { - width: 57.44680851063829%; - *width: 57.39361702127659%; -} - -.row-fluid .span6 { - width: 48.93617021276595%; - *width: 48.88297872340425%; -} - -.row-fluid .span5 { - width: 40.42553191489362%; - *width: 40.37234042553192%; -} - -.row-fluid .span4 { - width: 31.914893617021278%; - *width: 31.861702127659576%; -} - -.row-fluid .span3 { - width: 23.404255319148934%; - *width: 23.351063829787233%; -} - -.row-fluid .span2 { - width: 14.893617021276595%; - *width: 14.840425531914894%; -} - -.row-fluid .span1 { - width: 6.382978723404255%; - *width: 6.329787234042553%; -} - -.row-fluid .offset12 { - margin-left: 104.25531914893617%; - *margin-left: 104.14893617021275%; -} - -.row-fluid .offset12:first-child { - margin-left: 102.12765957446808%; - *margin-left: 102.02127659574467%; -} - -.row-fluid .offset11 { - margin-left: 95.74468085106382%; - *margin-left: 95.6382978723404%; -} - -.row-fluid .offset11:first-child { - margin-left: 93.61702127659574%; - *margin-left: 93.51063829787232%; -} - -.row-fluid .offset10 { - margin-left: 87.23404255319149%; - *margin-left: 87.12765957446807%; -} - -.row-fluid .offset10:first-child { - margin-left: 85.1063829787234%; - *margin-left: 84.99999999999999%; -} - -.row-fluid .offset9 { - margin-left: 78.72340425531914%; - *margin-left: 78.61702127659572%; -} - -.row-fluid .offset9:first-child { - margin-left: 76.59574468085106%; - *margin-left: 76.48936170212764%; -} - -.row-fluid .offset8 { - margin-left: 70.2127659574468%; - *margin-left: 70.10638297872339%; -} - -.row-fluid .offset8:first-child { - margin-left: 68.08510638297872%; - *margin-left: 67.9787234042553%; -} - -.row-fluid .offset7 { - margin-left: 61.70212765957446%; - *margin-left: 61.59574468085106%; -} - -.row-fluid .offset7:first-child { - margin-left: 59.574468085106375%; - *margin-left: 59.46808510638297%; -} - -.row-fluid .offset6 { - margin-left: 53.191489361702125%; - *margin-left: 53.085106382978715%; -} - -.row-fluid .offset6:first-child { - margin-left: 51.063829787234035%; - *margin-left: 50.95744680851063%; -} - -.row-fluid .offset5 { - margin-left: 44.68085106382979%; - *margin-left: 44.57446808510638%; -} - -.row-fluid .offset5:first-child { - margin-left: 42.5531914893617%; - *margin-left: 42.4468085106383%; -} - -.row-fluid .offset4 { - margin-left: 36.170212765957444%; - *margin-left: 36.06382978723405%; -} - -.row-fluid .offset4:first-child { - margin-left: 34.04255319148936%; - *margin-left: 33.93617021276596%; -} - -.row-fluid .offset3 { - margin-left: 27.659574468085104%; - *margin-left: 27.5531914893617%; -} - -.row-fluid .offset3:first-child { - margin-left: 25.53191489361702%; - *margin-left: 25.425531914893618%; -} - -.row-fluid .offset2 { - margin-left: 19.148936170212764%; - *margin-left: 19.04255319148936%; -} - -.row-fluid .offset2:first-child { - margin-left: 17.02127659574468%; - *margin-left: 16.914893617021278%; -} - -.row-fluid .offset1 { - margin-left: 10.638297872340425%; - *margin-left: 10.53191489361702%; -} - -.row-fluid .offset1:first-child { - margin-left: 8.51063829787234%; - *margin-left: 8.404255319148938%; -} - -[class*="span"].hide, -.row-fluid [class*="span"].hide { - display: none; -} - -[class*="span"].pull-right, -.row-fluid [class*="span"].pull-right { - float: right; -} - -.container { - margin-right: auto; - margin-left: auto; - *zoom: 1; -} - -.container:before, -.container:after { - display: table; - line-height: 0; - content: ""; -} - -.container:after { - clear: both; -} - -.container-fluid { - padding-right: 20px; - padding-left: 20px; - *zoom: 1; -} - -.container-fluid:before, -.container-fluid:after { - display: table; - line-height: 0; - content: ""; -} - -.container-fluid:after { - clear: both; -} - -p { - margin: 0 0 10px; -} - -.lead { - margin-bottom: 20px; - font-size: 21px; - font-weight: 200; - line-height: 30px; -} - -small { - font-size: 85%; -} - -strong { - font-weight: bold; -} - -em { - font-style: italic; -} - -cite { - font-style: normal; -} - -.muted { - color: #999999; -} - -a.muted:hover, -a.muted:focus { - color: #808080; -} - -.text-warning { - color: #c09853; -} - -a.text-warning:hover, -a.text-warning:focus { - color: #a47e3c; -} - -.text-error { - color: #b94a48; -} - -a.text-error:hover, -a.text-error:focus { - color: #953b39; -} - -.text-info { - color: #3a87ad; -} - -a.text-info:hover, -a.text-info:focus { - color: #2d6987; -} - -.text-success { - color: #468847; -} - -a.text-success:hover, -a.text-success:focus { - color: #356635; -} - -.text-left { - text-align: left; -} - -.text-right { - text-align: right; -} - -.text-center { - text-align: center; -} - -h1, -h2, -h3, -h4, -h5, -h6 { - margin: 10px 0; - font-family: inherit; - font-weight: bold; - line-height: 20px; - color: inherit; - text-rendering: optimizelegibility; -} - -h1 small, -h2 small, -h3 small, -h4 small, -h5 small, -h6 small { - font-weight: normal; - line-height: 1; - color: #999999; -} - -h1, -h2, -h3 { - line-height: 40px; -} - -h1 { - font-size: 38.5px; -} - -h2 { - font-size: 31.5px; -} - -h3 { - font-size: 24.5px; -} - -h4 { - font-size: 17.5px; -} - -h5 { - font-size: 14px; -} - -h6 { - font-size: 11.9px; -} - -h1 small { - font-size: 24.5px; -} - -h2 small { - font-size: 17.5px; -} - -h3 small { - font-size: 14px; -} - -h4 small { - font-size: 14px; -} - -.page-header { - padding-bottom: 9px; - margin: 20px 0 30px; - border-bottom: 1px solid #eeeeee; -} - -ul, -ol { - padding: 0; - margin: 0 0 10px 25px; -} - -ul ul, -ul ol, -ol ol, -ol ul { - margin-bottom: 0; -} - -li { - line-height: 20px; -} - -ul.unstyled, -ol.unstyled { - margin-left: 0; - list-style: none; -} - -ul.inline, -ol.inline { - margin-left: 0; - list-style: none; -} - -ul.inline > li, -ol.inline > li { - display: inline-block; - *display: inline; - padding-right: 5px; - padding-left: 5px; - *zoom: 1; -} - -dl { - margin-bottom: 20px; -} - -dt, -dd { - line-height: 20px; -} - -dt { - font-weight: bold; -} - -dd { - margin-left: 10px; -} - -.dl-horizontal { - *zoom: 1; -} - -.dl-horizontal:before, -.dl-horizontal:after { - display: table; - line-height: 0; - content: ""; -} - -.dl-horizontal:after { - clear: both; -} - -.dl-horizontal dt { - float: left; - width: 160px; - overflow: hidden; - clear: left; - text-align: right; - text-overflow: ellipsis; - white-space: nowrap; -} - -.dl-horizontal dd { - margin-left: 180px; -} - -hr { - margin: 20px 0; - border: 0; - border-top: 1px solid #eeeeee; - border-bottom: 1px solid #ffffff; -} - -abbr[title], -abbr[data-original-title] { - cursor: help; - border-bottom: 1px dotted #999999; -} - -abbr.initialism { - font-size: 90%; - text-transform: uppercase; -} - -blockquote { - padding: 0 0 0 15px; - margin: 0 0 20px; - border-left: 5px solid #eeeeee; -} - -blockquote p { - margin-bottom: 0; - font-size: 17.5px; - font-weight: 300; - line-height: 1.25; -} - -blockquote small { - display: block; - line-height: 20px; - color: #999999; -} - -blockquote small:before { - content: '\2014 \00A0'; -} - -blockquote.pull-right { - float: right; - padding-right: 15px; - padding-left: 0; - border-right: 5px solid #eeeeee; - border-left: 0; -} - -blockquote.pull-right p, -blockquote.pull-right small { - text-align: right; -} - -blockquote.pull-right small:before { - content: ''; -} - -blockquote.pull-right small:after { - content: '\00A0 \2014'; -} - -q:before, -q:after, -blockquote:before, -blockquote:after { - content: ""; -} - -address { - display: block; - margin-bottom: 20px; - font-style: normal; - line-height: 20px; -} - -code, -pre { - padding: 0 3px 2px; - font-family: Monaco, Menlo, Consolas, "Courier New", monospace; - font-size: 12px; - color: #333333; - -webkit-border-radius: 3px; - -moz-border-radius: 3px; - border-radius: 3px; -} - -code { - padding: 2px 4px; - color: #d14; - white-space: nowrap; - background-color: #f7f7f9; - border: 1px solid #e1e1e8; -} - -pre { - display: block; - padding: 9.5px; - margin: 0 0 10px; - font-size: 13px; - line-height: 20px; - word-break: break-all; - word-wrap: break-word; - white-space: pre; - white-space: pre-wrap; - background-color: #f5f5f5; - border: 1px solid #ccc; - border: 1px solid rgba(0, 0, 0, 0.15); - -webkit-border-radius: 4px; - -moz-border-radius: 4px; - border-radius: 4px; -} - -pre.prettyprint { - margin-bottom: 20px; -} - -pre code { - padding: 0; - color: inherit; - white-space: pre; - white-space: pre-wrap; - background-color: transparent; - border: 0; -} - -.pre-scrollable { - max-height: 340px; - overflow-y: scroll; -} - -form { - margin: 0 0 20px; -} - -fieldset { - padding: 0; - margin: 0; - border: 0; -} - -legend { - display: block; - width: 100%; - padding: 0; - margin-bottom: 20px; - font-size: 21px; - line-height: 40px; - color: #333333; - border: 0; - border-bottom: 1px solid #e5e5e5; -} - -legend small { - font-size: 15px; - color: #999999; -} - -label, -input, -button, -select, -textarea { - font-size: 14px; - font-weight: normal; - line-height: 20px; -} - -input, -button, -select, -textarea { - font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; -} - -label { - display: block; - margin-bottom: 5px; -} - -select, -textarea, -input[type="text"], -input[type="password"], -input[type="datetime"], -input[type="datetime-local"], -input[type="date"], -input[type="month"], -input[type="time"], -input[type="week"], -input[type="number"], -input[type="email"], -input[type="url"], -input[type="search"], -input[type="tel"], -input[type="color"], -.uneditable-input { - display: inline-block; - height: 30px; - padding: 4px 6px; - margin-bottom: 10px; - font-size: 14px; - line-height: 20px; - color: #555555; - vertical-align: middle; - -webkit-border-radius: 4px; - -moz-border-radius: 4px; - border-radius: 4px; -} - -input, -textarea, -.uneditable-input { - width: 206px; -} - -textarea { - height: auto; -} - -textarea, -input[type="text"], -input[type="password"], -input[type="datetime"], -input[type="datetime-local"], -input[type="date"], -input[type="month"], -input[type="time"], -input[type="week"], -input[type="number"], -input[type="email"], -input[type="url"], -input[type="search"], -input[type="tel"], -input[type="color"], -.uneditable-input { - background-color: #ffffff; - border: 1px solid #cccccc; - -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); - -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); - box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); - -webkit-transition: border linear 0.2s, box-shadow linear 0.2s; - -moz-transition: border linear 0.2s, box-shadow linear 0.2s; - -o-transition: border linear 0.2s, box-shadow linear 0.2s; - transition: border linear 0.2s, box-shadow linear 0.2s; -} - -textarea:focus, -input[type="text"]:focus, -input[type="password"]:focus, -input[type="datetime"]:focus, -input[type="datetime-local"]:focus, -input[type="date"]:focus, -input[type="month"]:focus, -input[type="time"]:focus, -input[type="week"]:focus, -input[type="number"]:focus, -input[type="email"]:focus, -input[type="url"]:focus, -input[type="search"]:focus, -input[type="tel"]:focus, -input[type="color"]:focus, -.uneditable-input:focus { - border-color: rgba(82, 168, 236, 0.8); - outline: 0; - outline: thin dotted \9; - /* IE6-9 */ - - -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(82, 168, 236, 0.6); - -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(82, 168, 236, 0.6); - box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(82, 168, 236, 0.6); -} - -input[type="radio"], -input[type="checkbox"] { - margin: 4px 0 0; - margin-top: 1px \9; - *margin-top: 0; - line-height: normal; -} - -input[type="file"], -input[type="image"], -input[type="submit"], -input[type="reset"], -input[type="button"], -input[type="radio"], -input[type="checkbox"] { - width: auto; -} - -select, -input[type="file"] { - height: 30px; - /* In IE7, the height of the select element cannot be changed by height, only font-size */ - - *margin-top: 4px; - /* For IE7, add top margin to align select with labels */ - - line-height: 30px; -} - -select { - width: 220px; - background-color: #ffffff; - border: 1px solid #cccccc; -} - -select[multiple], -select[size] { - height: auto; -} - -select:focus, -input[type="file"]:focus, -input[type="radio"]:focus, -input[type="checkbox"]:focus { - outline: thin dotted #333; - outline: 5px auto -webkit-focus-ring-color; - outline-offset: -2px; -} - -.uneditable-input, -.uneditable-textarea { - color: #999999; - cursor: not-allowed; - background-color: #fcfcfc; - border-color: #cccccc; - -webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.025); - -moz-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.025); - box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.025); -} - -.uneditable-input { - overflow: hidden; - white-space: nowrap; -} - -.uneditable-textarea { - width: auto; - height: auto; -} - -input:-moz-placeholder, -textarea:-moz-placeholder { - color: #999999; -} - -input:-ms-input-placeholder, -textarea:-ms-input-placeholder { - color: #999999; -} - -input::-webkit-input-placeholder, -textarea::-webkit-input-placeholder { - color: #999999; -} - -.radio, -.checkbox { - min-height: 20px; - padding-left: 20px; -} - -.radio input[type="radio"], -.checkbox input[type="checkbox"] { - float: left; - margin-left: -20px; -} - -.controls > .radio:first-child, -.controls > .checkbox:first-child { - padding-top: 5px; -} - -.radio.inline, -.checkbox.inline { - display: inline-block; - padding-top: 5px; - margin-bottom: 0; - vertical-align: middle; -} - -.radio.inline + .radio.inline, -.checkbox.inline + .checkbox.inline { - margin-left: 10px; -} - -.input-mini { - width: 60px; -} - -.input-small { - width: 90px; -} - -.input-medium { - width: 150px; -} - -.input-large { - width: 210px; -} - -.input-xlarge { - width: 270px; -} - -.input-xxlarge { - width: 530px; -} - -input[class*="span"], -select[class*="span"], -textarea[class*="span"], -.uneditable-input[class*="span"], -.row-fluid input[class*="span"], -.row-fluid select[class*="span"], -.row-fluid textarea[class*="span"], -.row-fluid .uneditable-input[class*="span"] { - float: none; - margin-left: 0; -} - -.input-append input[class*="span"], -.input-append .uneditable-input[class*="span"], -.input-prepend input[class*="span"], -.input-prepend .uneditable-input[class*="span"], -.row-fluid input[class*="span"], -.row-fluid select[class*="span"], -.row-fluid textarea[class*="span"], -.row-fluid .uneditable-input[class*="span"], -.row-fluid .input-prepend [class*="span"], -.row-fluid .input-append [class*="span"] { - display: inline-block; -} - -input, -textarea, -.uneditable-input { - margin-left: 0; -} - -.controls-row [class*="span"] + [class*="span"] { - margin-left: 20px; -} - -input.span12, -textarea.span12, -.uneditable-input.span12 { - width: 926px; -} - -input.span11, -textarea.span11, -.uneditable-input.span11 { - width: 846px; -} - -input.span10, -textarea.span10, -.uneditable-input.span10 { - width: 766px; -} - -input.span9, -textarea.span9, -.uneditable-input.span9 { - width: 686px; -} - -input.span8, -textarea.span8, -.uneditable-input.span8 { - width: 606px; -} - -input.span7, -textarea.span7, -.uneditable-input.span7 { - width: 526px; -} - -input.span6, -textarea.span6, -.uneditable-input.span6 { - width: 446px; -} - -input.span5, -textarea.span5, -.uneditable-input.span5 { - width: 366px; -} - -input.span4, -textarea.span4, -.uneditable-input.span4 { - width: 286px; -} - -input.span3, -textarea.span3, -.uneditable-input.span3 { - width: 206px; -} - -input.span2, -textarea.span2, -.uneditable-input.span2 { - width: 126px; -} - -input.span1, -textarea.span1, -.uneditable-input.span1 { - width: 46px; -} - -.controls-row { - *zoom: 1; -} - -.controls-row:before, -.controls-row:after { - display: table; - line-height: 0; - content: ""; -} - -.controls-row:after { - clear: both; -} - -.controls-row [class*="span"], -.row-fluid .controls-row [class*="span"] { - float: left; -} - -.controls-row .checkbox[class*="span"], -.controls-row .radio[class*="span"] { - padding-top: 5px; -} - -input[disabled], -select[disabled], -textarea[disabled], -input[readonly], -select[readonly], -textarea[readonly] { - cursor: not-allowed; - background-color: #eeeeee; -} - -input[type="radio"][disabled], -input[type="checkbox"][disabled], -input[type="radio"][readonly], -input[type="checkbox"][readonly] { - background-color: transparent; -} - -.control-group.warning .control-label, -.control-group.warning .help-block, -.control-group.warning .help-inline { - color: #c09853; -} - -.control-group.warning .checkbox, -.control-group.warning .radio, -.control-group.warning input, -.control-group.warning select, -.control-group.warning textarea { - color: #c09853; -} - -.control-group.warning input, -.control-group.warning select, -.control-group.warning textarea { - border-color: #c09853; - -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); - -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); - box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); -} - -.control-group.warning input:focus, -.control-group.warning select:focus, -.control-group.warning textarea:focus { - border-color: #a47e3c; - -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #dbc59e; - -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #dbc59e; - box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #dbc59e; -} - -.control-group.warning .input-prepend .add-on, -.control-group.warning .input-append .add-on { - color: #c09853; - background-color: #fcf8e3; - border-color: #c09853; -} - -.control-group.error .control-label, -.control-group.error .help-block, -.control-group.error .help-inline { - color: #b94a48; -} - -.control-group.error .checkbox, -.control-group.error .radio, -.control-group.error input, -.control-group.error select, -.control-group.error textarea { - color: #b94a48; -} - -.control-group.error input, -.control-group.error select, -.control-group.error textarea { - border-color: #b94a48; - -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); - -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); - box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); -} - -.control-group.error input:focus, -.control-group.error select:focus, -.control-group.error textarea:focus { - border-color: #953b39; - -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #d59392; - -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #d59392; - box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #d59392; -} - -.control-group.error .input-prepend .add-on, -.control-group.error .input-append .add-on { - color: #b94a48; - background-color: #f2dede; - border-color: #b94a48; -} - -.control-group.success .control-label, -.control-group.success .help-block, -.control-group.success .help-inline { - color: #468847; -} - -.control-group.success .checkbox, -.control-group.success .radio, -.control-group.success input, -.control-group.success select, -.control-group.success textarea { - color: #468847; -} - -.control-group.success input, -.control-group.success select, -.control-group.success textarea { - border-color: #468847; - -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); - -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); - box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); -} - -.control-group.success input:focus, -.control-group.success select:focus, -.control-group.success textarea:focus { - border-color: #356635; - -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #7aba7b; - -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #7aba7b; - box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #7aba7b; -} - -.control-group.success .input-prepend .add-on, -.control-group.success .input-append .add-on { - color: #468847; - background-color: #dff0d8; - border-color: #468847; -} - -.control-group.info .control-label, -.control-group.info .help-block, -.control-group.info .help-inline { - color: #3a87ad; -} - -.control-group.info .checkbox, -.control-group.info .radio, -.control-group.info input, -.control-group.info select, -.control-group.info textarea { - color: #3a87ad; -} - -.control-group.info input, -.control-group.info select, -.control-group.info textarea { - border-color: #3a87ad; - -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); - -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); - box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); -} - -.control-group.info input:focus, -.control-group.info select:focus, -.control-group.info textarea:focus { - border-color: #2d6987; - -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #7ab5d3; - -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #7ab5d3; - box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #7ab5d3; -} - -.control-group.info .input-prepend .add-on, -.control-group.info .input-append .add-on { - color: #3a87ad; - background-color: #d9edf7; - border-color: #3a87ad; -} - -input:focus:invalid, -textarea:focus:invalid, -select:focus:invalid { - color: #b94a48; - border-color: #ee5f5b; -} - -input:focus:invalid:focus, -textarea:focus:invalid:focus, -select:focus:invalid:focus { - border-color: #e9322d; - -webkit-box-shadow: 0 0 6px #f8b9b7; - -moz-box-shadow: 0 0 6px #f8b9b7; - box-shadow: 0 0 6px #f8b9b7; -} - -.form-actions { - padding: 19px 20px 20px; - margin-top: 20px; - margin-bottom: 20px; - background-color: #f5f5f5; - border-top: 1px solid #e5e5e5; - *zoom: 1; -} - -.form-actions:before, -.form-actions:after { - display: table; - line-height: 0; - content: ""; -} - -.form-actions:after { - clear: both; -} - -.help-block, -.help-inline { - color: #595959; -} - -.help-block { - display: block; - margin-bottom: 10px; -} - -.help-inline { - display: inline-block; - *display: inline; - padding-left: 5px; - vertical-align: middle; - *zoom: 1; -} - -.input-append, -.input-prepend { - display: inline-block; - margin-bottom: 10px; - font-size: 0; - white-space: nowrap; - vertical-align: middle; -} - -.input-append input, -.input-prepend input, -.input-append select, -.input-prepend select, -.input-append .uneditable-input, -.input-prepend .uneditable-input, -.input-append .dropdown-menu, -.input-prepend .dropdown-menu, -.input-append .popover, -.input-prepend .popover { - font-size: 14px; -} - -.input-append input, -.input-prepend input, -.input-append select, -.input-prepend select, -.input-append .uneditable-input, -.input-prepend .uneditable-input { - position: relative; - margin-bottom: 0; - *margin-left: 0; - vertical-align: top; - -webkit-border-radius: 0 4px 4px 0; - -moz-border-radius: 0 4px 4px 0; - border-radius: 0 4px 4px 0; -} - -.input-append input:focus, -.input-prepend input:focus, -.input-append select:focus, -.input-prepend select:focus, -.input-append .uneditable-input:focus, -.input-prepend .uneditable-input:focus { - z-index: 2; -} - -.input-append .add-on, -.input-prepend .add-on { - display: inline-block; - width: auto; - height: 20px; - min-width: 16px; - padding: 4px 5px; - font-size: 14px; - font-weight: normal; - line-height: 20px; - text-align: center; - text-shadow: 0 1px 0 #ffffff; - background-color: #eeeeee; - border: 1px solid #ccc; -} - -.input-append .add-on, -.input-prepend .add-on, -.input-append .btn, -.input-prepend .btn, -.input-append .btn-group > .dropdown-toggle, -.input-prepend .btn-group > .dropdown-toggle { - vertical-align: top; - -webkit-border-radius: 0; - -moz-border-radius: 0; - border-radius: 0; -} - -.input-append .active, -.input-prepend .active { - background-color: #a9dba9; - border-color: #46a546; -} - -.input-prepend .add-on, -.input-prepend .btn { - margin-right: -1px; -} - -.input-prepend .add-on:first-child, -.input-prepend .btn:first-child { - -webkit-border-radius: 4px 0 0 4px; - -moz-border-radius: 4px 0 0 4px; - border-radius: 4px 0 0 4px; -} - -.input-append input, -.input-append select, -.input-append .uneditable-input { - -webkit-border-radius: 4px 0 0 4px; - -moz-border-radius: 4px 0 0 4px; - border-radius: 4px 0 0 4px; -} - -.input-append input + .btn-group .btn:last-child, -.input-append select + .btn-group .btn:last-child, -.input-append .uneditable-input + .btn-group .btn:last-child { - -webkit-border-radius: 0 4px 4px 0; - -moz-border-radius: 0 4px 4px 0; - border-radius: 0 4px 4px 0; -} - -.input-append .add-on, -.input-append .btn, -.input-append .btn-group { - margin-left: -1px; -} - -.input-append .add-on:last-child, -.input-append .btn:last-child, -.input-append .btn-group:last-child > .dropdown-toggle { - -webkit-border-radius: 0 4px 4px 0; - -moz-border-radius: 0 4px 4px 0; - border-radius: 0 4px 4px 0; -} - -.input-prepend.input-append input, -.input-prepend.input-append select, -.input-prepend.input-append .uneditable-input { - -webkit-border-radius: 0; - -moz-border-radius: 0; - border-radius: 0; -} - -.input-prepend.input-append input + .btn-group .btn, -.input-prepend.input-append select + .btn-group .btn, -.input-prepend.input-append .uneditable-input + .btn-group .btn { - -webkit-border-radius: 0 4px 4px 0; - -moz-border-radius: 0 4px 4px 0; - border-radius: 0 4px 4px 0; -} - -.input-prepend.input-append .add-on:first-child, -.input-prepend.input-append .btn:first-child { - margin-right: -1px; - -webkit-border-radius: 4px 0 0 4px; - -moz-border-radius: 4px 0 0 4px; - border-radius: 4px 0 0 4px; -} - -.input-prepend.input-append .add-on:last-child, -.input-prepend.input-append .btn:last-child { - margin-left: -1px; - -webkit-border-radius: 0 4px 4px 0; - -moz-border-radius: 0 4px 4px 0; - border-radius: 0 4px 4px 0; -} - -.input-prepend.input-append .btn-group:first-child { - margin-left: 0; -} - -input.search-query { - padding-right: 14px; - padding-right: 4px \9; - padding-left: 14px; - padding-left: 4px \9; - /* IE7-8 doesn't have border-radius, so don't indent the padding */ - - margin-bottom: 0; - -webkit-border-radius: 15px; - -moz-border-radius: 15px; - border-radius: 15px; -} - -/* Allow for input prepend/append in search forms */ - -.form-search .input-append .search-query, -.form-search .input-prepend .search-query { - -webkit-border-radius: 0; - -moz-border-radius: 0; - border-radius: 0; -} - -.form-search .input-append .search-query { - -webkit-border-radius: 14px 0 0 14px; - -moz-border-radius: 14px 0 0 14px; - border-radius: 14px 0 0 14px; -} - -.form-search .input-append .btn { - -webkit-border-radius: 0 14px 14px 0; - -moz-border-radius: 0 14px 14px 0; - border-radius: 0 14px 14px 0; -} - -.form-search .input-prepend .search-query { - -webkit-border-radius: 0 14px 14px 0; - -moz-border-radius: 0 14px 14px 0; - border-radius: 0 14px 14px 0; -} - -.form-search .input-prepend .btn { - -webkit-border-radius: 14px 0 0 14px; - -moz-border-radius: 14px 0 0 14px; - border-radius: 14px 0 0 14px; -} - -.form-search input, -.form-inline input, -.form-horizontal input, -.form-search textarea, -.form-inline textarea, -.form-horizontal textarea, -.form-search select, -.form-inline select, -.form-horizontal select, -.form-search .help-inline, -.form-inline .help-inline, -.form-horizontal .help-inline, -.form-search .uneditable-input, -.form-inline .uneditable-input, -.form-horizontal .uneditable-input, -.form-search .input-prepend, -.form-inline .input-prepend, -.form-horizontal .input-prepend, -.form-search .input-append, -.form-inline .input-append, -.form-horizontal .input-append { - display: inline-block; - *display: inline; - margin-bottom: 0; - vertical-align: middle; - *zoom: 1; -} - -.form-search .hide, -.form-inline .hide, -.form-horizontal .hide { - display: none; -} - -.form-search label, -.form-inline label, -.form-search .btn-group, -.form-inline .btn-group { - display: inline-block; -} - -.form-search .input-append, -.form-inline .input-append, -.form-search .input-prepend, -.form-inline .input-prepend { - margin-bottom: 0; -} - -.form-search .radio, -.form-search .checkbox, -.form-inline .radio, -.form-inline .checkbox { - padding-left: 0; - margin-bottom: 0; - vertical-align: middle; -} - -.form-search .radio input[type="radio"], -.form-search .checkbox input[type="checkbox"], -.form-inline .radio input[type="radio"], -.form-inline .checkbox input[type="checkbox"] { - float: left; - margin-right: 3px; - margin-left: 0; -} - -.control-group { - margin-bottom: 10px; -} - -legend + .control-group { - margin-top: 20px; - -webkit-margin-top-collapse: separate; -} - -.form-horizontal .control-group { - margin-bottom: 20px; - *zoom: 1; -} - -.form-horizontal .control-group:before, -.form-horizontal .control-group:after { - display: table; - line-height: 0; - content: ""; -} - -.form-horizontal .control-group:after { - clear: both; -} - -.form-horizontal .control-label { - float: left; - width: 160px; - padding-top: 5px; - text-align: right; -} - -.form-horizontal .controls { - *display: inline-block; - *padding-left: 20px; - margin-left: 180px; - *margin-left: 0; -} - -.form-horizontal .controls:first-child { - *padding-left: 180px; -} - -.form-horizontal .help-block { - margin-bottom: 0; -} - -.form-horizontal input + .help-block, -.form-horizontal select + .help-block, -.form-horizontal textarea + .help-block, -.form-horizontal .uneditable-input + .help-block, -.form-horizontal .input-prepend + .help-block, -.form-horizontal .input-append + .help-block { - margin-top: 10px; -} - -.form-horizontal .form-actions { - padding-left: 180px; -} - -table { - max-width: 100%; - background-color: transparent; - border-collapse: collapse; - border-spacing: 0; -} - -.table { - width: 100%; - margin-bottom: 20px; -} - -.table th, -.table td { - padding: 8px; - line-height: 20px; - text-align: left; - vertical-align: top; - border-top: 1px solid #dddddd; -} - -.table th { - font-weight: bold; -} - -.table thead th { - vertical-align: bottom; -} - -.table caption + thead tr:first-child th, -.table caption + thead tr:first-child td, -.table colgroup + thead tr:first-child th, -.table colgroup + thead tr:first-child td, -.table thead:first-child tr:first-child th, -.table thead:first-child tr:first-child td { - border-top: 0; -} - -.table tbody + tbody { - border-top: 2px solid #dddddd; -} - -.table .table { - background-color: #ffffff; -} - -.table-condensed th, -.table-condensed td { - padding: 4px 5px; -} - -.table-bordered { - border: 1px solid #dddddd; - border-collapse: separate; - *border-collapse: collapse; - border-left: 0; - -webkit-border-radius: 4px; - -moz-border-radius: 4px; - border-radius: 4px; -} - -.table-bordered th, -.table-bordered td { - border-left: 1px solid #dddddd; -} - -.table-bordered caption + thead tr:first-child th, -.table-bordered caption + tbody tr:first-child th, -.table-bordered caption + tbody tr:first-child td, -.table-bordered colgroup + thead tr:first-child th, -.table-bordered colgroup + tbody tr:first-child th, -.table-bordered colgroup + tbody tr:first-child td, -.table-bordered thead:first-child tr:first-child th, -.table-bordered tbody:first-child tr:first-child th, -.table-bordered tbody:first-child tr:first-child td { - border-top: 0; -} - -.table-bordered thead:first-child tr:first-child > th:first-child, -.table-bordered tbody:first-child tr:first-child > td:first-child, -.table-bordered tbody:first-child tr:first-child > th:first-child { - -webkit-border-top-left-radius: 4px; - border-top-left-radius: 4px; - -moz-border-radius-topleft: 4px; -} - -.table-bordered thead:first-child tr:first-child > th:last-child, -.table-bordered tbody:first-child tr:first-child > td:last-child, -.table-bordered tbody:first-child tr:first-child > th:last-child { - -webkit-border-top-right-radius: 4px; - border-top-right-radius: 4px; - -moz-border-radius-topright: 4px; -} - -.table-bordered thead:last-child tr:last-child > th:first-child, -.table-bordered tbody:last-child tr:last-child > td:first-child, -.table-bordered tbody:last-child tr:last-child > th:first-child, -.table-bordered tfoot:last-child tr:last-child > td:first-child, -.table-bordered tfoot:last-child tr:last-child > th:first-child { - -webkit-border-bottom-left-radius: 4px; - border-bottom-left-radius: 4px; - -moz-border-radius-bottomleft: 4px; -} - -.table-bordered thead:last-child tr:last-child > th:last-child, -.table-bordered tbody:last-child tr:last-child > td:last-child, -.table-bordered tbody:last-child tr:last-child > th:last-child, -.table-bordered tfoot:last-child tr:last-child > td:last-child, -.table-bordered tfoot:last-child tr:last-child > th:last-child { - -webkit-border-bottom-right-radius: 4px; - border-bottom-right-radius: 4px; - -moz-border-radius-bottomright: 4px; -} - -.table-bordered tfoot + tbody:last-child tr:last-child td:first-child { - -webkit-border-bottom-left-radius: 0; - border-bottom-left-radius: 0; - -moz-border-radius-bottomleft: 0; -} - -.table-bordered tfoot + tbody:last-child tr:last-child td:last-child { - -webkit-border-bottom-right-radius: 0; - border-bottom-right-radius: 0; - -moz-border-radius-bottomright: 0; -} - -.table-bordered caption + thead tr:first-child th:first-child, -.table-bordered caption + tbody tr:first-child td:first-child, -.table-bordered colgroup + thead tr:first-child th:first-child, -.table-bordered colgroup + tbody tr:first-child td:first-child { - -webkit-border-top-left-radius: 4px; - border-top-left-radius: 4px; - -moz-border-radius-topleft: 4px; -} - -.table-bordered caption + thead tr:first-child th:last-child, -.table-bordered caption + tbody tr:first-child td:last-child, -.table-bordered colgroup + thead tr:first-child th:last-child, -.table-bordered colgroup + tbody tr:first-child td:last-child { - -webkit-border-top-right-radius: 4px; - border-top-right-radius: 4px; - -moz-border-radius-topright: 4px; -} - -.table-striped tbody > tr:nth-child(odd) > td, -.table-striped tbody > tr:nth-child(odd) > th { - background-color: #f9f9f9; -} - -.table-hover tbody tr:hover > td, -.table-hover tbody tr:hover > th { - background-color: #f5f5f5; -} - -table td[class*="span"], -table th[class*="span"], -.row-fluid table td[class*="span"], -.row-fluid table th[class*="span"] { - display: table-cell; - float: none; - margin-left: 0; -} - -.table td.span1, -.table th.span1 { - float: none; - width: 44px; - margin-left: 0; -} - -.table td.span2, -.table th.span2 { - float: none; - width: 124px; - margin-left: 0; -} - -.table td.span3, -.table th.span3 { - float: none; - width: 204px; - margin-left: 0; -} - -.table td.span4, -.table th.span4 { - float: none; - width: 284px; - margin-left: 0; -} - -.table td.span5, -.table th.span5 { - float: none; - width: 364px; - margin-left: 0; -} - -.table td.span6, -.table th.span6 { - float: none; - width: 444px; - margin-left: 0; -} - -.table td.span7, -.table th.span7 { - float: none; - width: 524px; - margin-left: 0; -} - -.table td.span8, -.table th.span8 { - float: none; - width: 604px; - margin-left: 0; -} - -.table td.span9, -.table th.span9 { - float: none; - width: 684px; - margin-left: 0; -} - -.table td.span10, -.table th.span10 { - float: none; - width: 764px; - margin-left: 0; -} - -.table td.span11, -.table th.span11 { - float: none; - width: 844px; - margin-left: 0; -} - -.table td.span12, -.table th.span12 { - float: none; - width: 924px; - margin-left: 0; -} - -.table tbody tr.success > td { - background-color: #dff0d8; -} - -.table tbody tr.error > td { - background-color: #f2dede; -} - -.table tbody tr.warning > td { - background-color: #fcf8e3; -} - -.table tbody tr.info > td { - background-color: #d9edf7; -} - -.table-hover tbody tr.success:hover > td { - background-color: #d0e9c6; -} - -.table-hover tbody tr.error:hover > td { - background-color: #ebcccc; -} - -.table-hover tbody tr.warning:hover > td { - background-color: #faf2cc; -} - -.table-hover tbody tr.info:hover > td { - background-color: #c4e3f3; -} - -[class^="icon-"], -[class*=" icon-"] { - display: inline-block; - width: 14px; - height: 14px; - margin-top: 1px; - *margin-right: .3em; - line-height: 14px; - vertical-align: text-top; - background-image: url("../img/glyphicons-halflings.png"); - background-position: 14px 14px; - background-repeat: no-repeat; -} - -/* White icons with optional class, or on hover/focus/active states of certain elements */ - -.icon-white, -.nav-pills > .active > a > [class^="icon-"], -.nav-pills > .active > a > [class*=" icon-"], -.nav-list > .active > a > [class^="icon-"], -.nav-list > .active > a > [class*=" icon-"], -.navbar-inverse .nav > .active > a > [class^="icon-"], -.navbar-inverse .nav > .active > a > [class*=" icon-"], -.dropdown-menu > li > a:hover > [class^="icon-"], -.dropdown-menu > li > a:focus > [class^="icon-"], -.dropdown-menu > li > a:hover > [class*=" icon-"], -.dropdown-menu > li > a:focus > [class*=" icon-"], -.dropdown-menu > .active > a > [class^="icon-"], -.dropdown-menu > .active > a > [class*=" icon-"], -.dropdown-submenu:hover > a > [class^="icon-"], -.dropdown-submenu:focus > a > [class^="icon-"], -.dropdown-submenu:hover > a > [class*=" icon-"], -.dropdown-submenu:focus > a > [class*=" icon-"] { - background-image: url("../img/glyphicons-halflings-white.png"); -} - -.icon-glass { - background-position: 0 0; -} - -.icon-music { - background-position: -24px 0; -} - -.icon-search { - background-position: -48px 0; -} - -.icon-envelope { - background-position: -72px 0; -} - -.icon-heart { - background-position: -96px 0; -} - -.icon-star { - background-position: -120px 0; -} - -.icon-star-empty { - background-position: -144px 0; -} - -.icon-user { - background-position: -168px 0; -} - -.icon-film { - background-position: -192px 0; -} - -.icon-th-large { - background-position: -216px 0; -} - -.icon-th { - background-position: -240px 0; -} - -.icon-th-list { - background-position: -264px 0; -} - -.icon-ok { - background-position: -288px 0; -} - -.icon-remove { - background-position: -312px 0; -} - -.icon-zoom-in { - background-position: -336px 0; -} - -.icon-zoom-out { - background-position: -360px 0; -} - -.icon-off { - background-position: -384px 0; -} - -.icon-signal { - background-position: -408px 0; -} - -.icon-cog { - background-position: -432px 0; -} - -.icon-trash { - background-position: -456px 0; -} - -.icon-home { - background-position: 0 -24px; -} - -.icon-file { - background-position: -24px -24px; -} - -.icon-time { - background-position: -48px -24px; -} - -.icon-road { - background-position: -72px -24px; -} - -.icon-download-alt { - background-position: -96px -24px; -} - -.icon-download { - background-position: -120px -24px; -} - -.icon-upload { - background-position: -144px -24px; -} - -.icon-inbox { - background-position: -168px -24px; -} - -.icon-play-circle { - background-position: -192px -24px; -} - -.icon-repeat { - background-position: -216px -24px; -} - -.icon-refresh { - background-position: -240px -24px; -} - -.icon-list-alt { - background-position: -264px -24px; -} - -.icon-lock { - background-position: -287px -24px; -} - -.icon-flag { - background-position: -312px -24px; -} - -.icon-headphones { - background-position: -336px -24px; -} - -.icon-volume-off { - background-position: -360px -24px; -} - -.icon-volume-down { - background-position: -384px -24px; -} - -.icon-volume-up { - background-position: -408px -24px; -} - -.icon-qrcode { - background-position: -432px -24px; -} - -.icon-barcode { - background-position: -456px -24px; -} - -.icon-tag { - background-position: 0 -48px; -} - -.icon-tags { - background-position: -25px -48px; -} - -.icon-book { - background-position: -48px -48px; -} - -.icon-bookmark { - background-position: -72px -48px; -} - -.icon-print { - background-position: -96px -48px; -} - -.icon-camera { - background-position: -120px -48px; -} - -.icon-font { - background-position: -144px -48px; -} - -.icon-bold { - background-position: -167px -48px; -} - -.icon-italic { - background-position: -192px -48px; -} - -.icon-text-height { - background-position: -216px -48px; -} - -.icon-text-width { - background-position: -240px -48px; -} - -.icon-align-left { - background-position: -264px -48px; -} - -.icon-align-center { - background-position: -288px -48px; -} - -.icon-align-right { - background-position: -312px -48px; -} - -.icon-align-justify { - background-position: -336px -48px; -} - -.icon-list { - background-position: -360px -48px; -} - -.icon-indent-left { - background-position: -384px -48px; -} - -.icon-indent-right { - background-position: -408px -48px; -} - -.icon-facetime-video { - background-position: -432px -48px; -} - -.icon-picture { - background-position: -456px -48px; -} - -.icon-pencil { - background-position: 0 -72px; -} - -.icon-map-marker { - background-position: -24px -72px; -} - -.icon-adjust { - background-position: -48px -72px; -} - -.icon-tint { - background-position: -72px -72px; -} - -.icon-edit { - background-position: -96px -72px; -} - -.icon-share { - background-position: -120px -72px; -} - -.icon-check { - background-position: -144px -72px; -} - -.icon-move { - background-position: -168px -72px; -} - -.icon-step-backward { - background-position: -192px -72px; -} - -.icon-fast-backward { - background-position: -216px -72px; -} - -.icon-backward { - background-position: -240px -72px; -} - -.icon-play { - background-position: -264px -72px; -} - -.icon-pause { - background-position: -288px -72px; -} - -.icon-stop { - background-position: -312px -72px; -} - -.icon-forward { - background-position: -336px -72px; -} - -.icon-fast-forward { - background-position: -360px -72px; -} - -.icon-step-forward { - background-position: -384px -72px; -} - -.icon-eject { - background-position: -408px -72px; -} - -.icon-chevron-left { - background-position: -432px -72px; -} - -.icon-chevron-right { - background-position: -456px -72px; -} - -.icon-plus-sign { - background-position: 0 -96px; -} - -.icon-minus-sign { - background-position: -24px -96px; -} - -.icon-remove-sign { - background-position: -48px -96px; -} - -.icon-ok-sign { - background-position: -72px -96px; -} - -.icon-question-sign { - background-position: -96px -96px; -} - -.icon-info-sign { - background-position: -120px -96px; -} - -.icon-screenshot { - background-position: -144px -96px; -} - -.icon-remove-circle { - background-position: -168px -96px; -} - -.icon-ok-circle { - background-position: -192px -96px; -} - -.icon-ban-circle { - background-position: -216px -96px; -} - -.icon-arrow-left { - background-position: -240px -96px; -} - -.icon-arrow-right { - background-position: -264px -96px; -} - -.icon-arrow-up { - background-position: -289px -96px; -} - -.icon-arrow-down { - background-position: -312px -96px; -} - -.icon-share-alt { - background-position: -336px -96px; -} - -.icon-resize-full { - background-position: -360px -96px; -} - -.icon-resize-small { - background-position: -384px -96px; -} - -.icon-plus { - background-position: -408px -96px; -} - -.icon-minus { - background-position: -433px -96px; -} - -.icon-asterisk { - background-position: -456px -96px; -} - -.icon-exclamation-sign { - background-position: 0 -120px; -} - -.icon-gift { - background-position: -24px -120px; -} - -.icon-leaf { - background-position: -48px -120px; -} - -.icon-fire { - background-position: -72px -120px; -} - -.icon-eye-open { - background-position: -96px -120px; -} - -.icon-eye-close { - background-position: -120px -120px; -} - -.icon-warning-sign { - background-position: -144px -120px; -} - -.icon-plane { - background-position: -168px -120px; -} - -.icon-calendar { - background-position: -192px -120px; -} - -.icon-random { - width: 16px; - background-position: -216px -120px; -} - -.icon-comment { - background-position: -240px -120px; -} - -.icon-magnet { - background-position: -264px -120px; -} - -.icon-chevron-up { - background-position: -288px -120px; -} - -.icon-chevron-down { - background-position: -313px -119px; -} - -.icon-retweet { - background-position: -336px -120px; -} - -.icon-shopping-cart { - background-position: -360px -120px; -} - -.icon-folder-close { - width: 16px; - background-position: -384px -120px; -} - -.icon-folder-open { - width: 16px; - background-position: -408px -120px; -} - -.icon-resize-vertical { - background-position: -432px -119px; -} - -.icon-resize-horizontal { - background-position: -456px -118px; -} - -.icon-hdd { - background-position: 0 -144px; -} - -.icon-bullhorn { - background-position: -24px -144px; -} - -.icon-bell { - background-position: -48px -144px; -} - -.icon-certificate { - background-position: -72px -144px; -} - -.icon-thumbs-up { - background-position: -96px -144px; -} - -.icon-thumbs-down { - background-position: -120px -144px; -} - -.icon-hand-right { - background-position: -144px -144px; -} - -.icon-hand-left { - background-position: -168px -144px; -} - -.icon-hand-up { - background-position: -192px -144px; -} - -.icon-hand-down { - background-position: -216px -144px; -} - -.icon-circle-arrow-right { - background-position: -240px -144px; -} - -.icon-circle-arrow-left { - background-position: -264px -144px; -} - -.icon-circle-arrow-up { - background-position: -288px -144px; -} - -.icon-circle-arrow-down { - background-position: -312px -144px; -} - -.icon-globe { - background-position: -336px -144px; -} - -.icon-wrench { - background-position: -360px -144px; -} - -.icon-tasks { - background-position: -384px -144px; -} - -.icon-filter { - background-position: -408px -144px; -} - -.icon-briefcase { - background-position: -432px -144px; -} - -.icon-fullscreen { - background-position: -456px -144px; -} - -.dropup, -.dropdown { - position: relative; -} - -.dropdown-toggle { - *margin-bottom: -3px; -} - -.dropdown-toggle:active, -.open .dropdown-toggle { - outline: 0; -} - -.caret { - display: inline-block; - width: 0; - height: 0; - vertical-align: top; - border-top: 4px solid #000000; - border-right: 4px solid transparent; - border-left: 4px solid transparent; - content: ""; -} - -.dropdown .caret { - margin-top: 8px; - margin-left: 2px; -} - -.dropdown-menu { - position: absolute; - top: 100%; - left: 0; - z-index: 1000; - display: none; - float: left; - min-width: 160px; - padding: 5px 0; - margin: 2px 0 0; - list-style: none; - background-color: #ffffff; - border: 1px solid #ccc; - border: 1px solid rgba(0, 0, 0, 0.2); - *border-right-width: 2px; - *border-bottom-width: 2px; - -webkit-border-radius: 6px; - -moz-border-radius: 6px; - border-radius: 6px; - -webkit-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2); - -moz-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2); - box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2); - -webkit-background-clip: padding-box; - -moz-background-clip: padding; - background-clip: padding-box; -} - -.dropdown-menu.pull-right { - right: 0; - left: auto; -} - -.dropdown-menu .divider { - *width: 100%; - height: 1px; - margin: 9px 1px; - *margin: -5px 0 5px; - overflow: hidden; - background-color: #e5e5e5; - border-bottom: 1px solid #ffffff; -} - -.dropdown-menu > li > a { - display: block; - padding: 3px 20px; - clear: both; - font-weight: normal; - line-height: 20px; - color: #333333; - white-space: nowrap; -} - -.dropdown-menu > li > a:hover, -.dropdown-menu > li > a:focus, -.dropdown-submenu:hover > a, -.dropdown-submenu:focus > a { - color: #ffffff; - text-decoration: none; - background-color: #0081c2; - background-image: -moz-linear-gradient(top, #0088cc, #0077b3); - background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#0088cc), to(#0077b3)); - background-image: -webkit-linear-gradient(top, #0088cc, #0077b3); - background-image: -o-linear-gradient(top, #0088cc, #0077b3); - background-image: linear-gradient(to bottom, #0088cc, #0077b3); - background-repeat: repeat-x; - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0088cc', endColorstr='#ff0077b3', GradientType=0); -} - -.dropdown-menu > .active > a, -.dropdown-menu > .active > a:hover, -.dropdown-menu > .active > a:focus { - color: #ffffff; - text-decoration: none; - background-color: #0081c2; - background-image: -moz-linear-gradient(top, #0088cc, #0077b3); - background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#0088cc), to(#0077b3)); - background-image: -webkit-linear-gradient(top, #0088cc, #0077b3); - background-image: -o-linear-gradient(top, #0088cc, #0077b3); - background-image: linear-gradient(to bottom, #0088cc, #0077b3); - background-repeat: repeat-x; - outline: 0; - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0088cc', endColorstr='#ff0077b3', GradientType=0); -} - -.dropdown-menu > .disabled > a, -.dropdown-menu > .disabled > a:hover, -.dropdown-menu > .disabled > a:focus { - color: #999999; -} - -.dropdown-menu > .disabled > a:hover, -.dropdown-menu > .disabled > a:focus { - text-decoration: none; - cursor: default; - background-color: transparent; - background-image: none; - filter: progid:DXImageTransform.Microsoft.gradient(enabled=false); -} - -.open { - *z-index: 1000; -} - -.open > .dropdown-menu { - display: block; -} - -.dropdown-backdrop { - position: fixed; - top: 0; - right: 0; - bottom: 0; - left: 0; - z-index: 990; -} - -.pull-right > .dropdown-menu { - right: 0; - left: auto; -} - -.dropup .caret, -.navbar-fixed-bottom .dropdown .caret { - border-top: 0; - border-bottom: 4px solid #000000; - content: ""; -} - -.dropup .dropdown-menu, -.navbar-fixed-bottom .dropdown .dropdown-menu { - top: auto; - bottom: 100%; - margin-bottom: 1px; -} - -.dropdown-submenu { - position: relative; -} - -.dropdown-submenu > .dropdown-menu { - top: 0; - left: 100%; - margin-top: -6px; - margin-left: -1px; - -webkit-border-radius: 0 6px 6px 6px; - -moz-border-radius: 0 6px 6px 6px; - border-radius: 0 6px 6px 6px; -} - -.dropdown-submenu:hover > .dropdown-menu { - display: block; -} - -.dropup .dropdown-submenu > .dropdown-menu { - top: auto; - bottom: 0; - margin-top: 0; - margin-bottom: -2px; - -webkit-border-radius: 5px 5px 5px 0; - -moz-border-radius: 5px 5px 5px 0; - border-radius: 5px 5px 5px 0; -} - -.dropdown-submenu > a:after { - display: block; - float: right; - width: 0; - height: 0; - margin-top: 5px; - margin-right: -10px; - border-color: transparent; - border-left-color: #cccccc; - border-style: solid; - border-width: 5px 0 5px 5px; - content: " "; -} - -.dropdown-submenu:hover > a:after { - border-left-color: #ffffff; -} - -.dropdown-submenu.pull-left { - float: none; -} - -.dropdown-submenu.pull-left > .dropdown-menu { - left: -100%; - margin-left: 10px; - -webkit-border-radius: 6px 0 6px 6px; - -moz-border-radius: 6px 0 6px 6px; - border-radius: 6px 0 6px 6px; -} - -.dropdown .dropdown-menu .nav-header { - padding-right: 20px; - padding-left: 20px; -} - -.typeahead { - z-index: 1051; - margin-top: 2px; - -webkit-border-radius: 4px; - -moz-border-radius: 4px; - border-radius: 4px; -} - -.well { - min-height: 20px; - padding: 19px; - margin-bottom: 20px; - background-color: #f5f5f5; - border: 1px solid #e3e3e3; - -webkit-border-radius: 4px; - -moz-border-radius: 4px; - border-radius: 4px; - -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05); - -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05); - box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05); -} - -.well blockquote { - border-color: #ddd; - border-color: rgba(0, 0, 0, 0.15); -} - -.well-large { - padding: 24px; - -webkit-border-radius: 6px; - -moz-border-radius: 6px; - border-radius: 6px; -} - -.well-small { - padding: 9px; - -webkit-border-radius: 3px; - -moz-border-radius: 3px; - border-radius: 3px; -} - -.fade { - opacity: 0; - -webkit-transition: opacity 0.15s linear; - -moz-transition: opacity 0.15s linear; - -o-transition: opacity 0.15s linear; - transition: opacity 0.15s linear; -} - -.fade.in { - opacity: 1; -} - -.collapse { - position: relative; - height: 0; - overflow: hidden; - -webkit-transition: height 0.35s ease; - -moz-transition: height 0.35s ease; - -o-transition: height 0.35s ease; - transition: height 0.35s ease; -} - -.collapse.in { - height: auto; -} - -.close { - float: right; - font-size: 20px; - font-weight: bold; - line-height: 20px; - color: #000000; - text-shadow: 0 1px 0 #ffffff; - opacity: 0.2; - filter: alpha(opacity=20); -} - -.close:hover, -.close:focus { - color: #000000; - text-decoration: none; - cursor: pointer; - opacity: 0.4; - filter: alpha(opacity=40); -} - -button.close { - padding: 0; - cursor: pointer; - background: transparent; - border: 0; - -webkit-appearance: none; -} - -.btn { - display: inline-block; - *display: inline; - padding: 4px 12px; - margin-bottom: 0; - *margin-left: .3em; - font-size: 14px; - line-height: 20px; - color: #333333; - text-align: center; - text-shadow: 0 1px 1px rgba(255, 255, 255, 0.75); - vertical-align: middle; - cursor: pointer; - background-color: #f5f5f5; - *background-color: #e6e6e6; - background-image: -moz-linear-gradient(top, #ffffff, #e6e6e6); - background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), to(#e6e6e6)); - background-image: -webkit-linear-gradient(top, #ffffff, #e6e6e6); - background-image: -o-linear-gradient(top, #ffffff, #e6e6e6); - background-image: linear-gradient(to bottom, #ffffff, #e6e6e6); - background-repeat: repeat-x; - border: 1px solid #cccccc; - *border: 0; - border-color: #e6e6e6 #e6e6e6 #bfbfbf; - border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); - border-bottom-color: #b3b3b3; - -webkit-border-radius: 4px; - -moz-border-radius: 4px; - border-radius: 4px; - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#ffe6e6e6', GradientType=0); - filter: progid:DXImageTransform.Microsoft.gradient(enabled=false); - *zoom: 1; - -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05); - -moz-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05); - box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05); -} - -.btn:hover, -.btn:focus, -.btn:active, -.btn.active, -.btn.disabled, -.btn[disabled] { - color: #333333; - background-color: #e6e6e6; - *background-color: #d9d9d9; -} - -.btn:active, -.btn.active { - background-color: #cccccc \9; -} - -.btn:first-child { - *margin-left: 0; -} - -.btn:hover, -.btn:focus { - color: #333333; - text-decoration: none; - background-position: 0 -15px; - -webkit-transition: background-position 0.1s linear; - -moz-transition: background-position 0.1s linear; - -o-transition: background-position 0.1s linear; - transition: background-position 0.1s linear; -} - -.btn:focus { - outline: thin dotted #333; - outline: 5px auto -webkit-focus-ring-color; - outline-offset: -2px; -} - -.btn.active, -.btn:active { - background-image: none; - outline: 0; - -webkit-box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05); - -moz-box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05); - box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05); -} - -.btn.disabled, -.btn[disabled] { - cursor: default; - background-image: none; - opacity: 0.65; - filter: alpha(opacity=65); - -webkit-box-shadow: none; - -moz-box-shadow: none; - box-shadow: none; -} - -.btn-large { - padding: 11px 19px; - font-size: 17.5px; - -webkit-border-radius: 6px; - -moz-border-radius: 6px; - border-radius: 6px; -} - -.btn-large [class^="icon-"], -.btn-large [class*=" icon-"] { - margin-top: 4px; -} - -.btn-small { - padding: 2px 10px; - font-size: 11.9px; - -webkit-border-radius: 3px; - -moz-border-radius: 3px; - border-radius: 3px; -} - -.btn-small [class^="icon-"], -.btn-small [class*=" icon-"] { - margin-top: 0; -} - -.btn-mini [class^="icon-"], -.btn-mini [class*=" icon-"] { - margin-top: -1px; -} - -.btn-mini { - padding: 0 6px; - font-size: 10.5px; - -webkit-border-radius: 3px; - -moz-border-radius: 3px; - border-radius: 3px; -} - -.btn-block { - display: block; - width: 100%; - padding-right: 0; - padding-left: 0; - -webkit-box-sizing: border-box; - -moz-box-sizing: border-box; - box-sizing: border-box; -} - -.btn-block + .btn-block { - margin-top: 5px; -} - -input[type="submit"].btn-block, -input[type="reset"].btn-block, -input[type="button"].btn-block { - width: 100%; -} - -.btn-primary.active, -.btn-warning.active, -.btn-danger.active, -.btn-success.active, -.btn-info.active, -.btn-inverse.active { - color: rgba(255, 255, 255, 0.75); -} - -.btn-primary { - color: #ffffff; - text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); - background-color: #006dcc; - *background-color: #0044cc; - background-image: -moz-linear-gradient(top, #0088cc, #0044cc); - background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#0088cc), to(#0044cc)); - background-image: -webkit-linear-gradient(top, #0088cc, #0044cc); - background-image: -o-linear-gradient(top, #0088cc, #0044cc); - background-image: linear-gradient(to bottom, #0088cc, #0044cc); - background-repeat: repeat-x; - border-color: #0044cc #0044cc #002a80; - border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0088cc', endColorstr='#ff0044cc', GradientType=0); - filter: progid:DXImageTransform.Microsoft.gradient(enabled=false); -} - -.btn-primary:hover, -.btn-primary:focus, -.btn-primary:active, -.btn-primary.active, -.btn-primary.disabled, -.btn-primary[disabled] { - color: #ffffff; - background-color: #0044cc; - *background-color: #003bb3; -} - -.btn-primary:active, -.btn-primary.active { - background-color: #003399 \9; -} - -.btn-warning { - color: #ffffff; - text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); - background-color: #faa732; - *background-color: #f89406; - background-image: -moz-linear-gradient(top, #fbb450, #f89406); - background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#fbb450), to(#f89406)); - background-image: -webkit-linear-gradient(top, #fbb450, #f89406); - background-image: -o-linear-gradient(top, #fbb450, #f89406); - background-image: linear-gradient(to bottom, #fbb450, #f89406); - background-repeat: repeat-x; - border-color: #f89406 #f89406 #ad6704; - border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffbb450', endColorstr='#fff89406', GradientType=0); - filter: progid:DXImageTransform.Microsoft.gradient(enabled=false); -} - -.btn-warning:hover, -.btn-warning:focus, -.btn-warning:active, -.btn-warning.active, -.btn-warning.disabled, -.btn-warning[disabled] { - color: #ffffff; - background-color: #f89406; - *background-color: #df8505; -} - -.btn-warning:active, -.btn-warning.active { - background-color: #c67605 \9; -} - -.btn-danger { - color: #ffffff; - text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); - background-color: #da4f49; - *background-color: #bd362f; - background-image: -moz-linear-gradient(top, #ee5f5b, #bd362f); - background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ee5f5b), to(#bd362f)); - background-image: -webkit-linear-gradient(top, #ee5f5b, #bd362f); - background-image: -o-linear-gradient(top, #ee5f5b, #bd362f); - background-image: linear-gradient(to bottom, #ee5f5b, #bd362f); - background-repeat: repeat-x; - border-color: #bd362f #bd362f #802420; - border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffee5f5b', endColorstr='#ffbd362f', GradientType=0); - filter: progid:DXImageTransform.Microsoft.gradient(enabled=false); -} - -.btn-danger:hover, -.btn-danger:focus, -.btn-danger:active, -.btn-danger.active, -.btn-danger.disabled, -.btn-danger[disabled] { - color: #ffffff; - background-color: #bd362f; - *background-color: #a9302a; -} - -.btn-danger:active, -.btn-danger.active { - background-color: #942a25 \9; -} - -.btn-success { - color: #ffffff; - text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); - background-color: #5bb75b; - *background-color: #51a351; - background-image: -moz-linear-gradient(top, #62c462, #51a351); - background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#62c462), to(#51a351)); - background-image: -webkit-linear-gradient(top, #62c462, #51a351); - background-image: -o-linear-gradient(top, #62c462, #51a351); - background-image: linear-gradient(to bottom, #62c462, #51a351); - background-repeat: repeat-x; - border-color: #51a351 #51a351 #387038; - border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff62c462', endColorstr='#ff51a351', GradientType=0); - filter: progid:DXImageTransform.Microsoft.gradient(enabled=false); -} - -.btn-success:hover, -.btn-success:focus, -.btn-success:active, -.btn-success.active, -.btn-success.disabled, -.btn-success[disabled] { - color: #ffffff; - background-color: #51a351; - *background-color: #499249; -} - -.btn-success:active, -.btn-success.active { - background-color: #408140 \9; -} - -.btn-info { - color: #ffffff; - text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); - background-color: #49afcd; - *background-color: #2f96b4; - background-image: -moz-linear-gradient(top, #5bc0de, #2f96b4); - background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#5bc0de), to(#2f96b4)); - background-image: -webkit-linear-gradient(top, #5bc0de, #2f96b4); - background-image: -o-linear-gradient(top, #5bc0de, #2f96b4); - background-image: linear-gradient(to bottom, #5bc0de, #2f96b4); - background-repeat: repeat-x; - border-color: #2f96b4 #2f96b4 #1f6377; - border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff2f96b4', GradientType=0); - filter: progid:DXImageTransform.Microsoft.gradient(enabled=false); -} - -.btn-info:hover, -.btn-info:focus, -.btn-info:active, -.btn-info.active, -.btn-info.disabled, -.btn-info[disabled] { - color: #ffffff; - background-color: #2f96b4; - *background-color: #2a85a0; -} - -.btn-info:active, -.btn-info.active { - background-color: #24748c \9; -} - -.btn-inverse { - color: #ffffff; - text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); - background-color: #363636; - *background-color: #222222; - background-image: -moz-linear-gradient(top, #444444, #222222); - background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#444444), to(#222222)); - background-image: -webkit-linear-gradient(top, #444444, #222222); - background-image: -o-linear-gradient(top, #444444, #222222); - background-image: linear-gradient(to bottom, #444444, #222222); - background-repeat: repeat-x; - border-color: #222222 #222222 #000000; - border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff444444', endColorstr='#ff222222', GradientType=0); - filter: progid:DXImageTransform.Microsoft.gradient(enabled=false); -} - -.btn-inverse:hover, -.btn-inverse:focus, -.btn-inverse:active, -.btn-inverse.active, -.btn-inverse.disabled, -.btn-inverse[disabled] { - color: #ffffff; - background-color: #222222; - *background-color: #151515; -} - -.btn-inverse:active, -.btn-inverse.active { - background-color: #080808 \9; -} - -button.btn, -input[type="submit"].btn { - *padding-top: 3px; - *padding-bottom: 3px; -} - -button.btn::-moz-focus-inner, -input[type="submit"].btn::-moz-focus-inner { - padding: 0; - border: 0; -} - -button.btn.btn-large, -input[type="submit"].btn.btn-large { - *padding-top: 7px; - *padding-bottom: 7px; -} - -button.btn.btn-small, -input[type="submit"].btn.btn-small { - *padding-top: 3px; - *padding-bottom: 3px; -} - -button.btn.btn-mini, -input[type="submit"].btn.btn-mini { - *padding-top: 1px; - *padding-bottom: 1px; -} - -.btn-link, -.btn-link:active, -.btn-link[disabled] { - background-color: transparent; - background-image: none; - -webkit-box-shadow: none; - -moz-box-shadow: none; - box-shadow: none; -} - -.btn-link { - color: #0088cc; - cursor: pointer; - border-color: transparent; - -webkit-border-radius: 0; - -moz-border-radius: 0; - border-radius: 0; -} - -.btn-link:hover, -.btn-link:focus { - color: #005580; - text-decoration: underline; - background-color: transparent; -} - -.btn-link[disabled]:hover, -.btn-link[disabled]:focus { - color: #333333; - text-decoration: none; -} - -.btn-group { - position: relative; - display: inline-block; - *display: inline; - *margin-left: .3em; - font-size: 0; - white-space: nowrap; - vertical-align: middle; - *zoom: 1; -} - -.btn-group:first-child { - *margin-left: 0; -} - -.btn-group + .btn-group { - margin-left: 5px; -} - -.btn-toolbar { - margin-top: 10px; - margin-bottom: 10px; - font-size: 0; -} - -.btn-toolbar > .btn + .btn, -.btn-toolbar > .btn-group + .btn, -.btn-toolbar > .btn + .btn-group { - margin-left: 5px; -} - -.btn-group > .btn { - position: relative; - -webkit-border-radius: 0; - -moz-border-radius: 0; - border-radius: 0; -} - -.btn-group > .btn + .btn { - margin-left: -1px; -} - -.btn-group > .btn, -.btn-group > .dropdown-menu, -.btn-group > .popover { - font-size: 14px; -} - -.btn-group > .btn-mini { - font-size: 10.5px; -} - -.btn-group > .btn-small { - font-size: 11.9px; -} - -.btn-group > .btn-large { - font-size: 17.5px; -} - -.btn-group > .btn:first-child { - margin-left: 0; - -webkit-border-bottom-left-radius: 4px; - border-bottom-left-radius: 4px; - -webkit-border-top-left-radius: 4px; - border-top-left-radius: 4px; - -moz-border-radius-bottomleft: 4px; - -moz-border-radius-topleft: 4px; -} - -.btn-group > .btn:last-child, -.btn-group > .dropdown-toggle { - -webkit-border-top-right-radius: 4px; - border-top-right-radius: 4px; - -webkit-border-bottom-right-radius: 4px; - border-bottom-right-radius: 4px; - -moz-border-radius-topright: 4px; - -moz-border-radius-bottomright: 4px; -} - -.btn-group > .btn.large:first-child { - margin-left: 0; - -webkit-border-bottom-left-radius: 6px; - border-bottom-left-radius: 6px; - -webkit-border-top-left-radius: 6px; - border-top-left-radius: 6px; - -moz-border-radius-bottomleft: 6px; - -moz-border-radius-topleft: 6px; -} - -.btn-group > .btn.large:last-child, -.btn-group > .large.dropdown-toggle { - -webkit-border-top-right-radius: 6px; - border-top-right-radius: 6px; - -webkit-border-bottom-right-radius: 6px; - border-bottom-right-radius: 6px; - -moz-border-radius-topright: 6px; - -moz-border-radius-bottomright: 6px; -} - -.btn-group > .btn:hover, -.btn-group > .btn:focus, -.btn-group > .btn:active, -.btn-group > .btn.active { - z-index: 2; -} - -.btn-group .dropdown-toggle:active, -.btn-group.open .dropdown-toggle { - outline: 0; -} - -.btn-group > .btn + .dropdown-toggle { - *padding-top: 5px; - padding-right: 8px; - *padding-bottom: 5px; - padding-left: 8px; - -webkit-box-shadow: inset 1px 0 0 rgba(255, 255, 255, 0.125), inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05); - -moz-box-shadow: inset 1px 0 0 rgba(255, 255, 255, 0.125), inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05); - box-shadow: inset 1px 0 0 rgba(255, 255, 255, 0.125), inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05); -} - -.btn-group > .btn-mini + .dropdown-toggle { - *padding-top: 2px; - padding-right: 5px; - *padding-bottom: 2px; - padding-left: 5px; -} - -.btn-group > .btn-small + .dropdown-toggle { - *padding-top: 5px; - *padding-bottom: 4px; -} - -.btn-group > .btn-large + .dropdown-toggle { - *padding-top: 7px; - padding-right: 12px; - *padding-bottom: 7px; - padding-left: 12px; -} - -.btn-group.open .dropdown-toggle { - background-image: none; - -webkit-box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05); - -moz-box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05); - box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05); -} - -.btn-group.open .btn.dropdown-toggle { - background-color: #e6e6e6; -} - -.btn-group.open .btn-primary.dropdown-toggle { - background-color: #0044cc; -} - -.btn-group.open .btn-warning.dropdown-toggle { - background-color: #f89406; -} - -.btn-group.open .btn-danger.dropdown-toggle { - background-color: #bd362f; -} - -.btn-group.open .btn-success.dropdown-toggle { - background-color: #51a351; -} - -.btn-group.open .btn-info.dropdown-toggle { - background-color: #2f96b4; -} - -.btn-group.open .btn-inverse.dropdown-toggle { - background-color: #222222; -} - -.btn .caret { - margin-top: 8px; - margin-left: 0; -} - -.btn-large .caret { - margin-top: 6px; -} - -.btn-large .caret { - border-top-width: 5px; - border-right-width: 5px; - border-left-width: 5px; -} - -.btn-mini .caret, -.btn-small .caret { - margin-top: 8px; -} - -.dropup .btn-large .caret { - border-bottom-width: 5px; -} - -.btn-primary .caret, -.btn-warning .caret, -.btn-danger .caret, -.btn-info .caret, -.btn-success .caret, -.btn-inverse .caret { - border-top-color: #ffffff; - border-bottom-color: #ffffff; -} - -.btn-group-vertical { - display: inline-block; - *display: inline; - /* IE7 inline-block hack */ - - *zoom: 1; -} - -.btn-group-vertical > .btn { - display: block; - float: none; - max-width: 100%; - -webkit-border-radius: 0; - -moz-border-radius: 0; - border-radius: 0; -} - -.btn-group-vertical > .btn + .btn { - margin-top: -1px; - margin-left: 0; -} - -.btn-group-vertical > .btn:first-child { - -webkit-border-radius: 4px 4px 0 0; - -moz-border-radius: 4px 4px 0 0; - border-radius: 4px 4px 0 0; -} - -.btn-group-vertical > .btn:last-child { - -webkit-border-radius: 0 0 4px 4px; - -moz-border-radius: 0 0 4px 4px; - border-radius: 0 0 4px 4px; -} - -.btn-group-vertical > .btn-large:first-child { - -webkit-border-radius: 6px 6px 0 0; - -moz-border-radius: 6px 6px 0 0; - border-radius: 6px 6px 0 0; -} - -.btn-group-vertical > .btn-large:last-child { - -webkit-border-radius: 0 0 6px 6px; - -moz-border-radius: 0 0 6px 6px; - border-radius: 0 0 6px 6px; -} - -.alert { - padding: 8px 35px 8px 14px; - margin-bottom: 20px; - text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5); - background-color: #fcf8e3; - border: 1px solid #fbeed5; - -webkit-border-radius: 4px; - -moz-border-radius: 4px; - border-radius: 4px; -} - -.alert, -.alert h4 { - color: #c09853; -} - -.alert h4 { - margin: 0; -} - -.alert .close { - position: relative; - top: -2px; - right: -21px; - line-height: 20px; -} - -.alert-success { - color: #468847; - background-color: #dff0d8; - border-color: #d6e9c6; -} - -.alert-success h4 { - color: #468847; -} - -.alert-danger, -.alert-error { - color: #b94a48; - background-color: #f2dede; - border-color: #eed3d7; -} - -.alert-danger h4, -.alert-error h4 { - color: #b94a48; -} - -.alert-info { - color: #3a87ad; - background-color: #d9edf7; - border-color: #bce8f1; -} - -.alert-info h4 { - color: #3a87ad; -} - -.alert-block { - padding-top: 14px; - padding-bottom: 14px; -} - -.alert-block > p, -.alert-block > ul { - margin-bottom: 0; -} - -.alert-block p + p { - margin-top: 5px; -} - -.nav { - margin-bottom: 20px; - margin-left: 0; - list-style: none; -} - -.nav > li > a { - display: block; -} - -.nav > li > a:hover, -.nav > li > a:focus { - text-decoration: none; - background-color: #eeeeee; -} - -.nav > li > a > img { - max-width: none; -} - -.nav > .pull-right { - float: right; -} - -.nav-header { - display: block; - padding: 3px 15px; - font-size: 11px; - font-weight: bold; - line-height: 20px; - color: #999999; - text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5); - text-transform: uppercase; -} - -.nav li + .nav-header { - margin-top: 9px; -} - -.nav-list { - padding-right: 15px; - padding-left: 15px; - margin-bottom: 0; -} - -.nav-list > li > a, -.nav-list .nav-header { - margin-right: -15px; - margin-left: -15px; - text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5); -} - -.nav-list > li > a { - padding: 3px 15px; -} - -.nav-list > .active > a, -.nav-list > .active > a:hover, -.nav-list > .active > a:focus { - color: #ffffff; - text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.2); - background-color: #0088cc; -} - -.nav-list [class^="icon-"], -.nav-list [class*=" icon-"] { - margin-right: 2px; -} - -.nav-list .divider { - *width: 100%; - height: 1px; - margin: 9px 1px; - *margin: -5px 0 5px; - overflow: hidden; - background-color: #e5e5e5; - border-bottom: 1px solid #ffffff; -} - -.nav-tabs, -.nav-pills { - *zoom: 1; -} - -.nav-tabs:before, -.nav-pills:before, -.nav-tabs:after, -.nav-pills:after { - display: table; - line-height: 0; - content: ""; -} - -.nav-tabs:after, -.nav-pills:after { - clear: both; -} - -.nav-tabs > li, -.nav-pills > li { - float: left; -} - -.nav-tabs > li > a, -.nav-pills > li > a { - padding-right: 12px; - padding-left: 12px; - margin-right: 2px; - line-height: 14px; -} - -.nav-tabs { - border-bottom: 1px solid #ddd; -} - -.nav-tabs > li { - margin-bottom: -1px; -} - -.nav-tabs > li > a { - padding-top: 8px; - padding-bottom: 8px; - line-height: 20px; - border: 1px solid transparent; - -webkit-border-radius: 4px 4px 0 0; - -moz-border-radius: 4px 4px 0 0; - border-radius: 4px 4px 0 0; -} - -.nav-tabs > li > a:hover, -.nav-tabs > li > a:focus { - border-color: #eeeeee #eeeeee #dddddd; -} - -.nav-tabs > .active > a, -.nav-tabs > .active > a:hover, -.nav-tabs > .active > a:focus { - color: #555555; - cursor: default; - background-color: #ffffff; - border: 1px solid #ddd; - border-bottom-color: transparent; -} - -.nav-pills > li > a { - padding-top: 8px; - padding-bottom: 8px; - margin-top: 2px; - margin-bottom: 2px; - -webkit-border-radius: 5px; - -moz-border-radius: 5px; - border-radius: 5px; -} - -.nav-pills > .active > a, -.nav-pills > .active > a:hover, -.nav-pills > .active > a:focus { - color: #ffffff; - background-color: #0088cc; -} - -.nav-stacked > li { - float: none; -} - -.nav-stacked > li > a { - margin-right: 0; -} - -.nav-tabs.nav-stacked { - border-bottom: 0; -} - -.nav-tabs.nav-stacked > li > a { - border: 1px solid #ddd; - -webkit-border-radius: 0; - -moz-border-radius: 0; - border-radius: 0; -} - -.nav-tabs.nav-stacked > li:first-child > a { - -webkit-border-top-right-radius: 4px; - border-top-right-radius: 4px; - -webkit-border-top-left-radius: 4px; - border-top-left-radius: 4px; - -moz-border-radius-topright: 4px; - -moz-border-radius-topleft: 4px; -} - -.nav-tabs.nav-stacked > li:last-child > a { - -webkit-border-bottom-right-radius: 4px; - border-bottom-right-radius: 4px; - -webkit-border-bottom-left-radius: 4px; - border-bottom-left-radius: 4px; - -moz-border-radius-bottomright: 4px; - -moz-border-radius-bottomleft: 4px; -} - -.nav-tabs.nav-stacked > li > a:hover, -.nav-tabs.nav-stacked > li > a:focus { - z-index: 2; - border-color: #ddd; -} - -.nav-pills.nav-stacked > li > a { - margin-bottom: 3px; -} - -.nav-pills.nav-stacked > li:last-child > a { - margin-bottom: 1px; -} - -.nav-tabs .dropdown-menu { - -webkit-border-radius: 0 0 6px 6px; - -moz-border-radius: 0 0 6px 6px; - border-radius: 0 0 6px 6px; -} - -.nav-pills .dropdown-menu { - -webkit-border-radius: 6px; - -moz-border-radius: 6px; - border-radius: 6px; -} - -.nav .dropdown-toggle .caret { - margin-top: 6px; - border-top-color: #0088cc; - border-bottom-color: #0088cc; -} - -.nav .dropdown-toggle:hover .caret, -.nav .dropdown-toggle:focus .caret { - border-top-color: #005580; - border-bottom-color: #005580; -} - -/* move down carets for tabs */ - -.nav-tabs .dropdown-toggle .caret { - margin-top: 8px; -} - -.nav .active .dropdown-toggle .caret { - border-top-color: #fff; - border-bottom-color: #fff; -} - -.nav-tabs .active .dropdown-toggle .caret { - border-top-color: #555555; - border-bottom-color: #555555; -} - -.nav > .dropdown.active > a:hover, -.nav > .dropdown.active > a:focus { - cursor: pointer; -} - -.nav-tabs .open .dropdown-toggle, -.nav-pills .open .dropdown-toggle, -.nav > li.dropdown.open.active > a:hover, -.nav > li.dropdown.open.active > a:focus { - color: #ffffff; - background-color: #999999; - border-color: #999999; -} - -.nav li.dropdown.open .caret, -.nav li.dropdown.open.active .caret, -.nav li.dropdown.open a:hover .caret, -.nav li.dropdown.open a:focus .caret { - border-top-color: #ffffff; - border-bottom-color: #ffffff; - opacity: 1; - filter: alpha(opacity=100); -} - -.tabs-stacked .open > a:hover, -.tabs-stacked .open > a:focus { - border-color: #999999; -} - -.tabbable { - *zoom: 1; -} - -.tabbable:before, -.tabbable:after { - display: table; - line-height: 0; - content: ""; -} - -.tabbable:after { - clear: both; -} - -.tab-content { - overflow: auto; -} - -.tabs-below > .nav-tabs, -.tabs-right > .nav-tabs, -.tabs-left > .nav-tabs { - border-bottom: 0; -} - -.tab-content > .tab-pane, -.pill-content > .pill-pane { - display: none; -} - -.tab-content > .active, -.pill-content > .active { - display: block; -} - -.tabs-below > .nav-tabs { - border-top: 1px solid #ddd; -} - -.tabs-below > .nav-tabs > li { - margin-top: -1px; - margin-bottom: 0; -} - -.tabs-below > .nav-tabs > li > a { - -webkit-border-radius: 0 0 4px 4px; - -moz-border-radius: 0 0 4px 4px; - border-radius: 0 0 4px 4px; -} - -.tabs-below > .nav-tabs > li > a:hover, -.tabs-below > .nav-tabs > li > a:focus { - border-top-color: #ddd; - border-bottom-color: transparent; -} - -.tabs-below > .nav-tabs > .active > a, -.tabs-below > .nav-tabs > .active > a:hover, -.tabs-below > .nav-tabs > .active > a:focus { - border-color: transparent #ddd #ddd #ddd; -} - -.tabs-left > .nav-tabs > li, -.tabs-right > .nav-tabs > li { - float: none; -} - -.tabs-left > .nav-tabs > li > a, -.tabs-right > .nav-tabs > li > a { - min-width: 74px; - margin-right: 0; - margin-bottom: 3px; -} - -.tabs-left > .nav-tabs { - float: left; - margin-right: 19px; - border-right: 1px solid #ddd; -} - -.tabs-left > .nav-tabs > li > a { - margin-right: -1px; - -webkit-border-radius: 4px 0 0 4px; - -moz-border-radius: 4px 0 0 4px; - border-radius: 4px 0 0 4px; -} - -.tabs-left > .nav-tabs > li > a:hover, -.tabs-left > .nav-tabs > li > a:focus { - border-color: #eeeeee #dddddd #eeeeee #eeeeee; -} - -.tabs-left > .nav-tabs .active > a, -.tabs-left > .nav-tabs .active > a:hover, -.tabs-left > .nav-tabs .active > a:focus { - border-color: #ddd transparent #ddd #ddd; - *border-right-color: #ffffff; -} - -.tabs-right > .nav-tabs { - float: right; - margin-left: 19px; - border-left: 1px solid #ddd; -} - -.tabs-right > .nav-tabs > li > a { - margin-left: -1px; - -webkit-border-radius: 0 4px 4px 0; - -moz-border-radius: 0 4px 4px 0; - border-radius: 0 4px 4px 0; -} - -.tabs-right > .nav-tabs > li > a:hover, -.tabs-right > .nav-tabs > li > a:focus { - border-color: #eeeeee #eeeeee #eeeeee #dddddd; -} - -.tabs-right > .nav-tabs .active > a, -.tabs-right > .nav-tabs .active > a:hover, -.tabs-right > .nav-tabs .active > a:focus { - border-color: #ddd #ddd #ddd transparent; - *border-left-color: #ffffff; -} - -.nav > .disabled > a { - color: #999999; -} - -.nav > .disabled > a:hover, -.nav > .disabled > a:focus { - text-decoration: none; - cursor: default; - background-color: transparent; -} - -.navbar { - *position: relative; - *z-index: 2; - margin-bottom: 20px; - overflow: visible; -} - -.navbar-inner { - min-height: 40px; - padding-right: 20px; - padding-left: 20px; - background-color: #fafafa; - background-image: -moz-linear-gradient(top, #ffffff, #f2f2f2); - background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), to(#f2f2f2)); - background-image: -webkit-linear-gradient(top, #ffffff, #f2f2f2); - background-image: -o-linear-gradient(top, #ffffff, #f2f2f2); - background-image: linear-gradient(to bottom, #ffffff, #f2f2f2); - background-repeat: repeat-x; - border: 1px solid #d4d4d4; - -webkit-border-radius: 4px; - -moz-border-radius: 4px; - border-radius: 4px; - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#fff2f2f2', GradientType=0); - *zoom: 1; - -webkit-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.065); - -moz-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.065); - box-shadow: 0 1px 4px rgba(0, 0, 0, 0.065); -} - -.navbar-inner:before, -.navbar-inner:after { - display: table; - line-height: 0; - content: ""; -} - -.navbar-inner:after { - clear: both; -} - -.navbar .container { - width: auto; -} - -.nav-collapse.collapse { - height: auto; - overflow: visible; -} - -.navbar .brand { - display: block; - float: left; - padding: 10px 20px 10px; - margin-left: -20px; - font-size: 20px; - font-weight: 200; - color: #777777; - text-shadow: 0 1px 0 #ffffff; -} - -.navbar .brand:hover, -.navbar .brand:focus { - text-decoration: none; -} - -.navbar-text { - margin-bottom: 0; - line-height: 40px; - color: #777777; -} - -.navbar-link { - color: #777777; -} - -.navbar-link:hover, -.navbar-link:focus { - color: #333333; -} - -.navbar .divider-vertical { - height: 40px; - margin: 0 9px; - border-right: 1px solid #ffffff; - border-left: 1px solid #f2f2f2; -} - -.navbar .btn, -.navbar .btn-group { - margin-top: 5px; -} - -.navbar .btn-group .btn, -.navbar .input-prepend .btn, -.navbar .input-append .btn, -.navbar .input-prepend .btn-group, -.navbar .input-append .btn-group { - margin-top: 0; -} - -.navbar-form { - margin-bottom: 0; - *zoom: 1; -} - -.navbar-form:before, -.navbar-form:after { - display: table; - line-height: 0; - content: ""; -} - -.navbar-form:after { - clear: both; -} - -.navbar-form input, -.navbar-form select, -.navbar-form .radio, -.navbar-form .checkbox { - margin-top: 5px; -} - -.navbar-form input, -.navbar-form select, -.navbar-form .btn { - display: inline-block; - margin-bottom: 0; -} - -.navbar-form input[type="image"], -.navbar-form input[type="checkbox"], -.navbar-form input[type="radio"] { - margin-top: 3px; -} - -.navbar-form .input-append, -.navbar-form .input-prepend { - margin-top: 5px; - white-space: nowrap; -} - -.navbar-form .input-append input, -.navbar-form .input-prepend input { - margin-top: 0; -} - -.navbar-search { - position: relative; - float: left; - margin-top: 5px; - margin-bottom: 0; -} - -.navbar-search .search-query { - padding: 4px 14px; - margin-bottom: 0; - font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; - font-size: 13px; - font-weight: normal; - line-height: 1; - -webkit-border-radius: 15px; - -moz-border-radius: 15px; - border-radius: 15px; -} - -.navbar-static-top { - position: static; - margin-bottom: 0; -} - -.navbar-static-top .navbar-inner { - -webkit-border-radius: 0; - -moz-border-radius: 0; - border-radius: 0; -} - -.navbar-fixed-top, -.navbar-fixed-bottom { - position: fixed; - right: 0; - left: 0; - z-index: 1030; - margin-bottom: 0; -} - -.navbar-fixed-top .navbar-inner, -.navbar-static-top .navbar-inner { - border-width: 0 0 1px; -} - -.navbar-fixed-bottom .navbar-inner { - border-width: 1px 0 0; -} - -.navbar-fixed-top .navbar-inner, -.navbar-fixed-bottom .navbar-inner { - padding-right: 0; - padding-left: 0; - -webkit-border-radius: 0; - -moz-border-radius: 0; - border-radius: 0; -} - -.navbar-static-top .container, -.navbar-fixed-top .container, -.navbar-fixed-bottom .container { - width: 940px; -} - -.navbar-fixed-top { - top: 0; -} - -.navbar-fixed-top .navbar-inner, -.navbar-static-top .navbar-inner { - -webkit-box-shadow: 0 1px 10px rgba(0, 0, 0, 0.1); - -moz-box-shadow: 0 1px 10px rgba(0, 0, 0, 0.1); - box-shadow: 0 1px 10px rgba(0, 0, 0, 0.1); -} - -.navbar-fixed-bottom { - bottom: 0; -} - -.navbar-fixed-bottom .navbar-inner { - -webkit-box-shadow: 0 -1px 10px rgba(0, 0, 0, 0.1); - -moz-box-shadow: 0 -1px 10px rgba(0, 0, 0, 0.1); - box-shadow: 0 -1px 10px rgba(0, 0, 0, 0.1); -} - -.navbar .nav { - position: relative; - left: 0; - display: block; - float: left; - margin: 0 10px 0 0; -} - -.navbar .nav.pull-right { - float: right; - margin-right: 0; -} - -.navbar .nav > li { - float: left; -} - -.navbar .nav > li > a { - float: none; - padding: 10px 15px 10px; - color: #777777; - text-decoration: none; - text-shadow: 0 1px 0 #ffffff; -} - -.navbar .nav .dropdown-toggle .caret { - margin-top: 8px; -} - -.navbar .nav > li > a:focus, -.navbar .nav > li > a:hover { - color: #333333; - text-decoration: none; - background-color: transparent; -} - -.navbar .nav > .active > a, -.navbar .nav > .active > a:hover, -.navbar .nav > .active > a:focus { - color: #555555; - text-decoration: none; - background-color: #e5e5e5; - -webkit-box-shadow: inset 0 3px 8px rgba(0, 0, 0, 0.125); - -moz-box-shadow: inset 0 3px 8px rgba(0, 0, 0, 0.125); - box-shadow: inset 0 3px 8px rgba(0, 0, 0, 0.125); -} - -.navbar .btn-navbar { - display: none; - float: right; - padding: 7px 10px; - margin-right: 5px; - margin-left: 5px; - color: #ffffff; - text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); - background-color: #ededed; - *background-color: #e5e5e5; - background-image: -moz-linear-gradient(top, #f2f2f2, #e5e5e5); - background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#f2f2f2), to(#e5e5e5)); - background-image: -webkit-linear-gradient(top, #f2f2f2, #e5e5e5); - background-image: -o-linear-gradient(top, #f2f2f2, #e5e5e5); - background-image: linear-gradient(to bottom, #f2f2f2, #e5e5e5); - background-repeat: repeat-x; - border-color: #e5e5e5 #e5e5e5 #bfbfbf; - border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2f2f2', endColorstr='#ffe5e5e5', GradientType=0); - filter: progid:DXImageTransform.Microsoft.gradient(enabled=false); - -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.075); - -moz-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.075); - box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.075); -} - -.navbar .btn-navbar:hover, -.navbar .btn-navbar:focus, -.navbar .btn-navbar:active, -.navbar .btn-navbar.active, -.navbar .btn-navbar.disabled, -.navbar .btn-navbar[disabled] { - color: #ffffff; - background-color: #e5e5e5; - *background-color: #d9d9d9; -} - -.navbar .btn-navbar:active, -.navbar .btn-navbar.active { - background-color: #cccccc \9; -} - -.navbar .btn-navbar .icon-bar { - display: block; - width: 18px; - height: 2px; - background-color: #f5f5f5; - -webkit-border-radius: 1px; - -moz-border-radius: 1px; - border-radius: 1px; - -webkit-box-shadow: 0 1px 0 rgba(0, 0, 0, 0.25); - -moz-box-shadow: 0 1px 0 rgba(0, 0, 0, 0.25); - box-shadow: 0 1px 0 rgba(0, 0, 0, 0.25); -} - -.btn-navbar .icon-bar + .icon-bar { - margin-top: 3px; -} - -.navbar .nav > li > .dropdown-menu:before { - position: absolute; - top: -7px; - left: 9px; - display: inline-block; - border-right: 7px solid transparent; - border-bottom: 7px solid #ccc; - border-left: 7px solid transparent; - border-bottom-color: rgba(0, 0, 0, 0.2); - content: ''; -} - -.navbar .nav > li > .dropdown-menu:after { - position: absolute; - top: -6px; - left: 10px; - display: inline-block; - border-right: 6px solid transparent; - border-bottom: 6px solid #ffffff; - border-left: 6px solid transparent; - content: ''; -} - -.navbar-fixed-bottom .nav > li > .dropdown-menu:before { - top: auto; - bottom: -7px; - border-top: 7px solid #ccc; - border-bottom: 0; - border-top-color: rgba(0, 0, 0, 0.2); -} - -.navbar-fixed-bottom .nav > li > .dropdown-menu:after { - top: auto; - bottom: -6px; - border-top: 6px solid #ffffff; - border-bottom: 0; -} - -.navbar .nav li.dropdown > a:hover .caret, -.navbar .nav li.dropdown > a:focus .caret { - border-top-color: #333333; - border-bottom-color: #333333; -} - -.navbar .nav li.dropdown.open > .dropdown-toggle, -.navbar .nav li.dropdown.active > .dropdown-toggle, -.navbar .nav li.dropdown.open.active > .dropdown-toggle { - color: #555555; - background-color: #e5e5e5; -} - -.navbar .nav li.dropdown > .dropdown-toggle .caret { - border-top-color: #777777; - border-bottom-color: #777777; -} - -.navbar .nav li.dropdown.open > .dropdown-toggle .caret, -.navbar .nav li.dropdown.active > .dropdown-toggle .caret, -.navbar .nav li.dropdown.open.active > .dropdown-toggle .caret { - border-top-color: #555555; - border-bottom-color: #555555; -} - -.navbar .pull-right > li > .dropdown-menu, -.navbar .nav > li > .dropdown-menu.pull-right { - right: 0; - left: auto; -} - -.navbar .pull-right > li > .dropdown-menu:before, -.navbar .nav > li > .dropdown-menu.pull-right:before { - right: 12px; - left: auto; -} - -.navbar .pull-right > li > .dropdown-menu:after, -.navbar .nav > li > .dropdown-menu.pull-right:after { - right: 13px; - left: auto; -} - -.navbar .pull-right > li > .dropdown-menu .dropdown-menu, -.navbar .nav > li > .dropdown-menu.pull-right .dropdown-menu { - right: 100%; - left: auto; - margin-right: -1px; - margin-left: 0; - -webkit-border-radius: 6px 0 6px 6px; - -moz-border-radius: 6px 0 6px 6px; - border-radius: 6px 0 6px 6px; -} - -.navbar-inverse .navbar-inner { - background-color: #1b1b1b; - background-image: -moz-linear-gradient(top, #222222, #111111); - background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#222222), to(#111111)); - background-image: -webkit-linear-gradient(top, #222222, #111111); - background-image: -o-linear-gradient(top, #222222, #111111); - background-image: linear-gradient(to bottom, #222222, #111111); - background-repeat: repeat-x; - border-color: #252525; - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff222222', endColorstr='#ff111111', GradientType=0); -} - -.navbar-inverse .brand, -.navbar-inverse .nav > li > a { - color: #999999; - text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); -} - -.navbar-inverse .brand:hover, -.navbar-inverse .nav > li > a:hover, -.navbar-inverse .brand:focus, -.navbar-inverse .nav > li > a:focus { - color: #ffffff; -} - -.navbar-inverse .brand { - color: #999999; -} - -.navbar-inverse .navbar-text { - color: #999999; -} - -.navbar-inverse .nav > li > a:focus, -.navbar-inverse .nav > li > a:hover { - color: #ffffff; - background-color: transparent; -} - -.navbar-inverse .nav .active > a, -.navbar-inverse .nav .active > a:hover, -.navbar-inverse .nav .active > a:focus { - color: #ffffff; - background-color: #111111; -} - -.navbar-inverse .navbar-link { - color: #999999; -} - -.navbar-inverse .navbar-link:hover, -.navbar-inverse .navbar-link:focus { - color: #ffffff; -} - -.navbar-inverse .divider-vertical { - border-right-color: #222222; - border-left-color: #111111; -} - -.navbar-inverse .nav li.dropdown.open > .dropdown-toggle, -.navbar-inverse .nav li.dropdown.active > .dropdown-toggle, -.navbar-inverse .nav li.dropdown.open.active > .dropdown-toggle { - color: #ffffff; - background-color: #111111; -} - -.navbar-inverse .nav li.dropdown > a:hover .caret, -.navbar-inverse .nav li.dropdown > a:focus .caret { - border-top-color: #ffffff; - border-bottom-color: #ffffff; -} - -.navbar-inverse .nav li.dropdown > .dropdown-toggle .caret { - border-top-color: #999999; - border-bottom-color: #999999; -} - -.navbar-inverse .nav li.dropdown.open > .dropdown-toggle .caret, -.navbar-inverse .nav li.dropdown.active > .dropdown-toggle .caret, -.navbar-inverse .nav li.dropdown.open.active > .dropdown-toggle .caret { - border-top-color: #ffffff; - border-bottom-color: #ffffff; -} - -.navbar-inverse .navbar-search .search-query { - color: #ffffff; - background-color: #515151; - border-color: #111111; - -webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1), 0 1px 0 rgba(255, 255, 255, 0.15); - -moz-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1), 0 1px 0 rgba(255, 255, 255, 0.15); - box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1), 0 1px 0 rgba(255, 255, 255, 0.15); - -webkit-transition: none; - -moz-transition: none; - -o-transition: none; - transition: none; -} - -.navbar-inverse .navbar-search .search-query:-moz-placeholder { - color: #cccccc; -} - -.navbar-inverse .navbar-search .search-query:-ms-input-placeholder { - color: #cccccc; -} - -.navbar-inverse .navbar-search .search-query::-webkit-input-placeholder { - color: #cccccc; -} - -.navbar-inverse .navbar-search .search-query:focus, -.navbar-inverse .navbar-search .search-query.focused { - padding: 5px 15px; - color: #333333; - text-shadow: 0 1px 0 #ffffff; - background-color: #ffffff; - border: 0; - outline: 0; - -webkit-box-shadow: 0 0 3px rgba(0, 0, 0, 0.15); - -moz-box-shadow: 0 0 3px rgba(0, 0, 0, 0.15); - box-shadow: 0 0 3px rgba(0, 0, 0, 0.15); -} - -.navbar-inverse .btn-navbar { - color: #ffffff; - text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); - background-color: #0e0e0e; - *background-color: #040404; - background-image: -moz-linear-gradient(top, #151515, #040404); - background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#151515), to(#040404)); - background-image: -webkit-linear-gradient(top, #151515, #040404); - background-image: -o-linear-gradient(top, #151515, #040404); - background-image: linear-gradient(to bottom, #151515, #040404); - background-repeat: repeat-x; - border-color: #040404 #040404 #000000; - border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff151515', endColorstr='#ff040404', GradientType=0); - filter: progid:DXImageTransform.Microsoft.gradient(enabled=false); -} - -.navbar-inverse .btn-navbar:hover, -.navbar-inverse .btn-navbar:focus, -.navbar-inverse .btn-navbar:active, -.navbar-inverse .btn-navbar.active, -.navbar-inverse .btn-navbar.disabled, -.navbar-inverse .btn-navbar[disabled] { - color: #ffffff; - background-color: #040404; - *background-color: #000000; -} - -.navbar-inverse .btn-navbar:active, -.navbar-inverse .btn-navbar.active { - background-color: #000000 \9; -} - -.breadcrumb { - padding: 8px 15px; - margin: 0 0 20px; - list-style: none; - background-color: #f5f5f5; - -webkit-border-radius: 4px; - -moz-border-radius: 4px; - border-radius: 4px; -} - -.breadcrumb > li { - display: inline-block; - *display: inline; - text-shadow: 0 1px 0 #ffffff; - *zoom: 1; -} - -.breadcrumb > li > .divider { - padding: 0 5px; - color: #ccc; -} - -.breadcrumb > .active { - color: #999999; -} - -.pagination { - margin: 20px 0; -} - -.pagination ul { - display: inline-block; - *display: inline; - margin-bottom: 0; - margin-left: 0; - -webkit-border-radius: 4px; - -moz-border-radius: 4px; - border-radius: 4px; - *zoom: 1; - -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05); - -moz-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05); - box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05); -} - -.pagination ul > li { - display: inline; -} - -.pagination ul > li > a, -.pagination ul > li > span { - float: left; - padding: 4px 12px; - line-height: 20px; - text-decoration: none; - background-color: #ffffff; - border: 1px solid #dddddd; - border-left-width: 0; -} - -.pagination ul > li > a:hover, -.pagination ul > li > a:focus, -.pagination ul > .active > a, -.pagination ul > .active > span { - background-color: #f5f5f5; -} - -.pagination ul > .active > a, -.pagination ul > .active > span { - color: #999999; - cursor: default; -} - -.pagination ul > .disabled > span, -.pagination ul > .disabled > a, -.pagination ul > .disabled > a:hover, -.pagination ul > .disabled > a:focus { - color: #999999; - cursor: default; - background-color: transparent; -} - -.pagination ul > li:first-child > a, -.pagination ul > li:first-child > span { - border-left-width: 1px; - -webkit-border-bottom-left-radius: 4px; - border-bottom-left-radius: 4px; - -webkit-border-top-left-radius: 4px; - border-top-left-radius: 4px; - -moz-border-radius-bottomleft: 4px; - -moz-border-radius-topleft: 4px; -} - -.pagination ul > li:last-child > a, -.pagination ul > li:last-child > span { - -webkit-border-top-right-radius: 4px; - border-top-right-radius: 4px; - -webkit-border-bottom-right-radius: 4px; - border-bottom-right-radius: 4px; - -moz-border-radius-topright: 4px; - -moz-border-radius-bottomright: 4px; -} - -.pagination-centered { - text-align: center; -} - -.pagination-right { - text-align: right; -} - -.pagination-large ul > li > a, -.pagination-large ul > li > span { - padding: 11px 19px; - font-size: 17.5px; -} - -.pagination-large ul > li:first-child > a, -.pagination-large ul > li:first-child > span { - -webkit-border-bottom-left-radius: 6px; - border-bottom-left-radius: 6px; - -webkit-border-top-left-radius: 6px; - border-top-left-radius: 6px; - -moz-border-radius-bottomleft: 6px; - -moz-border-radius-topleft: 6px; -} - -.pagination-large ul > li:last-child > a, -.pagination-large ul > li:last-child > span { - -webkit-border-top-right-radius: 6px; - border-top-right-radius: 6px; - -webkit-border-bottom-right-radius: 6px; - border-bottom-right-radius: 6px; - -moz-border-radius-topright: 6px; - -moz-border-radius-bottomright: 6px; -} - -.pagination-mini ul > li:first-child > a, -.pagination-small ul > li:first-child > a, -.pagination-mini ul > li:first-child > span, -.pagination-small ul > li:first-child > span { - -webkit-border-bottom-left-radius: 3px; - border-bottom-left-radius: 3px; - -webkit-border-top-left-radius: 3px; - border-top-left-radius: 3px; - -moz-border-radius-bottomleft: 3px; - -moz-border-radius-topleft: 3px; -} - -.pagination-mini ul > li:last-child > a, -.pagination-small ul > li:last-child > a, -.pagination-mini ul > li:last-child > span, -.pagination-small ul > li:last-child > span { - -webkit-border-top-right-radius: 3px; - border-top-right-radius: 3px; - -webkit-border-bottom-right-radius: 3px; - border-bottom-right-radius: 3px; - -moz-border-radius-topright: 3px; - -moz-border-radius-bottomright: 3px; -} - -.pagination-small ul > li > a, -.pagination-small ul > li > span { - padding: 2px 10px; - font-size: 11.9px; -} - -.pagination-mini ul > li > a, -.pagination-mini ul > li > span { - padding: 0 6px; - font-size: 10.5px; -} - -.pager { - margin: 20px 0; - text-align: center; - list-style: none; - *zoom: 1; -} - -.pager:before, -.pager:after { - display: table; - line-height: 0; - content: ""; -} - -.pager:after { - clear: both; -} - -.pager li { - display: inline; -} - -.pager li > a, -.pager li > span { - display: inline-block; - padding: 5px 14px; - background-color: #fff; - border: 1px solid #ddd; - -webkit-border-radius: 15px; - -moz-border-radius: 15px; - border-radius: 15px; -} - -.pager li > a:hover, -.pager li > a:focus { - text-decoration: none; - background-color: #f5f5f5; -} - -.pager .next > a, -.pager .next > span { - float: right; -} - -.pager .previous > a, -.pager .previous > span { - float: left; -} - -.pager .disabled > a, -.pager .disabled > a:hover, -.pager .disabled > a:focus, -.pager .disabled > span { - color: #999999; - cursor: default; - background-color: #fff; -} - -.modal-backdrop { - position: fixed; - top: 0; - right: 0; - bottom: 0; - left: 0; - z-index: 1040; - background-color: #000000; -} - -.modal-backdrop.fade { - opacity: 0; -} - -.modal-backdrop, -.modal-backdrop.fade.in { - opacity: 0.8; - filter: alpha(opacity=80); -} - -.modal { - position: fixed; - top: 10%; - left: 50%; - z-index: 1050; - width: 560px; - margin-left: -280px; - background-color: #ffffff; - border: 1px solid #999; - border: 1px solid rgba(0, 0, 0, 0.3); - *border: 1px solid #999; - -webkit-border-radius: 6px; - -moz-border-radius: 6px; - border-radius: 6px; - outline: none; - -webkit-box-shadow: 0 3px 7px rgba(0, 0, 0, 0.3); - -moz-box-shadow: 0 3px 7px rgba(0, 0, 0, 0.3); - box-shadow: 0 3px 7px rgba(0, 0, 0, 0.3); - -webkit-background-clip: padding-box; - -moz-background-clip: padding-box; - background-clip: padding-box; -} - -.modal.fade { - top: -25%; - -webkit-transition: opacity 0.3s linear, top 0.3s ease-out; - -moz-transition: opacity 0.3s linear, top 0.3s ease-out; - -o-transition: opacity 0.3s linear, top 0.3s ease-out; - transition: opacity 0.3s linear, top 0.3s ease-out; -} - -.modal.fade.in { - top: 10%; -} - -.modal-header { - padding: 9px 15px; - border-bottom: 1px solid #eee; -} - -.modal-header .close { - margin-top: 2px; -} - -.modal-header h3 { - margin: 0; - line-height: 30px; -} - -.modal-body { - position: relative; - max-height: 400px; - padding: 15px; - overflow-y: auto; -} - -.modal-form { - margin-bottom: 0; -} - -.modal-footer { - padding: 14px 15px 15px; - margin-bottom: 0; - text-align: right; - background-color: #f5f5f5; - border-top: 1px solid #ddd; - -webkit-border-radius: 0 0 6px 6px; - -moz-border-radius: 0 0 6px 6px; - border-radius: 0 0 6px 6px; - *zoom: 1; - -webkit-box-shadow: inset 0 1px 0 #ffffff; - -moz-box-shadow: inset 0 1px 0 #ffffff; - box-shadow: inset 0 1px 0 #ffffff; -} - -.modal-footer:before, -.modal-footer:after { - display: table; - line-height: 0; - content: ""; -} - -.modal-footer:after { - clear: both; -} - -.modal-footer .btn + .btn { - margin-bottom: 0; - margin-left: 5px; -} - -.modal-footer .btn-group .btn + .btn { - margin-left: -1px; -} - -.modal-footer .btn-block + .btn-block { - margin-left: 0; -} - -.tooltip { - position: absolute; - z-index: 1030; - display: block; - font-size: 11px; - line-height: 1.4; - opacity: 0; - filter: alpha(opacity=0); - visibility: visible; -} - -.tooltip.in { - opacity: 0.8; - filter: alpha(opacity=80); -} - -.tooltip.top { - padding: 5px 0; - margin-top: -3px; -} - -.tooltip.right { - padding: 0 5px; - margin-left: 3px; -} - -.tooltip.bottom { - padding: 5px 0; - margin-top: 3px; -} - -.tooltip.left { - padding: 0 5px; - margin-left: -3px; -} - -.tooltip-inner { - max-width: 200px; - padding: 8px; - color: #ffffff; - text-align: center; - text-decoration: none; - background-color: #000000; - -webkit-border-radius: 4px; - -moz-border-radius: 4px; - border-radius: 4px; -} - -.tooltip-arrow { - position: absolute; - width: 0; - height: 0; - border-color: transparent; - border-style: solid; -} - -.tooltip.top .tooltip-arrow { - bottom: 0; - left: 50%; - margin-left: -5px; - border-top-color: #000000; - border-width: 5px 5px 0; -} - -.tooltip.right .tooltip-arrow { - top: 50%; - left: 0; - margin-top: -5px; - border-right-color: #000000; - border-width: 5px 5px 5px 0; -} - -.tooltip.left .tooltip-arrow { - top: 50%; - right: 0; - margin-top: -5px; - border-left-color: #000000; - border-width: 5px 0 5px 5px; -} - -.tooltip.bottom .tooltip-arrow { - top: 0; - left: 50%; - margin-left: -5px; - border-bottom-color: #000000; - border-width: 0 5px 5px; -} - -.popover { - position: absolute; - top: 0; - left: 0; - z-index: 1010; - display: none; - max-width: 276px; - padding: 1px; - text-align: left; - white-space: normal; - background-color: #ffffff; - border: 1px solid #ccc; - border: 1px solid rgba(0, 0, 0, 0.2); - -webkit-border-radius: 6px; - -moz-border-radius: 6px; - border-radius: 6px; - -webkit-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2); - -moz-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2); - box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2); - -webkit-background-clip: padding-box; - -moz-background-clip: padding; - background-clip: padding-box; -} - -.popover.top { - margin-top: -10px; -} - -.popover.right { - margin-left: 10px; -} - -.popover.bottom { - margin-top: 10px; -} - -.popover.left { - margin-left: -10px; -} - -.popover-title { - padding: 8px 14px; - margin: 0; - font-size: 14px; - font-weight: normal; - line-height: 18px; - background-color: #f7f7f7; - border-bottom: 1px solid #ebebeb; - -webkit-border-radius: 5px 5px 0 0; - -moz-border-radius: 5px 5px 0 0; - border-radius: 5px 5px 0 0; -} - -.popover-title:empty { - display: none; -} - -.popover-content { - padding: 9px 14px; -} - -.popover .arrow, -.popover .arrow:after { - position: absolute; - display: block; - width: 0; - height: 0; - border-color: transparent; - border-style: solid; -} - -.popover .arrow { - border-width: 11px; -} - -.popover .arrow:after { - border-width: 10px; - content: ""; -} - -.popover.top .arrow { - bottom: -11px; - left: 50%; - margin-left: -11px; - border-top-color: #999; - border-top-color: rgba(0, 0, 0, 0.25); - border-bottom-width: 0; -} - -.popover.top .arrow:after { - bottom: 1px; - margin-left: -10px; - border-top-color: #ffffff; - border-bottom-width: 0; -} - -.popover.right .arrow { - top: 50%; - left: -11px; - margin-top: -11px; - border-right-color: #999; - border-right-color: rgba(0, 0, 0, 0.25); - border-left-width: 0; -} - -.popover.right .arrow:after { - bottom: -10px; - left: 1px; - border-right-color: #ffffff; - border-left-width: 0; -} - -.popover.bottom .arrow { - top: -11px; - left: 50%; - margin-left: -11px; - border-bottom-color: #999; - border-bottom-color: rgba(0, 0, 0, 0.25); - border-top-width: 0; -} - -.popover.bottom .arrow:after { - top: 1px; - margin-left: -10px; - border-bottom-color: #ffffff; - border-top-width: 0; -} - -.popover.left .arrow { - top: 50%; - right: -11px; - margin-top: -11px; - border-left-color: #999; - border-left-color: rgba(0, 0, 0, 0.25); - border-right-width: 0; -} - -.popover.left .arrow:after { - right: 1px; - bottom: -10px; - border-left-color: #ffffff; - border-right-width: 0; -} - -.thumbnails { - margin-left: -20px; - list-style: none; - *zoom: 1; -} - -.thumbnails:before, -.thumbnails:after { - display: table; - line-height: 0; - content: ""; -} - -.thumbnails:after { - clear: both; -} - -.row-fluid .thumbnails { - margin-left: 0; -} - -.thumbnails > li { - float: left; - margin-bottom: 20px; - margin-left: 20px; -} - -.thumbnail { - display: block; - padding: 4px; - line-height: 20px; - border: 1px solid #ddd; - -webkit-border-radius: 4px; - -moz-border-radius: 4px; - border-radius: 4px; - -webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.055); - -moz-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.055); - box-shadow: 0 1px 3px rgba(0, 0, 0, 0.055); - -webkit-transition: all 0.2s ease-in-out; - -moz-transition: all 0.2s ease-in-out; - -o-transition: all 0.2s ease-in-out; - transition: all 0.2s ease-in-out; -} - -a.thumbnail:hover, -a.thumbnail:focus { - border-color: #0088cc; - -webkit-box-shadow: 0 1px 4px rgba(0, 105, 214, 0.25); - -moz-box-shadow: 0 1px 4px rgba(0, 105, 214, 0.25); - box-shadow: 0 1px 4px rgba(0, 105, 214, 0.25); -} - -.thumbnail > img { - display: block; - max-width: 100%; - margin-right: auto; - margin-left: auto; -} - -.thumbnail .caption { - padding: 9px; - color: #555555; -} - -.media, -.media-body { - overflow: hidden; - *overflow: visible; - zoom: 1; -} - -.media, -.media .media { - margin-top: 15px; -} - -.media:first-child { - margin-top: 0; -} - -.media-object { - display: block; -} - -.media-heading { - margin: 0 0 5px; -} - -.media > .pull-left { - margin-right: 10px; -} - -.media > .pull-right { - margin-left: 10px; -} - -.media-list { - margin-left: 0; - list-style: none; -} - -.label, -.badge { - display: inline-block; - padding: 2px 4px; - font-size: 11.844px; - font-weight: bold; - line-height: 14px; - color: #ffffff; - text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); - white-space: nowrap; - vertical-align: baseline; - background-color: #999999; -} - -.label { - -webkit-border-radius: 3px; - -moz-border-radius: 3px; - border-radius: 3px; -} - -.badge { - padding-right: 9px; - padding-left: 9px; - -webkit-border-radius: 9px; - -moz-border-radius: 9px; - border-radius: 9px; -} - -.label:empty, -.badge:empty { - display: none; -} - -a.label:hover, -a.label:focus, -a.badge:hover, -a.badge:focus { - color: #ffffff; - text-decoration: none; - cursor: pointer; -} - -.label-important, -.badge-important { - background-color: #b94a48; -} - -.label-important[href], -.badge-important[href] { - background-color: #953b39; -} - -.label-warning, -.badge-warning { - background-color: #f89406; -} - -.label-warning[href], -.badge-warning[href] { - background-color: #c67605; -} - -.label-success, -.badge-success { - background-color: #468847; -} - -.label-success[href], -.badge-success[href] { - background-color: #356635; -} - -.label-info, -.badge-info { - background-color: #3a87ad; -} - -.label-info[href], -.badge-info[href] { - background-color: #2d6987; -} - -.label-inverse, -.badge-inverse { - background-color: #333333; -} - -.label-inverse[href], -.badge-inverse[href] { - background-color: #1a1a1a; -} - -.btn .label, -.btn .badge { - position: relative; - top: -1px; -} - -.btn-mini .label, -.btn-mini .badge { - top: 0; -} - -@-webkit-keyframes progress-bar-stripes { - from { - background-position: 40px 0; - } - to { - background-position: 0 0; - } -} - -@-moz-keyframes progress-bar-stripes { - from { - background-position: 40px 0; - } - to { - background-position: 0 0; - } -} - -@-ms-keyframes progress-bar-stripes { - from { - background-position: 40px 0; - } - to { - background-position: 0 0; - } -} - -@-o-keyframes progress-bar-stripes { - from { - background-position: 0 0; - } - to { - background-position: 40px 0; - } -} - -@keyframes progress-bar-stripes { - from { - background-position: 40px 0; - } - to { - background-position: 0 0; - } -} - -.progress { - height: 20px; - margin-bottom: 20px; - overflow: hidden; - background-color: #f7f7f7; - background-image: -moz-linear-gradient(top, #f5f5f5, #f9f9f9); - background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#f5f5f5), to(#f9f9f9)); - background-image: -webkit-linear-gradient(top, #f5f5f5, #f9f9f9); - background-image: -o-linear-gradient(top, #f5f5f5, #f9f9f9); - background-image: linear-gradient(to bottom, #f5f5f5, #f9f9f9); - background-repeat: repeat-x; - -webkit-border-radius: 4px; - -moz-border-radius: 4px; - border-radius: 4px; - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff5f5f5', endColorstr='#fff9f9f9', GradientType=0); - -webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1); - -moz-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1); - box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1); -} - -.progress .bar { - float: left; - width: 0; - height: 100%; - font-size: 12px; - color: #ffffff; - text-align: center; - text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); - background-color: #0e90d2; - background-image: -moz-linear-gradient(top, #149bdf, #0480be); - background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#149bdf), to(#0480be)); - background-image: -webkit-linear-gradient(top, #149bdf, #0480be); - background-image: -o-linear-gradient(top, #149bdf, #0480be); - background-image: linear-gradient(to bottom, #149bdf, #0480be); - background-repeat: repeat-x; - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff149bdf', endColorstr='#ff0480be', GradientType=0); - -webkit-box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.15); - -moz-box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.15); - box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.15); - -webkit-box-sizing: border-box; - -moz-box-sizing: border-box; - box-sizing: border-box; - -webkit-transition: width 0.6s ease; - -moz-transition: width 0.6s ease; - -o-transition: width 0.6s ease; - transition: width 0.6s ease; -} - -.progress .bar + .bar { - -webkit-box-shadow: inset 1px 0 0 rgba(0, 0, 0, 0.15), inset 0 -1px 0 rgba(0, 0, 0, 0.15); - -moz-box-shadow: inset 1px 0 0 rgba(0, 0, 0, 0.15), inset 0 -1px 0 rgba(0, 0, 0, 0.15); - box-shadow: inset 1px 0 0 rgba(0, 0, 0, 0.15), inset 0 -1px 0 rgba(0, 0, 0, 0.15); -} - -.progress-striped .bar { - background-color: #149bdf; - background-image: -webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent)); - background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); - background-image: -moz-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); - background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); - background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); - -webkit-background-size: 40px 40px; - -moz-background-size: 40px 40px; - -o-background-size: 40px 40px; - background-size: 40px 40px; -} - -.progress.active .bar { - -webkit-animation: progress-bar-stripes 2s linear infinite; - -moz-animation: progress-bar-stripes 2s linear infinite; - -ms-animation: progress-bar-stripes 2s linear infinite; - -o-animation: progress-bar-stripes 2s linear infinite; - animation: progress-bar-stripes 2s linear infinite; -} - -.progress-danger .bar, -.progress .bar-danger { - background-color: #dd514c; - background-image: -moz-linear-gradient(top, #ee5f5b, #c43c35); - background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ee5f5b), to(#c43c35)); - background-image: -webkit-linear-gradient(top, #ee5f5b, #c43c35); - background-image: -o-linear-gradient(top, #ee5f5b, #c43c35); - background-image: linear-gradient(to bottom, #ee5f5b, #c43c35); - background-repeat: repeat-x; - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffee5f5b', endColorstr='#ffc43c35', GradientType=0); -} - -.progress-danger.progress-striped .bar, -.progress-striped .bar-danger { - background-color: #ee5f5b; - background-image: -webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent)); - background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); - background-image: -moz-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); - background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); - background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); -} - -.progress-success .bar, -.progress .bar-success { - background-color: #5eb95e; - background-image: -moz-linear-gradient(top, #62c462, #57a957); - background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#62c462), to(#57a957)); - background-image: -webkit-linear-gradient(top, #62c462, #57a957); - background-image: -o-linear-gradient(top, #62c462, #57a957); - background-image: linear-gradient(to bottom, #62c462, #57a957); - background-repeat: repeat-x; - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff62c462', endColorstr='#ff57a957', GradientType=0); -} - -.progress-success.progress-striped .bar, -.progress-striped .bar-success { - background-color: #62c462; - background-image: -webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent)); - background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); - background-image: -moz-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); - background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); - background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); -} - -.progress-info .bar, -.progress .bar-info { - background-color: #4bb1cf; - background-image: -moz-linear-gradient(top, #5bc0de, #339bb9); - background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#5bc0de), to(#339bb9)); - background-image: -webkit-linear-gradient(top, #5bc0de, #339bb9); - background-image: -o-linear-gradient(top, #5bc0de, #339bb9); - background-image: linear-gradient(to bottom, #5bc0de, #339bb9); - background-repeat: repeat-x; - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff339bb9', GradientType=0); -} - -.progress-info.progress-striped .bar, -.progress-striped .bar-info { - background-color: #5bc0de; - background-image: -webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent)); - background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); - background-image: -moz-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); - background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); - background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); -} - -.progress-warning .bar, -.progress .bar-warning { - background-color: #faa732; - background-image: -moz-linear-gradient(top, #fbb450, #f89406); - background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#fbb450), to(#f89406)); - background-image: -webkit-linear-gradient(top, #fbb450, #f89406); - background-image: -o-linear-gradient(top, #fbb450, #f89406); - background-image: linear-gradient(to bottom, #fbb450, #f89406); - background-repeat: repeat-x; - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffbb450', endColorstr='#fff89406', GradientType=0); -} - -.progress-warning.progress-striped .bar, -.progress-striped .bar-warning { - background-color: #fbb450; - background-image: -webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent)); - background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); - background-image: -moz-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); - background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); - background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); -} - -.accordion { - margin-bottom: 20px; -} - -.accordion-group { - margin-bottom: 2px; - border: 1px solid #e5e5e5; - -webkit-border-radius: 4px; - -moz-border-radius: 4px; - border-radius: 4px; -} - -.accordion-heading { - border-bottom: 0; -} - -.accordion-heading .accordion-toggle { - display: block; - padding: 8px 15px; -} - -.accordion-toggle { - cursor: pointer; -} - -.accordion-inner { - padding: 9px 15px; - border-top: 1px solid #e5e5e5; -} - -.carousel { - position: relative; - margin-bottom: 20px; - line-height: 1; -} - -.carousel-inner { - position: relative; - width: 100%; - overflow: hidden; -} - -.carousel-inner > .item { - position: relative; - display: none; - -webkit-transition: 0.6s ease-in-out left; - -moz-transition: 0.6s ease-in-out left; - -o-transition: 0.6s ease-in-out left; - transition: 0.6s ease-in-out left; -} - -.carousel-inner > .item > img, -.carousel-inner > .item > a > img { - display: block; - line-height: 1; -} - -.carousel-inner > .active, -.carousel-inner > .next, -.carousel-inner > .prev { - display: block; -} - -.carousel-inner > .active { - left: 0; -} - -.carousel-inner > .next, -.carousel-inner > .prev { - position: absolute; - top: 0; - width: 100%; -} - -.carousel-inner > .next { - left: 100%; -} - -.carousel-inner > .prev { - left: -100%; -} - -.carousel-inner > .next.left, -.carousel-inner > .prev.right { - left: 0; -} - -.carousel-inner > .active.left { - left: -100%; -} - -.carousel-inner > .active.right { - left: 100%; -} - -.carousel-control { - position: absolute; - top: 40%; - left: 15px; - width: 40px; - height: 40px; - margin-top: -20px; - font-size: 60px; - font-weight: 100; - line-height: 30px; - color: #ffffff; - text-align: center; - background: #222222; - border: 3px solid #ffffff; - -webkit-border-radius: 23px; - -moz-border-radius: 23px; - border-radius: 23px; - opacity: 0.5; - filter: alpha(opacity=50); -} - -.carousel-control.right { - right: 15px; - left: auto; -} - -.carousel-control:hover, -.carousel-control:focus { - color: #ffffff; - text-decoration: none; - opacity: 0.9; - filter: alpha(opacity=90); -} - -.carousel-indicators { - position: absolute; - top: 15px; - right: 15px; - z-index: 5; - margin: 0; - list-style: none; -} - -.carousel-indicators li { - display: block; - float: left; - width: 10px; - height: 10px; - margin-left: 5px; - text-indent: -999px; - background-color: #ccc; - background-color: rgba(255, 255, 255, 0.25); - border-radius: 5px; -} - -.carousel-indicators .active { - background-color: #fff; -} - -.carousel-caption { - position: absolute; - right: 0; - bottom: 0; - left: 0; - padding: 15px; - background: #333333; - background: rgba(0, 0, 0, 0.75); -} - -.carousel-caption h4, -.carousel-caption p { - line-height: 20px; - color: #ffffff; -} - -.carousel-caption h4 { - margin: 0 0 5px; -} - -.carousel-caption p { - margin-bottom: 0; -} - -.hero-unit { - padding: 60px; - margin-bottom: 30px; - font-size: 18px; - font-weight: 200; - line-height: 30px; - color: inherit; - background-color: #eeeeee; - -webkit-border-radius: 6px; - -moz-border-radius: 6px; - border-radius: 6px; -} - -.hero-unit h1 { - margin-bottom: 0; - font-size: 60px; - line-height: 1; - letter-spacing: -1px; - color: inherit; -} - -.hero-unit li { - line-height: 30px; -} - -.pull-right { - float: right; -} - -.pull-left { - float: left; -} - -.hide { - display: none; -} - -.show { - display: block; -} - -.invisible { - visibility: hidden; -} - -.affix { - position: fixed; -} diff --git a/xstream-introduction/.classpath b/xstream-introduction/.classpath deleted file mode 100644 index 138df490af..0000000000 --- a/xstream-introduction/.classpath +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/xstream-introduction/src/main/java/org/baeldung/initializer/SimpleXstreamInitializer.java b/xstream-introduction/src/main/java/com/baeldung/initializer/SimpleXstreamInitializer.java similarity index 91% rename from xstream-introduction/src/main/java/org/baeldung/initializer/SimpleXstreamInitializer.java rename to xstream-introduction/src/main/java/com/baeldung/initializer/SimpleXstreamInitializer.java index 59912539ca..618df877b9 100644 --- a/xstream-introduction/src/main/java/org/baeldung/initializer/SimpleXstreamInitializer.java +++ b/xstream-introduction/src/main/java/com/baeldung/initializer/SimpleXstreamInitializer.java @@ -1,4 +1,4 @@ -package org.baeldung.initializer; +package com.baeldung.initializer; import com.thoughtworks.xstream.XStream; diff --git a/xstream-introduction/src/main/java/org/baeldung/pojo/AddressDetails.java b/xstream-introduction/src/main/java/com/baeldung/pojo/AddressDetails.java similarity index 96% rename from xstream-introduction/src/main/java/org/baeldung/pojo/AddressDetails.java rename to xstream-introduction/src/main/java/com/baeldung/pojo/AddressDetails.java index 16930cb8ab..e9e30bf5fc 100644 --- a/xstream-introduction/src/main/java/org/baeldung/pojo/AddressDetails.java +++ b/xstream-introduction/src/main/java/com/baeldung/pojo/AddressDetails.java @@ -1,4 +1,4 @@ -package org.baeldung.pojo; +package com.baeldung.pojo; import java.util.List; diff --git a/xstream-introduction/src/main/java/org/baeldung/pojo/ContactDetails.java b/xstream-introduction/src/main/java/com/baeldung/pojo/ContactDetails.java similarity index 94% rename from xstream-introduction/src/main/java/org/baeldung/pojo/ContactDetails.java rename to xstream-introduction/src/main/java/com/baeldung/pojo/ContactDetails.java index 1cb353414b..66475b9d8e 100644 --- a/xstream-introduction/src/main/java/org/baeldung/pojo/ContactDetails.java +++ b/xstream-introduction/src/main/java/com/baeldung/pojo/ContactDetails.java @@ -1,4 +1,4 @@ -package org.baeldung.pojo; +package com.baeldung.pojo; import com.thoughtworks.xstream.annotations.XStreamAlias; diff --git a/xstream-introduction/src/main/java/org/baeldung/pojo/Customer.java b/xstream-introduction/src/main/java/com/baeldung/pojo/Customer.java similarity index 95% rename from xstream-introduction/src/main/java/org/baeldung/pojo/Customer.java rename to xstream-introduction/src/main/java/com/baeldung/pojo/Customer.java index aeb6e0aaf3..2ed11dcdab 100644 --- a/xstream-introduction/src/main/java/org/baeldung/pojo/Customer.java +++ b/xstream-introduction/src/main/java/com/baeldung/pojo/Customer.java @@ -1,4 +1,4 @@ -package org.baeldung.pojo; +package com.baeldung.pojo; import java.util.Date; import java.util.List; @@ -10,7 +10,7 @@ import com.thoughtworks.xstream.annotations.XStreamOmitField; @XStreamAlias("customer") public class Customer { - @XStreamOmitField + //@XStreamOmitField private String firstName; private String lastName; diff --git a/xstream-introduction/src/main/java/org/baeldung/pojo/CustomerAddressDetails.java b/xstream-introduction/src/main/java/com/baeldung/pojo/CustomerAddressDetails.java similarity index 96% rename from xstream-introduction/src/main/java/org/baeldung/pojo/CustomerAddressDetails.java rename to xstream-introduction/src/main/java/com/baeldung/pojo/CustomerAddressDetails.java index e4ce5ae5cd..30fda1b92c 100644 --- a/xstream-introduction/src/main/java/org/baeldung/pojo/CustomerAddressDetails.java +++ b/xstream-introduction/src/main/java/com/baeldung/pojo/CustomerAddressDetails.java @@ -1,4 +1,4 @@ -package org.baeldung.pojo; +package com.baeldung.pojo; import java.util.List; diff --git a/xstream-introduction/src/main/java/org/baeldung/pojo/CustomerPortfolio.java b/xstream-introduction/src/main/java/com/baeldung/pojo/CustomerPortfolio.java similarity index 94% rename from xstream-introduction/src/main/java/org/baeldung/pojo/CustomerPortfolio.java rename to xstream-introduction/src/main/java/com/baeldung/pojo/CustomerPortfolio.java index cc65128650..6f1ce4b651 100644 --- a/xstream-introduction/src/main/java/org/baeldung/pojo/CustomerPortfolio.java +++ b/xstream-introduction/src/main/java/com/baeldung/pojo/CustomerPortfolio.java @@ -1,4 +1,4 @@ -package org.baeldung.pojo; +package com.baeldung.pojo; import java.util.List; diff --git a/xstream-introduction/src/main/java/org/baeldung/utility/MyDateConverter.java b/xstream-introduction/src/main/java/com/baeldung/utility/MyDateConverter.java similarity index 97% rename from xstream-introduction/src/main/java/org/baeldung/utility/MyDateConverter.java rename to xstream-introduction/src/main/java/com/baeldung/utility/MyDateConverter.java index a11b58bd12..564a28d1c5 100644 --- a/xstream-introduction/src/main/java/org/baeldung/utility/MyDateConverter.java +++ b/xstream-introduction/src/main/java/com/baeldung/utility/MyDateConverter.java @@ -1,4 +1,4 @@ -package org.baeldung.utility; +package com.baeldung.utility; import java.text.ParseException; import java.text.SimpleDateFormat; diff --git a/xstream-introduction/src/main/java/org/baeldung/utility/MySingleValueConverter.java b/xstream-introduction/src/main/java/com/baeldung/utility/MySingleValueConverter.java similarity index 90% rename from xstream-introduction/src/main/java/org/baeldung/utility/MySingleValueConverter.java rename to xstream-introduction/src/main/java/com/baeldung/utility/MySingleValueConverter.java index 0cabc4fe03..358d647835 100644 --- a/xstream-introduction/src/main/java/org/baeldung/utility/MySingleValueConverter.java +++ b/xstream-introduction/src/main/java/com/baeldung/utility/MySingleValueConverter.java @@ -1,10 +1,9 @@ -package org.baeldung.utility; +package com.baeldung.utility; import java.text.SimpleDateFormat; import java.util.Date; -import org.baeldung.pojo.Customer; - +import com.baeldung.pojo.Customer; import com.thoughtworks.xstream.converters.SingleValueConverter; public class MySingleValueConverter implements SingleValueConverter { diff --git a/xstream-introduction/src/main/java/org/baeldung/utility/SimpleDataGeneration.java b/xstream-introduction/src/main/java/com/baeldung/utility/SimpleDataGeneration.java similarity index 89% rename from xstream-introduction/src/main/java/org/baeldung/utility/SimpleDataGeneration.java rename to xstream-introduction/src/main/java/com/baeldung/utility/SimpleDataGeneration.java index 2b2a7a8bb8..22d0f0ce77 100644 --- a/xstream-introduction/src/main/java/org/baeldung/utility/SimpleDataGeneration.java +++ b/xstream-introduction/src/main/java/com/baeldung/utility/SimpleDataGeneration.java @@ -1,11 +1,11 @@ -package org.baeldung.utility; +package com.baeldung.utility; import java.util.ArrayList; import java.util.Calendar; import java.util.List; -import org.baeldung.pojo.ContactDetails; -import org.baeldung.pojo.Customer; +import com.baeldung.pojo.ContactDetails; +import com.baeldung.pojo.Customer; public class SimpleDataGeneration { diff --git a/xstream-introduction/src/test/java/com/baeldung/utility/XStreamSimpleXmlTest.java b/xstream-introduction/src/test/java/com/baeldung/utility/XStreamSimpleXmlTest.java new file mode 100644 index 0000000000..50d02528bd --- /dev/null +++ b/xstream-introduction/src/test/java/com/baeldung/utility/XStreamSimpleXmlTest.java @@ -0,0 +1,62 @@ +package com.baeldung.utility; + +import org.junit.Assert; +import org.junit.Before; +import org.junit.Test; + +import com.baeldung.initializer.SimpleXstreamInitializer; +import com.baeldung.pojo.AddressDetails; +import com.baeldung.pojo.ContactDetails; +import com.baeldung.pojo.Customer; +import com.baeldung.utility.SimpleDataGeneration; +import com.thoughtworks.xstream.XStream; + +public class XStreamSimpleXmlTest { + + private Customer customer = null; + + private String dataXml = null; + + private XStream xstream = null; + + @Before + public void dataSetup() { + customer = SimpleDataGeneration.generateData(); + xstream = SimpleXstreamInitializer.getXstreamInstance(); + xstream.processAnnotations(Customer.class); + xstream.processAnnotations(AddressDetails.class); + xstream.processAnnotations(ContactDetails.class); + xstream.omitField(Customer.class , "lastName"); + xstream.registerConverter(new MyDateConverter()); + // xstream.registerConverter(new MySingleValueConverter()); + xstream.aliasField("fn" , Customer.class , "firstName"); + + dataXml = xstream.toXML(customer); + System.out.println(dataXml); + } + + @Test + public void testClassAliasedAnnotation() { + Assert.assertNotEquals(-1 , dataXml.indexOf("")); + } + + @Test + public void testFieldAliasedAnnotation() { + Assert.assertNotEquals(-1 , dataXml.indexOf("")); + } + + @Test + public void testImplicitCollection() { + Assert.assertEquals(-1 , dataXml.indexOf("contactDetailsList")); + } + + @Test + public void testDateFieldFormating() { + Assert.assertEquals("14-02-1986" , dataXml.substring(dataXml.indexOf("") + 5 , dataXml.indexOf(""))); + } + + @Test + public void testOmitField() { + Assert.assertEquals(-1 , dataXml.indexOf("lastName")); + } +} diff --git a/xstream-introduction/src/test/java/org/baeldung/utility/XStreamSimpleXmlTest.java b/xstream-introduction/src/test/java/org/baeldung/utility/XStreamSimpleXmlTest.java deleted file mode 100644 index 57d0bd2b55..0000000000 --- a/xstream-introduction/src/test/java/org/baeldung/utility/XStreamSimpleXmlTest.java +++ /dev/null @@ -1,46 +0,0 @@ -package org.baeldung.utility; - -import org.baeldung.initializer.SimpleXstreamInitializer; -import org.baeldung.pojo.AddressDetails; -import org.baeldung.pojo.ContactDetails; -import org.baeldung.pojo.Customer; -import org.junit.Assert; -import org.junit.Before; -import org.junit.Test; - -import com.thoughtworks.xstream.XStream; - -public class XStreamSimpleXmlTest { - - private Customer customer = null; - private String dataXml = null; - private XStream xstream = null; - - @Before - public void dataSetup() { - customer = SimpleDataGeneration.generateData(); - xstream = SimpleXstreamInitializer.getXstreamInstance(); - xstream.processAnnotations(Customer.class); - xstream.processAnnotations(AddressDetails.class); - xstream.processAnnotations(ContactDetails.class); - xstream.omitField(Customer.class , "firstName"); - xstream.registerConverter(new MyDateConverter()); - //xtream.registerConverter(new MySingleValueConverter()); - xstream.aliasField("fn", Customer.class, "firstName"); - - dataXml = xstream.toXML(customer); - System.out.println(dataXml); - } - - @Test - public void convertDataToXml() { - Assert.assertNotNull(dataXml); - } - - @Test - public void convertXmlToObject() { - customer = (Customer) xstream.fromXML(dataXml); - Assert.assertNotNull(customer); - } - -}