7 Comments

  1. Thanks for these tutorials. Is there any particular reason why you are implementing your own CORS filter instead of configuring CORS through @CrossOrigin annotation?

    1. Author

      Good one. That’s also possible, but take into account that the @CrossOrigin annotation works only at method or class level for a controller. That means you need to put that annotation in all your controllers to make it work. I’d rather use that approach when a fine-grain configuration is needed, while the CORS filter configuration applies overall to the entire application.

  2. Hi and big thanks for this great post.
    I have one question : where is the mongo url in application.properties. ( who the backend can see the database in a container).
    thank you again for sharing your knowledge

    1. Author

      Hi Amin,

      Thanks for your feedback! I’m using Spring Boot’s Externalized Configuration to pass that property (which would correspond to spring.data.mongodb.host) via an Environment Variable that you can find in the docker-compose.yml file. To be precise, here it is: https://github.com/mechero/full-reactive-stack/blob/master/docker/docker-compose.yml#L20

      In this case, I’m passing only the host since the port is the default one but, if you need extra configuration, it works in a similar way.

  3. thk for great post, i have two question that hope u make me clear,
    1/ why don’t u use @autowire anonation for our repository instance
    2/ i’ve not understanded about this snippet more

    QuijoteDataLoader(final QuoteMongoReactiveRepository quoteMongoReactiveRepository) {
    this.quoteMongoReactiveRepository = quoteMongoReactiveRepository;

    whether it’s a contrustor of this class or its have another special

    thank for help

Comments