java集成logback,Java 实战开发之spring、logback配置及chrome开发神器(六)

这一节学习spring的配置。

一、spring 配置

emall/src/main/resources/applicationContext.xml 文件配置

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: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/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">

emall/src/main/resources/applicationContext-datasource.xml文件配置:

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: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/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">

class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">

classpath:datasource.properties

dialect=mysql

emall/src/main/resources/datasource.properties

db.driverLocation=/WEB/java/mysql/mysql-connector-java-5.1.6-bin.jar

db.driverClassName=com.mysql.jdbc.Driver

db.url=jdbc:mysql://192.168.1.103:3306/emall?characterEncoding=utf-8

db.username=emall

db.password=518666

db.initialSize = 20

db.maxActive = 50

db.maxIdle = 20

db.minIdle = 10

db.maxWait = 10

db.defaultAutoCommit = true

db.minEvictableIdleTimeMillis = 3600000

二、logback 配置

emall/src/main/resources/logback.xml

UTF-8

[%d{HH:mm:ss.SSS}][%p][%c{40}][%t] %m%n

DEBUG

/WEB/java/tomcat/logs/emall.log

/WEB/java/tomcat/logs/emall.log.%d{yyyy-MM-dd}.gz

true

10

[%d{HH:mm:ss.SSS}][%p][%c{40}][%t] %m%n

/WEB/java/tomcat/logs/error.log

/WEB/java/tomcat/logs/error.log.%d{yyyy-MM-dd}.gz

true

10

[%d{HH:mm:ss.SSS}][%p][%c{40}][%t] %m%n

ERROR

ACCEPT

DENY

三、ftp 配置

emall/src/main/resources/emall.properties

ftp.server.ip=192.168.1.103

ftp.user=ftpuser

ftp.pass=123456

ftp.server.http.prefix=http://img.emall.com/

三、IDE设置

(1)、开启实时编译make project automatically

bV2nHt?w=966&h=504

(2)、对spring进行编辑

bV2nHP?w=968&h=500

四、Chrome开发神器Restlet Client和fe助手

chrome上边两个非常强大的插件:

fe助手:可以解析json字符串

bV2nJc?w=474&h=470

Restlet Client :可以模拟http请求

bV2nJi?w=1199&h=604

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值