IDEA创建SSM(Spring+SpringMVC+Mybatis)项目-Maven版

数据库的密码

password=admin

定义初始连接数

initialSize=1

定义最大连接数

maxActive=20

定义最大空闲

maxIdle=20

定义最小空闲

minIdle=1

定义最长等待时间

maxWait=60000

4.log4j.properties

#日志输出级别

log4j.rootLogger=debug,stdout,D,E

#设置stdout的日志输出控制台

log4j.appender.stdout=org.apache.log4j.ConsoleAppender

#输出日志到控制台的方式,默认为System.out

log4j.appender.stdout.Target = System.out

#设置使用灵活布局

log4j.appender.stdout.layout=org.apache.log4j.PatternLayout

#灵活定义输出格式

log4j.appender.stdout.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss,SSS} -[%p] method:[%c (%rms)] - %m%n

5.spring-mvc.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:mvc=“http://www.springframework.org/schema/mvc”

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/mvc

http://www.springframework.org/schema/mvc/spring-mvc-3.0.xsd">

<context:component-scan base-package=“com.sjsq”/>

mvc:annotation-driven/

mvc:default-servlet-handler/

6.web.xml

<?xml version="1.0" encoding="UTF-8"?>

contextConfigLocation

classpath:applicationContext.xml

org.springframework.web.context.ContextLoaderListener

springmvc

org.springframework.web.servlet.DispatcherServlet

contextConfigLocation

classpath:spring-mvc.xml

1

springmvc

*.do

index.jsp

7.pom.xml

<?xml version="1.0" encoding="UTF-8"?>

<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/maven-v4_0_0.xsd”>

4.0.0

war

MavenSSMDemo

com.sjsq

MavenSSMDemo

1.0-SNAPSHOT

org.mortbay.jetty

maven-jetty-plugin

6.1.7

8888

30000

  • 10
    点赞
  • 28
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值