http-service: remove inferred destroy method on mongo client bean

It is important that the client isn't closed when using the jndi
provided client as it is a singleton and is reused.
This commit is contained in:
Adam
2019-08-09 10:43:55 -04:00
parent e0dcb668da
commit c6e24b832d

View File

@@ -161,7 +161,7 @@ public class SpringBootWebApplication extends SpringBootServletInitializer
return createSql2oFromDataSource(dataSource);
}
@Bean
@Bean(destroyMethod = "")
public MongoClient mongoClient(@Value("${mongo.host:}") String host, @Value("${mongo.jndiName:}") String jndiName) throws NamingException
{
if (!Strings.isNullOrEmpty(jndiName))