spring-boot-testjars
spring-boot-testjars copied to clipboard
Consider a new API that abstracts away CommonsExecWebServerFactoryBean
Given the following configuration:
@Bean
public CommonsExecWebServerFactoryBean authorizationServer() {
return CommonsExecWebServerFactoryBean.builder()
.mainClass(TestAuthorizationServerApplication.class.getName())
.classpath((classpath) -> classpath
.entries(MavenClasspathEntry.springBootStarter("oauth2-authorization-server"))
.recursive(TestAuthorizationServerApplication.class)
);
}
Can we consider a new API that abstracts away CommonsExecWebServerFactoryBean? I don't feel the CommonsExecWebServerFactoryBean is intuitive and is more of a technical implementation detail. I would prefer something as simple as WebServer.
@jgrandja Can you create a ticket per proposal so we can discuss them in isolation? I don't want one discussion to block another? I also want to ensure we consider each change you are proposing.
NOTE: Feel free to use this ticket as one of the proposals if you like
+1 for this. There's nothing special about CommonsExec or FactoryBean in relation to what the user wants here (a concise way to launch some code as a standalone app).