---
title: "hibernate.hbm2ddl.auto属性"
author: "nail2008"
date: "2010-05-28T10:24:48Z"
tags: []
categories: ["企业架构"]
slug: "hibernate-hbm2ddl-auto"
draft: false
lastmod: "2010-05-28T10:24:48Z"
id: 677606
url: "https://neilDuan.iteye.com/blog/677606"
---

```
hibernate.hbm2ddl.auto的配置参数，有以下四种:
validate:加载hibernate时，验证创建数据库表结构
create:每次加载hibernate，重新创建数据库表结构，这就是导致数据库表数据丢失的原因。
create-drop:加载hibernate时创建，退出是删除表结构
update:加载hibernate自动更新数据库结构
```