Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
X
XXL-JOB
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
靳帅
XXL-JOB
Commits
3e6851a2
提交
3e6851a2
authored
11月 28, 2015
作者:
xueli.xue
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
init
上级
b1e15c6a
隐藏空白字符变更
内嵌
并排
正在显示
30 个修改的文件
包含
1052 行增加
和
1 行删除
+1052
-1
pom.xml
pom.xml
+2
-0
pom.xml
xxl-job-admin/pom.xml
+164
-0
IndexController.java
...min/src/main/java/com/xxl/controller/IndexController.java
+16
-0
ITriggerService.java
...-admin/src/main/java/com/xxl/service/ITriggerService.java
+13
-0
TriggerServiceImpl.java
...rc/main/java/com/xxl/service/impl/TriggerServiceImpl.java
+30
-0
applicationcontext-base.xml
xxl-job-admin/src/main/resources/applicationcontext-base.xml
+39
-0
applicationcontext-database.xml
...-admin/src/main/resources/applicationcontext-database.xml
+44
-0
applicationcontext-trigger.xml
...b-admin/src/main/resources/applicationcontext-trigger.xml
+35
-0
applicationcontext-tx.xml
xxl-job-admin/src/main/resources/applicationcontext-tx.xml
+45
-0
freemarker.properties
xxl-job-admin/src/main/resources/freemarker.properties
+11
-0
freemarker.variables.properties
...-admin/src/main/resources/freemarker.variables.properties
+3
-0
jdbc.properties
xxl-job-admin/src/main/resources/jdbc.properties
+5
-0
log4j.properties
xxl-job-admin/src/main/resources/log4j.properties
+10
-0
springmvc-context.xml
xxl-job-admin/src/main/resources/springmvc-context.xml
+51
-0
web.xml
xxl-job-admin/src/main/webapp/WEB-INF/web.xml
+56
-0
pom.xml
xxl-job-core/pom.xml
+6
-1
pom.xml
xxl-job-demo/pom.xml
+164
-0
IndexController.java
...emo/src/main/java/com/xxl/controller/IndexController.java
+16
-0
ITriggerService.java
...b-demo/src/main/java/com/xxl/service/ITriggerService.java
+13
-0
TriggerServiceImpl.java
...rc/main/java/com/xxl/service/impl/TriggerServiceImpl.java
+30
-0
applicationcontext-base.xml
xxl-job-demo/src/main/resources/applicationcontext-base.xml
+39
-0
applicationcontext-database.xml
...b-demo/src/main/resources/applicationcontext-database.xml
+44
-0
applicationcontext-trigger.xml
...ob-demo/src/main/resources/applicationcontext-trigger.xml
+35
-0
applicationcontext-tx.xml
xxl-job-demo/src/main/resources/applicationcontext-tx.xml
+45
-0
freemarker.properties
xxl-job-demo/src/main/resources/freemarker.properties
+11
-0
freemarker.variables.properties
...b-demo/src/main/resources/freemarker.variables.properties
+3
-0
jdbc.properties
xxl-job-demo/src/main/resources/jdbc.properties
+5
-0
log4j.properties
xxl-job-demo/src/main/resources/log4j.properties
+10
-0
springmvc-context.xml
xxl-job-demo/src/main/resources/springmvc-context.xml
+51
-0
web.xml
xxl-job-demo/src/main/webapp/WEB-INF/web.xml
+56
-0
没有找到文件。
pom.xml
浏览文件 @
3e6851a2
...
...
@@ -7,6 +7,8 @@
<packaging>
pom
</packaging>
<modules>
<module>
xxl-job-core
</module>
<module>
xxl-job-demo
</module>
<module>
xxl-job-admin
</module>
</modules>
<build>
...
...
xxl-job-admin/pom.xml
0 → 100644
浏览文件 @
3e6851a2
<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"
>
<modelVersion>
4.0.0
</modelVersion>
<parent>
<groupId>
com.xxl
</groupId>
<artifactId>
xxl-job
</artifactId>
<version>
0.0.1-SNAPSHOT
</version>
</parent>
<artifactId>
xxl-job-admin
</artifactId>
<packaging>
war
</packaging>
<properties>
<spring.version>
3.2.14.RELEASE
</spring.version>
</properties>
<dependencies>
<!-- springframe start -->
<dependency>
<groupId>
org.springframework
</groupId>
<artifactId>
spring-webmvc
</artifactId>
<version>
${spring.version}
</version>
</dependency>
<dependency>
<groupId>
org.springframework
</groupId>
<artifactId>
spring-context-support
</artifactId>
<version>
${spring.version}
</version>
</dependency>
<dependency>
<groupId>
org.springframework
</groupId>
<artifactId>
spring-orm
</artifactId>
<version>
${spring.version}
</version>
</dependency>
<dependency>
<groupId>
org.springframework
</groupId>
<artifactId>
spring-test
</artifactId>
<version>
${spring.version}
</version>
</dependency>
<!-- springframe end -->
<!-- aspectjweaver (support spring aop) -->
<dependency>
<groupId>
org.aspectj
</groupId>
<artifactId>
aspectjweaver
</artifactId>
<version>
1.8.7
</version>
</dependency>
<!-- jackson (support spring json) -->
<dependency>
<groupId>
org.codehaus.jackson
</groupId>
<artifactId>
jackson-mapper-asl
</artifactId>
<version>
1.9.13
</version>
</dependency>
<!-- slf4j -->
<dependency>
<groupId>
org.slf4j
</groupId>
<artifactId>
slf4j-log4j12
</artifactId>
<version>
1.7.5
</version>
</dependency>
<!-- freemarker -->
<dependency>
<groupId>
org.freemarker
</groupId>
<artifactId>
freemarker
</artifactId>
<version>
2.3.20
</version>
</dependency>
<!-- commons-beanutils -->
<dependency>
<groupId>
commons-beanutils
</groupId>
<artifactId>
commons-beanutils
</artifactId>
<version>
1.9.2
</version>
</dependency>
<!-- commons-lang -->
<dependency>
<groupId>
commons-lang
</groupId>
<artifactId>
commons-lang
</artifactId>
<version>
2.6
</version>
</dependency>
<!-- servlet -->
<dependency>
<groupId>
javax.servlet
</groupId>
<artifactId>
servlet-api
</artifactId>
<version>
2.5
</version>
<scope>
provided
</scope>
</dependency>
<dependency>
<groupId>
javax.servlet.jsp
</groupId>
<artifactId>
jsp-api
</artifactId>
<version>
2.1
</version>
<scope>
provided
</scope>
</dependency>
<!-- junit -->
<dependency>
<groupId>
junit
</groupId>
<artifactId>
junit
</artifactId>
<version>
4.11
</version>
<scope>
test
</scope>
</dependency>
<!-- c3p0 -->
<dependency>
<groupId>
c3p0
</groupId>
<artifactId>
c3p0
</artifactId>
<version>
0.9.1.2
</version>
</dependency>
<!-- mybatis-spring -->
<dependency>
<groupId>
org.mybatis
</groupId>
<artifactId>
mybatis-spring
</artifactId>
<version>
1.2.2
</version>
</dependency>
<dependency>
<groupId>
org.mybatis
</groupId>
<artifactId>
mybatis
</artifactId>
<version>
3.2.8
</version>
</dependency>
<!-- mysql-connector -->
<dependency>
<groupId>
mysql
</groupId>
<artifactId>
mysql-connector-java
</artifactId>
<version>
5.1.29
</version>
</dependency>
<!-- quartz :quartz-2.2.1/c3p0-0.9.1.1/slf4j-api-1.6.6 -->
<dependency>
<groupId>
org.quartz-scheduler
</groupId>
<artifactId>
quartz
</artifactId>
<version>
2.2.1
</version>
</dependency>
<!-- xxl-mq-core -->
<dependency>
<groupId>
com.xxl
</groupId>
<artifactId>
xxl-job-core
</artifactId>
<version>
0.0.1-SNAPSHOT
</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>
org.apache.maven.plugins
</groupId>
<artifactId>
maven-compiler-plugin
</artifactId>
<version>
3.1
</version>
<configuration>
<source>
1.6
</source>
<target>
1.6
</target>
<encoding>
UTF8
</encoding>
</configuration>
</plugin>
<plugin>
<groupId>
org.apache.maven.plugins
</groupId>
<artifactId>
maven-war-plugin
</artifactId>
<version>
2.2
</version>
<configuration>
<archiveClasses>
true
</archiveClasses>
</configuration>
</plugin>
</plugins>
</build>
</project>
\ No newline at end of file
xxl-job-admin/src/main/java/com/xxl/controller/IndexController.java
0 → 100644
浏览文件 @
3e6851a2
package
com
.
xxl
.
controller
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.ResponseBody
;
@Controller
@RequestMapping
(
"/"
)
public
class
IndexController
{
@RequestMapping
(
""
)
@ResponseBody
private
String
index
()
{
return
"hehe"
;
}
}
xxl-job-admin/src/main/java/com/xxl/service/ITriggerService.java
0 → 100644
浏览文件 @
3e6851a2
package
com
.
xxl
.
service
;
/**
* Trigger Service
* @author xuxueli
*/
public
interface
ITriggerService
{
/**
* 全站静态化
*/
public
void
generateNetHtml
();
}
xxl-job-admin/src/main/java/com/xxl/service/impl/TriggerServiceImpl.java
0 → 100644
浏览文件 @
3e6851a2
package
com
.
xxl
.
service
.
impl
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.stereotype.Service
;
import
com.xxl.service.ITriggerService
;
/**
* Trigger Service
* @author xuxueli
*/
@Service
(
"triggerService"
)
public
class
TriggerServiceImpl
implements
ITriggerService
{
private
static
transient
Logger
logger
=
LoggerFactory
.
getLogger
(
TriggerServiceImpl
.
class
);
/**
* 全站静态化
*/
public
void
generateNetHtml
()
{
long
start
=
System
.
currentTimeMillis
();
logger
.
info
(
"全站静态化... start:{}"
,
start
);
long
end
=
System
.
currentTimeMillis
();
logger
.
info
(
"全站静态化... end:{}, cost:{}"
,
end
,
end
-
start
);
}
}
xxl-job-admin/src/main/resources/applicationcontext-base.xml
0 → 100644
浏览文件 @
3e6851a2
<?xml version="1.0" encoding="UTF-8"?>
<beans
xmlns=
"http://www.springframework.org/schema/beans"
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xmlns:context=
"http://www.springframework.org/schema/context"
xmlns:util=
"http://www.springframework.org/schema/util"
xsi:schemaLocation=
"http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-3.0.xsd
http://www.springframework.org/schema/util
http://www.springframework.org/schema/util/spring-util.xsd"
>
<context:annotation-config
/>
<context:component-scan
base-package=
"com.xxl.service.impl, com.xxl.dao.impl"
/>
<bean
id=
"freemarkerConfig"
class=
"org.springframework.web.servlet.view.freemarker.FreeMarkerConfigurer"
>
<property
name=
"templateLoaderPath"
value=
"/WEB-INF/template/"
/>
<property
name=
"freemarkerSettings"
>
<bean
class=
"org.springframework.beans.factory.config.PropertiesFactoryBean"
>
<property
name=
"location"
value=
"classpath:freemarker.properties"
/>
</bean>
</property>
<property
name=
"freemarkerVariables"
>
<bean
class=
"org.springframework.beans.factory.config.PropertiesFactoryBean"
>
<property
name=
"location"
value=
"classpath:freemarker.variables.properties"
/>
</bean>
</property>
</bean>
<bean
id=
"propertyConfigurer"
class=
"org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"
>
<property
name=
"fileEncoding"
value=
"utf-8"
/>
<property
name=
"locations"
>
<list>
<value>
classpath*:jdbc.properties
</value>
</list>
</property>
</bean>
</beans>
\ No newline at end of file
xxl-job-admin/src/main/resources/applicationcontext-database.xml
0 → 100644
浏览文件 @
3e6851a2
<?xml version="1.0" encoding="UTF-8"?>
<beans
xmlns=
"http://www.springframework.org/schema/beans"
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xmlns:context=
"http://www.springframework.org/schema/context"
xmlns:aop=
"http://www.springframework.org/schema/aop"
xmlns:tx=
"http://www.springframework.org/schema/tx"
xsi:schemaLocation=
"
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-3.0.xsd
http://www.springframework.org/schema/aop
http://www.springframework.org/schema/aop/spring-aop-3.0.xsd
http://www.springframework.org/schema/tx
http://www.springframework.org/schema/tx/spring-tx-3.0.xsd"
>
<context:annotation-config
/>
<context:component-scan
base-package=
"com.xxl.service.impl, com.xxl.dao.impl"
/>
<!-- c3p0:Main数据源 -->
<bean
id=
"dataSource"
class=
"com.mchange.v2.c3p0.ComboPooledDataSource"
destroy-method=
"close"
>
<property
name=
"driverClass"
value=
"${c3p0.driverClass}"
/>
<property
name=
"jdbcUrl"
value=
"${c3p0.url}"
/>
<property
name=
"user"
value=
"${c3p0.user}"
/>
<property
name=
"password"
value=
"${c3p0.password}"
/>
<property
name=
"initialPoolSize"
value=
"3"
/>
<property
name=
"minPoolSize"
value=
"2"
/>
<property
name=
"maxPoolSize"
value=
"10"
/>
<property
name=
"maxIdleTime"
value=
"60"
/>
<property
name=
"acquireRetryDelay"
value=
"1000"
/>
<property
name=
"acquireRetryAttempts"
value=
"10"
/>
<property
name=
"preferredTestQuery"
value=
"SELECT 1"
/>
</bean>
<bean
id=
"sqlSessionFactory"
class=
"org.mybatis.spring.SqlSessionFactoryBean"
>
<property
name=
"dataSource"
ref=
"dataSource"
/>
<property
name=
"mapperLocations"
value=
"classpath*:com/xxl/core/model/mapper/*.xml"
/>
</bean>
<!-- Template在Junit测试的时候,必须使用scope="prototype",原因未知 -->
<bean
id=
"sqlSessionTemplate"
class=
"org.mybatis.spring.SqlSessionTemplate"
scope=
"prototype"
>
<constructor-arg
index=
"0"
ref=
"sqlSessionFactory"
/>
</bean>
</beans>
\ No newline at end of file
xxl-job-admin/src/main/resources/applicationcontext-trigger.xml
0 → 100644
浏览文件 @
3e6851a2
<?xml version="1.0" encoding="UTF-8"?>
<beans
xmlns=
"http://www.springframework.org/schema/beans"
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xmlns:context=
"http://www.springframework.org/schema/context"
xmlns:util=
"http://www.springframework.org/schema/util"
xsi:schemaLocation=
"http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-3.0.xsd
http://www.springframework.org/schema/util
http://www.springframework.org/schema/util/spring-util.xsd"
>
<!-- 全站静态化:Job Detail -->
<bean
id=
"generateNetHtmlJobDetail"
class=
"org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean"
>
<property
name=
"targetObject"
ref=
"triggerService"
/>
<property
name=
"targetMethod"
value=
"generateNetHtml"
/>
<property
name=
"concurrent"
value=
"false"
/>
</bean>
<!-- 全站静态化:Cron Trigger (quartz-2.x的配置) -->
<bean
id=
"generateNetHtmlTrigger"
class=
"org.springframework.scheduling.quartz.CronTriggerFactoryBean"
>
<property
name=
"jobDetail"
ref=
"generateNetHtmlJobDetail"
/>
<property
name=
"cronExpression"
value=
"0 0/5 * * * ? *"
/>
</bean>
<!-- 启动触发器的配置开始 -->
<bean
name=
"startQuertz"
lazy-init=
"false"
autowire=
"no"
class=
"org.springframework.scheduling.quartz.SchedulerFactoryBean"
>
<property
name=
"triggers"
>
<list>
<ref
bean=
"generateNetHtmlTrigger"
/>
</list>
</property>
</bean>
</beans>
\ No newline at end of file
xxl-job-admin/src/main/resources/applicationcontext-tx.xml
0 → 100644
浏览文件 @
3e6851a2
<?xml version="1.0" encoding="UTF-8"?>
<beans
xmlns=
"http://www.springframework.org/schema/beans"
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xmlns:context=
"http://www.springframework.org/schema/context"
xmlns:aop=
"http://www.springframework.org/schema/aop"
xmlns:tx=
"http://www.springframework.org/schema/tx"
xsi:schemaLocation=
"
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-3.0.xsd
http://www.springframework.org/schema/aop
http://www.springframework.org/schema/aop/spring-aop-3.0.xsd
http://www.springframework.org/schema/tx
http://www.springframework.org/schema/tx/spring-tx-3.0.xsd"
>
<!-- 事务管理器(声明式事务) -->
<bean
id=
"transactionManager"
class=
"org.springframework.jdbc.datasource.DataSourceTransactionManager"
>
<property
name=
"dataSource"
ref=
"dataSource"
/>
</bean>
<!-- 启动事务注解(方式1:注解方式) -->
<tx:annotation-driven
transaction-manager=
"transactionManager"
proxy-target-class=
"true"
/>
<!-- 事务通知(方式2:XML事务管理) -->
<tx:advice
id=
"txAdvice"
transaction-manager=
"transactionManager"
>
<tx:attributes>
<tx:method
name=
"detail*"
propagation=
"SUPPORTS"
/>
<tx:method
name=
"visit*"
propagation=
"SUPPORTS"
/>
<tx:method
name=
"get*"
propagation=
"SUPPORTS"
/>
<tx:method
name=
"find*"
propagation=
"SUPPORTS"
/>
<tx:method
name=
"check*"
propagation=
"SUPPORTS"
/>
<tx:method
name=
"list*"
propagation=
"SUPPORTS"
/>
<tx:method
name=
"*"
propagation=
"REQUIRED"
rollback-for=
"exception"
/>
</tx:attributes>
</tx:advice>
<!-- AOP配置 -->
<aop:config>
<!-- 定义一个切入点 -->
<aop:pointcut
id=
"txoperation"
expression=
"execution(* com.xxl.service.imp.*.*(..))"
/>
<!-- 切入点事务通知 -->
<aop:advisor
pointcut-ref=
"txoperation"
advice-ref=
"txAdvice"
/>
</aop:config>
</beans>
\ No newline at end of file
xxl-job-admin/src/main/resources/freemarker.properties
0 → 100644
浏览文件 @
3e6851a2
template_update_delay
=
0
default_encoding
=
UTF-8
output_encoding
=
UTF-8
locale
=
zh_CN
number_format
=
0.##########
date_format
=
yyyy-MM-dd
time_format
=
HH:mm:ss
datetime_format
=
yyyy-MM-dd HH:mm:s
classic_compatible
=
true
template_exception_handler
=
ignore
\ No newline at end of file
xxl-job-admin/src/main/resources/freemarker.variables.properties
0 → 100644
浏览文件 @
3e6851a2
# 静态文件地址
static_url
=
https://www.baidu.com/
\ No newline at end of file
xxl-job-admin/src/main/resources/jdbc.properties
0 → 100644
浏览文件 @
3e6851a2
c3p0.driverClass
=
com.mysql.jdbc.Driver
c3p0.url
=
jdbc:mysql://localhost:3306/test?Unicode=true&characterEncoding=UTF-8
c3p0.user
=
root
c3p0.password
=
root_pwd
\ No newline at end of file
xxl-job-admin/src/main/resources/log4j.properties
0 → 100644
浏览文件 @
3e6851a2
log4j.rootLogger
=
info,console
log4j.appender.console
=
org.apache.log4j.ConsoleAppender
log4j.appender.console.layout
=
org.apache.log4j.PatternLayout
log4j.appender.console.layout.ConversionPattern
=
%d - xxl-job-admin - %p [%c] - <%m>%n
log4j.appender.logFile
=
org.apache.log4j.DailyRollingFileAppender
log4j.appender.logFile.File
=
${catalina.base}/logs/xxl-job-admin.log
log4j.appender.logFile.layout
=
org.apache.log4j.PatternLayout
log4j.appender.logFile.layout.ConversionPattern
=
%d - xxl-job-admin - %p [%c] - <%m>%n
xxl-job-admin/src/main/resources/springmvc-context.xml
0 → 100644
浏览文件 @
3e6851a2
<?xml version="1.0" encoding="UTF-8"?>
<beans
xmlns=
"http://www.springframework.org/schema/beans"
xmlns:aop=
"http://www.springframework.org/schema/aop"
xmlns:context=
"http://www.springframework.org/schema/context"
xmlns:p=
"http://www.springframework.org/schema/p"
xmlns:tx=
"http://www.springframework.org/schema/tx"
xmlns:mvc=
"http://www.springframework.org/schema/mvc"
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-3.0.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-3.0.xsd
http://www.springframework.org/schema/aop
http://www.springframework.org/schema/aop/spring-aop-3.0.xsd
http://www.springframework.org/schema/tx
http://www.springframework.org/schema/tx/spring-tx-3.0.xsd
http://www.springframework.org/schema/mvc
http://www.springframework.org/schema/mvc/spring-mvc-3.0.xsd"
>
<description>
Spring-web MVC配置
</description>
<mvc:annotation-driven
/>
<context:component-scan
base-package=
"com.xxl.controller"
/>
<mvc:resources
mapping=
"/favicon.ico"
location=
"/favicon.ico"
/>
<mvc:resources
mapping=
"/static/**"
location=
"/static/"
/>
<bean
id=
"viewResolver"
class=
"org.springframework.web.servlet.view.freemarker.FreeMarkerViewResolver"
>
<property
name=
"viewClass"
value=
"org.springframework.web.servlet.view.freemarker.FreeMarkerView"
/>
<!-- 解析视图模板类 -->
<property
name=
"prefix"
value=
""
/>
<!-- 模板前后缀,指定html页面为模板 -->
<property
name=
"suffix"
value=
".ftl"
/>
<property
name=
"contentType"
value=
"text/html;charset=UTF-8"
/>
<!-- 模板输出内容编码 (此处应与defaultEncoding保持一致) -->
<property
name=
"exposeSpringMacroHelpers"
value=
"true"
/>
<!-- 访问Request/Session宏助手 -->
<property
name=
"exposeRequestAttributes"
value=
"true"
/>
<!-- 允许访问Request属性,默认为false -->
<property
name=
"exposeSessionAttributes"
value=
"true"
/>
<!-- 允许访问Session属性,默认为false -->
<property
name=
"requestContextAttribute"
value=
"request"
/>
<!-- 将HttpServletRequest的属性存放到request这个变量中 -->
<property
name=
"cache"
value=
"true"
/>
<property
name=
"order"
value=
"0"
/>
</bean>
<!-- <mvc:interceptors>
<mvc:interceptor>
<mvc:mapping path="/**"/>
<bean class="com.xxl.controller.interceptor.PermissionInterceptor"/>
</mvc:interceptor>
</mvc:interceptors>
<bean id="exceptionResolver" class="com.xxl.controller.resolver.WebExceptionResolver" /> -->
</beans>
\ No newline at end of file
xxl-job-admin/src/main/webapp/WEB-INF/web.xml
0 → 100644
浏览文件 @
3e6851a2
<?xml version="1.0" encoding="UTF-8"?>
<web-app
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xmlns=
"http://java.sun.com/xml/ns/javaee"
xmlns:web=
"http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
xsi:schemaLocation=
"http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
id=
"WebApp_ID"
version=
"2.5"
>
<display-name>
xxl-job-admin
</display-name>
<context-param>
<param-name>
contextConfigLocation
</param-name>
<param-value>
classpath*:applicationcontext-*.xml
</param-value>
</context-param>
<listener>
<listener-class>
org.springframework.web.util.Log4jConfigListener
</listener-class>
</listener>
<listener>
<listener-class>
org.springframework.web.context.ContextLoaderListener
</listener-class>
</listener>
<filter>
<filter-name>
encodingFilter
</filter-name>
<filter-class>
org.springframework.web.filter.CharacterEncodingFilter
</filter-class>
<init-param>
<param-name>
encoding
</param-name>
<param-value>
UTF-8
</param-value>
</init-param>
<init-param>
<param-name>
forceEncoding
</param-name>
<param-value>
true
</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>
encodingFilter
</filter-name>
<url-pattern>
/*
</url-pattern>
</filter-mapping>
<servlet>
<servlet-name>
springmvc
</servlet-name>
<servlet-class>
org.springframework.web.servlet.DispatcherServlet
</servlet-class>
<init-param>
<param-name>
contextConfigLocation
</param-name>
<param-value>
classpath*:springmvc-context.xml
</param-value>
</init-param>
<load-on-startup>
1
</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>
springmvc
</servlet-name>
<url-pattern>
/
</url-pattern>
</servlet-mapping>
<welcome-file-list>
<welcome-file>
index.html
</welcome-file>
</welcome-file-list>
</web-app>
\ No newline at end of file
xxl-job-core/pom.xml
浏览文件 @
3e6851a2
...
...
@@ -7,5 +7,9 @@
<version>
0.0.1-SNAPSHOT
</version>
</parent>
<artifactId>
xxl-job-core
</artifactId>
<version>
0.0.1-SNAPSHOT
</version>
<packaging>
war
</packaging>
<dependencies>
</dependencies>
</project>
\ No newline at end of file
xxl-job-demo/pom.xml
0 → 100644
浏览文件 @
3e6851a2
<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"
>
<modelVersion>
4.0.0
</modelVersion>
<parent>
<groupId>
com.xxl
</groupId>
<artifactId>
xxl-job
</artifactId>
<version>
0.0.1-SNAPSHOT
</version>
</parent>
<artifactId>
xxl-job-demo
</artifactId>
<packaging>
war
</packaging>
<properties>
<spring.version>
3.2.14.RELEASE
</spring.version>
</properties>
<dependencies>
<!-- springframe start -->
<dependency>
<groupId>
org.springframework
</groupId>
<artifactId>
spring-webmvc
</artifactId>
<version>
${spring.version}
</version>
</dependency>
<dependency>
<groupId>
org.springframework
</groupId>
<artifactId>
spring-context-support
</artifactId>
<version>
${spring.version}
</version>
</dependency>
<dependency>
<groupId>
org.springframework
</groupId>
<artifactId>
spring-orm
</artifactId>
<version>
${spring.version}
</version>
</dependency>
<dependency>
<groupId>
org.springframework
</groupId>
<artifactId>
spring-test
</artifactId>
<version>
${spring.version}
</version>
</dependency>
<!-- springframe end -->
<!-- aspectjweaver (support spring aop) -->
<dependency>
<groupId>
org.aspectj
</groupId>
<artifactId>
aspectjweaver
</artifactId>
<version>
1.8.7
</version>
</dependency>
<!-- jackson (support spring json) -->
<dependency>
<groupId>
org.codehaus.jackson
</groupId>
<artifactId>
jackson-mapper-asl
</artifactId>
<version>
1.9.13
</version>
</dependency>
<!-- slf4j -->
<dependency>
<groupId>
org.slf4j
</groupId>
<artifactId>
slf4j-log4j12
</artifactId>
<version>
1.7.5
</version>
</dependency>
<!-- freemarker -->
<dependency>
<groupId>
org.freemarker
</groupId>
<artifactId>
freemarker
</artifactId>
<version>
2.3.20
</version>
</dependency>
<!-- commons-beanutils -->
<dependency>
<groupId>
commons-beanutils
</groupId>
<artifactId>
commons-beanutils
</artifactId>
<version>
1.9.2
</version>
</dependency>
<!-- commons-lang -->
<dependency>
<groupId>
commons-lang
</groupId>
<artifactId>
commons-lang
</artifactId>
<version>
2.6
</version>
</dependency>
<!-- servlet -->
<dependency>
<groupId>
javax.servlet
</groupId>
<artifactId>
servlet-api
</artifactId>
<version>
2.5
</version>
<scope>
provided
</scope>
</dependency>
<dependency>
<groupId>
javax.servlet.jsp
</groupId>
<artifactId>
jsp-api
</artifactId>
<version>
2.1
</version>
<scope>
provided
</scope>
</dependency>
<!-- junit -->
<dependency>
<groupId>
junit
</groupId>
<artifactId>
junit
</artifactId>
<version>
4.11
</version>
<scope>
test
</scope>
</dependency>
<!-- c3p0 -->
<dependency>
<groupId>
c3p0
</groupId>
<artifactId>
c3p0
</artifactId>
<version>
0.9.1.2
</version>
</dependency>
<!-- mybatis-spring -->
<dependency>
<groupId>
org.mybatis
</groupId>
<artifactId>
mybatis-spring
</artifactId>
<version>
1.2.2
</version>
</dependency>
<dependency>
<groupId>
org.mybatis
</groupId>
<artifactId>
mybatis
</artifactId>
<version>
3.2.8
</version>
</dependency>
<!-- mysql-connector -->
<dependency>
<groupId>
mysql
</groupId>
<artifactId>
mysql-connector-java
</artifactId>
<version>
5.1.29
</version>
</dependency>
<!-- quartz :quartz-2.2.1/c3p0-0.9.1.1/slf4j-api-1.6.6 -->
<dependency>
<groupId>
org.quartz-scheduler
</groupId>
<artifactId>
quartz
</artifactId>
<version>
2.2.1
</version>
</dependency>
<!-- xxl-mq-core -->
<dependency>
<groupId>
com.xxl
</groupId>
<artifactId>
xxl-job-core
</artifactId>
<version>
0.0.1-SNAPSHOT
</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>
org.apache.maven.plugins
</groupId>
<artifactId>
maven-compiler-plugin
</artifactId>
<version>
3.1
</version>
<configuration>
<source>
1.6
</source>
<target>
1.6
</target>
<encoding>
UTF8
</encoding>
</configuration>
</plugin>
<plugin>
<groupId>
org.apache.maven.plugins
</groupId>
<artifactId>
maven-war-plugin
</artifactId>
<version>
2.2
</version>
<configuration>
<archiveClasses>
true
</archiveClasses>
</configuration>
</plugin>
</plugins>
</build>
</project>
\ No newline at end of file
xxl-job-demo/src/main/java/com/xxl/controller/IndexController.java
0 → 100644
浏览文件 @
3e6851a2
package
com
.
xxl
.
controller
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.ResponseBody
;
@Controller
@RequestMapping
(
"/"
)
public
class
IndexController
{
@RequestMapping
(
""
)
@ResponseBody
private
String
index
()
{
return
"hehe"
;
}
}
xxl-job-demo/src/main/java/com/xxl/service/ITriggerService.java
0 → 100644
浏览文件 @
3e6851a2
package
com
.
xxl
.
service
;
/**
* Trigger Service
* @author xuxueli
*/
public
interface
ITriggerService
{
/**
* 全站静态化
*/
public
void
generateNetHtml
();
}
xxl-job-demo/src/main/java/com/xxl/service/impl/TriggerServiceImpl.java
0 → 100644
浏览文件 @
3e6851a2
package
com
.
xxl
.
service
.
impl
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.stereotype.Service
;
import
com.xxl.service.ITriggerService
;
/**
* Trigger Service
* @author xuxueli
*/
@Service
(
"triggerService"
)
public
class
TriggerServiceImpl
implements
ITriggerService
{
private
static
transient
Logger
logger
=
LoggerFactory
.
getLogger
(
TriggerServiceImpl
.
class
);
/**
* 全站静态化
*/
public
void
generateNetHtml
()
{
long
start
=
System
.
currentTimeMillis
();
logger
.
info
(
"全站静态化... start:{}"
,
start
);
long
end
=
System
.
currentTimeMillis
();
logger
.
info
(
"全站静态化... end:{}, cost:{}"
,
end
,
end
-
start
);
}
}
xxl-job-demo/src/main/resources/applicationcontext-base.xml
0 → 100644
浏览文件 @
3e6851a2
<?xml version="1.0" encoding="UTF-8"?>
<beans
xmlns=
"http://www.springframework.org/schema/beans"
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xmlns:context=
"http://www.springframework.org/schema/context"
xmlns:util=
"http://www.springframework.org/schema/util"
xsi:schemaLocation=
"http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-3.0.xsd
http://www.springframework.org/schema/util
http://www.springframework.org/schema/util/spring-util.xsd"
>
<context:annotation-config
/>
<context:component-scan
base-package=
"com.xxl.service.impl, com.xxl.dao.impl"
/>
<bean
id=
"freemarkerConfig"
class=
"org.springframework.web.servlet.view.freemarker.FreeMarkerConfigurer"
>
<property
name=
"templateLoaderPath"
value=
"/WEB-INF/template/"
/>
<property
name=
"freemarkerSettings"
>
<bean
class=
"org.springframework.beans.factory.config.PropertiesFactoryBean"
>
<property
name=
"location"
value=
"classpath:freemarker.properties"
/>
</bean>
</property>
<property
name=
"freemarkerVariables"
>
<bean
class=
"org.springframework.beans.factory.config.PropertiesFactoryBean"
>
<property
name=
"location"
value=
"classpath:freemarker.variables.properties"
/>
</bean>
</property>
</bean>
<bean
id=
"propertyConfigurer"
class=
"org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"
>
<property
name=
"fileEncoding"
value=
"utf-8"
/>
<property
name=
"locations"
>
<list>
<value>
classpath*:jdbc.properties
</value>
</list>
</property>
</bean>
</beans>
\ No newline at end of file
xxl-job-demo/src/main/resources/applicationcontext-database.xml
0 → 100644
浏览文件 @
3e6851a2
<?xml version="1.0" encoding="UTF-8"?>
<beans
xmlns=
"http://www.springframework.org/schema/beans"
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xmlns:context=
"http://www.springframework.org/schema/context"
xmlns:aop=
"http://www.springframework.org/schema/aop"
xmlns:tx=
"http://www.springframework.org/schema/tx"
xsi:schemaLocation=
"
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-3.0.xsd
http://www.springframework.org/schema/aop
http://www.springframework.org/schema/aop/spring-aop-3.0.xsd
http://www.springframework.org/schema/tx
http://www.springframework.org/schema/tx/spring-tx-3.0.xsd"
>
<context:annotation-config
/>
<context:component-scan
base-package=
"com.xxl.service.impl, com.xxl.dao.impl"
/>
<!-- c3p0:Main数据源 -->
<bean
id=
"dataSource"
class=
"com.mchange.v2.c3p0.ComboPooledDataSource"
destroy-method=
"close"
>
<property
name=
"driverClass"
value=
"${c3p0.driverClass}"
/>
<property
name=
"jdbcUrl"
value=
"${c3p0.url}"
/>
<property
name=
"user"
value=
"${c3p0.user}"
/>
<property
name=
"password"
value=
"${c3p0.password}"
/>
<property
name=
"initialPoolSize"
value=
"3"
/>
<property
name=
"minPoolSize"
value=
"2"
/>
<property
name=
"maxPoolSize"
value=
"10"
/>
<property
name=
"maxIdleTime"
value=
"60"
/>
<property
name=
"acquireRetryDelay"
value=
"1000"
/>
<property
name=
"acquireRetryAttempts"
value=
"10"
/>
<property
name=
"preferredTestQuery"
value=
"SELECT 1"
/>
</bean>
<bean
id=
"sqlSessionFactory"
class=
"org.mybatis.spring.SqlSessionFactoryBean"
>
<property
name=
"dataSource"
ref=
"dataSource"
/>
<property
name=
"mapperLocations"
value=
"classpath*:com/xxl/core/model/mapper/*.xml"
/>
</bean>
<!-- Template在Junit测试的时候,必须使用scope="prototype",原因未知 -->
<bean
id=
"sqlSessionTemplate"
class=
"org.mybatis.spring.SqlSessionTemplate"
scope=
"prototype"
>
<constructor-arg
index=
"0"
ref=
"sqlSessionFactory"
/>
</bean>
</beans>
\ No newline at end of file
xxl-job-demo/src/main/resources/applicationcontext-trigger.xml
0 → 100644
浏览文件 @
3e6851a2
<?xml version="1.0" encoding="UTF-8"?>
<beans
xmlns=
"http://www.springframework.org/schema/beans"
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xmlns:context=
"http://www.springframework.org/schema/context"
xmlns:util=
"http://www.springframework.org/schema/util"
xsi:schemaLocation=
"http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-3.0.xsd
http://www.springframework.org/schema/util
http://www.springframework.org/schema/util/spring-util.xsd"
>
<!-- 全站静态化:Job Detail -->
<bean
id=
"generateNetHtmlJobDetail"
class=
"org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean"
>
<property
name=
"targetObject"
ref=
"triggerService"
/>
<property
name=
"targetMethod"
value=
"generateNetHtml"
/>
<property
name=
"concurrent"
value=
"false"
/>
</bean>
<!-- 全站静态化:Cron Trigger (quartz-2.x的配置) -->
<bean
id=
"generateNetHtmlTrigger"
class=
"org.springframework.scheduling.quartz.CronTriggerFactoryBean"
>
<property
name=
"jobDetail"
ref=
"generateNetHtmlJobDetail"
/>
<property
name=
"cronExpression"
value=
"0/3 * * * * ? *"
/>
</bean>
<!-- 启动触发器的配置开始 -->
<bean
name=
"startQuertz"
lazy-init=
"false"
autowire=
"no"
class=
"org.springframework.scheduling.quartz.SchedulerFactoryBean"
>
<property
name=
"triggers"
>
<list>
<ref
bean=
"generateNetHtmlTrigger"
/>
</list>
</property>
</bean>
</beans>
\ No newline at end of file
xxl-job-demo/src/main/resources/applicationcontext-tx.xml
0 → 100644
浏览文件 @
3e6851a2
<?xml version="1.0" encoding="UTF-8"?>
<beans
xmlns=
"http://www.springframework.org/schema/beans"
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xmlns:context=
"http://www.springframework.org/schema/context"
xmlns:aop=
"http://www.springframework.org/schema/aop"
xmlns:tx=
"http://www.springframework.org/schema/tx"
xsi:schemaLocation=
"
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-3.0.xsd
http://www.springframework.org/schema/aop
http://www.springframework.org/schema/aop/spring-aop-3.0.xsd
http://www.springframework.org/schema/tx
http://www.springframework.org/schema/tx/spring-tx-3.0.xsd"
>
<!-- 事务管理器(声明式事务) -->
<bean
id=
"transactionManager"
class=
"org.springframework.jdbc.datasource.DataSourceTransactionManager"
>
<property
name=
"dataSource"
ref=
"dataSource"
/>
</bean>
<!-- 启动事务注解(方式1:注解方式) -->
<tx:annotation-driven
transaction-manager=
"transactionManager"
proxy-target-class=
"true"
/>
<!-- 事务通知(方式2:XML事务管理) -->
<tx:advice
id=
"txAdvice"
transaction-manager=
"transactionManager"
>
<tx:attributes>
<tx:method
name=
"detail*"
propagation=
"SUPPORTS"
/>
<tx:method
name=
"visit*"
propagation=
"SUPPORTS"
/>
<tx:method
name=
"get*"
propagation=
"SUPPORTS"
/>
<tx:method
name=
"find*"
propagation=
"SUPPORTS"
/>
<tx:method
name=
"check*"
propagation=
"SUPPORTS"
/>
<tx:method
name=
"list*"
propagation=
"SUPPORTS"
/>
<tx:method
name=
"*"
propagation=
"REQUIRED"
rollback-for=
"exception"
/>
</tx:attributes>
</tx:advice>
<!-- AOP配置 -->
<aop:config>
<!-- 定义一个切入点 -->
<aop:pointcut
id=
"txoperation"
expression=
"execution(* com.xxl.service.imp.*.*(..))"
/>
<!-- 切入点事务通知 -->
<aop:advisor
pointcut-ref=
"txoperation"
advice-ref=
"txAdvice"
/>
</aop:config>
</beans>
\ No newline at end of file
xxl-job-demo/src/main/resources/freemarker.properties
0 → 100644
浏览文件 @
3e6851a2
template_update_delay
=
0
default_encoding
=
UTF-8
output_encoding
=
UTF-8
locale
=
zh_CN
number_format
=
0.##########
date_format
=
yyyy-MM-dd
time_format
=
HH:mm:ss
datetime_format
=
yyyy-MM-dd HH:mm:s
classic_compatible
=
true
template_exception_handler
=
ignore
\ No newline at end of file
xxl-job-demo/src/main/resources/freemarker.variables.properties
0 → 100644
浏览文件 @
3e6851a2
# 静态文件地址
static_url
=
https://www.baidu.com/
\ No newline at end of file
xxl-job-demo/src/main/resources/jdbc.properties
0 → 100644
浏览文件 @
3e6851a2
c3p0.driverClass
=
com.mysql.jdbc.Driver
c3p0.url
=
jdbc:mysql://localhost:3306/test?Unicode=true&characterEncoding=UTF-8
c3p0.user
=
root
c3p0.password
=
root_pwd
\ No newline at end of file
xxl-job-demo/src/main/resources/log4j.properties
0 → 100644
浏览文件 @
3e6851a2
log4j.rootLogger
=
info,console
log4j.appender.console
=
org.apache.log4j.ConsoleAppender
log4j.appender.console.layout
=
org.apache.log4j.PatternLayout
log4j.appender.console.layout.ConversionPattern
=
%d - xxl-job-demo - %p [%c] - <%m>%n
log4j.appender.logFile
=
org.apache.log4j.DailyRollingFileAppender
log4j.appender.logFile.File
=
${catalina.base}/logs/xxl-job-demo.log
log4j.appender.logFile.layout
=
org.apache.log4j.PatternLayout
log4j.appender.logFile.layout.ConversionPattern
=
%d - xxl-job-demo - %p [%c] - <%m>%n
xxl-job-demo/src/main/resources/springmvc-context.xml
0 → 100644
浏览文件 @
3e6851a2
<?xml version="1.0" encoding="UTF-8"?>
<beans
xmlns=
"http://www.springframework.org/schema/beans"
xmlns:aop=
"http://www.springframework.org/schema/aop"
xmlns:context=
"http://www.springframework.org/schema/context"
xmlns:p=
"http://www.springframework.org/schema/p"
xmlns:tx=
"http://www.springframework.org/schema/tx"
xmlns:mvc=
"http://www.springframework.org/schema/mvc"
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-3.0.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-3.0.xsd
http://www.springframework.org/schema/aop
http://www.springframework.org/schema/aop/spring-aop-3.0.xsd
http://www.springframework.org/schema/tx
http://www.springframework.org/schema/tx/spring-tx-3.0.xsd
http://www.springframework.org/schema/mvc
http://www.springframework.org/schema/mvc/spring-mvc-3.0.xsd"
>
<description>
Spring-web MVC配置
</description>
<mvc:annotation-driven
/>
<context:component-scan
base-package=
"com.xxl.controller"
/>
<mvc:resources
mapping=
"/favicon.ico"
location=
"/favicon.ico"
/>
<mvc:resources
mapping=
"/static/**"
location=
"/static/"
/>
<bean
id=
"viewResolver"
class=
"org.springframework.web.servlet.view.freemarker.FreeMarkerViewResolver"
>
<property
name=
"viewClass"
value=
"org.springframework.web.servlet.view.freemarker.FreeMarkerView"
/>
<!-- 解析视图模板类 -->
<property
name=
"prefix"
value=
""
/>
<!-- 模板前后缀,指定html页面为模板 -->
<property
name=
"suffix"
value=
".ftl"
/>
<property
name=
"contentType"
value=
"text/html;charset=UTF-8"
/>
<!-- 模板输出内容编码 (此处应与defaultEncoding保持一致) -->
<property
name=
"exposeSpringMacroHelpers"
value=
"true"
/>
<!-- 访问Request/Session宏助手 -->
<property
name=
"exposeRequestAttributes"
value=
"true"
/>
<!-- 允许访问Request属性,默认为false -->
<property
name=
"exposeSessionAttributes"
value=
"true"
/>
<!-- 允许访问Session属性,默认为false -->
<property
name=
"requestContextAttribute"
value=
"request"
/>
<!-- 将HttpServletRequest的属性存放到request这个变量中 -->
<property
name=
"cache"
value=
"true"
/>
<property
name=
"order"
value=
"0"
/>
</bean>
<!-- <mvc:interceptors>
<mvc:interceptor>
<mvc:mapping path="/**"/>
<bean class="com.xxl.controller.interceptor.PermissionInterceptor"/>
</mvc:interceptor>
</mvc:interceptors>
<bean id="exceptionResolver" class="com.xxl.controller.resolver.WebExceptionResolver" /> -->
</beans>
\ No newline at end of file
xxl-job-demo/src/main/webapp/WEB-INF/web.xml
0 → 100644
浏览文件 @
3e6851a2
<?xml version="1.0" encoding="UTF-8"?>
<web-app
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xmlns=
"http://java.sun.com/xml/ns/javaee"
xmlns:web=
"http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
xsi:schemaLocation=
"http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
id=
"WebApp_ID"
version=
"2.5"
>
<display-name>
xxl-job-demo
</display-name>
<context-param>
<param-name>
contextConfigLocation
</param-name>
<param-value>
classpath*:applicationcontext-*.xml
</param-value>
</context-param>
<listener>
<listener-class>
org.springframework.web.util.Log4jConfigListener
</listener-class>
</listener>
<listener>
<listener-class>
org.springframework.web.context.ContextLoaderListener
</listener-class>
</listener>
<filter>
<filter-name>
encodingFilter
</filter-name>
<filter-class>
org.springframework.web.filter.CharacterEncodingFilter
</filter-class>
<init-param>
<param-name>
encoding
</param-name>
<param-value>
UTF-8
</param-value>
</init-param>
<init-param>
<param-name>
forceEncoding
</param-name>
<param-value>
true
</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>
encodingFilter
</filter-name>
<url-pattern>
/*
</url-pattern>
</filter-mapping>
<servlet>
<servlet-name>
springmvc
</servlet-name>
<servlet-class>
org.springframework.web.servlet.DispatcherServlet
</servlet-class>
<init-param>
<param-name>
contextConfigLocation
</param-name>
<param-value>
classpath*:springmvc-context.xml
</param-value>
</init-param>
<load-on-startup>
1
</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>
springmvc
</servlet-name>
<url-pattern>
/
</url-pattern>
</servlet-mapping>
<welcome-file-list>
<welcome-file>
index.html
</welcome-file>
</welcome-file-list>
</web-app>
\ No newline at end of file
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论