All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.netgrif.application.engine.startup.MailRunner.groovy Maven / Gradle / Ivy

Go to download

System provides workflow management functions including user, role and data management.

There is a newer version: 6.4.0
Show newest version
package com.netgrif.application.engine.startup

import com.netgrif.application.engine.mail.interfaces.IMailService
import org.slf4j.Logger
import org.slf4j.LoggerFactory
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.context.annotation.Profile
import org.springframework.stereotype.Component

@Component
@Profile("!test")
class MailRunner extends AbstractOrderedCommandLineRunner {

    private static final Logger log = LoggerFactory.getLogger(MailRunner)

    @Autowired
    private IMailService service

    @Override
    void run(String... strings) throws Exception {
        log.info("Starting test for mail connection")
        host()
        service.testConnection()
    }

    private void host() {
        log.info("HOST ADDRESS: " + InetAddress.localHost.hostAddress)
        log.info("HOST NAME: " + InetAddress.localHost.hostName)
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy