Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
th-app-java
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Oscar Enrique Gonzalez Escurra
th-app-java
Commits
03a13c52
Commit
03a13c52
authored
Aug 17, 2023
by
Amparo Oliver
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
spring.jpa.hibernate.ddl-auto=update
parent
1740891f
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
4 deletions
+12
-4
curriculumsearch/curriculumsearch-0.0.1-SNAPSHOT.jar
+0
-0
curriculumsearch/src/main/java/com/roshka/CurriculumsearchApplication.java
+11
-3
curriculumsearch/src/main/resources/application.properties
+1
-1
No files found.
curriculumsearch/curriculumsearch-0.0.1-SNAPSHOT.jar
View file @
03a13c52
No preview for this file type
curriculumsearch/src/main/java/com/roshka/CurriculumsearchApplication.java
View file @
03a13c52
...
...
@@ -43,16 +43,24 @@ public class CurriculumsearchApplication {
guardarJson
(
ciudR
,
"/json/Ciudad.json"
,
Ciudad
.
class
);
guardarJson
(
tecRepo
,
"/json/tecnologia.json"
,
Tecnologia
.
class
);
guardarJson
(
insR
,
"/json/institucion.json"
,
Institucion
.
class
);
guardarJson
(
postRepo
,
"/json/postulante.json"
,
Postulante
.
class
);
//
guardarJson(postRepo,"/json/postulante.json",Postulante.class);
String
password
=
new
BCryptPasswordEncoder
().
encode
(
"test"
);
String
testEmail
=
"test@test.com"
;
// Check if the user with the email already exists before saving
RRHHUser
existingUser
=
rrhhUserRepository
.
findByEmail
(
testEmail
);
if
(
existingUser
==
null
)
{
RRHHUser
testuser
=
new
RRHHUser
();
testuser
.
setEmail
(
"test@test.com"
);
testuser
.
setEmail
(
testEmail
);
testuser
.
setFirstName
(
"test"
);
testuser
.
setLastName
(
"test"
);
testuser
.
setPassword
(
password
);
rrhhUserRepository
.
save
(
testuser
);
System
.
out
.
println
(
"Usuario Test: \nEmail: test@test.com\nPassword: test"
);
System
.
out
.
println
(
"Usuario Test: \nEmail: "
+
testEmail
+
"\nPassword: test"
);
}
else
{
System
.
out
.
println
(
"User with email "
+
testEmail
+
" already exists."
);
}
}
catch
(
IOException
e
){
System
.
out
.
println
(
"Unable to save: "
+
e
.
getMessage
());
...
...
curriculumsearch/src/main/resources/application.properties
View file @
03a13c52
spring.jpa.hibernate.ddl-auto
=
create-drop
spring.jpa.hibernate.ddl-auto
=
update
spring.jpa.database-platform
=
org.hibernate.dialect.PostgreSQLDialect
#spring.jpa.show-sql=true
#spring.jpa.properties.hibernate.format_sql=true
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment