-
Open a command prompt or terminal.
-
Run this command:
keytool -genkey -keyalg RSA -alias tomcat -keystore selfsigned.jks \ -validity -keysize 2048
Where <days> indicate the number of days for which the certificate will be valid.
<plugin> | |
<groupId>org.apache.maven.plugins</groupId> | |
<artifactId>maven-eclipse-plugin</artifactId> | |
<version>2.8</version> | |
<configuration> | |
<wtpversion>2.0</wtpversion> | |
<downloadSources>true</downloadSources> | |
<downloadJavadocs>true</downloadJavadocs> | |
</configuration> | |
</plugin> |
Map valuesMap = HashMap(); | |
valuesMap.put("animal", "quick brown fox"); | |
valuesMap.put("target", "lazy dog"); | |
String templateString = "The ${animal} jumped over the ${target}."; | |
StrSubstitutor sub = new StrSubstitutor(valuesMap); | |
String resolvedString = sub.replace(templateString); |
@Entity | |
@PrimaryKeyJoinColumn(name = "EMP_PK") | |
class Employee extends Customer { | |
} |
@XmlSeeAlso({Dog.class,Cat.class}) | |
class Animal {} | |
class Dog extends Animal {} | |
class Cat extends Animal {} |
<?xml version="1.0" encoding="UTF-8"?> | |
<beans xmlns="http://www.springframework.org/schema/beans" | |
xmlns:aop="http://www.springframework.org/schema/aop" | |
xmlns:tx="http://www.springframework.org/schema/tx" | |
xmlns:p="http://www.springframework.org/schema/p" | |
xmlns:context="http://www.springframework.org/schema/context" | |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xsi:schemaLocation=" | |
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd | |
http://www.springframework.org/schema/batch http://www.springframework.org/schema/batch/spring-batch-2.1.xsd |
<?xml version="1.0" encoding="UTF-8"?> | |
<beans:beans xmlns="http://www.springframework.org/schema/security" | |
xmlns:beans="http://www.springframework.org/schema/beans" | |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd | |
http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-3.0.xsd "> | |
<global-method-security pre-post-annotations="enabled" /> |
KeyStore ks = KeyStore.getInstance("JKS"); | |
ks.load(CyberClient.class.getResourceAsStream("/test.keystore"), "password".toCharArray()); | |
KeyManagerFactory kmf = KeyManagerFactory.getInstance("SunX509"); | |
kmf.init(ks, "password".toCharArray()); | |
SSLContext sc = SSLContext.getInstance("TLS"); | |
sc.init(kmf.getKeyManagers(), null, null); | |
SSLServerSocketFactory ssf = sc.getServerSocketFactory(); | |
socket = (SSLServerSocket) ssf.createServerSocket(8888); | |
// socket = new ServerSocket(port); |
Open a command prompt or terminal.
Run this command:
keytool -genkey -keyalg RSA -alias tomcat -keystore selfsigned.jks \ -validity -keysize 2048
Where <days> indicate the number of days for which the certificate will be valid.
A proxy server may ask a client to be authenticated before using the relay. The authentication method can be Basic or NTLM. To find out which method is used by the browser, you can use chrome to open www.google.com and inspect the request headers.
If the headers contain a line like "Proxy-Authorization:NTLM xxxx", it means the proxy uses NTLM to authenticate the user. For the command line applications such as maven or vagrant, even eclipse, they cannot make use this kind proxy server directly, because they don't know how to generate the NTLM authentication hash.
Open a command window and type
set http_proxy=http://proxy.mycompany.com:8080
curl -v http://www.google.com
Although the install of vagrant on linux or MacOSx is quite simple, to install it on windows platform is not a trivial task.
First download the vagrant and follow the setup program. https://www.vagrantup.com/downloads.html
Vagrant uses rsync
to synchronize a local folder with a folder inside virtualbox, but rsync is not available on windows, you need to download it from https://www.itefix.net/cwrsync.