Korean Advanced Topics

Last updated by admin 4 years ago

?? ??

Grails ???

Grails? ??? ??(separation of concerns) ???? ???? Grails ??????? ? ???? ???? ????:

  • ? ??: ?????? ??? ?? ????. ? ??? ???? ??? ????:
  • ???? ?? ??: business logic controlled by a middle tier that supports transactional demarcation. Artifacts are:
  • ??? ??: ???? ??? ???? ?? ??? ???? ????, ???? ?? ?? ???? ????. ???? ??? ????:
    • ??? ???? ?? ????
    • ??? ??
    • ORM ?? ?? ? ???
???? ?? ??? ??? ? ??? ???? ???. ??? ?? ??? ???? ??? ?? ? ?? ??? ?? ???? ?????.

??(injection) ??

Bean? ??(injection)? ???? ?? ?? ??? ?? ??? ?? ?????.

CountryService countryService
? ??? ?? CountryService ??? Bean? ????.

??? ?? ??? ??? ?? "byName" ??? true? ?????:

boolean byName = true
? ??? "countryService"?? ???? ??? Bean? ??? ????.

When beans should not be available for injection create an "available" property and set it false. This property can be used to avoid type conflicts.

boolean available = true

??? ?? ??

?? ??? ??? ?? ??? ??? ???? ??? ? ??? ?? ??, ? ??? ??? ?? ???? ????:

class SomeService {
    boolean transactional = false
    String transactional = "false" // this property is ignored for configurational purposes.
}