
spring
野菌桃
这个作者很懒,什么都没留下…
展开
-
Spring框架事务 @Transactional常用属性说明
一.为什么要使用@Transactional注解举例:创建三个表 book money couponcreate table book( id char(36) primary key comment '主键', name varchar(12) comment '书名', quantity int(5) comment '数量', price float(5,2) comm...原创 2020-03-22 11:24:25 · 365 阅读 · 0 评论 -
MyBatis框架一对一与一对多
一.创建表--user_info表create table user_info( id int(2) primary key, user_name varchar(12) unique, password varchar(15) not null, real_name varchar(8) not null, age int(3)...原创 2020-03-21 15:53:43 · 234 阅读 · 0 评论 -
sping对象的生命周期
123原创 2020-02-28 17:08:22 · 211 阅读 · 0 评论 -
详述scope作用
1原创 2020-02-28 17:08:48 · 371 阅读 · 0 评论 -
详述lazy-init作用
1.创建spring Bean配置文件<?xml version="1.0" encoding="UTF-8"?><beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocat...原创 2020-02-28 17:08:54 · 239 阅读 · 0 评论 -
总结构造方法赋值方式
一.如何调用构造方法1.配置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...原创 2020-03-07 17:16:03 · 338 阅读 · 0 评论 -
详述context:component-scan作用
1.创建UserinfoDao类和Test类package com.jd.userinfo.dao;import org.springframework.stereotype.Service;@Service//添加了service注释public class UserInfoDao { }package com.jd.test;import org.springf...原创 2020-03-07 17:14:55 · 230 阅读 · 0 评论