원클릭으로
annotations
Conventions for using annotations in all tests using Jupiter
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Conventions for using annotations in all tests using Jupiter
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
| name | annotations |
| description | Conventions for using annotations in all tests using Jupiter |
@param:Value eveywhere @Value is declared for Kotlin classes and files onlyRemember to run tests after replacing all of them
@Value annotation in Kotlin classes and files onlyReplace this:
class VirtualThreadsDemoApplication(
val taskService: TaskService,
@param:Value("\${org.jesperancinha.vtcc.tasks}") private val tasks: Int,
)
with this:
class VirtualThreadsDemoApplication(
val taskService: TaskService,
@param:Value($$"${org.jesperancinha.vtcc.tasks}") private val tasks: Int,
)
Replace this:
class BankCompanyLauncherOtherPropertiesKotlinTest {
/**
* Properties and environment variables
*/
@Value($$"${environment}")
private lateinit var environment: String
}
with this:
class BankCompanyLauncherOtherPropertiesKotlinTest {
/**
* Properties and environment variables
*/
@field:Value($$"${environment}")
private lateinit var environment: String
}
The same should be applied to annotation @Autowired, but only for non-test classes and only in Kotlin files.
The same should be applied to annotation @JsonProperty, @JsonDeserialize, @JsonAlias, @LocalServerPort, but only in Kotlin files.
Do not add @Autowired, or any form of it with a different target to any parameter. @Autowired usage should be removed from production code instead.
[] Make sure there is no more use of @Value annotation being used directly
[] Make sure no @param:Value has been changed in a Java file
[] Check that all @param:Value annotations are used correctly