Srping3.24环境搭建
3.X对比与2.5变化是在有点大.各种jar要找.
给自己做个记录,以免又忘了。
[color=orange]Spring AOP[/color]
除了官方的JAR 还需要导入三个jar: aopalliance.jar,aspectjrt.jar和aspectjweaver.jar;
JDBC
需要commons-collections-3.1.jar,commons-dbcp-1.2.2.jar,commons-pool.jar
附带applactionContext.xml模板
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:p="http://www.springframework.org/schema/p"
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:context="http://www.springframework.org/schema/context"
xsi:schemaLocation="http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-3.2.xsd
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.2.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.2.xsd
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-3.2.xsd">
<bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource">
<property name="driverClassName" value="com.mysql.jdbc.Driver"></property>
<property name="username" value="root"></property>
<property name="password" value="meetrend"></property>
<property name="url" value="jdbc:mysql://XXX.XX.XXX:3306/msp?useUnicode=true&amp;characterEncoding=utf-8"></property>
</bean>
<bean id="feeDao" class="SpringAop.dao.impl.feedaoImpl">
<property name="dataSource" ref="dataSource"></property>
<property name="password" value="123456"></property>
</bean>
<bean id="spel" class="SpringAop.sqel.spelTest">
<property name="passWord" value="#{feeDao.password}"/>
</bean>
<bean id="record" class="SpringAop.aspect.record"></bean>
<aop:config
proxy-target-class="true">
<aop:aspect id="feeImpl" ref="record">
<aop:pointcut expression="execution(* SpringAop.dao.*.*(..))" id="point"/>
<aop:after method="record" pointcut-ref="point"/>
</aop:aspect>
</aop:config>
</beans>
分享到:
相关推荐
搭建spring源码阅读环境搭建
用于Spring 5.0.x基础环境搭建使用的java环境和打包编译环境, 配套使用, 出现错误几率更小
本人愚钝,实验了好久,才将spring4.x的RESTful使用实验出来,欣喜之余,和大家分享一下经验。
1 想学习SpringSecurity3.x对项目进行安全框架搭建的同学 2 想使用JasperReport5.1+Ireport5.1 进行报表设计的同学 3 你可以获取一个已经搭建好的安全管理平台 4 不用在网上找例子,就算找到也运行不了,该课程...
ssh的整合已是非常常见,但是struts2,spring ,jpa的整合网上资料不是很多,而且多半没有完整的,此文档,从jar开始,到整个环境的搭建运行,是个不错的学习整合资料,感兴趣的朋友可以下载学习!
??课程由浅入深,从项目开发环境搭建到SpringMVC到使用,重点讲解在企业项目开发中Spring常用功能,结合实际案例进行阶梯式讲解,整合实际开发中使用的工具代码。
这个包用于Java开发,方便于开发阶段搭建环境。 测试过没有问题,分享给大家!O(∩_∩)O哈哈~
我编译的版本为spring framework 5.x版本,所用软件:idea 2018.2 ,gradle5.6.4。 第一步:获取spring-framework 源码 ,地址为:https://github.com/spring-projects/spring-framework/tree/5.0.x 第二步:导入...
Struts2+Spring+Hibernate 中的Action单元测试环境搭建 在软件开发中,单元测试是一种非常重要的测试方法,可以帮助我们确保代码的可靠性和稳定性。在 Struts2+Spring+Hibernate 框架中,对 Action 的单元测试环境...
目标:本示例说明Spring Cloud的高可以用服务中心的搭建。也就是解决当一个服务注册中心当机后,我们可以提供多个服务注册副本来解决服务查询不到的问题,从达到在微服开发中实现高可用注册中心的功能。 开发环境:...
01 Activiti介绍与搭建开发环境 02 运行官方例子 03 编写第一个Activiti程序 04 流程引擎配置与服务组件 05 Activiti数据库介绍 06 API(1)Activiti数据查询 07 API(2)流程文件部署 08 API(3)流程定义 09 API...
通过选用SpringBoot简化了项目配置和搭建的过程,SSM框架提供了完善的后端架构支持,JSP作为前端展示技术便于页面设计与交互实现,而MySQL 8.x则为系统提供了稳定可靠的数据存储环境。这些技术的结合使得图书管理...
SpringCloud(Eureka+Gateway) Finchley.SR3 MySQL 5.7 Redis LCN5.0.2 准备: 3.1搭建好Redis和MySQL SQL建表语句(在txlcn-tm模块的resource目录下) /* Navicat Premium Data Transfer Source Server...
技术选型和环境搭建:根据项目需求,选择合适的开发语言和框架,如Java语言和Spring框架。同时,需要搭建开发环境,包括安装IDE、配置开发服务器等。 数据库设计和开发:设计数据库结构,包括表结构和关系设计,使用...
3.tomcat环境:Tomcat 7.x,8.x,9.x版本均可 4.硬件环境:windows 7/8/10 1G内存以上;或者 Mac OS; 5.数据库:MySql 8.0/5.7版本; 6.是否Maven项目:是; 技术栈 1. springboot 2. mybatis 3. layUi 4. JSP ...
主要介绍了springboot-2.3.x最新版源码阅读环境搭建(基于gradle构建),需要的朋友可以参考下
11.10.3. 查看并启动Ambari-server 37 11.10.4. Ambari登陆 38 11.11. Ambari集群搭建(所有agent节点机器操作) 38 11.11.1. 安装agent 38 11.11.2. 部署Agent 39 11.11.3. 创建集群: 39 11.11.4. 存储库地址配置...
开发环境:IDEA集成开发工具,JDK 1.8 使用步骤:下载资源后解压项目,使用IDEA导入项目文件。 ... ... 3. 在浏览器中打开一个窗口的地址栏,输入:...使用对象:想学习使用Spring 5.x版本实现的Spring Cloud编程的小白。