Skip to main content

Posts

swagger configuration

package com.shrikantmutyala.configuration; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.test.context.ActiveProfiles; import springfox.documentation.builders.ApiInfoBuilder; import springfox.documentation.service.ApiInfo; import springfox.documentation.spi.DocumentationType; import springfox.documentation.spring.web.plugins.Docket; import springfox.documentation.swagger2.annotations.EnableSwagger2; @Configuration @EnableSwagger2 @ActiveProfiles("default") public class ShrikantmutyalaSwaggerConfig {     @Bean     public Docket userApi() {         return new Docket(DocumentationType.SWAGGER_2).select().paths(path -> path.startsWith("/api")).build()                 .apiInfo(apiInfo());     }     private ApiInfo apiInfo() { ...
Recent posts

maven commands

Command Line Reference The following command line options are available when running Maven: usage: maven [options] [goal [goal2 [goal3] ...]] Options: -D,--define arg Define a system property -E,--emacs Produce logging information without adornments -P,--plugin-help Display help on using a given plugin -X,--debug Produce execution debug output -b,--nobanner Suppress logo banner -d,--dir arg Set effective working directory (ignored with -p or -f) -e,--exception Produce exception stack traces -f,--find arg Set project file and effective working directory by finding the project file -g,--goals Display available goals -h,--help Display help information -i,--info Display system information -o,--offline Build is happening offline -p,--pom arg Set project file -q,--quiet Reduce execution output -u,--usage Display help on using the current project ...

swagger annotations

@ApiResponses(value = { @ApiResponse(code = 200, message = "Successful retrieval of user detail"),             @ApiResponse(code = 404, message = "User with given username does not exist"),             @ApiResponse(code = 500, message = "Internal server error") }) @POST @Path("/pdf") @Consumes({ MediaType.MULTIPART_FORM_DATA }) @Produces({"image/jpeg,image/png"}) //@Produces("text/plain") public Response uploadPdfFile(@FormDataParam("file") InputStream fileInputStream,@FormDataParam("file") FormDataContentDisposition fileMetaData) throws Exception {  ... } @ApiModelProperty(value = "pet status in the store", allowableValues = "available,pending,sold")     @ApiOperation(value = "New User can register by himself by using this service", notes = "we have to provide valid email Id and Mobile number then user will get the verification mail or otp ") @Produces({...

Gmail Settings

For MAIL settings: Configure Outbound Email for shrikantmutyala.blogspot.in  for SMTP Servers​ Common Providers Settings Google Apps GMail SMTP HOST: smtp.gmail.com SMTPPORT: 587 (465 for SSL) USE SSL: Optional SMTP Auth: Login Yahoo SMTP HOST: smtp.mail.yahoo.com SMTPPORT : 465 USE SSL: Checked SMTP Auth: Login step 1: For Less Security https://www.google.com/settings/security/lesssecureapps step 2: For Unlocking Captcha https://accounts.google.com/DisplayUnlockCaptcha

DND

Idea DND . DND helps you to stop unwanted commercial phone calls and SMS on your Idea Mobile. Activate DND (Do Not Disturb) on your Idea mobile now. DND is now known as NCPR and it is initiative of TRAI. How DND Works on Idea Mobile? By default all the mobile numbers in India are not subscribed to NCPR; means any Telemarketer / Organization can call you to promote their products / services or send SMS. If you want to stop these unwanted commercial communication, subscribe to NCPR / activate DND. How to activate DND on Idea? DND activate / subscribing to NCPR is one simple step and free of charge for you. Choose any option from below to activate DND on your Idea mobile: SMS :  START 0  to 1909 Call : 1909 and follow the IVR guidance DND Options for Idea Mobile Fully Blocked All commercial communications will be blocked. Partially Blocked Partial blocked option will block all commercial voice calls. However, you can choose to recei...

Annotations

What’s the use of Annotations? 1) Instructions to the compiler : There are three built-in annotations available in Java ( @Deprecated ,  @Override  &  @SuppressWarnings ) that can be used for giving certain instructions to the compiler. For example the @override annotation is used for instructing compiler that the annotated method is overriding the method. More about these built-in annotations with example is discussed in the next sections of this article. 2) Compile-time instructors : Annotations can provide compile-time instructions to the compiler that can be further used by sofware build tools for generating code, XML files etc. 3) Runtime instructions : We can define annotations to be available at runtime which we can access using  java reflection  and can be used to give instructions to the program at runtime. We will discuss this with the help of an example, later in this same post. Annotations basics An annotation always starts with th...

Properties

Appendix A. Common application properties Various properties can be specified inside your  application.properties / application.yml  file or as command line switches. This section provides a list common Spring Boot properties and references to the underlying classes that consume them. Property contributions can come from additional jar files on your classpath so you should not consider this an exhaustive list. It is also perfectly legit to define your own properties. This sample file is meant as a guide only. Do  not  copy/paste the entire content into your application; rather pick only the properties that you need. # =================================================================== # COMMON SPRING BOOT PROPERTIES # # This sample file is provided as a guideline. Do NOT copy it in its # entirety to your own application. ^^^ # =================================================================== # ---------...