?
This commit is contained in:
parent
1eb5ca8366
commit
d8403015f7
2
SpringApp/.vscode/launch.json
vendored
2
SpringApp/.vscode/launch.json
vendored
@ -7,7 +7,7 @@
|
|||||||
"cwd": "${workspaceFolder}",
|
"cwd": "${workspaceFolder}",
|
||||||
"mainClass": "com.ip.library.LibraryApplication",
|
"mainClass": "com.ip.library.LibraryApplication",
|
||||||
"projectName": "library",
|
"projectName": "library",
|
||||||
"args": "--populate",
|
"args": "",
|
||||||
"envFile": "${workspaceFolder}/.env"
|
"envFile": "${workspaceFolder}/.env"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
plugins {
|
plugins {
|
||||||
id 'java'
|
id 'java'
|
||||||
id 'org.springframework.boot' version '3.2.4'
|
id 'org.springframework.boot' version '3.2.2'
|
||||||
id 'io.spring.dependency-management' version '1.1.4'
|
id 'io.spring.dependency-management' version '1.1.4'
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -20,6 +20,8 @@ dependencies {
|
|||||||
implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.3.0'
|
implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.3.0'
|
||||||
implementation 'org.modelmapper:modelmapper:3.2.0'
|
implementation 'org.modelmapper:modelmapper:3.2.0'
|
||||||
|
|
||||||
|
developmentOnly 'org.springframework.boot:spring-boot-devtools'
|
||||||
|
|
||||||
testImplementation 'org.springframework.boot:spring-boot-starter-test'
|
testImplementation 'org.springframework.boot:spring-boot-starter-test'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -32,7 +32,7 @@ public class UserService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public UserEntity create(UserEntity entity) {
|
public UserEntity create(UserEntity entity) {
|
||||||
if (!entity.getRole().equals("user")) {
|
if (entity.getRole() == null || !entity.getRole().equals("user")) {
|
||||||
entity.setRole("user");
|
entity.setRole("user");
|
||||||
}
|
}
|
||||||
entity.setBooks(new ArrayList<BookEntity>());
|
entity.setBooks(new ArrayList<BookEntity>());
|
||||||
|
Loading…
x
Reference in New Issue
Block a user