Skip to content
cccskills
FreePublished on GitHub

annotations

Conventions for using annotations in all tests using Jupiter

The English summary is being prepared. Showing the original description.

See how to install

Files included (1)

  • SKILL.md1.8 KB

SKILL.md (original)

Review the instructions the agent will receive before you install.

1. Make sure to use @param:Value eveywhere @Value is declared for Kotlin classes and files only

Remember to run tests after replacing all of them

2. Make sure to use interpolation prefixes for the @Value annotation in Kotlin classes and files only

Example 1 (applying to params)

Replace 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,
) 

Example 2 (applying to fields, on lateinit vars

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.

3. Checklist

[] 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

Reviews

No reviews yet. Tell others what you thought.

Comments

No login needed. Share how it worked for you, ask a question, or note where it did not run.

No comments yet. Be the first to write one.

Comments are published right away. Do not include personal information such as email addresses or phone numbers. Up to 2 URLs.

0 / 1,000 characters

This form is protected by reCAPTCHA, and the Google Privacy Policy and Terms of Service apply.

More skills from this repository

Conventions for Angular applications

The English summary is being prepared. Showing the original description.

jesperancinha/healthy-cameras3Updated Aug 11, 2026

docker

Free

Conventions for docker

The English summary is being prepared. Showing the original description.

jesperancinha/healthy-cameras3Updated Aug 11, 2026

Conventions for using in all JEE frameworks. These are common standards for CDI

The English summary is being prepared. Showing the original description.

jesperancinha/healthy-cameras3Updated Aug 11, 2026

Conventions for using Java

The English summary is being prepared. Showing the original description.

jesperancinha/healthy-cameras3Updated Aug 11, 2026

Conventions for using in all JVM languages

The English summary is being prepared. Showing the original description.

jesperancinha/healthy-cameras3Updated Aug 11, 2026

Conventions for using Kotlin

The English summary is being prepared. Showing the original description.

jesperancinha/healthy-cameras3Updated Aug 11, 2026

See all skills by jesperancinha

Report a problem with this skill