NutzCN Logo
问答 nutz-book shiro 配置问题
发布于 2698天前 作者 KerwinChen 1883 次浏览 复制 上一个帖子 下一个帖子
标签:

小弟在跟着 nutz-book 进行上手的时候,配置到“用 Shiro 做登录”这一步时,完成后发现控制台日志没有输出文档中的日志。与 shiro 相关的日志只有一句:

2017-07-04 10:54:28,302 org.nutz.mvc.impl.NutLoading.createSessionProvider(NutLoading.java:410) INFO  - SessionBy --> org.nutz.integration.shiro.ShiroSessionProvider@e8b65ee

翻到前面的章节,发现在“为正式开发做准备”中配置 shiro 就应该有相应日志了。
web.xml、shiro.ini、MainModel 都已经按照文档中的说明一摸一样的配置了。请问我应该再从哪里下手找问题出在哪呢?没头绪。。

14 回复

全部日志贴一下

2017-07-04 10:54:27,091 org.nutz.mvc.NutFilter._init(NutFilter.java:85) INFO  - NutFilter[nutz] starting ...
2017-07-04 10:54:27,110 org.nutz.resource.Scans.printLocations(Scans.java:521) DEBUG - Locations count=4 time use 4ms
2017-07-04 10:54:27,266 org.nutz.resource.Scans.printLocations(Scans.java:521) DEBUG - Locations count=50 time use 156ms
2017-07-04 10:54:27,358 org.nutz.castor.Castors.reload(Castors.java:115) DEBUG - Using 95 castor for Castors
2017-07-04 10:54:27,380 org.nutz.mvc.config.AbstractNutConfig.createLoading(AbstractNutConfig.java:59) DEBUG - Loading by class org.nutz.mvc.impl.NutLoading
2017-07-04 10:54:27,384 org.nutz.mvc.impl.NutLoading.load(NutLoading.java:55) INFO  - Nutz Version : 1.r.61.r2 2017-04-18 
2017-07-04 10:54:27,384 org.nutz.mvc.impl.NutLoading.load(NutLoading.java:56) INFO  - Nutz.Mvc[nutz] is initializing ...
2017-07-04 10:54:27,385 org.nutz.mvc.impl.NutLoading.load(NutLoading.java:60) DEBUG - Web Container Information:
2017-07-04 10:54:27,393 org.nutz.mvc.impl.NutLoading.load(NutLoading.java:61) DEBUG -  - Default Charset : UTF-8
2017-07-04 10:54:27,393 org.nutz.mvc.impl.NutLoading.load(NutLoading.java:62) DEBUG -  - Current . path  : /Users/Kerwin/Documents/Tools/tomcat7-eova/bin/.
2017-07-04 10:54:27,393 org.nutz.mvc.impl.NutLoading.load(NutLoading.java:63) DEBUG -  - Java Version    : 1.8.0_101
2017-07-04 10:54:27,394 org.nutz.mvc.impl.NutLoading.load(NutLoading.java:64) DEBUG -  - File separator  : /
2017-07-04 10:54:27,394 org.nutz.mvc.impl.NutLoading.load(NutLoading.java:65) DEBUG -  - Timezone        : Asia/Shanghai
2017-07-04 10:54:27,394 org.nutz.mvc.impl.NutLoading.load(NutLoading.java:66) DEBUG -  - OS              : Mac OS X x86_64
2017-07-04 10:54:27,394 org.nutz.mvc.impl.NutLoading.load(NutLoading.java:67) DEBUG -  - ServerInfo      : Apache Tomcat/7.0.63
2017-07-04 10:54:27,395 org.nutz.mvc.impl.NutLoading.load(NutLoading.java:68) DEBUG -  - Servlet API     : 3.0
2017-07-04 10:54:27,397 org.nutz.mvc.impl.NutLoading.load(NutLoading.java:73) DEBUG -  - ContextPath     : 
2017-07-04 10:54:27,397 org.nutz.mvc.impl.NutLoading.load(NutLoading.java:74) DEBUG -  - context.tempdir : /Users/Kerwin/Library/Caches/IntelliJIdea2017.1/tomcat/Unnamed_nutz-3/work/Catalina/localhost/_
2017-07-04 10:54:27,398 org.nutz.mvc.impl.NutLoading.load(NutLoading.java:75) DEBUG -  - MainModule      : cn.edu.xmut.nutz.MainModule
2017-07-04 10:54:27,398 org.nutz.mvc.impl.NutLoading.createContext(NutLoading.java:235) DEBUG - >> app.root = /Users/Kerwin/Documents/Code/Java/Nutz/nutz-3/target/nutz-3
2017-07-04 10:54:27,404 org.nutz.mvc.impl.NutLoading.createIoc(NutLoading.java:376) DEBUG - @IocBy(type=org.nutz.mvc.ioc.provider.ComboIocProvider, args=["*js", "ioc/", "*anno", "cn.edu.xmut.nutz", "*tx", "*quartz"],init=[])
2017-07-04 10:54:27,498 org.nutz.resource.Scans.scan(Scans.java:274) DEBUG - Found 2 resource by src( ioc/ ) , regex( ^(.+[.])(js|json)$ )
2017-07-04 10:54:27,498 org.nutz.ioc.loader.json.JsonLoader.<init>(JsonLoader.java:49) DEBUG - loading [dao.js]
2017-07-04 10:54:27,505 org.nutz.ioc.loader.json.JsonLoader.<init>(JsonLoader.java:49) DEBUG - loading [mail.js]
2017-07-04 10:54:27,506 org.nutz.ioc.loader.json.JsonLoader.<init>(JsonLoader.java:57) DEBUG - Loaded 5 bean define from path=[ioc/] --> [conf, dao, emailAuthenticator, dataSource, htmlEmail]
2017-07-04 10:54:27,524 org.nutz.resource.Scans.scan(Scans.java:274) DEBUG - Found 17 resource by src( cn/edu/xmut/nutz/ ) , regex( ^.+[.]class$ )
2017-07-04 10:54:27,557 org.nutz.ioc.loader.annotation.AnnotationIocLoader.addClass(AnnotationIocLoader.java:74) DEBUG - Found @IocBean : class cn.edu.xmut.nutz.module.UserModule
2017-07-04 10:54:27,575 org.nutz.ioc.loader.annotation.AnnotationIocLoader.addClass(AnnotationIocLoader.java:74) DEBUG - Found @IocBean : class cn.edu.xmut.nutz.module.UserProfileModule
2017-07-04 10:54:27,589 org.nutz.ioc.loader.annotation.AnnotationIocLoader.addClass(AnnotationIocLoader.java:74) DEBUG - Found @IocBean : class cn.edu.xmut.nutz.quartz.job.CleanNonActiveUserJob
2017-07-04 10:54:27,593 org.nutz.ioc.loader.annotation.AnnotationIocLoader.addClass(AnnotationIocLoader.java:74) DEBUG - Found @IocBean : class cn.edu.xmut.nutz.service.impl.EmailServiceImpl
2017-07-04 10:54:27,601 org.nutz.ioc.loader.annotation.AnnotationIocLoader.addClass(AnnotationIocLoader.java:74) DEBUG - Found @IocBean : class cn.edu.xmut.nutz.service.impl.UserServiceImpl
2017-07-04 10:54:27,609 org.nutz.ioc.loader.annotation.AnnotationIocLoader.<init>(AnnotationIocLoader.java:50) INFO  - Found 5 classes in 1 base-packages!
beans = ["cleanNonActiveUserJob", "userProfileModule", "userModule", "emailService", "userService"]
2017-07-04 10:54:27,622 org.nutz.ioc.loader.json.JsonLoader.<init>(JsonLoader.java:40) DEBUG - Loaded 5 bean define from reader --
[txREPEATABLE_READ, txSERIALIZABLE, txNONE, txREAD_UNCOMMITTED, txREAD_COMMITTED]
2017-07-04 10:54:27,628 org.nutz.ioc.loader.combo.ComboIocLoader.createIocLoader(ComboIocLoader.java:110) DEBUG - found quartz -- org.nutz.integration.quartz.QuartzIocLoader
2017-07-04 10:54:27,637 org.nutz.ioc.loader.json.JsonLoader.<init>(JsonLoader.java:57) DEBUG - Loaded 0 bean define from path=[] --> []
2017-07-04 10:54:27,642 org.nutz.ioc.impl.NutIoc.<init>(NutIoc.java:98) INFO  - NutIoc init begin ...
2017-07-04 10:54:27,750 org.nutz.ioc.impl.NutIoc.<init>(NutIoc.java:115) INFO  - ... NutIoc init complete
2017-07-04 10:54:27,756 org.nutz.mvc.impl.NutLoading.evalUrlMapping(NutLoading.java:159) INFO  - Build URL mapping by org.nutz.mvc.impl.UrlMappingImpl ...
2017-07-04 10:54:27,766 org.beetl.ext.nutz.BeetlViewMaker.init(BeetlViewMaker.java:59) DEBUG - beetl init ....
2017-07-04 10:54:27,771 org.beetl.ext.nutz.BeetlViewMaker.init(BeetlViewMaker.java:64) DEBUG - found beetl.properties, loading ...
2017-07-04 10:54:27,772 org.beetl.ext.nutz.BeetlViewMaker.init(BeetlViewMaker.java:74) DEBUG - no custom RESOURCE_LOADER found , select WebAppResourceLoader
2017-07-04 10:54:27,773 org.beetl.ext.nutz.BeetlViewMaker.init(BeetlViewMaker.java:79) DEBUG - no custom DIRECT_BYTE_OUTPUT found , set to true
2017-07-04 10:54:27,909 org.beetl.ext.nutz.BeetlViewMaker.init(BeetlViewMaker.java:92) DEBUG - beetl init complete
2017-07-04 10:54:27,910 org.nutz.mvc.impl.NutLoading.createViewMakers(NutLoading.java:366) DEBUG - @Views(BeetlViewMaker.class,DefaultViewMaker.class)
2017-07-04 10:54:27,924 org.nutz.mvc.impl.NutLoading.createChainMaker(NutLoading.java:263) DEBUG - @ChainBy(org.nutz.mvc.impl.NutActionChainMaker)
2017-07-04 10:54:27,933 org.nutz.mvc.impl.Loadings.scanModules(Loadings.java:154) DEBUG - module class location 'file:/Users/Kerwin/Documents/Code/Java/Nutz/nutz-3/target/nutz-3/WEB-INF/classes/cn/edu/xmut/nutz/MainModule.class'
2017-07-04 10:54:27,934 org.nutz.mvc.impl.Loadings.scanModuleInPackage(Loadings.java:184) DEBUG -  > scan 'cn.edu.xmut.nutz'
2017-07-04 10:54:27,939 org.nutz.resource.Scans.scan(Scans.java:274) DEBUG - Found 17 resource by src( cn/edu/xmut/nutz/ ) , regex( ^.+[.]class$ )
2017-07-04 10:54:27,945 org.nutz.mvc.impl.Loadings.checkModule(Loadings.java:199) DEBUG -    >> add 'cn.edu.xmut.nutz.module.UserModule'
2017-07-04 10:54:27,946 org.nutz.mvc.impl.Loadings.checkModule(Loadings.java:199) DEBUG -    >> add 'cn.edu.xmut.nutz.module.UserProfileModule'
2017-07-04 10:54:28,013 org.nutz.mvc.impl.NutActionChainMaker.getProcessorByName(NutActionChainMaker.java:72) INFO  - Optional processor class not found, disabled : org.nutz.plugins.validation.ValidationProcessor
2017-07-04 10:54:28,051 org.nutz.mvc.impl.UrlMappingImpl.print(UrlMappingImpl.java:146) DEBUG -    '/user/'                    >> (UserModule.java:54).index            : void       | @Ok(beetl:/index.html) @Fail(http:500) | by 0 Filters | (I:UTF-8/O:UTF-8)
2017-07-04 10:54:28,192 org.nutz.mvc.impl.UrlMappingImpl.print(UrlMappingImpl.java:146) DEBUG -    '/user/add'                 >> (UserModule.java:85).add              : Object     | @Ok(json:{locked:'password|salt',ignoreNull:true}) @Fail(http:500) | by 1 Filters | (I:UTF-8/O:UTF-8)
2017-07-04 10:54:28,193 org.nutz.mvc.impl.UrlMappingImpl.print(UrlMappingImpl.java:146) DEBUG -    '/user/count'               >> (UserModule.java:47).count            : int        | @Ok(json:{locked:'password|salt',ignoreNull:true}) @Fail(http:500) | by 1 Filters | (I:UTF-8/O:UTF-8)
2017-07-04 10:54:28,200 org.nutz.mvc.impl.UrlMappingImpl.print(UrlMappingImpl.java:146) DEBUG -    '/user/update'              >> (UserModule.java:96).update           : Object     | @Ok(json:{locked:'password|salt',ignoreNull:true}) @Fail(http:500) | by 1 Filters | (I:UTF-8/O:UTF-8)
2017-07-04 10:54:28,202 org.nutz.mvc.impl.UrlMappingImpl.print(UrlMappingImpl.java:146) DEBUG -    '/user/delete'              >> (UserModule.java:106).delete          : Object     | @Ok(json:{locked:'password|salt',ignoreNull:true}) @Fail(http:500) | by 1 Filters | (I:UTF-8/O:UTF-8)
2017-07-04 10:54:28,203 org.nutz.mvc.impl.UrlMappingImpl.print(UrlMappingImpl.java:146) DEBUG -    '/user/list'                >> (UserModule.java:59).list             : void       | @Ok(beetl:/list.html) @Fail(http:500) | by 1 Filters | (I:UTF-8/O:UTF-8)
2017-07-04 10:54:28,214 org.nutz.mvc.impl.UrlMappingImpl.print(UrlMappingImpl.java:146) DEBUG -    '/user/query'               >> (UserModule.java:117).query           : Object     | @Ok(json:{locked:'password|salt',ignoreNull:true}) @Fail(http:500) | by 1 Filters | (I:UTF-8/O:UTF-8)
2017-07-04 10:54:28,216 org.nutz.mvc.impl.UrlMappingImpl.print(UrlMappingImpl.java:146) DEBUG -    '/user/login'               >> (UserModule.java:65).login            : Object     | @Ok(json:{locked:'password|salt',ignoreNull:true}) @Fail(http:500) | by 0 Filters | (I:UTF-8/O:UTF-8)
2017-07-04 10:54:28,218 org.nutz.mvc.impl.UrlMappingImpl.print(UrlMappingImpl.java:146) DEBUG -    '/user/logout'              >> (UserModule.java:80).logout           : void       | @Ok(>>:/user) @Fail(http:500) | by 1 Filters | (I:UTF-8/O:UTF-8)
2017-07-04 10:54:28,222 org.nutz.mvc.impl.UrlMappingImpl.print(UrlMappingImpl.java:146) DEBUG -    '/user/profile/'            >> (UserProfileModule.java:53).index     : UserProfile | @Ok(beetl:/profile.html) @Fail(null ) | by 1 Filters | (I:UTF-8/O:UTF-8)
2017-07-04 10:54:28,233 org.nutz.mvc.impl.UrlMappingImpl.print(UrlMappingImpl.java:146) DEBUG -    '/user/profile/update'      >> (UserProfileModule.java:66).update    : Object     | @Ok(json:full) @Fail(null ) | by 1 Filters | (I:UTF-8/O:UTF-8)
2017-07-04 10:54:28,264 org.nutz.filepool.NutFilePool.<init>(NutFilePool.java:23) INFO  - Init file-pool by: /Users/Kerwin/Documents/Code/Java/Nutz/nutz-3/target/nutz-3/WEB-INF/tmp/user_avatar [20000]
2017-07-04 10:54:28,274 org.nutz.filepool.NutFilePool.<init>(NutFilePool.java:37) DEBUG - file-pool.home: '/Users/Kerwin/Documents/Code/Java/Nutz/nutz-3/target/nutz-3/WEB-INF/tmp/user_avatar'
2017-07-04 10:54:28,279 org.nutz.filepool.NutFilePool.<init>(NutFilePool.java:66) INFO  - file-pool.cursor: 9
2017-07-04 10:54:28,285 org.nutz.mvc.impl.UrlMappingImpl.print(UrlMappingImpl.java:146) DEBUG -    '/user/profile/avatar'      >> (UserProfileModule.java:104).uploadAvatar : void       | @Ok(>>:/user/profile) @Fail(null ) | by 1 Filters | (I:UTF-8/O:UTF-8)
2017-07-04 10:54:28,292 org.nutz.mvc.impl.UrlMappingImpl.print(UrlMappingImpl.java:146) DEBUG -    '/user/profile/avatar'      >> (UserProfileModule.java:142).readAvatar : Object     | @Ok(raw:jpg) @Fail(null ) | by 1 Filters | (I:UTF-8/O:UTF-8)
2017-07-04 10:54:28,293 org.nutz.mvc.impl.UrlMappingImpl.print(UrlMappingImpl.java:146) DEBUG -    '/user/profile/active/mail' >> (UserProfileModule.java:160).activeMail : Object     | @Ok(json:full) @Fail(null ) | by 1 Filters | (I:UTF-8/O:UTF-8)
2017-07-04 10:54:28,296 org.nutz.mvc.impl.UrlMappingImpl.print(UrlMappingImpl.java:146) DEBUG -    '/user/profile/active/mail' >> (UserProfileModule.java:187).activeMailCallback : String     | @Ok(raw  ) @Fail(null ) | by 0 Filters | (I:UTF-8/O:UTF-8)
2017-07-04 10:54:28,296 org.nutz.mvc.impl.NutLoading.evalUrlMapping(NutLoading.java:217) INFO  - Found 15 module methods
2017-07-04 10:54:28,297 org.nutz.mvc.impl.NutLoading.evalLocalization(NutLoading.java:331) DEBUG - @Localization not define
2017-07-04 10:54:28,302 org.nutz.mvc.impl.NutLoading.createSessionProvider(NutLoading.java:410) INFO  - SessionBy --> org.nutz.integration.shiro.ShiroSessionProvider@e8b65ee
2017-07-04 10:54:28,302 org.nutz.mvc.impl.NutLoading.evalSetup(NutLoading.java:271) INFO  - Setup application...
2017-07-04 10:54:28,311 org.nutz.ioc.impl.NutIoc.get(NutIoc.java:151) DEBUG - Get 'dao'<interface org.nutz.dao.Dao>
2017-07-04 10:54:28,314 org.nutz.ioc.aop.SimpleAopMaker.<init>(SimpleAopMaker.java:79) DEBUG - Load AopConfigure for anno=org.nutz.ioc.aop.Aop by type=org.nutz.ioc.aop.config.impl.AnnotationAopConfigration
2017-07-04 10:54:28,315 org.nutz.ioc.impl.NutIoc.get(NutIoc.java:177) DEBUG - 	 >> Load definition name=dao
2017-07-04 10:54:28,316 org.nutz.ioc.loader.map.MapLoader.load(MapLoader.java:67) DEBUG - Loading define for name=dao
2017-07-04 10:54:28,327 org.nutz.ioc.loader.combo.ComboIocLoader.load(ComboIocLoader.java:161) DEBUG - Found IocObject(dao) in JsonLoader(paths=[ioc/])
2017-07-04 10:54:28,328 org.nutz.ioc.impl.NutIoc.get(NutIoc.java:209) DEBUG - 	 >> Make...'dao'<interface org.nutz.dao.Dao>
2017-07-04 10:54:28,346 org.nutz.ioc.aop.impl.DefaultMirrorFactory.getMirror(DefaultMirrorFactory.java:70) DEBUG - Load class org.nutz.dao.impl.NutDao without AOP
2017-07-04 10:54:28,348 org.nutz.ioc.impl.ScopeContext.save(ScopeContext.java:64) DEBUG - Save object 'dao' to [app] 
2017-07-04 10:54:28,351 org.nutz.ioc.impl.NutIoc.get(NutIoc.java:151) DEBUG - Get 'dataSource'<>
2017-07-04 10:54:28,352 org.nutz.ioc.impl.NutIoc.get(NutIoc.java:177) DEBUG - 	 >> Load definition name=dataSource
2017-07-04 10:54:28,352 org.nutz.ioc.loader.map.MapLoader.load(MapLoader.java:67) DEBUG - Loading define for name=dataSource
2017-07-04 10:54:28,368 org.nutz.ioc.loader.combo.ComboIocLoader.load(ComboIocLoader.java:161) DEBUG - Found IocObject(dataSource) in JsonLoader(paths=[ioc/])
2017-07-04 10:54:28,368 org.nutz.ioc.impl.NutIoc.get(NutIoc.java:209) DEBUG - 	 >> Make...'dataSource'<>
2017-07-04 10:54:28,393 org.nutz.ioc.aop.impl.DefaultMirrorFactory.getMirror(DefaultMirrorFactory.java:70) DEBUG - Load class com.alibaba.druid.pool.DruidDataSource without AOP
2017-07-04 10:54:28,393 org.nutz.ioc.impl.ScopeContext.save(ScopeContext.java:64) DEBUG - Save object 'dataSource' to [app] 
2017-07-04 10:54:28,396 org.nutz.ioc.impl.NutIoc.get(NutIoc.java:151) DEBUG - Get 'conf'<>
2017-07-04 10:54:28,396 org.nutz.ioc.impl.NutIoc.get(NutIoc.java:177) DEBUG - 	 >> Load definition name=conf
2017-07-04 10:54:28,397 org.nutz.ioc.loader.map.MapLoader.load(MapLoader.java:67) DEBUG - Loading define for name=conf
2017-07-04 10:54:28,420 org.nutz.ioc.loader.combo.ComboIocLoader.load(ComboIocLoader.java:161) DEBUG - Found IocObject(conf) in JsonLoader(paths=[ioc/])
2017-07-04 10:54:28,420 org.nutz.ioc.impl.NutIoc.get(NutIoc.java:209) DEBUG - 	 >> Make...'conf'<>
2017-07-04 10:54:28,421 org.nutz.ioc.aop.impl.DefaultMirrorFactory.getMirror(DefaultMirrorFactory.java:70) DEBUG - Load class org.nutz.ioc.impl.PropertiesProxy without AOP
2017-07-04 10:54:28,422 org.nutz.ioc.impl.ScopeContext.save(ScopeContext.java:64) DEBUG - Save object 'conf' to [app] 
2017-07-04 10:54:28,519 org.nutz.resource.Scans.scan(Scans.java:274) DEBUG - Found 4 resource by src( custom/ ) , regex( ^.+[.]properties$ )
2017-07-04 10:54:28,520 org.nutz.ioc.impl.PropertiesProxy.setPaths(PropertiesProxy.java:113) DEBUG - load properties from File[/Users/Kerwin/Documents/Code/Java/Nutz/nutz-3/target/nutz-3/WEB-INF/classes/custom/cron.properties]
2017-07-04 10:54:28,521 org.nutz.ioc.impl.PropertiesProxy.setPaths(PropertiesProxy.java:113) DEBUG - load properties from File[/Users/Kerwin/Documents/Code/Java/Nutz/nutz-3/target/nutz-3/WEB-INF/classes/custom/db.properties]
2017-07-04 10:54:28,521 org.nutz.ioc.impl.PropertiesProxy.setPaths(PropertiesProxy.java:113) DEBUG - load properties from File[/Users/Kerwin/Documents/Code/Java/Nutz/nutz-3/target/nutz-3/WEB-INF/classes/custom/mail.properties]
2017-07-04 10:54:28,522 org.nutz.ioc.impl.PropertiesProxy.setPaths(PropertiesProxy.java:113) DEBUG - load properties from File[/Users/Kerwin/Documents/Code/Java/Nutz/nutz-3/target/nutz-3/WEB-INF/classes/custom/quartz.properties]
2017-07-04 10:54:28,981 com.alibaba.druid.pool.DruidDataSource.init(DruidDataSource.java:785) INFO  - {dataSource-1} inited
2017-07-04 10:54:28,982 org.nutz.ioc.impl.NutIoc.get(NutIoc.java:151) DEBUG - Get 'dataSource'<>
2017-07-04 10:54:29,124 org.nutz.filepool.NutFilePool.<init>(NutFilePool.java:23) INFO  - Init file-pool by: /Users/Kerwin/.nutz/tmp/dao/ [200000]
2017-07-04 10:54:29,124 org.nutz.filepool.NutFilePool.<init>(NutFilePool.java:37) DEBUG - file-pool.home: '/Users/Kerwin/.nutz/tmp/dao'
2017-07-04 10:54:29,125 org.nutz.filepool.NutFilePool.<init>(NutFilePool.java:66) INFO  - file-pool.cursor: 0
2017-07-04 10:54:29,265 org.nutz.dao.jdbc.Jdbcs.<clinit>(Jdbcs.java:90) DEBUG - Jdbcs init complete
2017-07-04 10:54:29,265 org.nutz.dao.jdbc.Jdbcs.getExpert(Jdbcs.java:103) INFO  - Get Connection from DataSource for JdbcExpert, if you lock at here, check your database server and configure
2017-07-04 10:54:29,609 org.nutz.dao.impl.DaoSupport.setDataSource(DaoSupport.java:189) DEBUG - select expert : org.nutz.dao.impl.jdbc.mysql.MysqlJdbcExpert
2017-07-04 10:54:29,614 org.nutz.dao.impl.DaoSupport$1.invoke(DaoSupport.java:200) DEBUG - JDBC Driver --> mysql-connector-java-5.1.40 ( Revision: 402933ef52cad9aa82624e80acbea46e3a701ce6 )
2017-07-04 10:54:29,615 org.nutz.dao.impl.DaoSupport$1.invoke(DaoSupport.java:201) DEBUG - JDBC Name   --> MySQL Connector Java
2017-07-04 10:54:29,615 org.nutz.dao.impl.DaoSupport$1.invoke(DaoSupport.java:203) DEBUG - JDBC URL    --> jdbc:mysql://172.28.224.199:3306/nutz?useSSL=false
2017-07-04 10:54:29,706 org.nutz.dao.impl.jdbc.mysql.MysqlJdbcExpert.checkDataSource(MysqlJdbcExpert.java:212) DEBUG - Mysql : character_set_client=utf8
2017-07-04 10:54:29,706 org.nutz.dao.impl.jdbc.mysql.MysqlJdbcExpert.checkDataSource(MysqlJdbcExpert.java:212) DEBUG - Mysql : character_set_connection=utf8
2017-07-04 10:54:29,706 org.nutz.dao.impl.jdbc.mysql.MysqlJdbcExpert.checkDataSource(MysqlJdbcExpert.java:212) DEBUG - Mysql : character_set_database=utf8
2017-07-04 10:54:29,706 org.nutz.dao.impl.jdbc.mysql.MysqlJdbcExpert.checkDataSource(MysqlJdbcExpert.java:212) DEBUG - Mysql : character_set_filesystem=binary
2017-07-04 10:54:29,707 org.nutz.dao.impl.jdbc.mysql.MysqlJdbcExpert.checkDataSource(MysqlJdbcExpert.java:212) DEBUG - Mysql : character_set_results=
2017-07-04 10:54:29,707 org.nutz.dao.impl.jdbc.mysql.MysqlJdbcExpert.checkDataSource(MysqlJdbcExpert.java:212) DEBUG - Mysql : character_set_server=utf8
2017-07-04 10:54:29,707 org.nutz.dao.impl.jdbc.mysql.MysqlJdbcExpert.checkDataSource(MysqlJdbcExpert.java:212) DEBUG - Mysql : character_set_system=utf8
2017-07-04 10:54:29,707 org.nutz.dao.impl.jdbc.mysql.MysqlJdbcExpert.checkDataSource(MysqlJdbcExpert.java:212) DEBUG - Mysql : character_sets_dir=C:\Program Files\MySQL\MySQL Server 5.7\share\charsets\
2017-07-04 10:54:29,710 org.nutz.dao.impl.jdbc.mysql.MysqlJdbcExpert.checkDataSource(MysqlJdbcExpert.java:219) DEBUG - Mysql : binlog_format=ROW
2017-07-04 10:54:29,712 org.nutz.dao.impl.jdbc.mysql.MysqlJdbcExpert.checkDataSource(MysqlJdbcExpert.java:226) DEBUG - Mysql : database=nutz
2017-07-04 10:54:29,713 org.nutz.dao.impl.jdbc.mysql.MysqlJdbcExpert.checkDataSource(MysqlJdbcExpert.java:232) DEBUG - Mysql : user=dev@172.18.8.184
2017-07-04 10:54:29,749 org.nutz.dao.impl.DaoSupport.setDataSource(DaoSupport.java:222) DEBUG - Database info --> MYSQL:[MySQL - 5.7.18-log]
2017-07-04 10:54:29,754 org.nutz.resource.Scans.scan(Scans.java:274) DEBUG - Found 17 resource by src( cn/edu/xmut/nutz/ ) , regex( ^.+[.]class$ )
2017-07-04 10:54:29,821 org.nutz.dao.impl.sql.run.NutDaoExecutor.printSQL(NutDaoExecutor.java:388) DEBUG - SELECT COUNT(*) FROM t_user 
2017-07-04 10:54:29,823 org.nutz.ioc.impl.NutIoc.get(NutIoc.java:151) DEBUG - Get 'nutQuartzCronJobFactory'<class org.nutz.integration.quartz.NutQuartzCronJobFactory>
2017-07-04 10:54:29,824 org.nutz.ioc.impl.NutIoc.get(NutIoc.java:177) DEBUG - 	 >> Load definition name=nutQuartzCronJobFactory
2017-07-04 10:54:29,824 org.nutz.ioc.loader.map.MapLoader.load(MapLoader.java:67) DEBUG - Loading define for name=nutQuartzCronJobFactory
2017-07-04 10:54:29,824 org.nutz.ioc.loader.combo.ComboIocLoader.load(ComboIocLoader.java:161) DEBUG - Found IocObject(nutQuartzCronJobFactory) in QuartzIocLoader@1696058722
2017-07-04 10:54:29,824 org.nutz.ioc.impl.NutIoc.get(NutIoc.java:209) DEBUG - 	 >> Make...'nutQuartzCronJobFactory'<class org.nutz.integration.quartz.NutQuartzCronJobFactory>
2017-07-04 10:54:29,825 org.nutz.ioc.aop.impl.DefaultMirrorFactory.getMirror(DefaultMirrorFactory.java:70) DEBUG - Load class org.nutz.integration.quartz.NutQuartzCronJobFactory without AOP
2017-07-04 10:54:29,825 org.nutz.ioc.impl.ScopeContext.save(ScopeContext.java:64) DEBUG - Save object 'nutQuartzCronJobFactory' to [app] 
2017-07-04 10:54:29,832 org.nutz.ioc.impl.NutIoc.get(NutIoc.java:151) DEBUG - Get 'scheduler'<>
2017-07-04 10:54:29,832 org.nutz.ioc.impl.NutIoc.get(NutIoc.java:177) DEBUG - 	 >> Load definition name=scheduler
2017-07-04 10:54:29,832 org.nutz.ioc.loader.map.MapLoader.load(MapLoader.java:67) DEBUG - Loading define for name=scheduler
2017-07-04 10:54:29,833 org.nutz.ioc.loader.combo.ComboIocLoader.load(ComboIocLoader.java:161) DEBUG - Found IocObject(scheduler) in QuartzIocLoader@1696058722
2017-07-04 10:54:29,833 org.nutz.ioc.impl.NutIoc.get(NutIoc.java:209) DEBUG - 	 >> Make...'scheduler'<>
2017-07-04 10:54:29,833 org.nutz.ioc.impl.ScopeContext.save(ScopeContext.java:64) DEBUG - Save object 'scheduler' to [app] 
2017-07-04 10:54:29,909 org.nutz.ioc.impl.NutIoc.get(NutIoc.java:151) DEBUG - Get 'jobFactory'<>
2017-07-04 10:54:29,909 org.nutz.ioc.impl.NutIoc.get(NutIoc.java:177) DEBUG - 	 >> Load definition name=jobFactory
2017-07-04 10:54:29,909 org.nutz.ioc.loader.map.MapLoader.load(MapLoader.java:67) DEBUG - Loading define for name=jobFactory
2017-07-04 10:54:29,910 org.nutz.ioc.loader.combo.ComboIocLoader.load(ComboIocLoader.java:161) DEBUG - Found IocObject(jobFactory) in QuartzIocLoader@1696058722
2017-07-04 10:54:29,910 org.nutz.ioc.impl.NutIoc.get(NutIoc.java:209) DEBUG - 	 >> Make...'jobFactory'<>
2017-07-04 10:54:29,912 org.nutz.ioc.aop.impl.DefaultMirrorFactory.getMirror(DefaultMirrorFactory.java:70) DEBUG - Load class org.nutz.integration.quartz.NutQuartzJobFactory without AOP
2017-07-04 10:54:29,912 org.nutz.ioc.impl.ScopeContext.save(ScopeContext.java:64) DEBUG - Save object 'jobFactory' to [app] 
2017-07-04 10:54:29,974 org.nutz.ioc.impl.NutIoc.get(NutIoc.java:151) DEBUG - Get 'conf'<>
2017-07-04 10:54:29,974 org.nutz.integration.quartz.NutQuartzCronJobFactory.init(NutQuartzCronJobFactory.java:35) DEBUG - job define name=cn.edu.xmut.nutz.quartz.job.CleanNonActiveUserJob cron=0 0/2 * * * ?
2017-07-04 10:54:29,991 org.nutz.integration.quartz.NutQuartzCronJobFactory.init(NutQuartzCronJobFactory.java:28) DEBUG - found cron job packages = cn.edu.xmut.nutz.quartz.job
2017-07-04 10:54:29,993 org.nutz.resource.Scans.scan(Scans.java:274) DEBUG - Found 1 resource by src( cn/edu/xmut/nutz/quartz/job/ ) , regex( ^.+[.]class$ )
2017-07-04 10:54:29,994 org.nutz.mvc.impl.NutLoading.load(NutLoading.java:141) INFO  - Nutz.Mvc[nutz] is up in 2596ms
2017-07-04 10:54:29,998 org.nutz.mvc.NutFilter._init(NutFilter.java:117) INFO  - exclusionsPrefix  = ^(/rs/|/druid/)
[2017-07-04 10:54:30,024] Artifact nutz-3:war exploded: Artifact is deployed successfully
[2017-07-04 10:54:30,024] Artifact nutz-3:war exploded: Deploy took 11,850 milliseconds

