大战熟女丰满人妻av-荡女精品导航-岛国aaaa级午夜福利片-岛国av动作片在线观看-岛国av无码免费无禁网站-岛国大片激情做爰视频

互聯(lián)網(wǎng)P2P金融項(xiàng)目
互聯(lián)網(wǎng)P2P金融項(xiàng)目架構(gòu)搭建
互聯(lián)網(wǎng)P2P金融項(xiàng)目業(yè)務(wù)功能

Java定時(shí)任務(wù)項(xiàng)目

項(xiàng)目名稱:p2p-timer

pom.xml文件

<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>p2p-parent</artifactId>
        <groupId>com.bjpowernode.p2p</groupId>
        <version>1.0.0</version>
        <relativePath>../p2p-parent/pom.xml</relativePath>
    </parent>
    <modelVersion>4.0.0</modelVersion>

    <artifactId>p2p-timer</artifactId>
    <packaging>war</packaging>

    <dependencies>

        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-context</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-aop</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-core</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-beans</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-jdbc</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-tx</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-web</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-webmvc</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-oxm</artifactId>
        </dependency>

        <!-- servlet及jstl標(biāo)簽庫(kù)依賴的JAR配置 -->
        <dependency>
            <groupId>javax.servlet</groupId>
            <artifactId>javax.servlet-api</artifactId>
        </dependency>
        <dependency>
            <groupId>javax.servlet.jsp.jstl</groupId>
            <artifactId>jstl-api</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.taglibs</groupId>
            <artifactId>taglibs-standard-spec</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.taglibs</groupId>
            <artifactId>taglibs-standard-impl</artifactId>
        </dependency>

        <!-- zookeeper客戶端依賴 -->
        <dependency>
            <groupId>com.101tec</groupId>
            <artifactId>zkclient</artifactId>
        </dependency>

        <!-- Log4j的配置start -->
        <dependency>
            <groupId>log4j</groupId>
            <artifactId>log4j</artifactId>
            <version>1.2.17</version>
        </dependency>


        <!--dubbo2.6.0-->
        <dependency>
            <groupId>com.alibaba</groupId>
            <artifactId>dubbo</artifactId>
        </dependency>

        <!--P2P的接口工程-->
        <dependency>
            <groupId>com.bjpowernode.p2p</groupId>
            <artifactId>p2p-exterface</artifactId>
            <version>1.0.0</version>
        </dependency>

        <!--p2p-common公共工程-->
        <dependency>
            <groupId>com.bjpowernode.p2p</groupId>
            <artifactId>p2p-common</artifactId>
            <version>1.0.0</version>
        </dependency>

    </dependencies>

</project>

Dubbo服務(wù)消費(fèi)者配置文件

文件名稱:applicationContext-dubbo-consumer.xml

<?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:dubbo="http://code.alibabatech.com/schema/dubbo"
       xsi:schemaLocation="http://www.springframework.org/schema/beans
            http://www.springframework.org/schema/beans/spring-beans.xsd
            http://code.alibabatech.com/schema/dubbo
            http://code.alibabatech.com/schema/dubbo/dubbo.xsd">
    <!-- 配置應(yīng)用名稱 -->
    <dubbo:application name="p2p"/>
    <!-- 配置注冊(cè)中心 -->
    <dubbo:registry protocol="zookeeper" address="192.168.31.128:2181"/>


</beans>

Spring定時(shí)器配置文件

文件名稱:applicationContext-task.xml

<?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:aop="http://www.springframework.org/schema/aop"
       xmlns:tx="http://www.springframework.org/schema/tx"
       xmlns:jdbc="http://www.springframework.org/schema/jdbc"
       xmlns:util="http://www.springframework.org/schema/util"
       xmlns:task="http://www.springframework.org/schema/task"
       xmlns:context="http://www.springframework.org/schema/context"
       xsi:schemaLocation="
            http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd
            http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
            http://www.springframework.org/schema/jdbc http://www.springframework.org/schema/jdbc/spring-jdbc.xsd
            http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx.xsd
            http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop.xsd
            http://www.springframework.org/schema/task http://www.springframework.org/schema/task/spring-task.xsd
            http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util.xsd ">

    <!-- 自動(dòng)掃描的包名 -->
    <context:component-scan base-package="com.bjpowernode.p2p.timer"/>

    <task:annotation-driven/>
