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:
@@ -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))
|
||||
|
||||
Reference in New Issue
Block a user