切换测试环境应用端口、logback换为log4j
This commit is contained in:
parent
1260faa8bc
commit
8e76caf137
16
pom.xml
16
pom.xml
|
|
@ -81,20 +81,8 @@
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.slf4j</groupId>
|
<groupId>org.slf4j</groupId>
|
||||||
<artifactId>slf4j-api</artifactId>
|
<artifactId>slf4j-log4j12</artifactId>
|
||||||
<version>1.7.12</version>
|
<version>1.7.13</version>
|
||||||
</dependency>
|
|
||||||
|
|
||||||
<dependency>
|
|
||||||
<groupId>ch.qos.logback</groupId>
|
|
||||||
<artifactId>logback-core</artifactId>
|
|
||||||
<version>1.1.2</version>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
<dependency>
|
|
||||||
<groupId>ch.qos.logback</groupId>
|
|
||||||
<artifactId>logback-classic</artifactId>
|
|
||||||
<version>1.1.2</version>
|
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
package com.ifish.action;
|
package com.ifish.action;
|
||||||
|
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
|
import org.apache.log4j.Logger;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Controller;
|
import org.springframework.stereotype.Controller;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
|
@ -29,6 +30,8 @@ import com.ifishNew.help.FastDFSClientI;
|
||||||
@Controller
|
@Controller
|
||||||
public class AdInfoAction {
|
public class AdInfoAction {
|
||||||
|
|
||||||
|
private Logger log = Logger.getLogger(AdInfoAction.class);
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private AdInfoService adInfoService;
|
private AdInfoService adInfoService;
|
||||||
/**
|
/**
|
||||||
|
|
@ -87,6 +90,7 @@ public class AdInfoAction {
|
||||||
} catch (IfishException e) {
|
} catch (IfishException e) {
|
||||||
throw e;
|
throw e;
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
log.error(this.getClass().getName(),e);
|
||||||
throw new IfishException(SysUserEnum.warn113);
|
throw new IfishException(SysUserEnum.warn113);
|
||||||
}
|
}
|
||||||
adInfo.setAdImage(newImgName);
|
adInfo.setAdImage(newImgName);
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,8 @@
|
||||||
c3p0.driverClassName=com.mysql.jdbc.Driver
|
c3p0.driverClassName=com.mysql.jdbc.Driver
|
||||||
c3p0.url=jdbc\:mysql\://localhost\:3306/myfishdb?characterEncoding\=UTF-8
|
c3p0.url=jdbc\:mysql\://localhost\:3306/myfishdb?characterEncoding\=UTF-8
|
||||||
c3p0.username=ifish
|
#c3p0.url=jdbc\:mysql\://139.196.24.156\:3306/myfishdb?characterEncoding\=UTF-8
|
||||||
c3p0.password=ifish7pwd
|
c3p0.username=root
|
||||||
|
c3p0.password=ifish7mysql
|
||||||
#c3p0.username=root
|
#c3p0.username=root
|
||||||
#c3p0.password=123456
|
#c3p0.password=123456
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,41 @@
|
||||||
|
log4j.rootLogger=INFO,CONSOLE,FILE,ROLLING_FILE
|
||||||
|
###################
|
||||||
|
# Console Appender
|
||||||
|
###################
|
||||||
|
log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender
|
||||||
|
log4j.appender.Threshold=INFO
|
||||||
|
log4j.appender.CONSOLE.Target=System.out
|
||||||
|
log4j.appender.CONSOLE.layout=org.apache.log4j.PatternLayout
|
||||||
|
log4j.appender.CONSOLE.layout.ConversionPattern=[ifish7System][%-5p]%d - (%F:%L) - %m%n
|
||||||
|
|
||||||
|
########################
|
||||||
|
# [INFO]Daily Rolling File
|
||||||
|
########################
|
||||||
|
log4j.appender.FILE=org.apache.log4j.DailyRollingFileAppender
|
||||||
|
log4j.appender.FILE.Threshold=INFO
|
||||||
|
log4j.appender.FILE.File=/logs/ifishSystem/ifish7System_ALL.log
|
||||||
|
log4j.appender.FILE.Append=true
|
||||||
|
log4j.appender.FILE.ImmediateFlush = true
|
||||||
|
log4j.appender.FILE.DatePattern='.'yyyy-MM-dd
|
||||||
|
log4j.appender.FILE.layout=org.apache.log4j.PatternLayout
|
||||||
|
log4j.appender.FILE.layout.ConversionPattern=[ifish7System][%-5p]%d - %c.%t(%F:%L) - %m%n
|
||||||
|
|
||||||
|
########################
|
||||||
|
# [ERROR]Rolling File
|
||||||
|
########################
|
||||||
|
log4j.appender.ROLLING_FILE=org.apache.log4j.DailyRollingFileAppender
|
||||||
|
log4j.appender.ROLLING_FILE.Threshold=ERROR
|
||||||
|
log4j.appender.ROLLING_FILE.File=/logs/ifishSystem/ifish7System_ERROR.log
|
||||||
|
log4j.appender.ROLLING_FILE.Append=true
|
||||||
|
log4j.appender.ROLLING_FILE.ImmediateFlush = true
|
||||||
|
log4j.appender.ROLLING_FILE.DatePattern='.'yyyy-MM-dd
|
||||||
|
log4j.appender.ROLLING_FILE.layout=org.apache.log4j.PatternLayout
|
||||||
|
log4j.appender.ROLLING_FILE.layout.ConversionPattern=[ifish7System][%-5p]%d - %c.%t(%F:%L) - %m%n
|
||||||
|
|
||||||
|
log4j.logger.org.springframework=INFO
|
||||||
|
log4j.logger.com.ibatis=ERROR
|
||||||
|
log4j.logger.java.sql=INFO
|
||||||
|
log4j.logger.com.travelsky.ypb.service.persistent=ERROR
|
||||||
|
log4j.logger.com.taobao.diamond=ERROR
|
||||||
|
log4j.logger.com.umetrip.consumer=ERROR
|
||||||
|
log4j.logger.com.umetrip.register=ERROR
|
||||||
|
|
@ -28,7 +28,7 @@
|
||||||
</appender>
|
</appender>
|
||||||
|
|
||||||
<!-- 将级别为“info”及大于“info”的日志信息传递给root处理,本身并不打印 -->
|
<!-- 将级别为“info”及大于“info”的日志信息传递给root处理,本身并不打印 -->
|
||||||
<root level="INFO">
|
<root level="DEBUG">
|
||||||
<!-- root将级别为“INFO”及大于“INFO”的日志信息交给已经配置好的名为“Console”的appender处理,“Console”appender将信息打印到Console; -->
|
<!-- root将级别为“INFO”及大于“INFO”的日志信息交给已经配置好的名为“Console”的appender处理,“Console”appender将信息打印到Console; -->
|
||||||
<appender-ref ref="file" />
|
<appender-ref ref="file" />
|
||||||
<!-- 标识这个appender将会添加到这个logger -->
|
<!-- 标识这个appender将会添加到这个logger -->
|
||||||
|
|
@ -27,4 +27,5 @@ fastDFS_url_local=http://139.196.24.156:83/
|
||||||
#FastDFS\u6587\u4ef6URL\u8bbf\u95ee\u8def\u5f84(\u6b63\u5f0f\u73af\u5883)
|
#FastDFS\u6587\u4ef6URL\u8bbf\u95ee\u8def\u5f84(\u6b63\u5f0f\u73af\u5883)
|
||||||
fastDFS_url_app=http://app.ifish7.com/
|
fastDFS_url_app=http://app.ifish7.com/
|
||||||
#\u73af\u5883(local:\u672c\u5730\u73af\u5883,test:\u6d4b\u8bd5\u73af\u5883,\u6b63\u5f0f\u73af\u5883:product)
|
#\u73af\u5883(local:\u672c\u5730\u73af\u5883,test:\u6d4b\u8bd5\u73af\u5883,\u6b63\u5f0f\u73af\u5883:product)
|
||||||
|
#env=test
|
||||||
env=product
|
env=product
|
||||||
|
|
@ -10,11 +10,8 @@
|
||||||
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.1.xsd
|
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.1.xsd
|
||||||
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-4.1.xsd
|
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-4.1.xsd
|
||||||
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-4.1.xsd
|
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-4.1.xsd
|
||||||
http://www.springframework.org/schema/webflow-config http://www.springframework.org/schema/webflow-config/spring-webflow-config-2.0.xsd
|
|
||||||
http://www.springframework.org/schema/jee http://www.springframework.org/schema/jee/spring-jee-4.1.xsd
|
http://www.springframework.org/schema/jee http://www.springframework.org/schema/jee/spring-jee-4.1.xsd
|
||||||
http://www.springframework.org/schema/jms http://www.springframework.org/schema/jms/spring-jms-4.1.xsd
|
|
||||||
http://www.springframework.org/schema/lang http://www.springframework.org/schema/lang/spring-lang-4.1.xsd
|
http://www.springframework.org/schema/lang http://www.springframework.org/schema/lang/spring-lang-4.1.xsd
|
||||||
http://www.springframework.org/schema/osgi http://www.springframework.org/schema/osgi/spring-osgi-1.2.xsd
|
|
||||||
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-4.1.xsd
|
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-4.1.xsd
|
||||||
http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-4.1.xsd
|
http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-4.1.xsd
|
||||||
http://www.springframework.org/schema/task http://www.springframework.org/schema/task/spring-task.xsd
|
http://www.springframework.org/schema/task http://www.springframework.org/schema/task/spring-task.xsd
|
||||||
|
|
|
||||||
|
|
@ -10,8 +10,8 @@
|
||||||
picturePath = request.getScheme() + "://" + request.getServerName() + ":81/";
|
picturePath = request.getScheme() + "://" + request.getServerName() + ":81/";
|
||||||
} //测试环境
|
} //测试环境
|
||||||
else if (IfishFileDirectory.env.equals("test")) {
|
else if (IfishFileDirectory.env.equals("test")) {
|
||||||
basePath = "http://139.196.24.156:83/";
|
basePath = "http://139.196.24.156:8080/";
|
||||||
picturePath = "http://139.196.24.156:83/";
|
picturePath = "http://139.196.24.156:8080/";
|
||||||
IMPath = "http://www.zhangxinyanv5.top/neteaseIM/im/index.html";
|
IMPath = "http://www.zhangxinyanv5.top/neteaseIM/im/index.html";
|
||||||
} //正式环境
|
} //正式环境
|
||||||
else if (IfishFileDirectory.env.equals("product")) {
|
else if (IfishFileDirectory.env.equals("product")) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue