Spring 环境搭建--整理

Oracle 数据库安装配置使用 (Stone的博客 )
@作者 @Stone www.1314sl.com
1 . 直接安装

3 . 打开服务 并尝试连接数据库

4 . 安装远程连接工具

PLSQLDeveloper 安装配置使用 

2.在 PLSQL Developer 启动,配置 oracle instanceclient 目录

enter description here
enter description here

4、 默认 PLSQL Developer 连接 Oracle 使用客户端字符集 utf-8 ,
基于工具使用 SQL 插入中文有乱码问题,设置客户端字符集 gb2312

配置 环境变量
NLS_LANG = SIMPLIFIED CHINESE_CHINA.ZHS16GBK

enter description here

弹窗了,就表示成功了!

工具补充:

Navicat Premium 安装和使用 (Stone的博客 )

直接安装

enter description here
enter description here

Orcale 创建用户 (Stone的博客 )

1 . 先进入 Orcale 命令行
2 . 针对 BOS 系统建立新的用户

创建 bos/bos 账户, 授予角色 connect、resource

-- Create the user  create   user BOS   identified by ""   default tablespace SYSTEM   temporary tablespace TEMP   profile DEFAULT   password expire; 


-- Grant/Revoke role privileges  grant connect to BOS; grant resource to BOS; -- Grant/Revoke system privileges  grant unlimited tablespace to BOS; 

Spring 环境搭建 (Stone的博客 )

IOC 导入 context 依赖 beans、core、expression
AOP 导入
测试集成
Web 集成 配置监听器
整合持久层框架 hibernate、jpa
web.xml 配置 spring 监听器

enter description here

src/main/resource 下 建立 applicationContext.xml
rc/main/resource 提供 config.properties 外部属性文件、log4j.properties 日志配置文件
Spring Data JPA

代替了 Hibernate
"CURD " 但是和Hibernate一样
实现DAO(数据)层的功能 "增删改查"
Hibernate 实体类 生成表结构 ---- 领域(Domain)驱动建模

这次使用的是驱动建模,传统的设计模式是:
先设计表,再创建实体

JPA 注解使用
    @Entity 标明是实体类
    @Table 映射表名称
enter description here
    @Id 主键标识
    @GeneratedValue 自动生成主键的值
    @Column 设置映射数据表中列信息
enter description here
@Temporal 控制数据表保存日期哪个部分(日期、时间、日期时间)
enter description here
@OneToMany(mappedBy 相当于 inverse )  @ManyToOne 结合 @JoinColumn 添加一列外键 
     ![enter description here][13]

    @ManyToMany 一方写 mappedBy 放弃外键维护、另一方 @JoinTable 维护中间表  
enter description here

思维导图:
(Stone的博客 )

Spring 环境搭建--整理_第1张图片
@Stone www.1314sl.com

( Stone的博客 )

你可能感兴趣的:(Spring 环境搭建--整理)