Why Is Swagger JSON Better Than Swagger Java Client?

The Swagger Java-Based Client Using Java Annotations on the Controller layer Pros and Cons It’s the old way of creating web-based REST API documents through the Swagger Java library. It’s easy for Java developers to code. All API description of endpoints will be added in the Java annotations parameters. Swagger API dependency has to be added to the MavenContinue reading “Why Is Swagger JSON Better Than Swagger Java Client?”

Rate this:

10 Challenges of Microservices and Solutions – Tips & Tricks

I am cloud API developer and architect and currently working on Google’s GCP based microservices for a large retail client of USA. Transitioning/implementing to microservices creates significant challenges for organizations. I have identified these challenges and solution based on my real exposure of microservices on PROD. I am writing this white paper in June 2018.Continue reading “10 Challenges of Microservices and Solutions – Tips & Tricks”

Rate this:

Logback is not writing specific log file Solution

Logback is not writing specific log file Solution Logback Configuration: <property name=”DEV_HOME” value=”/root/apps/logs” /> <appender name=”FILE-AUDIT” class=”ch.qos.logback.core.rolling.RollingFileAppender”> <file>${DEV_HOME}/myapp.log</file> <rollingPolicy class=”ch.qos.logback.core.rolling.TimeBasedRollingPolicy”> <!– rollover daily –> <fileNamePattern>${DEV_HOME}/archived/myapp.%d{yyyy-MM-dd}.%i.log.gz</fileNamePattern> <timeBasedFileNamingAndTriggeringPolicy class=”ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP”> <!– or whenever the file size reaches the max –> <maxFileSize>${rolling.file.max.size}</maxFileSize> </timeBasedFileNamingAndTriggeringPolicy> <maxHistory>${rolling.file.max.history}</maxHistory> </rollingPolicy> <encoder> <pattern>${rolling.file.encoder.pattern}</pattern> </encoder> </appender> Issue is related to conflict between log4j and Logback, whenContinue reading “Logback is not writing specific log file Solution”

Rate this:

Apache Common Pool – Object pool example

Advantage of using object pool is to improve performance of the application by saving time to create new object from other source for the same purpose. Object pool creates once and reuse for other subsequent operations on the same object. You can customize other configuration settings. Please visit this URL for more info: http://commons.apache.org/proper/commons-pool/api-1.6/index.html Step:1 Add this MavenContinue reading “Apache Common Pool – Object pool example”

Rate this:

Cassandra DataStax – Developer Guide with Spring Data Cassandra

We will discus Cassandra implementation : Important Points: http://www.datastax.com/documentation/cassandra/2.0/cassandra/gettingStartedCassandraIntro.html Recommended stable production version – DataStax Enterprise 4.5. (When this article as written) Compound Partition  and Clustered keys- http://www.datastax.com/documentation/cql/3.0/cql/ddl/ddl_compound_keys_c.html Spring-Data-Cassandra API and reference docs- http://projects.spring.io/spring-data-cassandra/  (Current release- 1.1.0.RELEASE) Download and Installation:   1. Tarball Installation DataStax DB You need to register yourself with DataStax for download. DataStax Enterprise – http://www.datastax.com/download#dl-enterprise.Continue reading “Cassandra DataStax – Developer Guide with Spring Data Cassandra”

Rate this:

MongoDB + Java + Maven Sample Application

Prerequisite: Download and Install MongoDB (http://docs.mongodb.org/manual/installation/) on your local machine and run two instances in two separate terminal/command prompt. This sample app is developed on Mac OS/Linux env. 1. Start MongoDB server using : ./mongod 2. Start MongoDB client : ./mongo Add MongoDB Jar dependency in your project:   Sample MONGODB CRUD code:

Rate this:

Git vs SVN – Advantages of GIT

Integration– Git has very flexible integration with Stash(GIt UI), Bamboo (Build tool) , JIRA (Agile). We can associate feature (a separate branch of code for a given story) branch with any JIRA story ( part of a sprint) by creating branch from Stash. So that all code changes/commits can be easily audit/trackable. Bamboo create buildContinue reading “Git vs SVN – Advantages of GIT”

Rate this:

How HashMap works in Java

Note: Original article – http://javarevisited.blogspot.com/2011/02/how-hashmap-works-in-java.html How HashMap works in Java How HashMap works in Java or sometime how get method work in HashMap is common interview questions now days. Almost everybody who worked in Java knows what hashMap is, where to use hashMap or difference between hashtable and HashMap then why this interview question becomes so special? BecauseContinue reading “How HashMap works in Java”

Rate this: