package org.hxut.zyk;
import com.alibaba.druid.sql.repository.SchemaResolveVisitor;
import org.hxut.zyk.dao.AccountdaoImpl;
import org.hxut.zyk.service.AccountService;
import org.hxut.zyk.service.AccountServiceImpl;
import org.junit.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
public class test {
public static void main(String[] args) {
// 基于注解方式
ApplicationContext context= new ClassPathXmlApplicationContext("config.xml");
AccountServiceImpl accountserviceimpl1=context.getBean("accountServiceImpl",AccountServiceImpl.class);
accountserviceimpl1.change();
}
}
没有合适的资源?快使用搜索试试~ 我知道了~
温馨提示
注意:只是jdbc自带的jdbctample,不能 用于整合mybatis框架的事务,我整合了,事务不起作用!!!! 按老师的说法是基于xml方式,但不准确,因为也用到了注解 <aop:aspectj-autoproxy proxy-target-class="true"></aop:aspectj-autoproxy> xml中要有这句,可以解决子类类报错的问题。 或者去掉这句话,同时去掉public class AccountServiceImpl implements AccountService {继承关系,也可以解决
资源详情
资源评论
资源推荐
收起资源包目录
spring_SubmitByHand.zip (39个子文件)
spring_SubmitByHand
spring_SubmitByHand.iml 495B
src
config2.xml 3KB
config.xml 2KB
org
hxut
zyk
dao
AccountdaoImpl.java 762B
Accountdao.java 242B
test.java 881B
service
AccountServiceImpl.java 661B
AccountService.java 243B
.idea
uiDesigner.xml 9KB
misc.xml 278B
.name 24B
modules.xml 285B
workspace.xml 3KB
.gitignore 0B
libraries
lib.xml 266B
out
production
spring_SubmitByHand
config2.xml 3KB
config.xml 2KB
org
hxut
zyk
dao
Accountdao.class 165B
AccountdaoImpl.class 1KB
test.class 908B
service
AccountServiceImpl.class 847B
AccountService.class 153B
lib
spring-expression-5.2.6.RELEASE.jar 276KB
spring-beans-5.2.6.RELEASE.jar 670KB
commons-logging-1.1.1-1.0.0.jar 63KB
spring-orm-5.2.6.RELEASE.jar 196KB
spring-aspects-5.2.6.RELEASE.jar 46KB
spring-jdbc-5.2.6.RELEASE.jar 398KB
mysql-connector-java-5.1.49.jar 983KB
hamcrest-core-1.3.jar 44KB
com.springsource.org.aopalliance-1.0.0.jar 5KB
spring-aop-5.2.6.RELEASE.jar 364KB
spring-tx-5.2.6.RELEASE.jar 307KB
aspectjweaver-1.6.8.jar 1.55MB
druid-1.2.4.jar 3.37MB
com.springsource.net.sf.cglib-2.2.0.jar 319KB
spring-core-5.2.6.RELEASE.jar 1.38MB
junit-4.13.1.jar 374KB
spring-context-5.2.6.RELEASE.jar 1.17MB
共 39 条
- 1
仰望星空的快乐
- 粉丝: 119
- 资源: 12
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- Docker容器配置进阶
- tensorflow-gpu-2.7.4-cp37-cp37m-manylinux2010-x86-64.whl
- 多段线、 圆、弧转多段线(仅我可见)
- tensorflow-2.7.2-cp38-cp38-manylinux2010-x86-64.whl
- yeyue-p8Yi4-ve4a83792.apk
- tensorflow-gpu-2.7.3-cp38-cp38-manylinux2010-x86-64.whl
- 五相感应电机矢量控制模型MATLAB
- RGLED (1) (1).circ
- IMG_20240427_215747.jpg
- python下前端WEB学习笔记
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
评论0