Last active
September 7, 2020 14:43
-
-
Save manuwell/dd4ad0aa256d2df3a2ab2f665ae4977b to your computer and use it in GitHub Desktop.
medium - springboot de um jeito diferente
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Slf4j | |
@SpringBootApplication | |
@EntityScan({ "com.app.domain.models" }) | |
@EnableJpaRepositories({ "com.app.domain.repositories" }) | |
@ComponentScan({ "com.app.config", "com.app.domain", "com.app.backoffice" }) | |
@EnableAutoConfiguration | |
public class BackofficeApplication { | |
public static void main(String[] args) throws Exception { | |
log.info("STARTING BACKOFFICE APPLICATION"); | |
SpringApplication.run(BackofficeApplication.class, args); | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Slf4j | |
@SpringBootApplication | |
@EntityScan({ "com.app.domain.models" }) | |
@EnableJpaRepositories({ "com.app.domain.repositories" }) | |
@ComponentScan({ "com.app.config", "com.app.domain", "com.app.workers" }) | |
@EnableAutoConfiguration | |
public class WorkerApplication { | |
public static void main(String[] args) throws Exception { | |
log.info("STARTING WORKER APPLICATION"); | |
SpringApplication app = new SpringApplication(WorkerApplication.class); | |
app.setWebApplicationType(WebApplicationType.NONE); // desligando a interface web | |
app.run(args); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment