refactor: Koinのコードを削除

This commit is contained in:
usbharu 2023-09-23 00:14:40 +09:00
parent 332ad1bb41
commit ad11b072a8
36 changed files with 0 additions and 82 deletions

View File

@ -1,8 +0,0 @@
package dev.usbharu.hideout
import org.koin.core.annotation.ComponentScan
import org.koin.core.annotation.Module
@Module
@ComponentScan
class HideoutModule

View File

@ -5,11 +5,9 @@ import dev.usbharu.hideout.repository.Users
import dev.usbharu.hideout.repository.UsersFollowers import dev.usbharu.hideout.repository.UsersFollowers
import org.jetbrains.exposed.sql.* import org.jetbrains.exposed.sql.*
import org.jetbrains.exposed.sql.SqlExpressionBuilder.eq import org.jetbrains.exposed.sql.SqlExpressionBuilder.eq
import org.koin.core.annotation.Single
import org.springframework.stereotype.Repository import org.springframework.stereotype.Repository
import java.time.Instant import java.time.Instant
@Single
@Repository @Repository
class FollowerQueryServiceImpl : FollowerQueryService { class FollowerQueryServiceImpl : FollowerQueryService {
override suspend fun findFollowersById(id: Long): List<User> { override suspend fun findFollowersById(id: Long): List<User> {

View File

@ -9,10 +9,8 @@ import org.jetbrains.exposed.sql.SqlExpressionBuilder.eq
import org.jetbrains.exposed.sql.deleteAll import org.jetbrains.exposed.sql.deleteAll
import org.jetbrains.exposed.sql.deleteWhere import org.jetbrains.exposed.sql.deleteWhere
import org.jetbrains.exposed.sql.select import org.jetbrains.exposed.sql.select
import org.koin.core.annotation.Single
import org.springframework.stereotype.Repository import org.springframework.stereotype.Repository
@Single
@Repository @Repository
class JwtRefreshTokenQueryServiceImpl : JwtRefreshTokenQueryService { class JwtRefreshTokenQueryServiceImpl : JwtRefreshTokenQueryService {
override suspend fun findById(id: Long): JwtRefreshToken = override suspend fun findById(id: Long): JwtRefreshToken =

View File

@ -6,10 +6,8 @@ import dev.usbharu.hideout.repository.Posts
import dev.usbharu.hideout.repository.toPost import dev.usbharu.hideout.repository.toPost
import dev.usbharu.hideout.util.singleOr import dev.usbharu.hideout.util.singleOr
import org.jetbrains.exposed.sql.select import org.jetbrains.exposed.sql.select
import org.koin.core.annotation.Single
import org.springframework.stereotype.Repository import org.springframework.stereotype.Repository
@Single
@Repository @Repository
class PostQueryServiceImpl : PostQueryService { class PostQueryServiceImpl : PostQueryService {
override suspend fun findById(id: Long): Post = override suspend fun findById(id: Long): Post =

View File

@ -11,10 +11,8 @@ import org.jetbrains.exposed.sql.and
import org.jetbrains.exposed.sql.innerJoin import org.jetbrains.exposed.sql.innerJoin
import org.jetbrains.exposed.sql.select import org.jetbrains.exposed.sql.select
import org.jetbrains.exposed.sql.selectAll import org.jetbrains.exposed.sql.selectAll
import org.koin.core.annotation.Single
import org.springframework.stereotype.Repository import org.springframework.stereotype.Repository
@Single
@Repository @Repository
class PostResponseQueryServiceImpl : PostResponseQueryService { class PostResponseQueryServiceImpl : PostResponseQueryService {
override suspend fun findById(id: Long, userId: Long?): PostResponse { override suspend fun findById(id: Long, userId: Long?): PostResponse {

View File

@ -10,10 +10,8 @@ import dev.usbharu.hideout.repository.toReaction
import dev.usbharu.hideout.util.singleOr import dev.usbharu.hideout.util.singleOr
import org.jetbrains.exposed.sql.* import org.jetbrains.exposed.sql.*
import org.jetbrains.exposed.sql.SqlExpressionBuilder.eq import org.jetbrains.exposed.sql.SqlExpressionBuilder.eq
import org.koin.core.annotation.Single
import org.springframework.stereotype.Repository import org.springframework.stereotype.Repository
@Single
@Repository @Repository
class ReactionQueryServiceImpl : ReactionQueryService { class ReactionQueryServiceImpl : ReactionQueryService {
override suspend fun findByPostId(postId: Long, userId: Long?): List<Reaction> { override suspend fun findByPostId(postId: Long, userId: Long?): List<Reaction> {

View File

@ -8,11 +8,9 @@ import dev.usbharu.hideout.util.singleOr
import org.jetbrains.exposed.sql.and import org.jetbrains.exposed.sql.and
import org.jetbrains.exposed.sql.select import org.jetbrains.exposed.sql.select
import org.jetbrains.exposed.sql.selectAll import org.jetbrains.exposed.sql.selectAll
import org.koin.core.annotation.Single
import org.slf4j.LoggerFactory import org.slf4j.LoggerFactory
import org.springframework.stereotype.Repository import org.springframework.stereotype.Repository
@Single
@Repository @Repository
class UserQueryServiceImpl : UserQueryService { class UserQueryServiceImpl : UserQueryService {

View File

@ -5,11 +5,9 @@ import dev.usbharu.hideout.service.core.IdGenerateService
import org.jetbrains.exposed.sql.* import org.jetbrains.exposed.sql.*
import org.jetbrains.exposed.sql.SqlExpressionBuilder.eq import org.jetbrains.exposed.sql.SqlExpressionBuilder.eq
import org.jetbrains.exposed.sql.transactions.transaction import org.jetbrains.exposed.sql.transactions.transaction
import org.koin.core.annotation.Single
import org.springframework.stereotype.Repository import org.springframework.stereotype.Repository
import java.time.Instant import java.time.Instant
@Single
@Repository @Repository
class JwtRefreshTokenRepositoryImpl( class JwtRefreshTokenRepositoryImpl(
private val database: Database, private val database: Database,

View File

@ -3,11 +3,9 @@ package dev.usbharu.hideout.repository
import dev.usbharu.hideout.domain.model.hideout.entity.Jwt import dev.usbharu.hideout.domain.model.hideout.entity.Jwt
import org.jetbrains.exposed.sql.* import org.jetbrains.exposed.sql.*
import org.jetbrains.exposed.sql.transactions.transaction import org.jetbrains.exposed.sql.transactions.transaction
import org.koin.core.annotation.Single
import org.springframework.stereotype.Repository import org.springframework.stereotype.Repository
import java.util.* import java.util.*
@Single
@Repository @Repository
class MetaRepositoryImpl(private val database: Database) : MetaRepository { class MetaRepositoryImpl(private val database: Database) : MetaRepository {

View File

@ -7,10 +7,8 @@ import dev.usbharu.hideout.service.core.IdGenerateService
import org.jetbrains.exposed.sql.* import org.jetbrains.exposed.sql.*
import org.jetbrains.exposed.sql.SqlExpressionBuilder.eq import org.jetbrains.exposed.sql.SqlExpressionBuilder.eq
import org.jetbrains.exposed.sql.transactions.transaction import org.jetbrains.exposed.sql.transactions.transaction
import org.koin.core.annotation.Single
import org.springframework.stereotype.Repository import org.springframework.stereotype.Repository
@Single
@Repository @Repository
class PostRepositoryImpl(database: Database, private val idGenerateService: IdGenerateService) : PostRepository { class PostRepositoryImpl(database: Database, private val idGenerateService: IdGenerateService) : PostRepository {

View File

@ -6,10 +6,8 @@ import org.jetbrains.exposed.dao.id.LongIdTable
import org.jetbrains.exposed.sql.* import org.jetbrains.exposed.sql.*
import org.jetbrains.exposed.sql.SqlExpressionBuilder.eq import org.jetbrains.exposed.sql.SqlExpressionBuilder.eq
import org.jetbrains.exposed.sql.transactions.transaction import org.jetbrains.exposed.sql.transactions.transaction
import org.koin.core.annotation.Single
import org.springframework.stereotype.Repository import org.springframework.stereotype.Repository
@Single
@Repository @Repository
class ReactionRepositoryImpl( class ReactionRepositoryImpl(
private val database: Database, private val database: Database,

View File

@ -7,11 +7,9 @@ import org.jetbrains.exposed.dao.id.LongIdTable
import org.jetbrains.exposed.sql.* import org.jetbrains.exposed.sql.*
import org.jetbrains.exposed.sql.SqlExpressionBuilder.eq import org.jetbrains.exposed.sql.SqlExpressionBuilder.eq
import org.jetbrains.exposed.sql.transactions.transaction import org.jetbrains.exposed.sql.transactions.transaction
import org.koin.core.annotation.Single
import org.springframework.stereotype.Repository import org.springframework.stereotype.Repository
import java.time.Instant import java.time.Instant
@Single
@Repository @Repository
class UserRepositoryImpl(private val database: Database, private val idGenerateService: IdGenerateService) : class UserRepositoryImpl(private val database: Database, private val idGenerateService: IdGenerateService) :
UserRepository { UserRepository {

View File

@ -10,7 +10,6 @@ import dev.usbharu.hideout.query.UserQueryService
import dev.usbharu.hideout.service.core.Transaction import dev.usbharu.hideout.service.core.Transaction
import dev.usbharu.hideout.service.user.UserService import dev.usbharu.hideout.service.user.UserService
import io.ktor.http.* import io.ktor.http.*
import org.koin.core.annotation.Single
import org.springframework.stereotype.Service import org.springframework.stereotype.Service
@Service @Service
@ -18,7 +17,6 @@ interface APAcceptService {
suspend fun receiveAccept(accept: Accept): ActivityPubResponse suspend fun receiveAccept(accept: Accept): ActivityPubResponse
} }
@Single
@Service @Service
class APAcceptServiceImpl( class APAcceptServiceImpl(
private val userService: UserService, private val userService: UserService,

View File

@ -7,7 +7,6 @@ import dev.usbharu.hideout.domain.model.ap.Note
import dev.usbharu.hideout.exception.ap.IllegalActivityPubObjectException import dev.usbharu.hideout.exception.ap.IllegalActivityPubObjectException
import dev.usbharu.hideout.service.core.Transaction import dev.usbharu.hideout.service.core.Transaction
import io.ktor.http.* import io.ktor.http.*
import org.koin.core.annotation.Single
import org.springframework.stereotype.Service import org.springframework.stereotype.Service
@Service @Service
@ -15,7 +14,6 @@ interface APCreateService {
suspend fun receiveCreate(create: Create): ActivityPubResponse suspend fun receiveCreate(create: Create): ActivityPubResponse
} }
@Single
@Service @Service
class APCreateServiceImpl( class APCreateServiceImpl(
private val apNoteService: APNoteService, private val apNoteService: APNoteService,

View File

@ -8,7 +8,6 @@ import dev.usbharu.hideout.query.PostQueryService
import dev.usbharu.hideout.service.core.Transaction import dev.usbharu.hideout.service.core.Transaction
import dev.usbharu.hideout.service.reaction.ReactionService import dev.usbharu.hideout.service.reaction.ReactionService
import io.ktor.http.* import io.ktor.http.*
import org.koin.core.annotation.Single
import org.springframework.stereotype.Service import org.springframework.stereotype.Service
@Service @Service
@ -16,7 +15,6 @@ interface APLikeService {
suspend fun receiveLike(like: Like): ActivityPubResponse suspend fun receiveLike(like: Like): ActivityPubResponse
} }
@Single
@Service @Service
class APLikeServiceImpl( class APLikeServiceImpl(
private val reactionService: ReactionService, private val reactionService: ReactionService,

View File

@ -19,7 +19,6 @@ import dev.usbharu.hideout.service.job.JobQueueParentService
import io.ktor.client.* import io.ktor.client.*
import io.ktor.client.statement.* import io.ktor.client.statement.*
import kjob.core.job.JobProps import kjob.core.job.JobProps
import org.koin.core.annotation.Single
import org.slf4j.LoggerFactory import org.slf4j.LoggerFactory
import org.springframework.stereotype.Service import org.springframework.stereotype.Service
import java.time.Instant import java.time.Instant
@ -34,7 +33,6 @@ interface APNoteService {
suspend fun fetchNote(note: Note, targetActor: String? = null): Note suspend fun fetchNote(note: Note, targetActor: String? = null): Note
} }
@Single
@Service @Service
class APNoteServiceImpl( class APNoteServiceImpl(
private val httpClient: HttpClient, private val httpClient: HttpClient,

View File

@ -14,7 +14,6 @@ import dev.usbharu.hideout.query.UserQueryService
import dev.usbharu.hideout.service.job.JobQueueParentService import dev.usbharu.hideout.service.job.JobQueueParentService
import io.ktor.client.* import io.ktor.client.*
import kjob.core.job.JobProps import kjob.core.job.JobProps
import org.koin.core.annotation.Single
import org.springframework.stereotype.Service import org.springframework.stereotype.Service
import java.time.Instant import java.time.Instant
@ -26,7 +25,6 @@ interface APReactionService {
suspend fun removeReactionJob(props: JobProps<DeliverRemoveReactionJob>) suspend fun removeReactionJob(props: JobProps<DeliverRemoveReactionJob>)
} }
@Single
@Service @Service
class APReactionServiceImpl( class APReactionServiceImpl(
private val jobQueueParentService: JobQueueParentService, private val jobQueueParentService: JobQueueParentService,

View File

@ -15,7 +15,6 @@ import dev.usbharu.hideout.service.user.UserService
import io.ktor.client.* import io.ktor.client.*
import io.ktor.http.* import io.ktor.http.*
import kjob.core.job.JobProps import kjob.core.job.JobProps
import org.koin.core.annotation.Single
import org.springframework.stereotype.Service import org.springframework.stereotype.Service
@Service @Service
@ -24,7 +23,6 @@ interface APReceiveFollowService {
suspend fun receiveFollowJob(props: JobProps<ReceiveFollowJob>) suspend fun receiveFollowJob(props: JobProps<ReceiveFollowJob>)
} }
@Single
@Service @Service
class APReceiveFollowServiceImpl( class APReceiveFollowServiceImpl(
private val jobQueueParentService: JobQueueParentService, private val jobQueueParentService: JobQueueParentService,

View File

@ -4,7 +4,6 @@ import dev.usbharu.hideout.domain.model.ap.Follow
import dev.usbharu.hideout.domain.model.hideout.dto.SendFollowDto import dev.usbharu.hideout.domain.model.hideout.dto.SendFollowDto
import dev.usbharu.hideout.plugins.postAp import dev.usbharu.hideout.plugins.postAp
import io.ktor.client.* import io.ktor.client.*
import org.koin.core.annotation.Single
import org.springframework.stereotype.Service import org.springframework.stereotype.Service
@Service @Service
@ -12,7 +11,6 @@ interface APSendFollowService {
suspend fun sendFollow(sendFollowDto: SendFollowDto) suspend fun sendFollow(sendFollowDto: SendFollowDto)
} }
@Single
@Service @Service
class APSendFollowServiceImpl(private val httpClient: HttpClient) : APSendFollowService { class APSendFollowServiceImpl(private val httpClient: HttpClient) : APSendFollowService {
override suspend fun sendFollow(sendFollowDto: SendFollowDto) { override suspend fun sendFollow(sendFollowDto: SendFollowDto) {

View File

@ -9,7 +9,6 @@ import dev.usbharu.hideout.domain.model.job.*
import dev.usbharu.hideout.exception.JsonParseException import dev.usbharu.hideout.exception.JsonParseException
import kjob.core.dsl.JobContextWithProps import kjob.core.dsl.JobContextWithProps
import kjob.core.job.JobProps import kjob.core.job.JobProps
import org.koin.core.annotation.Single
import org.slf4j.Logger import org.slf4j.Logger
import org.slf4j.LoggerFactory import org.slf4j.LoggerFactory
import org.springframework.stereotype.Service import org.springframework.stereotype.Service
@ -174,7 +173,6 @@ enum class ExtendedVocabulary {
Emoji Emoji
} }
@Single
@Service @Service
class APServiceImpl( class APServiceImpl(
private val apReceiveFollowService: APReceiveFollowService, private val apReceiveFollowService: APReceiveFollowService,

View File

@ -8,7 +8,6 @@ import dev.usbharu.hideout.query.UserQueryService
import dev.usbharu.hideout.service.core.Transaction import dev.usbharu.hideout.service.core.Transaction
import dev.usbharu.hideout.service.user.UserService import dev.usbharu.hideout.service.user.UserService
import io.ktor.http.* import io.ktor.http.*
import org.koin.core.annotation.Single
import org.springframework.stereotype.Service import org.springframework.stereotype.Service
@Service @Service
@ -16,7 +15,6 @@ interface APUndoService {
suspend fun receiveUndo(undo: Undo): ActivityPubResponse suspend fun receiveUndo(undo: Undo): ActivityPubResponse
} }
@Single
@Service @Service
@Suppress("UnsafeCallOnNullableType") @Suppress("UnsafeCallOnNullableType")
class APUndoServiceImpl( class APUndoServiceImpl(

View File

@ -18,7 +18,6 @@ import io.ktor.client.*
import io.ktor.client.request.* import io.ktor.client.request.*
import io.ktor.client.statement.* import io.ktor.client.statement.*
import io.ktor.http.* import io.ktor.http.*
import org.koin.core.annotation.Single
import org.springframework.stereotype.Service import org.springframework.stereotype.Service
@Service @Service
@ -37,7 +36,6 @@ interface APUserService {
suspend fun fetchPersonWithEntity(url: String, targetActor: String? = null): Pair<Person, User> suspend fun fetchPersonWithEntity(url: String, targetActor: String? = null): Pair<Person, User>
} }
@Single
@Service @Service
class APUserServiceImpl( class APUserServiceImpl(
private val userService: UserService, private val userService: UserService,

View File

@ -12,7 +12,6 @@ import dev.usbharu.hideout.service.core.Transaction
import dev.usbharu.hideout.service.post.PostService import dev.usbharu.hideout.service.post.PostService
import dev.usbharu.hideout.service.reaction.ReactionService import dev.usbharu.hideout.service.reaction.ReactionService
import dev.usbharu.hideout.util.AcctUtil import dev.usbharu.hideout.util.AcctUtil
import org.koin.core.annotation.Single
import org.springframework.stereotype.Service import org.springframework.stereotype.Service
import java.time.Instant import java.time.Instant
@ -45,7 +44,6 @@ interface PostApiService {
suspend fun removeReaction(userId: Long, postId: Long) suspend fun removeReaction(userId: Long, postId: Long)
} }
@Single
@Service @Service
class PostApiServiceImpl( class PostApiServiceImpl(
private val postService: PostService, private val postService: PostService,

View File

@ -9,7 +9,6 @@ import dev.usbharu.hideout.query.FollowerQueryService
import dev.usbharu.hideout.query.UserQueryService import dev.usbharu.hideout.query.UserQueryService
import dev.usbharu.hideout.service.core.Transaction import dev.usbharu.hideout.service.core.Transaction
import dev.usbharu.hideout.service.user.UserService import dev.usbharu.hideout.service.user.UserService
import org.koin.core.annotation.Single
import org.springframework.stereotype.Service import org.springframework.stereotype.Service
import kotlin.math.min import kotlin.math.min
@ -38,7 +37,6 @@ interface UserApiService {
suspend fun follow(targetAcct: Acct, sourceId: Long): Boolean suspend fun follow(targetAcct: Acct, sourceId: Long): Boolean
} }
@Single
@Service @Service
class UserApiServiceImpl( class UserApiServiceImpl(
private val userQueryService: UserQueryService, private val userQueryService: UserQueryService,

View File

@ -8,7 +8,6 @@ import dev.usbharu.hideout.query.UserQueryService
import dev.usbharu.hideout.service.auth.JwtService import dev.usbharu.hideout.service.auth.JwtService
import dev.usbharu.hideout.service.core.Transaction import dev.usbharu.hideout.service.core.Transaction
import dev.usbharu.hideout.service.user.UserAuthServiceImpl import dev.usbharu.hideout.service.user.UserAuthServiceImpl
import org.koin.core.annotation.Single
import org.springframework.stereotype.Service import org.springframework.stereotype.Service
@Service @Service
@ -17,7 +16,6 @@ interface UserAuthApiService {
suspend fun refreshToken(refreshToken: RefreshToken): JwtToken suspend fun refreshToken(refreshToken: RefreshToken): JwtToken
} }
@Single
@Service @Service
class UserAuthApiServiceImpl( class UserAuthApiServiceImpl(
private val userAuthService: UserAuthServiceImpl, private val userAuthService: UserAuthServiceImpl,

View File

@ -3,7 +3,6 @@ package dev.usbharu.hideout.service.api
import dev.usbharu.hideout.domain.model.hideout.entity.User import dev.usbharu.hideout.domain.model.hideout.entity.User
import dev.usbharu.hideout.query.UserQueryService import dev.usbharu.hideout.query.UserQueryService
import dev.usbharu.hideout.service.core.Transaction import dev.usbharu.hideout.service.core.Transaction
import org.koin.core.annotation.Single
import org.springframework.stereotype.Service import org.springframework.stereotype.Service
@Service @Service
@ -11,7 +10,6 @@ interface WebFingerApiService {
suspend fun findByNameAndDomain(name: String, domain: String): User suspend fun findByNameAndDomain(name: String, domain: String): User
} }
@Single
@Service @Service
class WebFingerApiServiceImpl(private val transaction: Transaction, private val userQueryService: UserQueryService) : class WebFingerApiServiceImpl(private val transaction: Transaction, private val userQueryService: UserQueryService) :
WebFingerApiService { WebFingerApiService {

View File

@ -4,7 +4,6 @@ import dev.usbharu.hideout.plugins.KtorKeyMap
import dev.usbharu.hideout.query.UserQueryService import dev.usbharu.hideout.query.UserQueryService
import dev.usbharu.hideout.service.core.Transaction import dev.usbharu.hideout.service.core.Transaction
import io.ktor.http.* import io.ktor.http.*
import org.koin.core.annotation.Single
import org.springframework.stereotype.Service import org.springframework.stereotype.Service
import tech.barbero.http.message.signing.SignatureHeaderVerifier import tech.barbero.http.message.signing.SignatureHeaderVerifier
@ -13,7 +12,6 @@ interface HttpSignatureVerifyService {
fun verify(headers: Headers): Boolean fun verify(headers: Headers): Boolean
} }
@Single
@Service @Service
class HttpSignatureVerifyServiceImpl( class HttpSignatureVerifyServiceImpl(
private val userQueryService: UserQueryService, private val userQueryService: UserQueryService,

View File

@ -14,7 +14,6 @@ import dev.usbharu.hideout.repository.JwtRefreshTokenRepository
import dev.usbharu.hideout.service.core.MetaService import dev.usbharu.hideout.service.core.MetaService
import dev.usbharu.hideout.util.RsaUtil import dev.usbharu.hideout.util.RsaUtil
import kotlinx.coroutines.runBlocking import kotlinx.coroutines.runBlocking
import org.koin.core.annotation.Single
import org.springframework.stereotype.Service import org.springframework.stereotype.Service
import java.time.Instant import java.time.Instant
import java.time.temporal.ChronoUnit import java.time.temporal.ChronoUnit
@ -31,7 +30,6 @@ interface JwtService {
} }
@Suppress("InjectDispatcher") @Suppress("InjectDispatcher")
@Single
@Service @Service
class JwtServiceImpl( class JwtServiceImpl(
private val metaService: MetaService, private val metaService: MetaService,

View File

@ -1,10 +1,8 @@
package dev.usbharu.hideout.service.core package dev.usbharu.hideout.service.core
import org.jetbrains.exposed.sql.transactions.experimental.newSuspendedTransaction import org.jetbrains.exposed.sql.transactions.experimental.newSuspendedTransaction
import org.koin.core.annotation.Single
import org.springframework.stereotype.Service import org.springframework.stereotype.Service
@Single
@Service @Service
class ExposedTransaction : Transaction { class ExposedTransaction : Transaction {
override suspend fun <T> transaction(block: suspend () -> T): T { override suspend fun <T> transaction(block: suspend () -> T): T {

View File

@ -4,10 +4,8 @@ import dev.usbharu.hideout.domain.model.hideout.entity.Jwt
import dev.usbharu.hideout.domain.model.hideout.entity.Meta import dev.usbharu.hideout.domain.model.hideout.entity.Meta
import dev.usbharu.hideout.exception.NotInitException import dev.usbharu.hideout.exception.NotInitException
import dev.usbharu.hideout.repository.MetaRepository import dev.usbharu.hideout.repository.MetaRepository
import org.koin.core.annotation.Single
import org.springframework.stereotype.Service import org.springframework.stereotype.Service
@Single
@Service @Service
class MetaServiceImpl(private val metaRepository: MetaRepository, private val transaction: Transaction) : class MetaServiceImpl(private val metaRepository: MetaRepository, private val transaction: Transaction) :
MetaService { MetaService {

View File

@ -4,14 +4,12 @@ import dev.usbharu.hideout.domain.model.hideout.entity.Jwt
import dev.usbharu.hideout.domain.model.hideout.entity.Meta import dev.usbharu.hideout.domain.model.hideout.entity.Meta
import dev.usbharu.hideout.repository.MetaRepository import dev.usbharu.hideout.repository.MetaRepository
import dev.usbharu.hideout.util.ServerUtil import dev.usbharu.hideout.util.ServerUtil
import org.koin.core.annotation.Single
import org.slf4j.Logger import org.slf4j.Logger
import org.slf4j.LoggerFactory import org.slf4j.LoggerFactory
import org.springframework.stereotype.Service import org.springframework.stereotype.Service
import java.security.KeyPairGenerator import java.security.KeyPairGenerator
import java.util.* import java.util.*
@Single
@Service @Service
class ServerInitialiseServiceImpl( class ServerInitialiseServiceImpl(
private val metaRepository: MetaRepository, private val metaRepository: MetaRepository,

View File

@ -6,12 +6,10 @@ import dev.usbharu.hideout.exception.UserNotFoundException
import dev.usbharu.hideout.repository.PostRepository import dev.usbharu.hideout.repository.PostRepository
import dev.usbharu.hideout.repository.UserRepository import dev.usbharu.hideout.repository.UserRepository
import dev.usbharu.hideout.service.ap.APNoteService import dev.usbharu.hideout.service.ap.APNoteService
import org.koin.core.annotation.Single
import org.springframework.stereotype.Service import org.springframework.stereotype.Service
import java.time.Instant import java.time.Instant
@Service @Service
@Single
class PostServiceImpl( class PostServiceImpl(
private val postRepository: PostRepository, private val postRepository: PostRepository,
private val userRepository: UserRepository, private val userRepository: UserRepository,

View File

@ -4,10 +4,8 @@ import dev.usbharu.hideout.domain.model.hideout.entity.Reaction
import dev.usbharu.hideout.query.ReactionQueryService import dev.usbharu.hideout.query.ReactionQueryService
import dev.usbharu.hideout.repository.ReactionRepository import dev.usbharu.hideout.repository.ReactionRepository
import dev.usbharu.hideout.service.ap.APReactionService import dev.usbharu.hideout.service.ap.APReactionService
import org.koin.core.annotation.Single
import org.springframework.stereotype.Service import org.springframework.stereotype.Service
@Single
@Service @Service
class ReactionServiceImpl( class ReactionServiceImpl(
private val reactionRepository: ReactionRepository, private val reactionRepository: ReactionRepository,

View File

@ -2,13 +2,11 @@ package dev.usbharu.hideout.service.user
import dev.usbharu.hideout.config.Config import dev.usbharu.hideout.config.Config
import dev.usbharu.hideout.query.UserQueryService import dev.usbharu.hideout.query.UserQueryService
import org.koin.core.annotation.Single
import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder
import org.springframework.stereotype.Service import org.springframework.stereotype.Service
import java.security.* import java.security.*
import java.util.* import java.util.*
@Single
@Service @Service
class UserAuthServiceImpl( class UserAuthServiceImpl(
val userQueryService: UserQueryService val userQueryService: UserQueryService

View File

@ -10,11 +10,9 @@ import dev.usbharu.hideout.query.FollowerQueryService
import dev.usbharu.hideout.query.UserQueryService import dev.usbharu.hideout.query.UserQueryService
import dev.usbharu.hideout.repository.UserRepository import dev.usbharu.hideout.repository.UserRepository
import dev.usbharu.hideout.service.ap.APSendFollowService import dev.usbharu.hideout.service.ap.APSendFollowService
import org.koin.core.annotation.Single
import org.springframework.stereotype.Service import org.springframework.stereotype.Service
import java.time.Instant import java.time.Instant
@Single
@Service @Service
class UserServiceImpl( class UserServiceImpl(
private val userRepository: UserRepository, private val userRepository: UserRepository,

View File

@ -1,6 +0,0 @@
package dev.usbharu.hideout
import io.ktor.server.application.*
fun Application.empty() {
}