From 0e87d70dc72b222d9b22e800b40a0d0942a9ce67 Mon Sep 17 00:00:00 2001 From: Greg Burd Date: Tue, 11 Apr 2017 16:38:14 -0400 Subject: [PATCH] A few tweeks. --- .gitignore | 2 +- build.gradle | 59 +++++++++++---------- src/main/resources/META-INF/persistence.xml | 2 +- src/main/resources/application.yml | 3 +- 4 files changed, 34 insertions(+), 32 deletions(-) diff --git a/.gitignore b/.gitignore index ea4cbb7..5416c64 100644 --- a/.gitignore +++ b/.gitignore @@ -13,7 +13,7 @@ #*# gradle gradlew -._git_gburd +.git_gburd .gradle run-jetty-run/ license.err diff --git a/build.gradle b/build.gradle index 0b995d6..1a8177a 100644 --- a/build.gradle +++ b/build.gradle @@ -38,42 +38,43 @@ task wrapper(type: Wrapper) { gradleVersion = '3.4.1' } -applicationDefaultJvmArgs = ["-Dgreeting.language=en"] - jar { baseName = 'crud' version = '0.0.2-SNAPSHOT' } +applicationDefaultJvmArgs =["-server", + "-Xms1g", + "-Xmx1g", + "-XX:NewRatio=3", + "-Xss16m", + "-XX:+UseConcMarkSweepGC", + "-XX:+CMSParallelRemarkEnabled", + "-XX:ConcGCThreads=4", + "-XX:ReservedCodeCacheSize=240m", + "-XX:+AlwaysPreTouch", + "-XX:+TieredCompilation", + "-XX:+UseCompressedOops", + "-XX:SoftRefLRUPolicyMSPerMB=50", + "-Dsun.io.useCanonCaches=false", + "-Djava.net.preferIPv4Stack=true", + "-Djsse.enableSNIExtension=false", + "-ea", + "-XX:+UseAdaptiveGCBoundary", + "-XX:CompileThreshold=10000", + "-XX:+OptimizeStringConcat", + "-XX:+UseFastAccessorMethods", + "-XX:+HeapDumpOnOutOfMemoryError", + "-XX:-OmitStackTraceInFastThrow", + "-XX:MaxJavaStackTraceDepth=-1", + "-XX:+UseCompressedOops", + "-Dgreeting.language=en"] + bootRun { if (project.hasProperty('jvmArgs')) { jvmArgs = (project.jvmArgs.split("\\s+") as List) } else { - jvmArgs = ["-server", - "-Xms1g", - "-Xmx1g", - "-XX:NewRatio=3", - "-Xss16m", - "-XX:+UseConcMarkSweepGC", - "-XX:+CMSParallelRemarkEnabled", - "-XX:ConcGCThreads=4", - "-XX:ReservedCodeCacheSize=240m", - "-XX:+AlwaysPreTouch", - "-XX:+TieredCompilation", - "-XX:+UseCompressedOops", - "-XX:SoftRefLRUPolicyMSPerMB=50", - "-Dsun.io.useCanonCaches=false", - "-Djava.net.preferIPv4Stack=true", - "-Djsse.enableSNIExtension=false", - "-ea", - "-XX:+UseAdaptiveGCBoundary", - "-XX:CompileThreshold=10000", - "-XX:+OptimizeStringConcat", - "-XX:+UseFastAccessorMethods", - "-XX:+HeapDumpOnOutOfMemoryError", - "-XX:-OmitStackTraceInFastThrow", - "-XX:MaxJavaStackTraceDepth=-1", - "-XX:+UseCompressedOops"] + jvmArgs = applicationDefaultJvmArgs } } @@ -199,10 +200,10 @@ task weaveJpaEntities(type: JavaExec, dependsOn: "compileJava"){ inputs.dir compileJava.destinationDir outputs.dir compileJava.destinationDir main "org.eclipse.persistence.tools.weaving.jpa.StaticWeave" - args "-loglevel", "FINE", - "-persistenceinfo", "src/main/resources", + args "-persistenceinfo", "src/main/resources", compileJava.destinationDir.getAbsolutePath(), compileJava.destinationDir.getAbsolutePath() + //,"-loglevel", "FINE" classpath = configurations.compile } diff --git a/src/main/resources/META-INF/persistence.xml b/src/main/resources/META-INF/persistence.xml index fe72e2e..f4c3c29 100644 --- a/src/main/resources/META-INF/persistence.xml +++ b/src/main/resources/META-INF/persistence.xml @@ -47,7 +47,7 @@ - + diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml index 13c534a..4a4f5dc 100644 --- a/src/main/resources/application.yml +++ b/src/main/resources/application.yml @@ -15,7 +15,8 @@ server: undertow: accesslog: enabled: true - pattern: '%t %a "%r" %s (%D ms)' + pattern: '%h %t "%r" %s "%{i,User-Agent}" %l %u %b %T' + dir: '/var/log/crud' spring: aop: proxy-target-class: true