Report this

What is the reason for this report?

Should I change value of mongo bean of a Spring Web App when deploying in digitalOcean server?

Posted on October 22, 2014
Siva

By Siva

So, I am deploying my spring web app in tomcat server in production environment. I have my production server ip address. Should I replace the value of mongo bean from localhost to my ipaddress, in order to access the db?

<!-- Factory bean that creates the Mongo instance -->
<bean id="mongo" class="org.springframework.data.mongodb.core.MongoFactoryBean">
    <property name="host" value="localhost" />
</bean>

What else should I change, in order to make my web app work with mongodb in production environment?



This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

This question was answered by @asb:

Are running the MongoDB instance on the same server? If so, you will most likely want to leave localhost.

View the original comment

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.