parent
c272768c91
commit
400337a86e
@ -0,0 +1,57 @@ |
||||
<?xml version="1.0" encoding="UTF-8"?> |
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" |
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> |
||||
<parent> |
||||
<artifactId>webCrawler</artifactId> |
||||
<groupId>org.pqh</groupId> |
||||
<version>1.0</version> |
||||
</parent> |
||||
<modelVersion>4.0.0</modelVersion> |
||||
|
||||
<artifactId>makeGif</artifactId> |
||||
|
||||
<build> |
||||
|
||||
<finalName>makeGif</finalName> |
||||
|
||||
<plugins> |
||||
<plugin> |
||||
<groupId>org.apache.maven.plugins</groupId> |
||||
<artifactId>maven-compiler-plugin</artifactId> |
||||
<version>3.6.1</version> |
||||
<configuration> |
||||
<source>${java.version}</source> |
||||
<target>${java.version}</target> |
||||
<encoding>UTF-8</encoding> |
||||
</configuration> |
||||
</plugin> |
||||
|
||||
<plugin> |
||||
<artifactId>maven-assembly-plugin</artifactId> |
||||
<configuration> |
||||
<descriptorRefs> |
||||
<descriptorRef>jar-with-dependencies</descriptorRef> |
||||
</descriptorRefs> |
||||
<archive> |
||||
<manifest> |
||||
<mainClass></mainClass> |
||||
</manifest> |
||||
</archive> |
||||
</configuration> |
||||
<executions> |
||||
<execution> |
||||
<id>make-assembly</id> |
||||
<phase>package</phase> |
||||
<goals> |
||||
<goal>single</goal> |
||||
</goals> |
||||
</execution> |
||||
</executions> |
||||
</plugin> |
||||
</plugins> |
||||
|
||||
|
||||
</build> |
||||
|
||||
</project> |
@ -0,0 +1,36 @@ |
||||
package org.pqh.config; |
||||
|
||||
import org.apache.logging.log4j.LogManager; |
||||
import org.springframework.web.WebApplicationInitializer; |
||||
|
||||
import javax.servlet.ServletContext; |
||||
import javax.servlet.ServletException; |
||||
|
||||
/** |
||||
* Created by reborn on 2017/9/18. |
||||
*/ |
||||
public class WebConfigImpl implements WebApplicationInitializer{ |
||||
private String encoding ="UTF-8"; |
||||
|
||||
@Override |
||||
public void onStartup(ServletContext servletContext) throws ServletException { |
||||
LogManager.getLogger().info("onStartup"); |
||||
// //基于注解配置的上下文
|
||||
// AnnotationConfigWebApplicationContext context = new AnnotationConfigWebApplicationContext();
|
||||
// //注册Spring容器配置类
|
||||
// context.register(SpringConfig.class);
|
||||
// ServletRegistration.Dynamic servlet = servletContext.addServlet("dispatcher", new DispatcherServlet(context));
|
||||
// //配置映射路径
|
||||
// servlet.addMapping("/");
|
||||
// //启动顺序
|
||||
// servlet.setLoadOnStartup(1);
|
||||
//
|
||||
//
|
||||
// servletContext.addListener(new ContextLoaderListener(context));
|
||||
//
|
||||
// FilterRegistration.Dynamic characterEncodingFilter=servletContext.addFilter("CharacterEncodingFilter", CharacterEncodingFilter.class);
|
||||
// servletContext.log("CharacterEncodingFilter设置编码:"+encoding);
|
||||
// characterEncodingFilter.setInitParameter("encoding",encoding);
|
||||
// characterEncodingFilter.addMappingForUrlPatterns(EnumSet.of(DispatcherType.REQUEST),true,"/*");
|
||||
} |
||||
} |
@ -1,8 +0,0 @@ |
||||
package org.pqh.util; |
||||
|
||||
/** |
||||
* Created by reborn on 2017/8/8. |
||||
*/ |
||||
public class Log4jUtil { |
||||
|
||||
} |
Loading…
Reference in new issue