- 浏览: 2566867 次
- 性别:
- 来自: 成都
-
文章分类
最新评论
-
nation:
你好,在部署Mesos+Spark的运行环境时,出现一个现象, ...
Spark(4)Deal with Mesos -
sillycat:
AMAZON Relatedhttps://www.godad ...
AMAZON API Gateway(2)Client Side SSL with NGINX -
sillycat:
sudo usermod -aG docker ec2-use ...
Docker and VirtualBox(1)Set up Shared Disk for Virtual Box -
sillycat:
Every Half an Hour30 * * * * /u ...
Build Home NAS(3)Data Redundancy -
sillycat:
3 List the Cron Job I Have>c ...
Build Home NAS(3)Data Redundancy
Java Generate/Merge Files(2)Akka and Actor
root guardian is the father of all actors,
User Actor is the father of all user actors, path is /user
System Actor is the father of all system actors, path is /system
actorOf - create a new Actor
actorSelection - select and search Actor
actorFor - use actorSelection
AKKA Configuration application.conf
akka.actor.deployment {
user/sourceRouter {
router = smallest-mailbox-pool
resizer {
lower-bound = 2
upper-bound = 15
}
}
user/jobIDRouter {
router = smallest-mailbox-pool
resizer {
lower-bound = 20
upper-bound = 100
}
}
}
XML related AKKA Config
<bean id="actorSystemFactory" class="com.sillycat.feeds2g.services.base.ActorSystemFactory"
init-method="init" />
<bean id="sourceIDsExportActor" class="com.sillycat.feeds2g.services.actors.SourceIDsExportActor"
scope="prototype">
<property name="sourceDAO" ref="sourceDAO" />
</bean>
<bean id="jobIDExportActor" class="com.sillycat.feeds2g.services.actors.JobIDExportActor"
scope="prototype">
<property name="redisService" ref="redisService" />
</bean>
<bean id="referenceIDsExportActor" class="com.sillycat.feeds2g.services.actors.ReferenceIDsExportActor"
scope="prototype">
<property name="redisService" ref="redisService" />
</bean>
They are just normal spring typical configurations. Some base java factory classes.
package com.sillycat.feeds2g.services.base;
import org.springframework.beans.BeansException;
import org.springframework.context.ApplicationContext;
import org.springframework.context.ApplicationContextAware;
import akka.actor.ActorSystem;
public class ActorSystemFactory implements ApplicationContextAware {
private ApplicationContext applicationContext;
private ActorSystem system;
public void setApplicationContext(ApplicationContext context) throws BeansException {
applicationContext = context;
}
public void init() {
system = ActorSystem.create("feeds2g");
// initialize the application context in the Akka Spring Extension
SpringExtension.SpringExtProvider.get(system).initialize(applicationContext);
}
public ActorSystem getActorSystem() {
return system;
}
}
Actor spring integration support
package com.sillycat.feeds2g.services.base;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
import akka.actor.Actor;
import akka.actor.IndirectActorProducer;
public class SpringActorProducer implements IndirectActorProducer {
final ClassPathXmlApplicationContext applicationContext;
final String actorBeanName;
public SpringActorProducer(ApplicationContext applicationContext, String actorBeanName) {
this.applicationContext = (ClassPathXmlApplicationContext) applicationContext;
this.actorBeanName = actorBeanName;
}
@Override
public Actor produce() {
applicationContext.refresh();
return (Actor) applicationContext.getBean(actorBeanName);
}
@SuppressWarnings("unchecked")
@Override
public Class<? extends Actor> actorClass() {
applicationContext.refresh();
return (Class<? extends Actor>) applicationContext.getType(actorBeanName);
}
}
package com.sillycat.feeds2g.services.base;
import org.springframework.context.ApplicationContext;
import akka.actor.AbstractExtensionId;
import akka.actor.ExtendedActorSystem;
import akka.actor.Extension;
import akka.actor.Props;
public class SpringExtension extends AbstractExtensionId<SpringExtension.SpringExt> {
/**
* The identifier used to access the SpringExtension.
*/
public static SpringExtension SpringExtProvider = new SpringExtension();
/**
* Is used by Akka to instantiate the Extension identified by this
* ExtensionId, internal use only.
*/
@Override
public SpringExt createExtension(ExtendedActorSystem system) {
return new SpringExt();
}
/**
* The Extension implementation.
*/
public static class SpringExt implements Extension {
private volatile ApplicationContext applicationContext;
/**
* Used to initialize the Spring application context for the extension.
*
* @param applicationContext
*/
public void initialize(ApplicationContext applicationContext) {
this.applicationContext = applicationContext;
}
/**
* Create a Props for the specified actorBeanName using the
* SpringActorProducer class.
*
* @param actorBeanName
* The name of the actor bean to create Props for
* @return a Props that will create the named actor bean using Spring
*/
public Props props(String actorBeanName) {
return Props.create(SpringActorProducer.class, applicationContext, actorBeanName);
}
}
}
Related pom.xml configuration to load the dependencies and build.
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.sillycat</groupId>
<artifactId>feeds-2g</artifactId>
<version>1.0</version>
<description>feeds next generation</description>
<name>feeds next generation</name>
<packaging>jar</packaging>
<properties>
<springframework.version>4.3.7.RELEASE</springframework.version>
<jackson.version>2.8.7</jackson.version>
<akka.version></akka.version>
</properties>
<dependencies>
<!-- akka -->
<dependency>
<groupId>com.typesafe.akka</groupId>
<artifactId>akka-actor_2.11</artifactId>
<version>2.4.17</version>
</dependency>
<!-- myIbatis -->
<dependency>
<groupId>org.mybatis</groupId>
<artifactId>mybatis-spring</artifactId>
<version>1.3.1</version>
</dependency>
<!-- logging -->
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>1.7.25</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>jcl-over-slf4j</artifactId>
<version>1.7.25</version>
</dependency>
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
<version>1.2.3</version>
</dependency>
<!-- REDIS -->
<dependency>
<groupId>redis.clients</groupId>
<artifactId>jedis</artifactId>
<version>2.9.0</version>
</dependency>
<!-- spring framework -->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
<version>${springframework.version}</version>
<exclusions>
<exclusion>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</exclusion>
</exclusions>
</dependency>
<!-- apache -->
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>3.5</version>
</dependency>
<!-- JSON -->
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-core</artifactId>
<version>${jackson.version}</version>
</dependency>
<!-- testing -->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-test</artifactId>
<version>${springframework.version}</version>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.amazonaws</groupId>
<artifactId>aws-java-sdk-s3</artifactId>
<version>1.11.113</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.6.1</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<version>2.4.1</version>
<configuration>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
<archive>
<manifest>
<mainClass>com.sillycat.feeds2g.ExecutorApp</mainClass>
</manifest>
</archive>
</configuration>
<executions>
<execution>
<id>assemble-all</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.0.0</version>
<executions>
<execution>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<transformers>
<transformer
implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
<resource>META-INF/spring.handlers</resource>
</transformer>
<transformer
implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
<resource>META-INF/spring.schemas</resource>
</transformer>
</transformers>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
One typical Actor
package com.sillycat.feeds2g.services.actors;
import java.util.Arrays;
import java.util.List;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.sillycat.feeds2g.models.ReferenceIDsResult;
import com.sillycat.feeds2g.models.messages.CampaignIDMessage;
import com.sillycat.feeds2g.models.messages.ReferenceIDsMessage;
import com.sillycat.feeds2g.models.messages.SourceIDMessage;
import com.sillycat.feeds2g.services.RedisService;
import akka.actor.ActorRef;
import akka.actor.ActorSelection;
import akka.actor.UntypedActor;
public class ReferenceIDsExportActor extends UntypedActor {
private final Logger logger = LoggerFactory.getLogger(this.getClass());
private RedisService redisService;
private ActorSelection jobIDRouter = getContext().actorSelection("akka://feeds2g/user/jobIDRouter");
public void setRedisService(RedisService redisService) {
this.redisService = redisService;
}
public void onReceive(Object msg) throws Throwable {
if (msg instanceof CampaignIDMessage) {
// SSCAN REDIS to find the referenceIDs
logger.debug("ReferenceIDsExportActor get message " + msg);
} else if (msg instanceof SourceIDMessage) {
// SSCAN REDIS to find the referenceIDs
logger.debug("ReferenceIDsExportActor get message " + msg);
SourceIDMessage sourceIDMessage = (SourceIDMessage) msg;
Integer sourceID = sourceIDMessage.getSourceID();
logger.info("System ReferenceIDsExportActor start to export jobs for sourceID = " + sourceID);
String cursor = "0";
do {
ReferenceIDsResult result = redisService.fetchReferenceIDsBySource(sourceID, cursor);
cursor = result.getCursor();
String referenceIDString = result.getReferenceIDString();
String[] referenceArray = referenceIDString.split(",");
List<String> referenceIDs = Arrays.asList(referenceArray);
jobIDRouter.tell(new ReferenceIDsMessage(sourceID, referenceIDs), ActorRef.noSender());
} while (!"0".equals(cursor));
logger.info("System ReferenceIDsExportActor finished sscanning all referenceIDs for sourceID = " + sourceID);
} else {
unhandled(msg);
}
}
}
References:
http://sunxiang0918.cn/2016/01/10/Akka-in-JAVA-1/
http://sunxiang0918.cn/2016/01/13/Akka-in-JAVA-2/
http://sunxiang0918.cn/2016/01/18/Akka-in-JAVA-3/
http://sunxiang0918.cn/2016/02/10/Akka-in-JAVA-4/
demo
https://github.com/sunxiang0918/AkkaDemo
http://doc.akka.io/docs/akka-modules/1.3.1/modules/spring.html
http://stackoverflow.com/questions/11849254/akka-and-spring-configuration
https://github.com/aliakh/demo-akka-spring
https://github.com/XiaoMi/rose/tree/master/rose-example
http://doc.akka.io/docs/akka/current/general/configuration.html
Redis
https://redis.io/commands/rpoplpush
https://blog.logentries.com/2016/05/queuing-tasks-with-redis/
root guardian is the father of all actors,
User Actor is the father of all user actors, path is /user
System Actor is the father of all system actors, path is /system
actorOf - create a new Actor
actorSelection - select and search Actor
actorFor - use actorSelection
AKKA Configuration application.conf
akka.actor.deployment {
user/sourceRouter {
router = smallest-mailbox-pool
resizer {
lower-bound = 2
upper-bound = 15
}
}
user/jobIDRouter {
router = smallest-mailbox-pool
resizer {
lower-bound = 20
upper-bound = 100
}
}
}
XML related AKKA Config
<bean id="actorSystemFactory" class="com.sillycat.feeds2g.services.base.ActorSystemFactory"
init-method="init" />
<bean id="sourceIDsExportActor" class="com.sillycat.feeds2g.services.actors.SourceIDsExportActor"
scope="prototype">
<property name="sourceDAO" ref="sourceDAO" />
</bean>
<bean id="jobIDExportActor" class="com.sillycat.feeds2g.services.actors.JobIDExportActor"
scope="prototype">
<property name="redisService" ref="redisService" />
</bean>
<bean id="referenceIDsExportActor" class="com.sillycat.feeds2g.services.actors.ReferenceIDsExportActor"
scope="prototype">
<property name="redisService" ref="redisService" />
</bean>
They are just normal spring typical configurations. Some base java factory classes.
package com.sillycat.feeds2g.services.base;
import org.springframework.beans.BeansException;
import org.springframework.context.ApplicationContext;
import org.springframework.context.ApplicationContextAware;
import akka.actor.ActorSystem;
public class ActorSystemFactory implements ApplicationContextAware {
private ApplicationContext applicationContext;
private ActorSystem system;
public void setApplicationContext(ApplicationContext context) throws BeansException {
applicationContext = context;
}
public void init() {
system = ActorSystem.create("feeds2g");
// initialize the application context in the Akka Spring Extension
SpringExtension.SpringExtProvider.get(system).initialize(applicationContext);
}
public ActorSystem getActorSystem() {
return system;
}
}
Actor spring integration support
package com.sillycat.feeds2g.services.base;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
import akka.actor.Actor;
import akka.actor.IndirectActorProducer;
public class SpringActorProducer implements IndirectActorProducer {
final ClassPathXmlApplicationContext applicationContext;
final String actorBeanName;
public SpringActorProducer(ApplicationContext applicationContext, String actorBeanName) {
this.applicationContext = (ClassPathXmlApplicationContext) applicationContext;
this.actorBeanName = actorBeanName;
}
@Override
public Actor produce() {
applicationContext.refresh();
return (Actor) applicationContext.getBean(actorBeanName);
}
@SuppressWarnings("unchecked")
@Override
public Class<? extends Actor> actorClass() {
applicationContext.refresh();
return (Class<? extends Actor>) applicationContext.getType(actorBeanName);
}
}
package com.sillycat.feeds2g.services.base;
import org.springframework.context.ApplicationContext;
import akka.actor.AbstractExtensionId;
import akka.actor.ExtendedActorSystem;
import akka.actor.Extension;
import akka.actor.Props;
public class SpringExtension extends AbstractExtensionId<SpringExtension.SpringExt> {
/**
* The identifier used to access the SpringExtension.
*/
public static SpringExtension SpringExtProvider = new SpringExtension();
/**
* Is used by Akka to instantiate the Extension identified by this
* ExtensionId, internal use only.
*/
@Override
public SpringExt createExtension(ExtendedActorSystem system) {
return new SpringExt();
}
/**
* The Extension implementation.
*/
public static class SpringExt implements Extension {
private volatile ApplicationContext applicationContext;
/**
* Used to initialize the Spring application context for the extension.
*
* @param applicationContext
*/
public void initialize(ApplicationContext applicationContext) {
this.applicationContext = applicationContext;
}
/**
* Create a Props for the specified actorBeanName using the
* SpringActorProducer class.
*
* @param actorBeanName
* The name of the actor bean to create Props for
* @return a Props that will create the named actor bean using Spring
*/
public Props props(String actorBeanName) {
return Props.create(SpringActorProducer.class, applicationContext, actorBeanName);
}
}
}
Related pom.xml configuration to load the dependencies and build.
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.sillycat</groupId>
<artifactId>feeds-2g</artifactId>
<version>1.0</version>
<description>feeds next generation</description>
<name>feeds next generation</name>
<packaging>jar</packaging>
<properties>
<springframework.version>4.3.7.RELEASE</springframework.version>
<jackson.version>2.8.7</jackson.version>
<akka.version></akka.version>
</properties>
<dependencies>
<!-- akka -->
<dependency>
<groupId>com.typesafe.akka</groupId>
<artifactId>akka-actor_2.11</artifactId>
<version>2.4.17</version>
</dependency>
<!-- myIbatis -->
<dependency>
<groupId>org.mybatis</groupId>
<artifactId>mybatis-spring</artifactId>
<version>1.3.1</version>
</dependency>
<!-- logging -->
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>1.7.25</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>jcl-over-slf4j</artifactId>
<version>1.7.25</version>
</dependency>
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
<version>1.2.3</version>
</dependency>
<!-- REDIS -->
<dependency>
<groupId>redis.clients</groupId>
<artifactId>jedis</artifactId>
<version>2.9.0</version>
</dependency>
<!-- spring framework -->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
<version>${springframework.version}</version>
<exclusions>
<exclusion>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</exclusion>
</exclusions>
</dependency>
<!-- apache -->
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>3.5</version>
</dependency>
<!-- JSON -->
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-core</artifactId>
<version>${jackson.version}</version>
</dependency>
<!-- testing -->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-test</artifactId>
<version>${springframework.version}</version>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.amazonaws</groupId>
<artifactId>aws-java-sdk-s3</artifactId>
<version>1.11.113</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.6.1</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<version>2.4.1</version>
<configuration>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
<archive>
<manifest>
<mainClass>com.sillycat.feeds2g.ExecutorApp</mainClass>
</manifest>
</archive>
</configuration>
<executions>
<execution>
<id>assemble-all</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.0.0</version>
<executions>
<execution>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<transformers>
<transformer
implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
<resource>META-INF/spring.handlers</resource>
</transformer>
<transformer
implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
<resource>META-INF/spring.schemas</resource>
</transformer>
</transformers>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
One typical Actor
package com.sillycat.feeds2g.services.actors;
import java.util.Arrays;
import java.util.List;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.sillycat.feeds2g.models.ReferenceIDsResult;
import com.sillycat.feeds2g.models.messages.CampaignIDMessage;
import com.sillycat.feeds2g.models.messages.ReferenceIDsMessage;
import com.sillycat.feeds2g.models.messages.SourceIDMessage;
import com.sillycat.feeds2g.services.RedisService;
import akka.actor.ActorRef;
import akka.actor.ActorSelection;
import akka.actor.UntypedActor;
public class ReferenceIDsExportActor extends UntypedActor {
private final Logger logger = LoggerFactory.getLogger(this.getClass());
private RedisService redisService;
private ActorSelection jobIDRouter = getContext().actorSelection("akka://feeds2g/user/jobIDRouter");
public void setRedisService(RedisService redisService) {
this.redisService = redisService;
}
public void onReceive(Object msg) throws Throwable {
if (msg instanceof CampaignIDMessage) {
// SSCAN REDIS to find the referenceIDs
logger.debug("ReferenceIDsExportActor get message " + msg);
} else if (msg instanceof SourceIDMessage) {
// SSCAN REDIS to find the referenceIDs
logger.debug("ReferenceIDsExportActor get message " + msg);
SourceIDMessage sourceIDMessage = (SourceIDMessage) msg;
Integer sourceID = sourceIDMessage.getSourceID();
logger.info("System ReferenceIDsExportActor start to export jobs for sourceID = " + sourceID);
String cursor = "0";
do {
ReferenceIDsResult result = redisService.fetchReferenceIDsBySource(sourceID, cursor);
cursor = result.getCursor();
String referenceIDString = result.getReferenceIDString();
String[] referenceArray = referenceIDString.split(",");
List<String> referenceIDs = Arrays.asList(referenceArray);
jobIDRouter.tell(new ReferenceIDsMessage(sourceID, referenceIDs), ActorRef.noSender());
} while (!"0".equals(cursor));
logger.info("System ReferenceIDsExportActor finished sscanning all referenceIDs for sourceID = " + sourceID);
} else {
unhandled(msg);
}
}
}
References:
http://sunxiang0918.cn/2016/01/10/Akka-in-JAVA-1/
http://sunxiang0918.cn/2016/01/13/Akka-in-JAVA-2/
http://sunxiang0918.cn/2016/01/18/Akka-in-JAVA-3/
http://sunxiang0918.cn/2016/02/10/Akka-in-JAVA-4/
demo
https://github.com/sunxiang0918/AkkaDemo
http://doc.akka.io/docs/akka-modules/1.3.1/modules/spring.html
http://stackoverflow.com/questions/11849254/akka-and-spring-configuration
https://github.com/aliakh/demo-akka-spring
https://github.com/XiaoMi/rose/tree/master/rose-example
http://doc.akka.io/docs/akka/current/general/configuration.html
Redis
https://redis.io/commands/rpoplpush
https://blog.logentries.com/2016/05/queuing-tasks-with-redis/
发表评论
-
Stop Update Here
2020-04-28 09:00 331I will stop update here, and mo ... -
NodeJS12 and Zlib
2020-04-01 07:44 491NodeJS12 and Zlib It works as ... -
Docker Swarm 2020(2)Docker Swarm and Portainer
2020-03-31 23:18 377Docker Swarm 2020(2)Docker Swar ... -
Docker Swarm 2020(1)Simply Install and Use Swarm
2020-03-31 07:58 381Docker Swarm 2020(1)Simply Inst ... -
Traefik 2020(1)Introduction and Installation
2020-03-29 13:52 351Traefik 2020(1)Introduction and ... -
Portainer 2020(4)Deploy Nginx and Others
2020-03-20 12:06 439Portainer 2020(4)Deploy Nginx a ... -
Private Registry 2020(1)No auth in registry Nginx AUTH for UI
2020-03-18 00:56 449Private Registry 2020(1)No auth ... -
Docker Compose 2020(1)Installation and Basic
2020-03-15 08:10 392Docker Compose 2020(1)Installat ... -
VPN Server 2020(2)Docker on CentOS in Ubuntu
2020-03-02 08:04 475VPN Server 2020(2)Docker on Cen ... -
Buffer in NodeJS 12 and NodeJS 8
2020-02-25 06:43 401Buffer in NodeJS 12 and NodeJS ... -
NodeJS ENV Similar to JENV and PyENV
2020-02-25 05:14 496NodeJS ENV Similar to JENV and ... -
Prometheus HA 2020(3)AlertManager Cluster
2020-02-24 01:47 438Prometheus HA 2020(3)AlertManag ... -
Serverless with NodeJS and TencentCloud 2020(5)CRON and Settings
2020-02-24 01:46 346Serverless with NodeJS and Tenc ... -
GraphQL 2019(3)Connect to MySQL
2020-02-24 01:48 262GraphQL 2019(3)Connect to MySQL ... -
GraphQL 2019(2)GraphQL and Deploy to Tencent Cloud
2020-02-24 01:48 463GraphQL 2019(2)GraphQL and Depl ... -
GraphQL 2019(1)Apollo Basic
2020-02-19 01:36 336GraphQL 2019(1)Apollo Basic Cl ... -
Serverless with NodeJS and TencentCloud 2020(4)Multiple Handlers and Running wit
2020-02-19 01:19 322Serverless with NodeJS and Tenc ... -
Serverless with NodeJS and TencentCloud 2020(3)Build Tree and Traverse Tree
2020-02-19 01:19 330Serverless with NodeJS and Tenc ... -
Serverless with NodeJS and TencentCloud 2020(2)Trigger SCF in SCF
2020-02-19 01:18 306Serverless with NodeJS and Tenc ... -
Serverless with NodeJS and TencentCloud 2020(1)Running with Component
2020-02-19 01:17 320Serverless with NodeJS and Tenc ...
相关推荐
"GenerateKey.java"、"EncryptClasses.java"以及"Util"、"DecryptStart"这些标签暗示了这是一个关于Java加密和解密操作的项目。下面将详细讨论相关知识点。 1. **GenerateKey.java**: 这个文件很可能包含了生成...
解决 java.lang.RuntimeException: Could not generate DH keypair异常处理。 bcprov-ext-jdk15on-1.60、bcprov-jdk15on-1.60两个包放到jre下的$JAVA_HOME/jre/lib/ext的路径下,然后配置$JAVA_HOME/jre/lib/...
Use it to compare and merge source code, web pages, XML and other text files with native application performance. Directly open and compare the text from Microsoft Office (Word and Excel), ...
Use it to compare and merge source code, web pages, XML and other text files with native application performance. Directly open and compare the text from Microsoft Office (Word and Excel), ...
2. **Java中的二维码库**: Java中常用的二维码生成库有ZXing(Zebra Crossing)和Java QR Code Generator。ZXing是一个开源项目,提供多种条码和二维码的读取和生成。`QRCOdeUtil.java`可能是基于ZXing库自定义...
a) 定义JAVA_HOME变量,指向JDK的安装路径,例如:D:/Program Files/Java/Java/jdk1.6.0_05。 b) 更新系统变量PATH,添加JDK的bin目录,如:D:/Program Files/Java/jdk1.6.0_05/bin。 c) 将javabuilder.jar添加到...
//java -jar testAES.jar --generate-key ./key.txt 256 //java -jar testAES.jar --encrypt ./input.txt ./OUT.txt ./key.txt CFB //java -jar testAES.jar --decrypt ./OUT.txt ./OUTDEC.txt ./key.txt CFB
标题 "Generate the JUNIT report by Ant and Junit" 指的是使用Apache Ant构建工具和JUnit测试框架生成测试报告的过程。这个过程对于任何Java项目来说都至关重要,因为它可以帮助开发者了解代码的质量和测试覆盖率...
2. **数据库元数据获取**:codegenerate模块需要获取数据库的表结构信息,包括字段、主键、索引等。理解这部分源码有助于我们定制数据源的接入,或者实现对特殊数据库的支持。 3. **代码生成逻辑**:分析代码生成的...
Java2WSDL 和 WSDL2Java 操作指南 Java2WSDL 和 WSDL2Java 是两种常用的 Web 服务开发工具,分别用于将 Java 类转换为 WSDL 文件和将 WSDL 文件转换为 Java 代码。在本文中,我们将详细介绍 Java2WSDL 和 WSDL2Java...
Marven + Jetty + Myeclipse实现java修改实时生效 1、把jrebel.jar放在任意地方(非项目中) 2、在myeclipse中配置 输入jetty:run -X 输入-noverify -javaagent:D:/java/spring/jrebel.jar 3、在pom.xml中...
### 利用DES加密算法保护Java源代码 #### 一、引言 随着信息技术的快速发展,数据的安全性问题越来越受到人们的重视。对于软件开发者来说,保护自己的Java源代码不被非法访问或篡改是非常重要的。Java作为一种跨...
It lets you create, render, print, secure, merge, split and manipulate PDF files with only a few lines of code. Support is provided for the most popular programming languages through ActiveX, DLL, ...
《PyPI官网下载:generate_files-1.0.1-py3-none-any.whl——Python后端开发必备工具》 PyPI(Python Package Index)是Python开发者的重要资源库,它提供了大量的第三方Python库,供全球的程序员下载和使用。本文...
在SSH(Spring、Struts和Hibernate)项目中,`hbm2dll`和`hbm2java`是Hibernate工具的一部分,用于自动化数据库映射过程。这两个工具极大地简化了开发过程,尤其是在处理对象关系映射(ORM)时。下面将详细解释这两...
java java_leetcode题解之Generate Parentheses.java
generate bitmaps from the compressed data and vice versa. It also provides for methods to access the meta data in the files, and methods to manipulate the Jpeg file in a lossless way (rotation/...
//generate image data and store in BufferedImage instance BufferedImage bufferedImage = barCodeGenerator.generateImage(); //save to image ImageIO.write(bufferedImage,"png",new File("QR_CODE...
在Go语言的开发环境中,`go generate`是一个非常实用的工具,它允许开发者自定义代码生成逻辑,以自动化处理一些繁琐的手动编码工作。本文将深入探讨`go generate`的使用,包括其基本原理、如何运行、递归执行以及...
IDEA自带的插件Generate POJOs.groovy 比较简陋,不能生成完整的dao/mapper,切生成的POJO没有注解。没有统一格式化,所以在此基础上进行了扩展能够简单的生成pojo/dao/mapper. 使用时选择目录后会在改目录下生成...