spring-projects-experimental / spring-boot-testjars

67 stars 6 forks source link

Consider a new API that abstracts away CommonsExecWebServerFactoryBean #44

Open jgrandja opened 6 months ago

jgrandja commented 6 months ago

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.

rwinch commented 2 months ago

@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