添加链接
link管理
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接
相关文章推荐
风度翩翩的柿子  ·  Scope functions | ...·  1 月前    · 
乖乖的红薯  ·  ValueError: I/O ...·  4 月前    · 
暴走的单车  ·  photoshop cs4基础 ...·  4 月前    · 
瘦瘦的海豚  ·  肾结石| 港怡医院·  5 月前    · 

@kotlin hi, i’m use kotlin with anno and spring,now i have a problem.please see it in java code:

@ComponentScan(basePackages = "com.kis",excludeFilters = @ComponentScan.Filter({Controller.class, RestController.class,Configuration.class}))

when it convert to kotlin.it’s can’t work.like this

@ComponentScan(basePackages = "com.kis", excludeFilters = @ComponentScan.Filter({Controller.class, RestController.class,Configuration.class}))

i can change basePackages=arrayOf("com.kis.config") but about excludeFilters i have no way…

how can i do?
btw:what is the direction of kotlin for future? android or web(j2ee)

excludeFilters = arrayOf(ComponentScan.Filter({Controller::class, RestController::class,Configuration::class})))

That should do it :slightly_smiling:

must use like this

@ComponentScan(excludeFilters = arrayOf(ComponentScan.Filter(Controller::class),ComponentScan.Filter(RestController::class),ComponentScan.Filter(Configuration::class))