Home > OS >  When applying the annotation, it throws an error (@SpringBootApplication)
When applying the annotation, it throws an error (@SpringBootApplication)

Time:09-29

such a question. When adding the annotation @SpringBootApplication(exclude={SecurityAutoConfiguration.class}) Gives an error when building Name expected The IDE writes like this: enter image description here

What could be the problem?

CodePudding user response:

Assuming by tags that you are using kotlin and it has slightly different syntax actually.

Change

@SpringBootApplication(exclude={SecurityAutoConfiguration.class})

To

@SpringBootApplication(exclude=[SecurityAutoConfiguration::class])
  • Related