Skip to content

Commit

Permalink
This diff shows a change in the Application.kt file, specifically m…
Browse files Browse the repository at this point in the history
…odifying the classes included in the Spring Boot component scan. The `AiTranslatorController` class is being removed from the explicit scan, while the `AssistantManager` class (presumably nested within `AiTranslatorController`) is being added.

This change suggests a refactoring where the `AssistantManager` is now intended to be a standalone Spring-managed component, rather than being implicitly managed through its parent class `AiTranslatorController`. This could be due to a desire for greater control over the lifecycle and dependencies of the `AssistantManager`, or perhaps to facilitate testing or modularity.  Since `AiTranslatorController` is no longer explicitly scanned, Spring will likely still create it if `AssistantManager` is injected into it using dependency injection.  This change makes the `AssistantManager`'s Spring management more explicit.
  • Loading branch information
cheroliv committed Nov 20, 2024
1 parent 2b1c61c commit dc52df8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions api/src/main/kotlin/app/Application.kt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package app

import ai.translator.AiTranslatorController
import ai.translator.AiTranslatorController.AssistantManager
import app.utils.LoggerUtils.startupLog
import app.utils.Properties
import org.springframework.boot.autoconfigure.SpringBootApplication
Expand All @@ -11,8 +11,8 @@ import users.User
@SpringBootApplication(
scanBasePackageClasses = [
Application::class,
AiTranslatorController::class,
User::class,
AssistantManager::class,
],
)
@EnableConfigurationProperties(Properties::class)
Expand Down

0 comments on commit dc52df8

Please sign in to comment.