zhou-hao 6 years ago
parent
commit
5e2c600ae8

+ 2 - 2
hsweb-starter/hsweb-spring-boot-starter/src/main/java/org/hswebframework/web/starter/init/simple/SimpleDependencyInstaller.java

@@ -48,7 +48,7 @@ public class SimpleDependencyInstaller implements DependencyInstaller {
 
     public void doUnInstall(Map<String, Object> context) {
         if (unInstaller != null) {
-            installer.execute(context);
+            unInstaller.execute(context);
         }
     }
 
@@ -56,7 +56,7 @@ public class SimpleDependencyInstaller implements DependencyInstaller {
         SimpleDependencyUpgrader simpleDependencyUpgrader =
                 new SimpleDependencyUpgrader(installed, dependency, context);
         context.put("upgrader", simpleDependencyUpgrader);
-        if (unInstaller != null) {
+        if (upgrader != null) {
             upgrader.execute(context);
         }
     }

+ 3 - 3
hsweb-starter/hsweb-spring-boot-starter/src/test/resources/hsweb-starter.js

@@ -30,19 +30,19 @@ var versions = [
     {
         version: "3.0.0",
         upgrade: function (context) {
-            java.lang.System.out.println("更新到3.0.2了");
+            java.lang.System.out.println("更新到3.0.0了");
         }
     },
     {
         version: "3.0.1",
         upgrade: function (context) {
-            java.lang.System.out.println("更新到3.0.2了");
+            java.lang.System.out.println("更新到3.0.1了");
         }
     },
     {
         version: "3.0.2",
         upgrade: function (context) {
-            java.lang.System.out.println("更新到3.0.1了");
+            java.lang.System.out.println("更新到3.0.2了");
         }
     }
 ];