Showing posts with label MicroServices. Show all posts
Showing posts with label MicroServices. Show all posts

October 01, 2018

Solution for upload Large File in a Spring Boot

Default browser/postman allows 1MB files for uploading, if want to upload more then 1MB, we need to do below configurations based spring-boot versions Exception while uploading file/image: org.springframework.web.multipart.MultipartException: Could not parse multipart servlet request; nested exception is java.lang.IllegalStateException:...
Read more ...

December 28, 2017

How to handle "java net unknownhostexception" exception

While creating restTemplate, we have to configure proxy settings like: @Bean RestTemplate restTemplate() { final String username = "xxxxx"; final String password = "XXXXXX"; final String proxyUrl = "XXXX.com"; final int port = 8080; CredentialsProvider credsProvider = new BasicCredentialsProvider(); credsProvider.setCredentials( new AuthScope(proxyUrl, port), new UsernamePasswordCredentials(username, password)); HttpHost...
Read more ...

December 08, 2017

Spring Boot Interview Questions

In this post, we will look at Spring Boot Interview questions. Examples are provided with an explanation.  Q: What is Spring Boot? A: Over the years spring has become more and more complex as new functionalities have been added. Just visit the page-https://spring.io/projects and we will see all the spring projects we can use in our application for different functionalities. If one has to start a new spring project...
Read more ...

Difference between Object Oriented Programming(OOP) vs. Functional Programming(FP)

Object-oriented programming (OOP) is a programming paradigm based on the concept of "objects", which are data structures that contain data, in the form of fields, often known as attributes; and code, in the form of procedures, often known as methods -- Wikipedia https://en.wikipedia.org/wiki/Object-oriented_programming Functional...
Read more ...

July 21, 2017

Evolving a REST API is a difficult problem – one for which many options are available - Solution for API Versioning

 Situation:     Evolving a REST API is a difficult problem – one for which many options are available - Solution for API Versioning. Action:   > Specifying the version number in URI  E.g.: /v2/products/               The URI in REST should represent the resource only              This is...
Read more ...

How Internally works Eureka connection pool? How to configure?

We can configure total connections Eureka, updating peerNodeTotalConnections property in the application.yml (default: eurkea peerNodeTotalConnections is 1000) in eureka application: eureka:     server:        waitTimeInMsWhenSyncEmpty: 0        peerNodeTotalConnections: 1000        peerNodeTotalConnectionsPerHost: 500 Ref: https://github.com/spring-cloud/spring-cloud-netflix/blob/master/spring-cloud-netflix-eureka-server/src/main/java/org/springframework/cloud/netflix/eureka/server/EurekaServerConfigBean.java EurekaServerConfigBean...
Read more ...

August 01, 2014

Mockito Junit Code Examples

Mockito is an unwrap source testing framework for Java released under the MIT License. The framework allows the creation of test double objects (mock objects) inautomated unit tests for the purpose of Test-driven Development (TDD) or Behavior Driven Development (BDD). Unit...
Read more ...

My Favorite Site's List

#update below script more than 500 posts