- ubuntu12.04环境下使用kvm ioctl接口实现最简单的虚拟机
- Ubuntu 通过无线网络安装Ubuntu Server启动系统后连接无线网络的方法
- 在Ubuntu上搭建网桥的方法
- ubuntu 虚拟机上网方式及相关配置详解
CFSDN坚持开源创造价值,我们致力于搭建一个资源共享平台,让每一个IT人在这里找到属于你的精彩世界.
这篇CFSDN的博客文章SSM 整合的配合文件(分享)由作者收集整理,如果你对这篇文章有兴趣,记得点赞哟.
1.1 maven项目pom管理 。
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
|
<!--常量和版本号-->
<
properties
>
<
project.build.sourceEncoding
>UTF-8</
project.build.sourceEncoding
>
<
project.reporting.outputEncoding
>UTF-8</
project.reporting.outputEncoding
>
<
commons.beanutils
>1.9.3</
commons.beanutils
>
<
spring.version
>4.3.2.RELEASE</
spring.version
>
<
aspectj.version
>1.8.6</
aspectj.version
>
<
aspectj.weaver
>1.8.6</
aspectj.weaver
>
<
mybatis.spring.version
>1.3.0</
mybatis.spring.version
>
<
mybatis.version
>3.4.5</
mybatis.version
>
<
mysql.version
>5.1.32</
mysql.version
>
<
slf4j.version
>1.7.25</
slf4j.version
>
<
slf4j.log4j12.version
>1.7.25</
slf4j.log4j12.version
>
<
log4j.version
>1.2.17</
log4j.version
>
<
log4j.core.version
>2.3</
log4j.core.version
>
<
commons.logging.version
>1.2</
commons.logging.version
>
<
junit.version
>4.12</
junit.version
>
<
commons-fileupload.version
>1.3.1</
commons-fileupload.version
>
<
druid.version
>1.0.13</
druid.version
>
<
jstl.version
>1.2</
jstl.version
>
<
jsp-api.version
>2.0</
jsp-api.version
>
<
jackson.version
>2.9.2</
jackson.version
>
</
properties
>
<
dependencies
>
<!--数据连接池-->
<
dependency
>
<
groupId
>com.alibaba</
groupId
>
<
artifactId
>druid</
artifactId
>
<
version
>${druid.version}</
version
>
</
dependency
>
<
dependency
>
<
groupId
>commons-beanutils</
groupId
>
<
artifactId
>commons-beanutils</
artifactId
>
<
version
>${commons.beanutils}</
version
>
</
dependency
>
<!-- spring-core -->
<
dependency
>
<
groupId
>org.springframework</
groupId
>
<
artifactId
>spring-core</
artifactId
>
<
version
>${spring.version}</
version
>
</
dependency
>
<!-- spring-context -->
<
dependency
>
<
groupId
>org.springframework</
groupId
>
<
artifactId
>spring-context</
artifactId
>
<
version
>${spring.version}</
version
>
</
dependency
>
<!-- Spring AOP -->
<
dependency
>
<
groupId
>org.springframework</
groupId
>
<
artifactId
>spring-aop</
artifactId
>
<
version
>${spring.version}</
version
>
</
dependency
>
<!-- AspectJ Runtime -->
<
dependency
>
<
groupId
>org.aspectj</
groupId
>
<
artifactId
>aspectjrt</
artifactId
>
<
version
>${aspectj.version}</
version
>
</
dependency
>
<!-- AspectJ Weaver -->
<
dependency
>
<
groupId
>org.aspectj</
groupId
>
<
artifactId
>aspectjweaver</
artifactId
>
<
version
>${aspectj.weaver}</
version
>
</
dependency
>
<!-- Spring Jdbc 的支持 -->
<
dependency
>
<
groupId
>org.springframework</
groupId
>
<
artifactId
>spring-jdbc</
artifactId
>
<
version
>${spring.version}</
version
>
</
dependency
>
<!-- SpringMVC -->
<
dependency
>
<
groupId
>org.springframework</
groupId
>
<
artifactId
>spring-webmvc</
artifactId
>
<
version
>${spring.version}</
version
>
</
dependency
>
<!-- mybatis-spring 整合 -->
<
dependency
>
<
groupId
>org.mybatis</
groupId
>
<
artifactId
>mybatis-spring</
artifactId
>
<
version
>${mybatis.spring.version}</
version
>
</
dependency
>
<!-- Jackson Json处理工具包 -->
<
dependency
>
<
groupId
>com.fasterxml.jackson.core</
groupId
>
<
artifactId
>jackson-databind</
artifactId
>
<
version
>${jackson.version}</
version
>
</
dependency
>
<!-- mybatis -->
<
dependency
>
<
groupId
>org.mybatis</
groupId
>
<
artifactId
>mybatis</
artifactId
>
<
version
>${mybatis.version}</
version
>
</
dependency
>
<!-- MySql -->
<
dependency
>
<
groupId
>mysql</
groupId
>
<
artifactId
>mysql-connector-java</
artifactId
>
<
version
>${mysql.version}</
version
>
</
dependency
>
<!-- 文件上传组件 -->
<
dependency
>
<
groupId
>commons-fileupload</
groupId
>
<
artifactId
>commons-fileupload</
artifactId
>
<
version
>${commons-fileupload.version}</
version
>
</
dependency
>
<!-- JSP相关 -->
<
dependency
>
<
groupId
>jstl</
groupId
>
<
artifactId
>jstl</
artifactId
>
<
version
>${jstl.version}</
version
>
</
dependency
>
<
dependency
>
<
groupId
>javax.servlet</
groupId
>
<
artifactId
>jsp-api</
artifactId
>
<
version
>${jsp-api.version}</
version
>
<
scope
>provided</
scope
>
</
dependency
>
<!-- Test dependencies -->
<
dependency
>
<
groupId
>junit</
groupId
>
<
artifactId
>junit</
artifactId
>
<
version
>${junit.version}</
version
>
<
scope
>test</
scope
>
</
dependency
>
</
dependencies
>
<
build
>
<
defaultGoal
>install</
defaultGoal
>
<
plugins
>
<
plugin
>
<
groupId
>org.apache.maven.plugins</
groupId
>
<
artifactId
>maven-compiler-plugin</
artifactId
>
<
version
>3.6.1</
version
>
<
configuration
>
<
source
>1.8</
source
>
<
target
>1.8</
target
>
</
configuration
>
</
plugin
>
<
plugin
>
<
groupId
>org.apache.maven.plugins</
groupId
>
<
artifactId
>maven-resources-plugin</
artifactId
>
<
version
>3.0.2</
version
>
<
configuration
>
<
encoding
>UTF-8</
encoding
>
</
configuration
>
</
plugin
>
</
plugins
>
<!--IDEA编译src的java文件,而目录下的xml文件并不会一起打包,需要手动指定哪些配置文件需要读取-->
<
resources
>
<
resource
>
<
directory
>src/main/java</
directory
>
<
includes
>
<
include
>**/*.xml</
include
>
</
includes
>
</
resource
>
</
resources
>
</
build
>
|
1.2 Web.xml配置 。
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
|
<?
xml
version
=
"1.0"
encoding
=
"UTF-8"
?>
<
web-app
xmlns:xsi
=
"http://www.w3.org/2001/XMLSchema-instance"
xmlns
=
"http://java.sun.com/xml/ns/javaee"
xsi:schemaLocation
=
"http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
id
=
"WebApp_ID"
version
=
"3.0"
>
<
display-name
>ssm</
display-name
>
<!-- 编码过滤器 -->
<
filter
>
<
filter-name
>characterEncoding</
filter-name
>
<
filter-class
>org.springframework.web.filter.CharacterEncodingFilter</
filter-class
>
<
init-param
>
<
param-name
>encoding</
param-name
>
<
param-value
>UTF-8</
param-value
>
</
init-param
>
<
init-param
>
<
param-name
>forceEncoding</
param-name
>
<
param-value
>true</
param-value
>
</
init-param
>
</
filter
>
<
filter-mapping
>
<
filter-name
>characterEncoding</
filter-name
>
<
url-pattern
>/*</
url-pattern
>
</
filter-mapping
>
<!--//End 编码过滤器 -->
<!-- 将POST请求转化为DELETE或者是PUT 要用_method指定真正的请求参数 -->
<
filter
>
<
filter-name
>HttpMethodFilter</
filter-name
>
<
filter-class
>org.springframework.web.filter.HttpPutFormContentFilter</
filter-class
>
</
filter
>
<
filter-mapping
>
<
filter-name
>HttpMethodFilter</
filter-name
>
<
url-pattern
>/*</
url-pattern
>
</
filter-mapping
>
<
filter
>
<
filter-name
>HiddenHttpMethodFilter</
filter-name
>
<
filter-class
>org.springframework.web.filter.HiddenHttpMethodFilter</
filter-class
>
</
filter
>
<
filter-mapping
>
<
filter-name
>HiddenHttpMethodFilter</
filter-name
>
<
url-pattern
>/*</
url-pattern
>
</
filter-mapping
>
<!-- SpringMVC -->
<
servlet
>
<
servlet-name
>springmvc</
servlet-name
>
<
servlet-class
>org.springframework.web.servlet.DispatcherServlet</
servlet-class
>
<
init-param
>
<
param-name
>contextConfigLocation</
param-name
>
<
param-value
>classpath:springmvc.xml</
param-value
>
</
init-param
>
<
load-on-startup
>1</
load-on-startup
>
</
servlet
>
<
servlet-mapping
>
<
servlet-name
>springmvc</
servlet-name
>
<
url-pattern
>*.shtml</
url-pattern
>
</
servlet-mapping
>
<!-- //End SpringMVC -->
<
welcome-file-list
>
<
welcome-file
>index.shtml</
welcome-file
>
<
welcome-file
>index.htm</
welcome-file
>
<
welcome-file
>index.jsp</
welcome-file
>
<
welcome-file
>default.html</
welcome-file
>
<
welcome-file
>default.htm</
welcome-file
>
<
welcome-file
>default.jsp</
welcome-file
>
</
welcome-file-list
>
</
web-app
>
|
1.3 springmvc配置文件 。
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
<?
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:p
=
"http://www.springframework.org/schema/p"
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.xsd">
<!-- 包扫描 -->
<
context:component-scan
base-package
=
"cn.itcast"
/>
<!--视图解析器配置-->
<
bean
class
=
"org.springframework.web.servlet.view.InternalResourceViewResolver"
>
<
property
name
=
"prefix"
value
=
"/WEB-INF/jsp/"
/>
<
property
name
=
"suffix"
value
=
".jsp"
/>
</
bean
>
<!-- 文件上传解析器 -->
<
bean
id
=
"multipartResolver"
class
=
"org.springframework.web.multipart.commons.CommonsMultipartResolver"
>
<!-- 最大允许上传文件大小,单位byte -->
<
property
name
=
"maxUploadSize"
value
=
"100000000"
/>
</
bean
>
<!--引入spring配置-->
<
import
resource
=
"spring.xml"
/>
</
beans
>
|
1.4 spring配置文件 。
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
|
<?
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:p
=
"http://www.springframework.org/schema/p"
xmlns:context
=
"http://www.springframework.org/schema/context"
xmlns:mvc
=
"http://www.springframework.org/schema/mvc"
xmlns:tx
=
"http://www.springframework.org/schema/tx"
xmlns:aop
=
"http://www.springframework.org/schema/aop"
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.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">
<!-- 解析jdbc配置文件 -->
<
context:property-placeholder
location
=
"classpath:jdbc.properties"
/>
<!-- the transactional advice (what 'happens'; see the <aop:advisor/> bean
below) 事务传播特性配置 -->
<
tx:advice
id
=
"txAdvice"
transaction-manager
=
"txManager"
>
<!-- the transactional semantics... -->
<
tx:attributes
>
<
tx:method
name
=
"add*"
propagation
=
"REQUIRED"
isolation
=
"DEFAULT"
rollback-for
=
"java.lang.Exception"
/>
<
tx:method
name
=
"save*"
propagation
=
"REQUIRED"
isolation
=
"DEFAULT"
rollback-for
=
"java.lang.Exception"
/>
<
tx:method
name
=
"insert*"
propagation
=
"REQUIRED"
isolation
=
"DEFAULT"
rollback-for
=
"java.lang.Exception"
/>
<
tx:method
name
=
"update*"
propagation
=
"REQUIRED"
isolation
=
"DEFAULT"
rollback-for
=
"java.lang.Exception"
/>
<
tx:method
name
=
"modify*"
propagation
=
"REQUIRED"
isolation
=
"DEFAULT"
rollback-for
=
"java.lang.Exception"
/>
<
tx:method
name
=
"delete*"
propagation
=
"REQUIRED"
isolation
=
"DEFAULT"
rollback-for
=
"java.lang.Exception"
/>
<!-- 查询方法 -->
<
tx:method
name
=
"query*"
read-only
=
"true"
/>
<
tx:method
name
=
"select*"
read-only
=
"true"
/>
<
tx:method
name
=
"find*"
read-only
=
"true"
/>
</
tx:attributes
>
</
tx:advice
>
<!-- 配置事务管理器 -->
<
bean
id
=
"txManager"
class
=
"org.springframework.jdbc.datasource.DataSourceTransactionManager"
>
<
property
name
=
"dataSource"
ref
=
"dataSource"
/>
</
bean
>
<!-- 数据库基本信息配置 -->
<
bean
id
=
"dataSource"
class
=
"com.alibaba.druid.pool.DruidDataSource"
init-method
=
"init"
destroy-method
=
"close"
>
<
property
name
=
"driverClassName"
value
=
"${jdbc.driver}"
/>
<
property
name
=
"url"
value
=
"${jdbc.url}"
/>
<
property
name
=
"username"
value
=
"${jdbc.username}"
/>
<
property
name
=
"password"
value
=
"${jdbc.pwd}"
/>
</
bean
>
<!-- 声明式事务AOP配置 -->
<
aop:config
>
<
aop:pointcut
expression
=
"execution(* cn.itcast.service.impl.*.*(..))"
id
=
"tranpointcut"
/>
<
aop:advisor
advice-ref
=
"txAdvice"
pointcut-ref
=
"tranpointcut"
/>
</
aop:config
>
<!--SqlSessionFactoryBean的配置-->
<
bean
id
=
"sqlSessionFactoryBean"
class
=
"org.mybatis.spring.SqlSessionFactoryBean"
>
<!--
MyBatis别名
MyBatis配置文件
MyBatis配置映射文件
指定数据源
-->
<
property
name
=
"typeAliasesPackage"
value
=
"cn.itcast.model"
/>
<
property
name
=
"configLocation"
value
=
"classpath:mybatis.xml"
/>
<
property
name
=
"mapperLocations"
>
<
array
>
<
value
>classpath:cn/itcast/mapper/*Mapper.xml</
value
>
</
array
>
</
property
>
<
property
name
=
"dataSource"
ref
=
"dataSource"
/>
</
bean
>
<!--包扫描-->
<
bean
id
=
"mapperScannerConfigurer"
class
=
"org.mybatis.spring.mapper.MapperScannerConfigurer"
>
<!--指定对应接口的包路径-->
<
property
name
=
"basePackage"
value
=
"cn.itcast.mapper"
/>
<
property
name
=
"sqlSessionFactoryBeanName"
value
=
"sqlSessionFactoryBean"
/>
</
bean
>
</
beans
>
|
1.5 JDBC配置文件 。
1
2
3
4
|
jdbc.driver=com.mysql.jdbc.Driver
jdbc.url=jdbc:mysql://127.0.0.1:3306/crm?useUnicode=true&characterEncoding=utf8&autoReconnect=true
jdbc.username=root
jdbc.pwd=123456
|
1.6 Log4j配置文件 。
1
2
3
4
5
6
|
log4j.rootLogger=DEBUG,A1
log4j.logger.com.taotao = DEBUG
log4j.logger.org.mybatis = DEBUG
log4j.appender.A1=org.apache.log4j.ConsoleAppender
log4j.appender.A1.layout=org.apache.log4j.PatternLayout
log4j.appender.A1.layout.ConversionPattern=%-d{yyyy-MM-dd HH:mm:ss,SSS} [%t] [%c]-[%p] %m%n
|
1.7 MyBatis配置文件 。
1
2
3
4
5
6
|
<?
xml
version
=
"1.0"
encoding
=
"UTF-8"
?>
<!DOCTYPE configuration
PUBLIC "-//mybatis.org//DTD Config 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-config.dtd">
<
configuration
>
</
configuration
>
|
以上这篇SSM 整合的配合文件(分享)就是小编分享给大家的全部内容了,希望能给大家一个参考,也希望大家多多支持我.
原文链接:http://www.cnblogs.com/123-shen/archive/2017/12/20/8072608.html 。
最后此篇关于SSM 整合的配合文件(分享)的文章就讲到这里了,如果你想了解更多关于SSM 整合的配合文件(分享)的内容请搜索CFSDN的文章或继续浏览相关文章,希望大家以后支持我的博客! 。
我想在我的 EC2 实例 AWSFIS-Run-CPU-Stress 上运行 SSM 文档。它通过 AWS 故障注入(inject)模拟器 (FIS) 执行,这需要指定一个 documentARN,具
我正在尝试编写一个 lambda 来监听来自 CloudWatch 的参数存储更改事件,并通过调用 boto3.client('ssm').get_parameter_history(Name=eve
我有一个带有 CloudFormation 堆栈参数的 CDK 应用程序: project_name_param = cdk.CfnParameter( self, "ProjectN
我需要审核大量 AWS 账户以确定哪些 EC2 实例缺少 SSM 代理。然后我需要输出所有这些实例及其标签。 运行 aws ssm describe-instance-information 会列出所
背景 token的意思是“令牌”,是服务端生成的一串字符串,作为客户端进行请求的一个标识。 当用户第一次登录后,服务器生成一个token并将此token返回给客户端,以后客户端只需带上这个t
如果想用框架来实现验证码,可以看我的另外一篇: kaptcha 框架的使用很简单的。新手必备。 http://www.zzvips.com/article/171694.html 1、效果图
SpringBoot内部类注入 没有限制随意都能注入,会自动去找对应的内部类的,只要是能注入进容器中的,都能像正常的bean一样的使用 package com.service; import org
我在 lambda 中编写了 python 代码,用于从 SSM 运行命令,但出现错误错误 回复:{ "errorMessage": "2019-11-26T10:51:09.649Z d6a9aff
夏天到了、小雪来给大家降降温 话不多说、直接进入主题 主要功能模块设计: 登录注册、首页信息浏览、选课分类查看、选课详情查看、评论交流、收藏、浏览量、以及后台数据管理、用户
主要技术实现设计:spring、 springmvc、 springboot、 springboot security权限控制、mybatis 、session、 jquery 、 md5 、boo
主要功能设计: 用户、区域、物质类型、物质详情、物质申请和审核以及我的申请和通知公告以及灵活控制菜单权限 主要技术实现:spring、 springmvc、 springboot、sprin
第一次写上传图片的代码,碰到很多问题。昨天做了整整一天,终于在晚上的时候成功了。大声欢呼。 但是,做完之后,还是有很多问题想不通。所以在这里也算是写个笔记,日后忘记了可以回顾,也算请教各路朋友。(
1.1 maven项目pom管理 ? 1
我需要一些帮助/指导,了解如何安全访问 SSM 参数存储以获取现有 secureString 上的(已解密)值以用于其他 Terraform 资源? 例如,我们在 SSM 中存储了一个用于 CI 的
我已经编写了一个代码来为我获取 SSM 参数 import boto3 client = boto3.client('ssm') def lambda_handler(event, c
目录 咱们废话不多说进入主题、系统主页展示: 用户信息管理; 角色权限控制管理: 管理员查看灵活配置; 插入一小部分代码段 通知公告信息管
目录 1、基本概念 1.1、Spring 1.2、SpringMVC
我试过 moto,但我总是得到: botocore.exceptions.ClientError: An error occurred (UnrecognizedClientException) wh
我正在尝试同步一个 S3 存储桶,这需要将近 3 个小时才能完全同步。 同步桶.sh: nohup aws s3 sync "$source_bucket/$folder/" "s3://$desti
我有一个触发 Jenkins 工作的 lambda 函数。我想在添加新的 ssm 参数时调用此 lambda。我在 cloud-watch 事件模式中添加了以下自定义事件模式。 { "source
我是一名优秀的程序员,十分优秀!