Skip to content

Commit 2847a91

Browse files
author
Hidde Lycklama
committed
Add sql dump file, add hibernate java model
1 parent 2194822 commit 2847a91

File tree

4 files changed

+85
-1
lines changed

4 files changed

+85
-1
lines changed

pom.xml

+7
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,13 @@
5353
<groupId>org.springframework.boot</groupId>
5454
<artifactId>spring-boot-starter-security</artifactId>
5555
</dependency>
56+
57+
<dependency>
58+
<groupId>org.projectlombok</groupId>
59+
<artifactId>lombok</artifactId>
60+
<version>1.16.10</version>
61+
<scope>provided</scope>
62+
</dependency>
5663
</dependencies>
5764

5865
<build>

schema.sql

+54
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
-- MySQL dump 10.13 Distrib 5.1.41, for debian-linux-gnu (i486)
2+
--
3+
-- Host: localhost Database: imovies
4+
-- ------------------------------------------------------
5+
-- Server version 5.1.41-3ubuntu12.6
6+
7+
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
8+
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
9+
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
10+
/*!40101 SET NAMES utf8 */;
11+
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
12+
/*!40103 SET TIME_ZONE='+00:00' */;
13+
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
14+
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
15+
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
16+
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
17+
18+
--
19+
-- Table structure for table `users`
20+
--
21+
22+
DROP TABLE IF EXISTS `users`;
23+
/*!40101 SET @saved_cs_client = @@character_set_client */;
24+
/*!40101 SET character_set_client = utf8 */;
25+
CREATE TABLE `users` (
26+
`uid` varchar(64) NOT NULL DEFAULT '',
27+
`lastname` varchar(64) NOT NULL DEFAULT '',
28+
`firstname` varchar(64) NOT NULL DEFAULT '',
29+
`email` varchar(64) NOT NULL DEFAULT '',
30+
`pwd` varchar(64) NOT NULL DEFAULT '',
31+
PRIMARY KEY (`uid`)
32+
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
33+
/*!40101 SET character_set_client = @saved_cs_client */;
34+
35+
--
36+
-- Dumping data for table `users`
37+
--
38+
39+
LOCK TABLES `users` WRITE;
40+
/*!40000 ALTER TABLE `users` DISABLE KEYS */;
41+
INSERT INTO `users` VALUES ('fu','Fuerst','Andreas','fu@imovies.ch','6e58f76f5be5ef06a56d4eeb2c4dc58be3dbe8c7'),('db','Basin','David','db@imovies.ch','8d0547d4b27b689c3a3299635d859f7d50a2b805'),('ms','Schlaepfer','Michael','ms@imovies.ch','4d7de8512bd584c3137bb80f453e61306b148875'),('a3','Anderson','Andres Alan','and@imovies.ch','6b97f534c330b5cc78d4cc23e01e48be3377105b');
42+
/*!40000 ALTER TABLE `users` ENABLE KEYS */;
43+
UNLOCK TABLES;
44+
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
45+
46+
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
47+
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
48+
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
49+
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
50+
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
51+
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
52+
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
53+
54+
-- Dump completed on 2010-10-28 16:53:06
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
package ch.eth.infsec.model;
2+
3+
import javax.persistence.Entity;
4+
import javax.persistence.Id;
5+
import javax.persistence.Table;
6+
7+
@Entity
8+
@Table(name = "users")
9+
public class User {
10+
11+
@Id
12+
private String uid;
13+
14+
private String lastname;
15+
16+
private String firstname;
17+
18+
private String email;
19+
20+
private String pwd;
21+
}

src/main/resources/application.properties.example

+3-1
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,6 @@ spring.datasource.username=root
33
spring.datasource.password=
44

55
spring.datasource.driver-class-name=com.mysql.jdbc.Driver
6-
spring.jpa.database-platform=org.hibernate.dialect.MySQL5InnoDBDialect
6+
spring.jpa.database-platform=org.hibernate.dialect.MySQL5InnoDBDialect
7+
8+
spring.jpa.properties.hibernate.hbm2ddl.import_files=import.sql

0 commit comments

Comments
 (0)