Book Image

Spring 5.0 Cookbook

By : Sherwin John C. Tragura
Book Image

Spring 5.0 Cookbook

By: Sherwin John C. Tragura

Overview of this book

The Spring framework has been the go-to framework for Java developers for quite some time. It enhances modularity, provides more readable code, and enables the developer to focus on developing the application while the underlying framework takes care of transaction APIs, remote APIs, JMX APIs, and JMS APIs. The upcoming version of the Spring Framework has a lot to offer, above and beyond the platform upgrade to Java 9, and this book will show you all you need to know to overcome common to advanced problems you might face. Each recipe will showcase some old and new issues and solutions, right from configuring Spring 5.0 container to testing its components. Most importantly, the book will highlight concurrent processes, asynchronous MVC and reactive programming using Reactor Core APIs. Aside from the core components, this book will also include integration of third-party technologies that are mostly needed in building enterprise applications. By the end of the book, the reader will not only be well versed with the essential concepts of Spring, but will also have mastered its latest features in a solution-oriented manner.
Table of Contents (20 chapters)
Title Page
Credits
About the Author
About the Reviewer
www.PacktPub.com
Customer Feedback
Preface

Installing the MongoDB 3.2 database server


Spring 5.0 has the capability to perform data transactions with NoSQL databases where schema design is not fixed and the data involved is so complex wherein its read-write operations are defined by graph theory. The MongoDB 3.2 server will highlight some NoSQL and document-based data transactions with Spring 5.0 using the raw implementation and its Spring Data module.

Getting started

Visit the site https://www.mongodb.com/download-center#community to download MongoDB under different operating system platforms. It also comes with SSL and no-SSL support.

How to do it...

  1. After downloading the installer (for example, mongodb-win32-x86_64-2008plus-ssl-3.2.0-signed.msi), follow the installation wizards:
  1. After the installation, create the MONGODB_HOME system variable in your classpath and expose the <installation_folder>MongoDbServer3.2bin commands.
  2. Since MongoDB requires a data directory to store all data, create a default data directory path, /data/db, at the root level (for example, C:datadb).
  3. You are now ready to start the MongoDb server.

How it works...

The MongoDB server will be running with the default port 27017. In order to run the server, we type the mongod command using the command-line terminal:

And then we open another terminal to open the server for the no-SQL transactions through the mongo command: