1. conanca
  2. nutzdemo-shiro

Commits

conanca  committed 04c021b

修正过滤器错误配置

  • Participants
  • Parent commits f54dd4f
  • Branches default

Comments (0)

Files changed (3)

File src/main/java/com/dolplay/nutzshiro/MainModule.java

View file
  • Ignore whitespace
 import com.dolplay.nutzshiro.module.SystemModule;
 import com.dolplay.nutzshiro.module.UserModule;
 
-@Modules({ UserModule.class, RoleModule.class, SystemModule.class,PermissionModule.class })
+@Modules({ UserModule.class, RoleModule.class, SystemModule.class, PermissionModule.class })
 @IocBy(type = JsonIocProvider.class, args = { "ioc.js", "dao.js", "shiro.js" })
 @SetupBy(MvcSetup.class)
 @Fail("json")
-@Filters(@By(type = AuthorizationFilter.class, args = { "ioc:authorizationFilter" }))
+@Filters(@By(type = AuthorizationFilter.class))
 @Localization("msg")
 public class MainModule {
 

File src/main/java/com/dolplay/nutzshiro/module/SystemModule.java

View file
  • Ignore whitespace
 import org.nutz.mvc.annotation.Ok;
 
 import com.dolplay.nutzshiro.filter.AuthenticationFilter;
+import com.dolplay.nutzshiro.filter.LogoutFilter;
 
 @IocBean
 @InjectName
 	public void login() {
 
 	}
-	
+
 	@At("/logout")
 	@Ok(">>:/")
-	@Filters({ @By(type = AuthenticationFilter.class, args = { "ioc:logoutFilter" }) })
+	@Filters({ @By(type = LogoutFilter.class) })
 	public void logout() {
 
 	}

File src/main/resources/shiro.js

View file
  • Ignore whitespace
 				refer : "securityManager"
 			}
 		}
-	},
-
-	authorizationFilter : {
-		type : "com.dolplay.nutzshiro.filter.AuthorizationFilter",
-	},
-
-	logoutFilter : {
-		type : "com.dolplay.nutzshiro.filter.LogoutFilter",
 	}
 };