</beans>

Spring總配置文件

名稱文件:applicationContext.xml

<?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:p="http://www.springframework.org/schema/p"
       xmlns:aop="http://www.springframework.org/schema/aop"
       xmlns:tx="http://www.springframework.org/schema/tx"
       xmlns:task="http://www.springframework.org/schema/task"
       xsi:schemaLocation="
            http://www.springframework.org/schema/beans
            http://www.springframework.org/schema/beans/spring-beans.xsd
            http://www.springframework.org/schema/context
            http://www.springframework.org/schema/context/spring-context.xsd
            http://www.springframework.org/schema/tx
            http://www.springframework.org/schema/tx/spring-tx.xsd
            http://www.springframework.org/schema/aop
            http://www.springframework.org/schema/aop/spring-aop.xsd">

    <!-- 導(dǎo)入spring task配置文件-->
    <import resource="applicationContext-task.xml"/>

    <!-- 導(dǎo)入服務(wù)消費(fèi)者配置 -->
    <import resource="applicationContext-dubbo-consumer.xml" />
</beans>

log4j日志文件

log4j.rootLogger = info, stdout, file
### 輸出到控制臺(tái) ###
log4j.appender.stdout = org.apache.log4j.ConsoleAppender
log4j.appender.stdout.Target = System.out
log4j.appender.stdout.layout = org.apache.log4j.PatternLayout
log4j.appender.stdout.layout.ConversionPattern = [timer] %d{ABSOLUTE} %5p %c{1}:%L - %m%n

log4j.appender.file = org.apache.log4j.DailyRollingFileAppender
log4j.appender.file.File = /opt/task/timer/logs/log.log
log4j.appender.file.Append = true
log4j.appender.file.Threshold = debug
log4j.appender.file.layout = org.apache.log4j.PatternLayout
log4j.appender.file.layout.ConversionPattern = [timer] %-d{yyyy-MM-dd HH:mm:ss} [ %c{1} ] - [ %p ] %m%n

配置web.xml文件

<?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"
         xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
         id="dataservice" version="3.0">
    <display-name>timer application</display-name>
    <!-- spring監(jiān)聽(tīng)器加載applicationContext.xml配置文件 -->
    <context-param>
        <param-name>contextConfigLocation</param-name>
        <param-value>classpath:applicationContext.xml</param-value>
    </context-param>
    <listener>
        <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
    </listener>
</web-app>

 

全部教程
主站蜘蛛池模板: 国产一级一级一级成人毛片 | 狠狠插网站 | 国产欧美一区二区三区观看 | 免费一级毛片在线视频观看 | 波多野吉衣一区二区三区在线观看 | 高清视频 一区二区三区四区 | 国产综合久久久久影院 | 欧美激情亚洲精品日韩1区2区 | 亚洲第一伊人 | 国产成人精视频在线观看免费 | 99久久影视 | 香蕉网伊在线中文慕大全 | 综合88| 久久女人 | 亚洲精品丝袜在线一区波多野结衣 | 欧美日韩亚洲一区二区 | 69成人网| 久久人人爽人人爽 | 九九视频在线观看6 | 99久久中文字幕伊人 | 国产精品欧美亚洲韩国日本久久 | 国产99在线观看 | 日韩免费高清 | 亚洲天堂2015| 狠狠色狠狠色 | 激情综合婷婷 | 午夜久久免费视频 | 久久久窝窝午夜精品 | 国产成人a在一区线观看高清 | 欧美中文字幕在线视频 | 国产精品国产三级国产an | 高清国产在线 | 九月婷婷天天澡天天添天天爽 | 欧美日韩一区二区三区自拍 | 免费一看一级毛片全播放 | www.精品| 毛片视频免费 | 97神马| 久久久精品国产四虎影视 | 爱爱的免费视频 | 午夜999 |