web.xml 没配好, 贴出来看看

<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee"
         xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
         id="WebApp_ID" version="2.5">
    <listener>
        <listener-class>org.apache.shiro.web.env.EnvironmentLoaderListener</listener-class>
    </listener>
    <filter>
        <filter-name>ShiroFilter</filter-name>
        <filter-class>org.nutz.integration.shiro.ShiroFilter2</filter-class>
    </filter>
    <filter-mapping>
        <filter-name>ShiroFilter</filter-name>
        <url-pattern>/*</url-pattern>
        <dispatcher>REQUEST</dispatcher>
        <dispatcher>FORWARD</dispatcher>
        <dispatcher>INCLUDE</dispatcher>
        <dispatcher>ERROR</dispatcher>
    </filter-mapping>

    <filter>
        <filter-name>DruidWebStatFilter</filter-name>
        <filter-class>com.alibaba.druid.support.http.WebStatFilter</filter-class>
        <init-param>
            <param-name>exclusions</param-name>
            <param-value>*.js,*.gif,*.jpg,*.png,*.css,*.ico,/druid/*,/rs/*</param-value>
        </init-param>
    </filter>
    <filter-mapping>
        <filter-name>DruidWebStatFilter</filter-name>
        <url-pattern>/*</url-pattern>
    </filter-mapping>
    <filter>
        <filter-name>nutz</filter-name>
        <filter-class>org.nutz.mvc.NutFilter</filter-class>
        <init-param>
            <param-name>modules</param-name>
            <param-value>cn.edu.xmut.nutz.MainModule</param-value>
        </init-param>
        <init-param>
            <param-name>exclusions</param-name>
            <param-value>/rs/*,/druid/*</param-value>
        </init-param>
    </filter>
    <filter-mapping>
        <filter-name>nutz</filter-name>
        <url-pattern>/*</url-pattern>
        <!-- ForwardView需要下面的配置 @Ok("->:/xxx/yyy/zzz") -->
        <dispatcher>REQUEST</dispatcher>
        <dispatcher>FORWARD</dispatcher>
        <dispatcher>INCLUDE</dispatcher>
    </filter-mapping>
    <servlet>
        <servlet-name>DruidStatView</servlet-name>
        <servlet-class>com.alibaba.druid.support.http.StatViewServlet</servlet-class>
    </servlet>
    <servlet-mapping>
        <servlet-name>DruidStatView</servlet-name>
        <url-pattern>/druid/*</url-pattern>
    </servlet-mapping>
    <welcome-file-list>
        <welcome-file>index.html</welcome-file>
    </welcome-file-list>
</web-app>

看上去也没错的样子,难道是log4j.properties里面把日志全禁了??

下面这句日志之前,应该还有东西吧??? 贴来看看

2017-07-04 10:54:27,091 org.nutz.mvc.NutFilter._init(NutFilter.java:85) INFO  - NutFilter[nutz] starting ...
/Users/Kerwin/Documents/Tools/tomcat7-eova/bin/catalina.sh run
Connected to the target VM, address: '127.0.0.1:60695', transport: 'socket'
[2017-07-04 10:54:11,452] Artifact nutz-3:war exploded: Server is not connected. Deploy is not available.
七月 04, 2017 10:54:17 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: Server version:        Apache Tomcat/7.0.63
七月 04, 2017 10:54:17 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: Server built:          Jun 30 2015 08:08:33 UTC
七月 04, 2017 10:54:17 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: Server number:         7.0.63.0
七月 04, 2017 10:54:17 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: OS Name:               Mac OS X
七月 04, 2017 10:54:17 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: OS Version:            10.12.5
七月 04, 2017 10:54:17 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: Architecture:          x86_64
七月 04, 2017 10:54:17 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: Java Home:             /Library/Java/JavaVirtualMachines/jdk1.8.0_101.jdk/Contents/Home/jre
七月 04, 2017 10:54:17 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: JVM Version:           1.8.0_101-b13
七月 04, 2017 10:54:17 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: JVM Vendor:            Oracle Corporation
七月 04, 2017 10:54:17 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: CATALINA_BASE:         /Users/Kerwin/Library/Caches/IntelliJIdea2017.1/tomcat/Unnamed_nutz-3
七月 04, 2017 10:54:17 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: CATALINA_HOME:         /Users/Kerwin/Documents/Tools/tomcat7-eova
七月 04, 2017 10:54:17 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Djava.util.logging.config.file=/Users/Kerwin/Library/Caches/IntelliJIdea2017.1/tomcat/Unnamed_nutz-3/conf/logging.properties
七月 04, 2017 10:54:17 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
七月 04, 2017 10:54:17 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -agentlib:jdwp=transport=dt_socket,address=127.0.0.1:60695,suspend=y,server=n
七月 04, 2017 10:54:17 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Dfile.encoding=UTF-8
七月 04, 2017 10:54:17 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Dcom.sun.management.jmxremote=
七月 04, 2017 10:54:17 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Dcom.sun.management.jmxremote.port=1099
七月 04, 2017 10:54:17 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Dcom.sun.management.jmxremote.ssl=false
七月 04, 2017 10:54:17 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Dcom.sun.management.jmxremote.authenticate=false
七月 04, 2017 10:54:17 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Djava.rmi.server.hostname=127.0.0.1
七月 04, 2017 10:54:17 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Djava.endorsed.dirs=/Users/Kerwin/Documents/Tools/tomcat7-eova/endorsed
七月 04, 2017 10:54:17 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Dcatalina.base=/Users/Kerwin/Library/Caches/IntelliJIdea2017.1/tomcat/Unnamed_nutz-3
七月 04, 2017 10:54:17 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Dcatalina.home=/Users/Kerwin/Documents/Tools/tomcat7-eova
七月 04, 2017 10:54:17 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Djava.io.tmpdir=/Users/Kerwin/Documents/Tools/tomcat7-eova/temp
七月 04, 2017 10:54:17 上午 org.apache.catalina.core.AprLifecycleListener lifecycleEvent
信息: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: /Users/Kerwin/Library/Java/Extensions:/Library/Java/Extensions:/Network/Library/Java/Extensions:/System/Library/Java/Extensions:/usr/lib/java:.
七月 04, 2017 10:54:17 上午 org.apache.coyote.AbstractProtocol init
信息: Initializing ProtocolHandler ["http-bio-8080"]
七月 04, 2017 10:54:17 上午 org.apache.coyote.AbstractProtocol init
信息: Initializing ProtocolHandler ["ajp-bio-8009"]
七月 04, 2017 10:54:17 上午 org.apache.catalina.startup.Catalina load
信息: Initialization processed in 868 ms
七月 04, 2017 10:54:17 上午 org.apache.catalina.core.StandardService startInternal
信息: Starting service Catalina
七月 04, 2017 10:54:17 上午 org.apache.catalina.core.StandardEngine startInternal
信息: Starting Servlet Engine: Apache Tomcat/7.0.63
七月 04, 2017 10:54:17 上午 org.apache.coyote.AbstractProtocol start
信息: Starting ProtocolHandler ["http-bio-8080"]
七月 04, 2017 10:54:17 上午 org.apache.coyote.AbstractProtocol start
信息: Starting ProtocolHandler ["ajp-bio-8009"]
七月 04, 2017 10:54:17 上午 org.apache.catalina.startup.Catalina start
信息: Server startup in 75 ms
Connected to server
[2017-07-04 10:54:18,175] Artifact nutz-3:war exploded: Artifact is being deployed, please wait...
七月 04, 2017 10:54:18 上午 org.apache.catalina.loader.WebappClassLoader validateJarFile
信息: validateJarFile(/Users/Kerwin/Documents/Code/Java/Nutz/nutz-3/target/nutz-3/WEB-INF/lib/javax.servlet-api-3.1.0.jar) - jar not loaded. See Servlet Spec 3.0, section 10.7.2. Offending class: javax/servlet/Servlet.class
七月 04, 2017 10:54:21 上午 org.apache.catalina.startup.TldConfig execute
信息: At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.

我 log 配的是 debug,应该不会禁掉吧?

你的log4j.properties写错了, 贴出来

说错,是少了个jar, slf4j-log4j12.jar

log4j.rootLogger=debug,Console

log4j.appender.Console=org.apache.log4j.ConsoleAppender
log4j.appender.Console.layout=org.apache.log4j.PatternLayout
log4j.appender.Console.layout.ConversionPattern=%d %l %-5p - %m%n

就这样

<dependency>
            <groupId>org.apache.shiro</groupId>
            <artifactId>shiro-all</artifactId>
            <version>1.4.0</version>
            <type>pom</type>
            <exclusions>
                <exclusion>
                    <groupId>org.apache.shiro</groupId>
                    <artifactId>shiro-quartz</artifactId>
                </exclusion>
                <exclusion>
                    <artifactId>ehcache-core</artifactId>
                    <groupId>net.sf.ehcache</groupId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.ehcache</groupId>
            <artifactId>ehcache</artifactId>
            <version>3.3.1</version>
        </dependency>
        <dependency>
            <groupId>org.nutz</groupId>
            <artifactId>nutz-integration-shiro</artifactId>
            <version>1.r.61.r2</version>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
            <version>1.7.25</version>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-log4j12</artifactId>
            <version>1.7.25</version>
        </dependency>

有哦。

但是报的就是 "SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".

看看StaticLoggerBinder类是否存在

重启一下就好了。。。我。。迷醉。。。

添加回复
请先登陆
回到顶部