datasource.properties模板和上传配置

好用请点赞收藏一波!

转发请带上作者名@LLLua和原文地址,谢谢!


db.driverLocation=/Users/imooc/mysql-connector-java-5.1.6-bin.jar
db.driverClassName=com.mysql.jdbc.Driver


db.url=jdbc:mysql://localhost:3306/xxx?characterEncoding=utf-8
db.username=
db.password=


db.initialSize = 20
db.maxActive = 50
db.maxIdle = 20
db.minIdle = 10
db.maxWait = 10
db.defaultAutoCommit = true
db.minEvictableIdleTimeMillis = 3600000

dispatcher-servlet.xml中采用spring的multipartResolver

<bean id="multipartResolver" class="org.springframework.web.multipart.commons.CommonsMultipartResolver">
    <property name="maxUploadSize" value="10485760"/> <!-- 10m -->
    <property name="maxInMemorySize" value="4096" />
    <property name="defaultEncoding" value="UTF-8"></property>
</bean>


阅读更多

没有更多推荐了,返回首页