Toggle navigation
Toggle navigation
This project
Loading...
Sign in
grogv3
/
grog-cubi
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
Jean-Francois Leveque
2017-01-18 12:49:18 +0100
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
2b6adc2959aaf0fcf374392d356947240bec2451
2b6adc29
1 parent
1bcb7a06
Refactoring des comptes vers dénomination Account : import.sql (non détecté par IDEA, oubli)
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
37 additions
and
8 deletions
pom.xml
src/main/java/org/legrog/configuration/JpaConfiguration.java
src/main/resources/META-INF/persistence.xml
src/main/resources/import.sql
src/main/webapp/WEB-INF/resources.xml
pom.xml
View file @
2b6adc2
...
...
@@ -173,6 +173,14 @@
</dependency>
<dependency>
<groupId>
mysql
</groupId>
<artifactId>
mysql-connector-java
</artifactId>
<!--
<version>5.1.6</version>
-->
</dependency>
<dependency>
<groupId>
org.springframework.data
</groupId>
<artifactId>
spring-data-jpa
</artifactId>
</dependency>
...
...
src/main/java/org/legrog/configuration/JpaConfiguration.java
View file @
2b6adc2
...
...
@@ -10,7 +10,7 @@ public class JpaConfiguration {
@Produces
@RequestScoped
@PersistenceContext
(
unitName
=
"
book
-pu"
)
@PersistenceContext
(
unitName
=
"
v3
-pu"
)
public
EntityManager
entityManager
;
}
...
...
src/main/resources/META-INF/persistence.xml
View file @
2b6adc2
...
...
@@ -17,4 +17,18 @@
</properties>
</persistence-unit>
<persistence-unit
name=
"v3-pu"
transaction-type=
"JTA"
>
<provider>
org.hibernate.jpa.HibernatePersistenceProvider
</provider>
<jta-data-source>
v3Database
</jta-data-source>
<exclude-unlisted-classes>
false
</exclude-unlisted-classes>
<properties>
<property
name=
"hibernate.hbm2ddl.auto"
value=
"create-drop"
/>
<property
name=
"hibernate.hbm2ddl.import_files"
value=
"import.sql"
/>
<property
name=
"hibernate.hbm2ddl.import_files_sql_extractor"
value=
"org.hibernate.tool.hbm2ddl.MultipleLinesSqlCommandExtractor"
/>
<!-- DDL control OFF
<property name="hibernate.show_sql" value="true"/>
<property name="hibernate.format_sql" value="true"/>
-->
</properties>
</persistence-unit>
</persistence>
\ No newline at end of file
...
...
src/main/resources/import.sql
View file @
2b6adc2
...
...
@@ -85,10 +85,10 @@ INSERT INTO AccountProperty (userPropertyId, name, tag, visible) VALUES
(
4
,
'taille_listes'
,
'Nombre d
''
éléments affichés dans les listes'
,
TRUE
),
(
5
,
'skin'
,
'Thème visuel'
,
TRUE
);
INSERT
INTO
Person_AccountRole
VALUES
(
1
,
2
);
INSERT
INTO
Person_AccountRole
VALUES
(
2
,
2
);
INSERT
INTO
Person_AccountRole
VALUES
(
3
,
2
);
INSERT
INTO
Person_AccountRole
VALUES
(
4
,
2
);
INSERT
INTO
Person_AccountRole
VALUES
(
5
,
2
);
INSERT
INTO
Person_AccountRole
VALUES
(
6
,
2
);
INSERT
INTO
Person_AccountRole
VALUES
(
5
,
4
);
\ No newline at end of file
INSERT
INTO
Account_AccountRole
VALUES
(
1
,
2
);
INSERT
INTO
Account_AccountRole
VALUES
(
2
,
2
);
INSERT
INTO
Account_AccountRole
VALUES
(
3
,
2
);
INSERT
INTO
Account_AccountRole
VALUES
(
4
,
2
);
INSERT
INTO
Account_AccountRole
VALUES
(
5
,
2
);
INSERT
INTO
Account_AccountRole
VALUES
(
6
,
2
);
INSERT
INTO
Account_AccountRole
VALUES
(
5
,
4
);
\ No newline at end of file
...
...
src/main/webapp/WEB-INF/resources.xml
View file @
2b6adc2
...
...
@@ -6,4 +6,11 @@
UserName = sa
JtaManaged= true
</Resource>
<Resource
id=
"v3Database"
type=
"javax.sql.DataSource"
>
JdbcDriver = com.mysql.jdbc.Driver
JdbcUrl = jdbc:mysql://localhost/v2?useSSL=false
UserName = grogdev
password = grogdev
JtaManaged= true
</Resource>
</tomee>
\ No newline at end of file
...
...
Please
register
or
login
to post a comment