티스토리 뷰

반응형
import org.apache.nifi.controller.ControllerService

def lookup = context.controllerServiceLookup
def dbcpServiceId = lookup.getControllerServiceIdentifiers(ControllerService).find { 
    cs -> lookup.getControllerServiceName(cs) == "HF_TSTDB"
}
def dbcpService = lookup.getControllerService(dbcpServiceId)
//def dbcpService = context.controllerServiceLookup.getControllerService("43c54e78-0191-1000-9a98-fd1fe94dc5e5")

def conn = dbcpService.getConnection()
반응형