spring-boot-testjars icon indicating copy to clipboard operation
spring-boot-testjars copied to clipboard

Consider a new API that abstracts away CommonsExecWebServerFactoryBean

Open jgrandja opened this issue 1 year ago • 2 comments

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 avatar May 06 '24 16:05 jgrandja

@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

rwinch avatar Aug 30 '24 20:08 rwinch

+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).

dsyer avatar Jan 29 '25 09:01 dsyer