Skip to content

Commit

Permalink
Merge pull request #104 from depromeet/feature/#99
Browse files Browse the repository at this point in the history
feat(#99): edit osiv, add transactional
  • Loading branch information
ManHyuk authored Jan 9, 2024
2 parents 2f34282 + 9942d50 commit fa42e70
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import org.springframework.security.core.userdetails.UserDetails
import org.springframework.security.core.userdetails.UserDetailsService
import org.springframework.security.core.userdetails.UsernameNotFoundException
import org.springframework.stereotype.Service
import org.springframework.transaction.annotation.Transactional
import java.time.LocalDate
import kotlin.jvm.optionals.getOrNull

Expand All @@ -16,6 +17,7 @@ class AuthService(
private val userRepository: UserRepository,
) : UserDetailsService {

@Transactional(readOnly = true)
fun getUserById(id: Long): UserDTO {
val user = userRepository.getById(id)
return UserDTO.of(user)
Expand Down
2 changes: 1 addition & 1 deletion storage/db-core/src/main/resources/application-db-core.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# default
spring:
jpa:
open-in-view: true
open-in-view: false
hibernate:
ddl-auto: none

Expand Down

0 comments on commit fa42e70

Please sign in to comment.