This file contains hidden or 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.isb.phoenix.demo.hotels.controller; | |
| import com.isb.phoenix.demo.hotels.data.entity.Hotel; | |
| import com.isb.phoenix.demo.hotels.data.repository.HotelsRepository; | |
| import org.springframework.beans.factory.annotation.Autowired; | |
| import org.springframework.stereotype.Controller; | |
| import org.springframework.ui.ModelMap; | |
| import org.springframework.web.bind.annotation.ModelAttribute; | |
| import org.springframework.web.bind.annotation.PathVariable; | |
| import org.springframework.web.bind.annotation.RequestMapping; |
This file contains hidden or 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
| FileInputStream fileInputStream = new FileInputStream("c:\\data\\Temp\\bugs\\segfat\\DummyServerTrustFile.jks"); | |
| KeyStore jks = KeyStore.getInstance("JKS"); | |
| // jks.load(fileInputStream, "".toCharArray()); | |
| jks.load(fileInputStream, null); | |
| Enumeration<String> aliases = jks.aliases(); | |
| System.out.println("aliases.toString() = " + aliases.nextElement()); |
This file contains hidden or 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
| CertificateFactory x509 = CertificateFactory.getInstance("X509"); | |
| FileInputStream inStream = new FileInputStream(CERTIFICATE_PATH); | |
| Certificate certificate = x509.generateCertificate(inStream); | |
| byte[] encoded = certificate.getPublicKey().getEncoded(); | |
| FileOutputStream fileOutputStream = new FileOutputStream("c:/data/temp/phoenix-public-key.bin"); | |
| fileOutputStream.write(encoded); | |
| fileOutputStream.close(); |
This file contains hidden or 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
| @PowerMockIgnore({"org.apache.log4j.*", "javax.crypto.*", "org.springframework.*", | |
| "javax.xml.*","org.xml.*","com.sun.*"}) |
This file contains hidden or 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
| X509Certificate[] x509Certificates = (X509Certificate[]) request.getAttribute("javax.servlet.request.X509Certificate"); |
This file contains hidden or 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
| return request.getParameterMap().entrySet().stream() | |
| .collect(Collectors.toMap(e -> e.getKey(), e -> e.getValue()[0])); |
This file contains hidden or 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
| Path path = Paths.get("path/to/file"); | |
| byte[] data = Files.readAllBytes(path); |
This file contains hidden or 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
| <profiles> | |
| <profile> | |
| <id>sonar</id> | |
| <activation> | |
| <activeByDefault>true</activeByDefault> | |
| </activation> | |
| <properties> | |
| <sonar.host.url>http://sonarqube..../</sonar.host.url> | |
| <sonar.login>...</sonar.login> | |
| <sonar.password>...</sonar.password> |
This file contains hidden or 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
| /** | |
| * @author luismoramedina | |
| */ | |
| public class UrlOverriderInterceptor implements ClientHttpRequestInterceptor { | |
| private final String urlBase; | |
| public UrlOverriderInterceptor(String urlBase) { | |
| this.urlBase = urlBase; | |
| } |
This file contains hidden or 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
| <configuration> | |
| <port>8687</port> | |
| <httpsPort>8443</httpsPort> | |
| <keystoreFile>${project.basedir}/src/test/resources/keystore.jks</keystoreFile> | |
| <keystorePass>password</keystorePass> | |
| <systemProperties> | |
| <javax.net.ssl.trustStore>${project.basedir}/src/test/resources/keystore-aia-new.jks</javax.net.ssl.trustStore> | |
| <javax.net.ssl.keyStore>${project.basedir}/src/main/resources/webservices-client.jks</javax.net.ssl.keyStore> | |
| <javax.net.ssl.keyStorePassword>123123123</javax.net.ssl.keyStorePassword> | |
| <javax.net.debug>all</javax.net.debug> |
OlderNewer