This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
httpClient.DefaultRequestHeaders.Authorization = | |
new AuthenticationHeaderValue( | |
"Basic", | |
Convert.ToBase64String( | |
System.Text.ASCIIEncoding.ASCII.GetBytes( | |
string.Format("{0}:{1}", username, password)))); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{"openapi":"3.0.1","info":{"title":"OpenAPI definition","version":"v0"},"servers":[{"url":"https://sandbox-api.dhan.co","description":"Generated server url"}],"paths":{"/orders/{order-id}":{"get":{"tags":["Orders"],"summary":"get order by id","description":"get order by id description","externalDocs":{"description":"short description of external docs","url":"http://localhost/deeplink#"},"operationId":"OrderByOrderId","parameters":[{"name":"access-token","in":"header","required":true,"schema":{"type":"string"}},{"name":"order-id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderResponse"}}}}}},"put":{"tags":["Orders"],"summary":"modify order","description":"modify order description","externalDocs":{"description":"short description of external docs","url":"http://localhost/deeplink#"},"operationId":"modifyOrder","parameters":[{"name":"access-token","in":"header","required": |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public List<ProfileDocument> searchByTechnology(String technology) throws Exception { | |
SearchRequest searchRequest = new SearchRequest(); | |
SearchSourceBuilder searchSourceBuilder = new SearchSourceBuilder(); | |
QueryBuilder queryBuilder = QueryBuilders | |
.boolQuery() | |
.must(QueryBuilders | |
.matchQuery("technologies.name", technology)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Test@12345 | |
Test@1234 | |
Test@123 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
java -jar modules/swagger-codegen-cli/target/swagger-codegen-cli.jar generate -i /home/ubuntu/fineract/fineract-provider/src/main/resources/swagger-ui/response.json -l java --library resttemplate -o /home/ubuntu/temp-swagger/ | |
a | |
{ | |
"sortParamsByRequiredFlag": { | |
"opt": "sortParamsByRequiredFlag", | |
"description": "Sort method arguments to place required parameters before optional parameters.", | |
"type": "boolean", | |
"default": "true" | |
}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.ms.pwm.retail.bank; | |
import java.security.KeyManagementException; | |
import java.security.NoSuchAlgorithmException; | |
import java.security.cert.CertificateException; | |
import javax.net.ssl.SSLContext; | |
import javax.net.ssl.SSLSession; | |
import javax.net.ssl.SSLSocketFactory; | |
import javax.net.ssl.TrustManager; | |
import javax.net.ssl.X509TrustManager; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1) install jdk | |
2) set java home environment variable /etc/environment | |
3) setup maven, ide, git, db access tool of your choice | |
4) install docker | |
5) docker run --name mysql-5.5 -p 3306:3306 -e MYSQL_ROOT_PASSWORD=mysql -d mysql:5.5 | |
6) git clone https://github.com/apache/fineract.git | |
7) ./gradlew createDB -PdbName=mifosplatform-tenants | |
8) ./gradlew createDB -PdbName=mifosplatform-tenants |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Create a RestTemplate bean | |
* with trust all SSL certificates and SSLConnectionSocketFactory.ALLOW_ALL_HOSTNAME_VERIFIER | |
* replaced for new apache httpclient to NoopHostnameVerifier.INSTANCE | |
*/ | |
@Bean | |
public RestTemplate restTemplate() throws NoSuchAlgorithmException, KeyManagementException { | |
/* | |
* Ignore untrusted certificates |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Import the official AdoptOpenJDK GPG key | |
Import the AdoptOpenJDK DEB repo using add-apt-repository | |
wget -qO - https://adoptopenjdk.jfrog.io/adoptopenjdk/api/gpg/key/public | sudo apt-key add - | |
sudo add-apt-repository --yes https://adoptopenjdk.jfrog.io/adoptopenjdk/deb/ | |
sudo apt update |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<!-- Base logback configuration provided for compatibility with Spring Boot--> | |
<configuration> | |
<conversionRule conversionWord="clr" | |
converterClass="org.springframework.boot.logging.logback.ColorConverter" /> | |
<conversionRule conversionWord="wex" | |
converterClass="org.springframework.boot.logging.logback.WhitespaceThrowableProxyConverter" /> |
NewerOlder