Skip to content

Commit 223cf15

Browse files
author
孙健
committed
up some fix
1 parent f85ac51 commit 223cf15

File tree

3 files changed

+13
-13
lines changed

3 files changed

+13
-13
lines changed

build.gradle

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,7 @@ dependencies {
3232

3333
//log
3434
//support old version
35-
compile 'log4j:log4j:1.2.16'
36-
compile 'org.slf4j:slf4j-log4j12:1.6.1'
35+
//compile 'log4j:log4j:1.2.16'
3736
//new version use log
3837
compile 'org.slf4j:slf4j-api:1.7.21'
3938
compile 'org.apache.logging.log4j:log4j-slf4j-impl:2.6.2'
@@ -54,16 +53,19 @@ dependencies {
5453
compile 'javax.inject:javax.inject:1'
5554
compile 'javax:javaee-api:7.0'
5655
compile 'io.netty:netty-all:4.1.2.Final'
56+
compile 'org.eclipse.jetty:jetty-servlet:9.2.2.v20140723'
57+
58+
5759

5860

5961
// web server
60-
providedCompile 'org.eclipse.jetty:jetty-webapp:9.2.2.v20140723'
62+
providedCompile 'org.eclipse.jetty:jetty-webapp:9.2.2.v20140723'
6163
providedCompile 'org.eclipse.jetty:jetty-jsp:9.2.2.v20140723'
6264
providedCompile 'org.eclipse.jetty:jetty-continuation:9.2.2.v20140723'
6365
providedCompile 'org.eclipse.jetty.websocket:websocket-server:9.2.2.v20140723'
6466
providedCompile 'org.eclipse.jetty.websocket:javax-websocket-server-impl:9.2.2.v20140723'
6567

66-
68+
6769
testCompile 'junit:junit:4.12'
6870

6971
war{
@@ -75,12 +77,6 @@ dependencies {
7577
def schemaJarFile = project.configurations.providedCompile
7678

7779
schemaJarFile.each{source ->
78-
println source
79-
if(source.name=='javax.servlet-api-3.1.0.jar'){
80-
from(source){
81-
into 'WEB-INF/lib'
82-
}
83-
}
8480
from zipTree(source)
8581
exclude("**/*.SF")
8682
}

src/main/java/Bootstrap.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ public class Bootstrap {
2020
private static final String PREFIX = "jcoder_";
2121

2222
public static void main(String[] args) throws Exception {
23-
23+
2424
for (String arg : args) {
2525
if (arg.startsWith("-f")) {
2626
if (arg.contains("=")) {
@@ -84,6 +84,11 @@ public static void main(String[] args) throws Exception {
8484
context.setContextPath("/");
8585
context.setServer(server);
8686
context.setMaxFormContentSize(0);
87+
context.setServerClasses(new String[] {
88+
"org.objectweb.asm.", // hide asm used by jetty
89+
"org.eclipse.jdt.", // hide jdt used by jetty
90+
"-org.eclipse.jetty." // hide other jetty classes
91+
});
8792

8893
context.setWelcomeFiles(new String[] { "Home.jsp" });
8994

src/main/java/org/nlpcn/jcoder/App.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,8 @@
88
import org.nutz.mvc.ioc.provider.ComboIocProvider;
99

1010
@Modules(packages = { "org.nlpcn.jcoder.controller" }, scanPackage = true)
11-
@IocBy(type = ComboIocProvider.class, args = {"*anno", "org.nlpcn.jcoder" })
11+
@IocBy(type = ComboIocProvider.class, args = { "*anno", "org.nlpcn.jcoder" })
1212
@Encoding(input = "UTF-8", output = "UTF-8")
1313
@SetupBy(SiteSetup.class)
1414
public class App {
15-
1615
}

0 commit comments

Comments
 (0)