Skip to content

Conversation

ayudovin
Copy link
Contributor

@ayudovin ayudovin commented Apr 5, 2019

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Apr 5, 2019
… into autoConfiguration-support-mongo-reactiveGridFsTemplate
@ayudovin
Copy link
Contributor Author

ayudovin commented Apr 6, 2019

Test failure seems unrelated

ayudovin added 2 commits April 7, 2019 23:04
… into autoConfiguration-support-mongo-reactiveGridFsTemplate
… into autoConfiguration-support-mongo-reactiveGridFsTemplate
public ReactiveGridFsTemplate reactiveGridFsTemplate(
ReactiveMongoDatabaseFactory reactiveMongoDbFactory,
MappingMongoConverter mappingMongoConverter) {
return new ReactiveGridFsTemplate(reactiveMongoDbFactory, mappingMongoConverter);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ideally, we should configure ReactiveGridFsTemplate with DataBufferFactory to share potentially resources.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ReactiveGridFsTemplate constructor has 4 parameters:

  • DataBufferFactory

  • ReactiveMongoDatabaseFactory

  • MappingMongoConverter

  • bucket

What value of bucket should be in this case?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mbhave mbhave added type: enhancement A general enhancement and removed status: waiting-for-triage An issue we've not yet triaged labels Apr 10, 2019
@mbhave mbhave added this to the 2.2.x milestone Apr 10, 2019
Copy link
Member

@snicoll snicoll left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. I think the test has to be rewritten unless I am missing something.

@Test
public void gridFsTemplateExists() {
this.contextRunner.run((context) -> assertThat(context)
.hasSingleBean(ReactiveMongoTemplate.class));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks like you're checking for the wrong bean there.


@Bean
@ConditionalOnMissingBean
public DataBufferFactory dataBufferFactory() {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we flip those two methods? Required dependencies are defined before so I'd like to keep it that way.

@snicoll snicoll added the status: waiting-for-feedback We need additional information before we can continue label Apr 17, 2019
@snicoll snicoll self-assigned this Apr 17, 2019
@snicoll snicoll removed the status: waiting-for-feedback We need additional information before we can continue label Apr 17, 2019
@snicoll snicoll modified the milestones: 2.2.x, 2.2.0.M3 Apr 17, 2019
@snicoll snicoll closed this in e24c17d Apr 17, 2019
snicoll added a commit that referenced this pull request Apr 17, 2019
* pr/16467:
  Polish "Add auto-configuration support for ReactiveGridFsTemplate"
  Add auto-configuration support for ReactiveGridFsTemplate
@snicoll
Copy link
Member

snicoll commented Apr 17, 2019

@ayudovin thanks for the feedback

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement A general enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants