Skip to content

Commit

Permalink
fix: support ConfigurationProperties("prefix") (#888)
Browse files Browse the repository at this point in the history
  • Loading branch information
tangcent authored Dec 24, 2022
1 parent 7c06644 commit bfade02
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -69,11 +69,11 @@ abstract class FieldsToMessageAction : BasicAnAction {
super.actionPerformed(actionContext, project, anActionEvent)

try {
actionContext.runInWriteUI {
actionContext.runInReadUI {
val currentClass = ActionUtils.findCurrentClass()
if (currentClass == null) {
logger!!.info("no class be selected!")
return@runInWriteUI
return@runInReadUI
}
contextSwitchListener!!.switchTo(currentClass)
val psiType = jvmClassHelper!!.resolveClassToType(currentClass)
Expand All @@ -84,7 +84,7 @@ abstract class FieldsToMessageAction : BasicAnAction {
}
}
} catch (e: Exception) {
logger!!.traceError("To json failed", e)
logger!!.traceError("parse fields failed", e)
}
}

Expand Down
1 change: 1 addition & 0 deletions idea-plugin/src/main/resources/.recommend.easy.api.config
Original file line number Diff line number Diff line change
Expand Up @@ -539,6 +539,7 @@ field.name=groovy:```

#[properties]*
# @ConfigurationProperties
properties.prefix=@org.springframework.boot.context.properties.ConfigurationProperties
properties.prefix=@org.springframework.boot.context.properties.ConfigurationProperties#prefix

#[Fastjson]*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ api.status[#undone]=undone
api.status[#todo]=undone
field.mock=#mock
constant.field.ignore=groovy:it.name()=="serialVersionUID"
properties.prefix=@org.springframework.boot.context.properties.ConfigurationProperties
properties.prefix=@org.springframework.boot.context.properties.ConfigurationProperties#prefix
[email protected]#value
enum.use.by.type=true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ field.mock=#mock
#ignore serialVersionUID
constant.field.ignore=groovy:it.name()=="serialVersionUID"
# @ConfigurationProperties
properties.prefix=@org.springframework.boot.context.properties.ConfigurationProperties
properties.prefix=@org.springframework.boot.context.properties.ConfigurationProperties#prefix
#Support for Fastjson annotations
[email protected]#value
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ field.mock=#mock
#ignore serialVersionUID
constant.field.ignore=groovy:it.name()=="serialVersionUID"
# @ConfigurationProperties
properties.prefix=@org.springframework.boot.context.properties.ConfigurationProperties
properties.prefix=@org.springframework.boot.context.properties.ConfigurationProperties#prefix
#Support for Fastjson annotations
[email protected]#value
Expand Down

0 comments on commit bfade02

Please sign in to comment.