SSM的相关配置文件
Spring框架
applicationContext.xml
Spring框架的核心配置文件
aspectJ框架的xml配置文件 applicationContext .xml
Spring MVC框架
springmvc-servlet.xml
控制层配置文件
转发器DispatcherServlet中的web.xml
作为底层支撑的Servlet版本至少要在3.1以上
SpringMVC
springmvc
org.springframework.web.servlet.DispatcherServlet
1
springmvc
/
MyBatis框架
UserMapper.xml
映射
insert into user (uname,usex) values(#{uname},#{usex})
update user set uname = #{uname}, usex = #{usex} where uid = #{uid}
delete from user where uid = #{uid}
mybatis-config.xml~~~~
PUBLIC "-//mybatis.org//DTD Config 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-config.dtd">
generatorConfig.xml
PUBLIC "-//mybatis.org//DTD MyBatis Generator Configuration 1.0//EN"
"http://mybatis.org/dtd/mybatis-generator-config_1_0.dtd">
mybatis-generator的核心依赖
3.2.5
3.4.6
5.1.38
1.0
1.3.5
tk.mybatis.mapper.generator.MapperPlugin
tk.mybatis.mapper.common.Mapper
org.mybatis
mybatis
${mybatis.version}
mysql
mysql-connector-java
${jdbc.driver.version}
runtime
tk.mybatis
mapper
${tk.mybatis.version}
//MyMapper通用接口
/*
- The MIT License (MIT)
*
- Copyright (c) 2014-2016 [email protected]
*
- Permission is hereby granted, free of charge, to any person obtaining a copy
- of this software and associated documentation files (the "Software"), to deal
- in the Software without restriction, including without limitation the rights
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- copies of the Software, and to permit persons to whom the Software is
- furnished to do so, subject to the following conditions:
*
- The above copyright notice and this permission notice shall be included in
- all copies or substantial portions of the Software.
*
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- THE SOFTWARE.
*/
package com.mmall.util;
import tk.mybatis.mapper.common.Mapper;
import tk.mybatis.mapper.common.MySqlMapper;
/**
- 继承自己的MyMapper
*
- @author liuzh
- @since 2015-09-06 21:53
*/
public interface MyMapper
//TODO
//FIXME 特别注意,该接口不能被扫描到,否则会出错
}
mybatis-generator的maven手动命令所需要的插件
org.mybatis.generator
mybatis-generator-maven-plugin
${mybatis.generator.version}
generatorConfig.xml
true
false
org.mybatis
mybatis
${mybatis.version}
tk.mybatis
mapper
${tk.mybatis.version}
mysql
mysql-connector-java
${jdbc.driver.version}
runtime
org.mybatis.generator
mybatis-generator-core
${mybatis.generator.version}
log4j.properties
# Global logging configuration 错误信息打印
log4j.rootLogger=ERROR, stdout
# MyBatis logging configuration... 对应的包打印追踪
log4j.logger.com.octupus = TRACE
# Console output... 打印格式
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
log4j.appender.stdout.layout.ConversionPattern=%5p [%t] - %m%n
db.properties
jdbc.jdbcUrl=jdbc:mysql://localhost:3306/springtest
jdbc.driverClass=com.mysql.jdbc.Driver?useUnicode=true&characterEncoding=utf8
jdbc.user=root
jdbc.password=root
SSM模板整合框架配置文件
# Global logging configuration 错误信息打印
log4j.rootLogger=ERROR, stdout
# MyBatis logging configuration... 对应的包打印追踪
log4j.logger.com.ssmdemo = TRACE
# Console output... 打印格式
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
log4j.appender.stdout.layout.ConversionPattern=%5p [%t] - %m%n
PUBLIC "-//mybatis.org//DTD//EN"
"http://mybatis.org/dtd/mybatis-3-config.dtd">
SSM框架中的web.xml
xmlns="http://xmlns.jcp.org/xml/ns/javaee"
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_4_0.xsd"
id="WebApp_ID" version="4.0">
logback的配置文件
logback
DEBUG
%d [%thread] %-5level %logger{36} [%file : %line] - %msg%n
${scheduler.manager.server.home}/logs/${app.name}.log
${scheduler.manager.server.home}/logs/${app.name}.%d{yyyy-MM-dd.HH}.log.gz
60
20GB
100MB
%d [%thread] %-5level %logger{36} [%file : %line] - %msg%n
ftp服务器防火墙的配置
A INPUT -p TCP --dport 61001:62000 -J ACCEPT
A ONPUT -p TCP --sport 61001:62000 -J ACCEPT
A INPUT -p TCP --dport 20 -J ACCEPT
A ONPUT -p TCP --sport 20 -J ACCEPT
A INPUT -p TCP --dport 21 -J ACCEPT
A ONPUT -p TCP --dport 21 -J ACCEPT