|
|
|
@ -17,6 +17,7 @@
|
|
|
|
|
package org.springframework.boot.actuate.flyway;
|
|
|
|
|
|
|
|
|
|
import java.time.Instant;
|
|
|
|
|
import java.util.Date;
|
|
|
|
|
import java.util.HashMap;
|
|
|
|
|
import java.util.List;
|
|
|
|
|
import java.util.Map;
|
|
|
|
@ -38,6 +39,7 @@ import org.springframework.context.ApplicationContext;
|
|
|
|
|
* @author Eddú Meléndez
|
|
|
|
|
* @author Phillip Webb
|
|
|
|
|
* @author Andy Wilkinson
|
|
|
|
|
* @author Artsiom Yudovin
|
|
|
|
|
* @since 2.0.0
|
|
|
|
|
*/
|
|
|
|
|
@Endpoint(id = "flyway")
|
|
|
|
@ -164,9 +166,14 @@ public class FlywayEndpoint {
|
|
|
|
|
this.script = info.getScript();
|
|
|
|
|
this.state = info.getState();
|
|
|
|
|
this.installedBy = info.getInstalledBy();
|
|
|
|
|
this.installedOn = Instant.ofEpochMilli(info.getInstalledOn().getTime());
|
|
|
|
|
this.installedRank = info.getInstalledRank();
|
|
|
|
|
this.executionTime = info.getExecutionTime();
|
|
|
|
|
this.installedOn = toEpochMilli(info.getInstalledOn());
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private Instant toEpochMilli(Date installedOn) {
|
|
|
|
|
return (installedOn != null) ? Instant.ofEpochMilli(installedOn.getTime())
|
|
|
|
|
: null;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private String nullSafeToString(Object obj) {
|
|
|
|
|