[ Server ] [ Server ] - 角色部分CRUD加测试代码
This commit is contained in:
21
server/src/main/java/io/wdd/common/utils/FakeDataUtils.java
Normal file
21
server/src/main/java/io/wdd/common/utils/FakeDataUtils.java
Normal file
@@ -0,0 +1,21 @@
|
||||
package io.wdd.common.utils;
|
||||
|
||||
import net.datafaker.Faker;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.util.Locale;
|
||||
|
||||
@Component
|
||||
public class FakeDataUtils {
|
||||
|
||||
@Bean(name = "fakerInstance")
|
||||
public Faker NewFakerInstance() {
|
||||
Faker faker = new Faker(new Locale(
|
||||
"zh",
|
||||
"CN"
|
||||
));
|
||||
|
||||
return faker;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user