add mysql
This commit is contained in:
@@ -79,6 +79,22 @@ steps:
|
||||
image: gcr.io/$PROJECT_ID/$_PROJECT_NAME:$COMMIT_SHA
|
||||
ports:
|
||||
- containerPort: 8080
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
path: /actuator/health
|
||||
port: 8080
|
||||
initialDelaySeconds: 10
|
||||
timeoutSeconds: 2
|
||||
periodSeconds: 5
|
||||
failureThreshold: 5
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: /products/1
|
||||
port: 8080
|
||||
initialDelaySeconds: 40
|
||||
timeoutSeconds: 2
|
||||
periodSeconds: 5
|
||||
failureThreshold: 5
|
||||
EOF
|
||||
substitutions:
|
||||
_PROJECT_NAME: products
|
||||
|
||||
@@ -8,11 +8,20 @@ import org.springframework.messaging.MessageHeaders;
|
||||
import org.springframework.messaging.support.MessageBuilder;
|
||||
import org.springframework.util.MimeTypeUtils;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Date;
|
||||
|
||||
public class AbstractEvent {
|
||||
|
||||
String eventType;
|
||||
String timestamp;
|
||||
|
||||
public AbstractEvent(){
|
||||
this.setEventType(this.getClass().getSimpleName());
|
||||
SimpleDateFormat defaultSimpleDateFormat = new SimpleDateFormat("YYYYMMddHHmmss");
|
||||
this.timestamp = defaultSimpleDateFormat.format(new Date());
|
||||
}
|
||||
|
||||
public String getEventType() {
|
||||
return eventType;
|
||||
}
|
||||
@@ -62,5 +71,4 @@ public class AbstractEvent {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user