AWS S3 File Upload Spring Boot Controller And Service

AWS S3 File Upload Spring Boot Controller And Service

This blog posts explains on how to upload your file to Amazon S3 services using spring/spring boot. Prerequisite: endpoint Url Access Key secret Key BucketName Pom.xml file: Here it is spring boot project, so if your is spring then just add the required dependencies for AWS. Spring Controller: This controller provides the way to upload and delete the files from S3. BucketController.java AmazonClient: Amazon client service to interact with S3 for both upload and deleting the files. AmazonClient.java If you…

Read More Read More

191 total views, 12 views today

Swagger Tutorials & Notes

Swagger Tutorials & Notes

What is the URL to open Swagger UI ? What is the URL to view the list of API’s as JSON in Swagger ? How to disable Swagger related URL’s in Spring Security ? In your WebSecurityConfig class make sure to skip the below endpoints/urls, In very few case it still throws the exceptions then try “**/swagger-resources/**” instead of “/swagger-resources/**” How to disable Swagger UI in Production ? Swagger UI can be enabled or disabled based on the profile. Make…

Read More Read More

768 total views, 18 views today

Java Interesting Problems

Java Interesting Problems

How to print Fibonacci Series Till 1000 ? Learning from the above program: You can not use int/Integer and also long/Long to store the value. Because maximum value of int(2147483647) and long(9223372036854775807). Both these values would be reached even before the first 100 fibonacci series values. So BigInteger is one and only option for us to print the value of fibonacci series more than 100. BigInteger size is int[] of 2147483647 [Integer.MAX_VALUE), so it can able to keep the big…

Read More Read More

595 total views, 14 views today

Angular Errors & Solutions

Angular Errors & Solutions

How to fix “This usually happens because your environment has changed since running npm install.” this issue ? This issue generally happens if you updated or reinstalled your npm. The easiest solution is, Solution 1: Solution 2: If it does not work, then try removing the node_modules folder and then then try, Solution 3: [This is the one worked for me] Remove browserlist.cmd and browserlist file from your project’s root folder then try ng build then ng server 621 total views,…

Read More Read More

621 total views, 16 views today

Windows Notes

Windows Notes

How to change the user to admin through command prompt ? If suppose your user name is ngdeveloper then the actual command would be, How to remove the user from adminstrator access in windows 10? How to test whether you are admin or not ? Windows -> Run -> netplwiz will show you the users with their user type/access. 690 total views, 14 views today

690 total views, 14 views today

How to save & load Jenkins docker images in two hosts

How to save & load Jenkins docker images in two hosts

This posts help you with step by step instructions to move jenkins images from one hosts to another hosts. I have personally used the below method and worked great for me. I have another method mentioned here. But that gave me lot of errors and also the jenkins_home contents like custom shell scripts/job details etc were missed. But still I have posted because this can work for other docker containers. Step 1: Save Jenkins Image in Machine 1 Step 2:…

Read More Read More

622 total views, 14 views today

How to do docker import export from two AWS Machines ?

How to do docker import export from two AWS Machines ?

Step 1: Docker Export in Machine 1: Step 2: Run From Machine 1 to copy .gz file to Machine 2: .pem file is mandatory to connect with any AWS machine in AWS environments. If you don’t have that file in your server, make sure to copy that in your aws machine from your local computer using the below command. Step 3: Docker Import in Machine 2: Step 4: Docker Run in Machine 2: ngjenkins is my docker name which is…

Read More Read More

870 total views, 19 views today

AWS Notes

AWS Notes

How to copy some files from your aws machine to your local desktop ? Download Mobaxterm community edition, open new session then go to desktop, my-docker-keypair.pem is the keypair file which you can download from aws console. ngjenkins.tar is my tar file which I need to copy from AWS machine to local desktop. I am running this command from desktop and I need the file to be downloaded to desktop only, so gave just (“/”) in the copy command. How…

Read More Read More

909 total views, 20 views today

How to Implement JWT Token Based Authentication in Spring Boot Microservices

How to Implement JWT Token Based Authentication in Spring Boot Microservices

JWT (JSON Web Token) tokens are an open, industry standard RFC 7519 method for representing claims securely between two parties. It is highly recommended and used authentication method for REST API & Webservices. Today we are going to see how to implement JWT token based authentication in spring boot microservices to securely communicate and transfer the data’s between the client(any client applications, angular/react/vue in modern application world) and server side applications. Though process for Token Based Authentication Spring security is needed…

Read More Read More

815 total views, 3 views today