Fakultas Ilmu Komputer UI
Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
B
be-authentication-test
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
SafetyPin
be-authentication-test
Commits
31ea98b5
Commit
31ea98b5
authored
1 month ago
by
Fredo
Browse files
Options
Downloads
Patches
Plain Diff
[GREEN] Fix DevDataSeeder not working
parent
260d989e
No related branches found
No related tags found
1 merge request
!1
Login registration
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/main/java/com/safetypin/authentication/seeder/DevDataSeeder.java
+10
-0
10 additions, 0 deletions
...va/com/safetypin/authentication/seeder/DevDataSeeder.java
with
10 additions
and
0 deletions
src/main/java/com/safetypin/authentication/seeder/DevDataSeeder.java
+
10
−
0
View file @
31ea98b5
...
@@ -2,10 +2,15 @@ package com.safetypin.authentication.seeder;
...
@@ -2,10 +2,15 @@ package com.safetypin.authentication.seeder;
import
com.safetypin.authentication.model.User
;
import
com.safetypin.authentication.model.User
;
import
com.safetypin.authentication.repository.UserRepository
;
import
com.safetypin.authentication.repository.UserRepository
;
import
jakarta.annotation.PostConstruct
;
import
org.springframework.context.annotation.Profile
;
import
org.springframework.security.crypto.password.PasswordEncoder
;
import
org.springframework.security.crypto.password.PasswordEncoder
;
import
org.springframework.stereotype.Component
;
import
java.time.LocalDate
;
import
java.time.LocalDate
;
@Component
@Profile
({
"dev"
})
public
class
DevDataSeeder
implements
Runnable
{
public
class
DevDataSeeder
implements
Runnable
{
private
final
UserRepository
userRepository
;
private
final
UserRepository
userRepository
;
...
@@ -16,6 +21,11 @@ public class DevDataSeeder implements Runnable {
...
@@ -16,6 +21,11 @@ public class DevDataSeeder implements Runnable {
this
.
passwordEncoder
=
passwordEncoder
;
this
.
passwordEncoder
=
passwordEncoder
;
}
}
@PostConstruct
public
void
init
()
{
run
();
}
@Override
@Override
public
void
run
()
{
public
void
run
()
{
// Only seed if there are no users in the repository
// Only seed if there are no users in the repository
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment