mail.properties:
mail.HostName=smtp.aliyun.com
mail.SmtpPort=25
mail.UserName=luliaiwqh@aliyun.com
mail.Password=xxxxxxx
mail.SSLOnConnect=false
mail.From=luliaiwqh@aliyun.com
mail.charset=UTF-8
mail.js:
var ioc={
emailAuthenticator : {
type : "org.apache.commons.mail.DefaultAuthenticator",
args : [{java:"$conf.get('mail.UserName')"}, {java:"$conf.get('mail.Password')"}]
},
htmlEmail : {
type : "org.apache.commons.mail.ImageHtmlEmail",
singleton : false,
fields : {
hostName : {java:"$conf.get('mail.HostName')"},
smtpPort : {java:"$conf.get('mail.SmtpPort')"},
authenticator : {refer:"emailAuthenticator"},
SSLOnConnect : {java:"$conf.get('mail.SSLOnConnect')"},
from : {java:"$conf.get('mail.From')"},
charset : {java:"$conf.get('mail.charset', 'UTF-8')"}
}
}
};
MainSetup:
package net.wendal.nutzbook;
import net.wendal.nutzbook.bean.User;
import org.apache.commons.mail.HtmlEmail;
import org.nutz.dao.Dao;
import org.nutz.dao.util.Daos;
import org.nutz.integration.quartz.NutQuartzCronJobFactory;
import org.nutz.ioc.Ioc;
import org.nutz.mvc.NutConfig;
import org.nutz.mvc.Setup;
import java.util.Date;
/**
* Created by 17194 on 2017/6/14 0014.
*/
public class MainSetup implements Setup {
//初始化
public void init(NutConfig nc) {
Ioc ioc =nc.getIoc();
Dao dao = ioc.get(Dao.class);
Daos.createTablesInPackage(dao,"net.wendal.nutzbook.bean",false); //创建一个包下的所有实体类对应的表
if(dao.count(User.class) == 0){
User user = new User();
user.setName("admin");
user.setPassword("123456");
user.setCreateTime(new Date());
user.setUpdateTime(new Date());
dao.insert(user);
}
// 获取NutQuartzCronJobFactory从而触发计划任务的初始化与启动
ioc.get(NutQuartzCronJobFactory.class);
// 测试发送邮件
try {
HtmlEmail email = ioc.get(HtmlEmail.class);
email.setSubject("测试NutzBook");
email.setMsg("This is a test mail ... :-)" + System.currentTimeMillis());
email.addTo("1719411461@qq.com");//请务必改成您自己的邮箱啊!!!
email.buildMimeMessage();
email.sendMimeMessage();
} catch (Exception e) {
e.printStackTrace();
}
}
public void destroy(NutConfig nc) {
// webapp销毁之前执行的逻辑
// 这个时候依然可以从nc取出ioc, 然后取出需要的ioc 对象进行操作
}
}
日志信息:
[INFO ] 14:15:38.853 org.nutz.mvc.NutFilter._init(NutFilter.java:81) - NutFilter[nutz] starting ...
[DEBUG] 14:15:38.979 org.nutz.resource.Scans.<init>(Scans.java:509) - Locations for Scans:
[Dir[path=E:\Dev\apache-tomcat-8.0.44\bin], Jar[path=F:\gitResp\ShiroForNutzDemo\target\ShiroForNutzDemo\WEB-INF\lib\nutz-1.r.60.jar], Dir[path=F:\gitResp\ShiroForNutzDemo\target\ShiroForNutzDemo\WEB-INF\classes], Jar[path=E:\Dev\apache-tomcat-8.0.44\bin\bootstrap.jar], Jar[path=E:\Dev\apache-tomcat-8.0.44\bin\tomcat-juli.jar]]
[DEBUG] 14:15:39.108 org.nutz.resource.Scans.init(Scans.java:105) - Locations for Scans:
{E:\Dev\apache-tomcat-8.0.44\bin=Dir[path=E:\Dev\apache-tomcat-8.0.44\bin], F:\gitResp\ShiroForNutzDemo\target\ShiroForNutzDemo\WEB-INF\lib\nutz-1.r.60.jar=Jar[path=F:\gitResp\ShiroForNutzDemo\target\ShiroForNutzDemo\WEB-INF\lib\nutz-1.r.60.jar], F:\gitResp\ShiroForNutzDemo\target\ShiroForNutzDemo\WEB-INF\classes=Dir[path=F:\gitResp\ShiroForNutzDemo\target\ShiroForNutzDemo\WEB-INF\classes], E:\Dev\apache-tomcat-8.0.44\bin\bootstrap.jar=Jar[path=E:\Dev\apache-tomcat-8.0.44\bin\bootstrap.jar], E:\Dev\apache-tomcat-8.0.44\bin\tomcat-juli.jar=Jar[path=E:\Dev\apache-tomcat-8.0.44\bin\tomcat-juli.jar], F:\gitResp\ShiroForNutzDemo\target\ShiroForNutzDemo\WEB-INF\lib\nutz-integration-shiro-1.r.60.jar=Jar[path=F:\gitResp\ShiroForNutzDemo\target\ShiroForNutzDemo\WEB-INF\lib\nutz-integration-shiro-1.r.60.jar], F:\gitResp\ShiroForNutzDemo\target\ShiroForNutzDemo\WEB-INF\lib\javax.servlet-api-3.1.0.jar=Jar[path=F:\gitResp\ShiroForNutzDemo\target\ShiroForNutzDemo\WEB-INF\lib\javax.servlet-api-3.1.0.jar], F:\gitResp\ShiroForNutzDemo\target\ShiroForNutzDemo\WEB-INF\lib\activation-1.1.1.jar=Jar[path=F:\gitResp\ShiroForNutzDemo\target\ShiroForNutzDemo\WEB-INF\lib\activation-1.1.1.jar], F:\gitResp\ShiroForNutzDemo\target\ShiroForNutzDemo\WEB-INF\lib\quartz-2.2.1.jar=Jar[path=F:\gitResp\ShiroForNutzDemo\target\ShiroForNutzDemo\WEB-INF\lib\quartz-2.2.1.jar], F:\gitResp\ShiroForNutzDemo\target\ShiroForNutzDemo\WEB-INF\lib\commons-logging-1.2.jar=Jar[path=F:\gitResp\ShiroForNutzDemo\target\ShiroForNutzDemo\WEB-INF\lib\commons-logging-1.2.jar], F:\gitResp\ShiroForNutzDemo\target\ShiroForNutzDemo\WEB-INF\lib\guice-multibindings-3.0.jar=Jar[path=F:\gitResp\ShiroForNutzDemo\target\ShiroForNutzDemo\WEB-INF\lib\guice-multibindings-3.0.jar], F:\gitResp\ShiroForNutzDemo\target\ShiroForNutzDemo\WEB-INF\lib\taglibs-standard-spec-1.2.5.jar=Jar[path=F:\gitResp\ShiroForNutzDemo\target\ShiroForNutzDemo\WEB-INF\lib\taglibs-standard-spec-1.2.5.jar], F:\gitResp\ShiroForNutzDemo\target\ShiroForNutzDemo\WEB-INF\lib\aopalliance-1.0.jar=Jar[path=F:\gitResp\ShiroForNutzDemo\target\ShiroForNutzDemo\WEB-INF\lib\aopalliance-1.0.jar], F:\gitResp\ShiroForNutzDemo\target\ShiroForNutzDemo\WEB-INF\lib\nutz-integration-quartz-1.r.60.r2.jar=Jar[path=F:\gitResp\ShiroForNutzDemo\target\ShiroForNutzDemo\WEB-INF\lib\nutz-integration-quartz-1.r.60.r2.jar], F:\gitResp\ShiroForNutzDemo\target\ShiroForNutzDemo\WEB-INF\lib\commons-collections-3.2.1.jar=Jar[path=F:\gitResp\ShiroForNutzDemo\target\ShiroForNutzDemo\WEB-INF\lib\commons-collections-3.2.1.jar], F:\gitResp\ShiroForNutzDemo\target\ShiroForNutzDemo\WEB-INF\lib\druid-1.0.26.jar=Jar[path=F:\gitResp\ShiroForNutzDemo\target\ShiroForNutzDemo\WEB-INF\lib\druid-1.0.26.jar], F:\gitResp\ShiroForNutzDemo\target\ShiroForNutzDemo\WEB-INF\lib\mysql-connector-java-5.1.40.jar=Jar[path=F:\gitResp\ShiroForNutzDemo\target\ShiroForNutzDemo\WEB-INF\lib\mysql-connector-java-5.1.40.jar], F:\gitResp\ShiroForNutzDemo\target\ShiroForNutzDemo\WEB-INF\lib\c3p0-0.9.1.1.jar=Jar[path=F:\gitResp\ShiroForNutzDemo\target\ShiroForNutzDemo\WEB-INF\lib\c3p0-0.9.1.1.jar], F:\gitResp\ShiroForNutzDemo\target\ShiroForNutzDemo\WEB-INF\lib\shiro-all-1.3.2.jar=Jar[path=F:\gitResp\ShiroForNutzDemo\target\ShiroForNutzDemo\WEB-INF\lib\shiro-all-1.3.2.jar], F:\gitResp\ShiroForNutzDemo\target\ShiroForNutzDemo\WEB-INF\lib\javax.mail-api-1.5.2.jar=Jar[path=F:\gitResp\ShiroForNutzDemo\target\ShiroForNutzDemo\WEB-INF\lib\javax.mail-api-1.5.2.jar], F:\gitResp\ShiroForNutzDemo\target\ShiroForNutzDemo\WEB-INF\lib\taglibs-standard-impl-1.2.5.jar=Jar[path=F:\gitResp\ShiroForNutzDemo\target\ShiroForNutzDemo\WEB-INF\lib\taglibs-standard-impl-1.2.5.jar], F:\gitResp\ShiroForNutzDemo\target\ShiroForNutzDemo\WEB-INF\lib\guice-3.0.jar=Jar[path=F:\gitResp\ShiroForNutzDemo\target\ShiroForNutzDemo\WEB-INF\lib\guice-3.0.jar], F:\gitResp\ShiroForNutzDemo\target\ShiroForNutzDemo\WEB-INF\lib\javax.inject-1.jar=Jar[path=F:\gitResp\ShiroForNutzDemo\target\ShiroForNutzDemo\WEB-INF\lib\javax.inject-1.jar], F:\gitResp\ShiroForNutzDemo\target\ShiroForNutzDemo\WEB-INF\lib\slf4j-api-1.7.12.jar=Jar[path=F:\gitResp\ShiroForNutzDemo\target\ShiroForNutzDemo\WEB-INF\lib\slf4j-api-1.7.12.jar], F:\gitResp\ShiroForNutzDemo\target\ShiroForNutzDemo\WEB-INF\lib\shiro-guice-1.3.2.jar=Jar[path=F:\gitResp\ShiroForNutzDemo\target\ShiroForNutzDemo\WEB-INF\lib\shiro-guice-1.3.2.jar], F:\gitResp\ShiroForNutzDemo\target\ShiroForNutzDemo\WEB-INF\lib\commons-beanutils-1.9.2.jar=Jar[path=F:\gitResp\ShiroForNutzDemo\target\ShiroForNutzDemo\WEB-INF\lib\commons-beanutils-1.9.2.jar], F:\gitResp\ShiroForNutzDemo\target\ShiroForNutzDemo\WEB-INF\lib\shiro-core-1.3.2.jar=Jar[path=F:\gitResp\ShiroForNutzDemo\target\ShiroForNutzDemo\WEB-INF\lib\shiro-core-1.3.2.jar], F:\gitResp\ShiroForNutzDemo\target\ShiroForNutzDemo\WEB-INF\lib\shiro-web-1.3.2.jar=Jar[path=F:\gitResp\ShiroForNutzDemo\target\ShiroForNutzDemo\WEB-INF\lib\shiro-web-1.3.2.jar], F:\gitResp\ShiroForNutzDemo\target\ShiroForNutzDemo\WEB-INF\lib\log4j-1.2.17.jar=Jar[path=F:\gitResp\ShiroForNutzDemo\target\ShiroForNutzDemo\WEB-INF\lib\log4j-1.2.17.jar], F:\gitResp\ShiroForNutzDemo\target\ShiroForNutzDemo\WEB-INF\lib\taglibs-standard-jstlel-1.2.5.jar=Jar[path=F:\gitResp\ShiroForNutzDemo\target\ShiroForNutzDemo\WEB-INF\lib\taglibs-standard-jstlel-1.2.5.jar], F:\gitResp\ShiroForNutzDemo\target\ShiroForNutzDemo\WEB-INF\lib\mail-1.4.5.jar=Jar[path=F:\gitResp\ShiroForNutzDemo\target\ShiroForNutzDemo\WEB-INF\lib\mail-1.4.5.jar], F:\gitResp\ShiroForNutzDemo\target\ShiroForNutzDemo\WEB-INF\lib\jstl-1.2.jar=Jar[path=F:\gitResp\ShiroForNutzDemo\target\ShiroForNutzDemo\WEB-INF\lib\jstl-1.2.jar], F:\gitResp\ShiroForNutzDemo\target\ShiroForNutzDemo\WEB-INF\lib\commons-email-1.3.3.jar=Jar[path=F:\gitResp\ShiroForNutzDemo\target\ShiroForNutzDemo\WEB-INF\lib\commons-email-1.3.3.jar]}
[DEBUG] 14:15:39.162 org.nutz.castor.Castors.reload(Castors.java:115) - Using 95 castor for Castors
[DEBUG] 14:15:39.171 org.nutz.mvc.config.AbstractNutConfig.createLoading(AbstractNutConfig.java:59) - Loading by class org.nutz.mvc.impl.NutLoading
[INFO ] 14:15:39.174 org.nutz.mvc.impl.NutLoading.load(NutLoading.java:55) - Nutz Version : 1.r.60
[INFO ] 14:15:39.174 org.nutz.mvc.impl.NutLoading.load(NutLoading.java:56) - Nutz.Mvc[nutz] is initializing ...
[DEBUG] 14:15:39.175 org.nutz.mvc.impl.NutLoading.load(NutLoading.java:60) - Web Container Information:
[DEBUG] 14:15:39.176 org.nutz.mvc.impl.NutLoading.load(NutLoading.java:61) - - Default Charset : UTF-8
[DEBUG] 14:15:39.176 org.nutz.mvc.impl.NutLoading.load(NutLoading.java:62) - - Current . path : E:\Dev\apache-tomcat-8.0.44\bin\.
[DEBUG] 14:15:39.176 org.nutz.mvc.impl.NutLoading.load(NutLoading.java:63) - - Java Version : 1.8.0_131
[DEBUG] 14:15:39.177 org.nutz.mvc.impl.NutLoading.load(NutLoading.java:64) - - File separator : \
[DEBUG] 14:15:39.178 org.nutz.mvc.impl.NutLoading.load(NutLoading.java:65) - - Timezone : Asia/Shanghai
[DEBUG] 14:15:39.178 org.nutz.mvc.impl.NutLoading.load(NutLoading.java:66) - - OS : Windows 10 amd64
[DEBUG] 14:15:39.178 org.nutz.mvc.impl.NutLoading.load(NutLoading.java:67) - - ServerInfo : Apache Tomcat/8.0.44
[DEBUG] 14:15:39.178 org.nutz.mvc.impl.NutLoading.load(NutLoading.java:68) - - Servlet API : 3.1
[DEBUG] 14:15:39.179 org.nutz.mvc.impl.NutLoading.load(NutLoading.java:73) - - ContextPath : /nutzbook
[DEBUG] 14:15:39.180 org.nutz.mvc.impl.NutLoading.load(NutLoading.java:74) - - context.tempdir : C:\Users\17194\.IntelliJIdea2017.1\system\tomcat\Unnamed_ShiroForNutzDemo\work\Catalina\localhost\nutzbook
[DEBUG] 14:15:39.180 org.nutz.mvc.impl.NutLoading.load(NutLoading.java:75) - - MainModule : net.wendal.nutzbook.MainModule
[DEBUG] 14:15:39.182 org.nutz.mvc.impl.NutLoading.createContext(NutLoading.java:238) - >> app.root = F:/gitResp/ShiroForNutzDemo/target/ShiroForNutzDemo
[DEBUG] 14:15:39.185 org.nutz.mvc.impl.NutLoading.createIoc(NutLoading.java:379) - @IocBy(type=org.nutz.mvc.ioc.provider.ComboIocProvider, args=["*js", "ioc/", "*anno", "net.wendal.nutzbook", "*tx", "*async", "*quartz"],init=[])
[DEBUG] 14:15:39.207 org.nutz.resource.Scans.scan(Scans.java:274) - Found 2 resource by src( ioc/ ) , regex( ^(.+[.])(js|json)$ )
[DEBUG] 14:15:39.207 org.nutz.ioc.loader.json.JsonLoader.<init>(JsonLoader.java:48) - loading ioc js config from [dao.js]
[DEBUG] 14:15:39.211 org.nutz.ioc.loader.json.JsonLoader.<init>(JsonLoader.java:48) - loading ioc js config from [mail.js]
[DEBUG] 14:15:39.212 org.nutz.ioc.loader.json.JsonLoader.<init>(JsonLoader.java:56) - Loaded 5 bean define from path=[ioc/] --> [conf, dao, emailAuthenticator, dataSource, htmlEmail]
[DEBUG] 14:15:39.217 org.nutz.resource.Scans.scan(Scans.java:274) - Found 10 resource by src( net/wendal/nutzbook/ ) , regex( ^.+[.]class$ )
[DEBUG] 14:15:39.237 org.nutz.ioc.loader.annotation.AnnotationIocLoader.addClass(AnnotationIocLoader.java:74) - Found @IocBean : class net.wendal.nutzbook.module.BaseModule
[DEBUG] 14:15:39.250 org.nutz.ioc.loader.annotation.AnnotationIocLoader.addClass(AnnotationIocLoader.java:74) - Found @IocBean : class net.wendal.nutzbook.module.UserModule
[DEBUG] 14:15:39.255 org.nutz.ioc.loader.annotation.AnnotationIocLoader.addClass(AnnotationIocLoader.java:74) - Found @IocBean : class net.wendal.nutzbook.module.UserProfileModule
[INFO ] 14:15:39.267 org.nutz.ioc.loader.annotation.AnnotationIocLoader.<init>(AnnotationIocLoader.java:50) - Found 3 classes in 1 base-packages!
beans = ["userProfileModule", "baseModule", "userModule"]
[DEBUG] 14:15:39.269 org.nutz.ioc.loader.json.JsonLoader.<init>(JsonLoader.java:40) - Loaded 5 bean define from reader --
[txREPEATABLE_READ, txSERIALIZABLE, txNONE, txREAD_UNCOMMITTED, txREAD_COMMITTED]
[DEBUG] 14:15:39.272 org.nutz.ioc.aop.SimpleAopMaker.<init>(SimpleAopMaker.java:79) - Load AopConfigure for anno=org.nutz.aop.interceptor.async.Async by type=org.nutz.aop.interceptor.async.AsyncAopIocLoader
[DEBUG] 14:15:39.275 org.nutz.ioc.loader.combo.ComboIocLoader.createIocLoader(ComboIocLoader.java:118) - found org.nutz.integration.quartz.QuartzIocLoader -- org.nutz.integration.quartz.QuartzIocLoader
[DEBUG] 14:15:39.276 org.nutz.ioc.loader.json.JsonLoader.<init>(JsonLoader.java:56) - Loaded 0 bean define from path=[] --> []
[INFO ] 14:15:39.279 org.nutz.ioc.impl.NutIoc.<init>(NutIoc.java:98) - NutIoc init begin ...
[INFO ] 14:15:39.282 org.nutz.ioc.impl.NutIoc.<init>(NutIoc.java:115) - ... NutIoc init complete
[INFO ] 14:15:39.286 org.nutz.mvc.impl.NutLoading.evalUrlMapping(NutLoading.java:159) - Build URL mapping by org.nutz.mvc.impl.UrlMappingImpl ...
[DEBUG] 14:15:39.289 org.nutz.mvc.impl.NutLoading.createViewMakers(NutLoading.java:369) - @Views(DefaultViewMaker.class)
[DEBUG] 14:15:39.294 org.nutz.mvc.impl.NutLoading.createChainMaker(NutLoading.java:266) - @ChainBy(org.nutz.mvc.impl.NutActionChainMaker)
[DEBUG] 14:15:39.300 org.nutz.mvc.impl.Loadings.scanModules(Loadings.java:154) - module class location 'file:/F:/gitResp/ShiroForNutzDemo/target/ShiroForNutzDemo/WEB-INF/classes/'
[DEBUG] 14:15:39.301 org.nutz.mvc.impl.Loadings.scanModuleInPackage(Loadings.java:184) - > scan 'net.wendal.nutzbook'
[DEBUG] 14:15:39.306 org.nutz.resource.Scans.scan(Scans.java:274) - Found 10 resource by src( net/wendal/nutzbook/ ) , regex( ^.+[.]class$ )
[DEBUG] 14:15:39.307 org.nutz.mvc.impl.Loadings.checkModule(Loadings.java:198) - >> add 'net.wendal.nutzbook.module.UserModule'
[DEBUG] 14:15:39.307 org.nutz.mvc.impl.Loadings.checkModule(Loadings.java:198) - >> add 'net.wendal.nutzbook.module.UserProfileModule'
[INFO ] 14:15:39.346 org.nutz.mvc.impl.NutActionChainMaker.getProcessorByName(NutActionChainMaker.java:72) - Optional processor class not found, disabled : org.nutz.plugins.validation.ValidationProcessor
[DEBUG] 14:15:39.359 org.nutz.mvc.impl.UrlMappingImpl.print(UrlMappingImpl.java:146) - '/user/' >> (UserModule.java:33).index : void | @Ok(jsp:jsp.user.list) @Fail(http:500) | by 1 Filters | (I:UTF-8/O:UTF-8)
[DEBUG] 14:15:39.379 org.nutz.mvc.impl.UrlMappingImpl.print(UrlMappingImpl.java:146) - '/user/add' >> (UserModule.java:60).add : Object | @Ok(json:{locked:'password|salt',ignoreNull:true}) @Fail(http:500) | by 1 Filters | (I:UTF-8/O:UTF-8)
[DEBUG] 14:15:39.381 org.nutz.mvc.impl.UrlMappingImpl.print(UrlMappingImpl.java:146) - '/user/count' >> (UserModule.java:49).count : int | @Ok(json:{locked:'password|salt',ignoreNull:true}) @Fail(http:500) | by 1 Filters | (I:UTF-8/O:UTF-8)
[DEBUG] 14:15:39.384 org.nutz.mvc.impl.UrlMappingImpl.print(UrlMappingImpl.java:146) - '/user/update' >> (UserModule.java:74).update : Object | @Ok(json:{locked:'password|salt',ignoreNull:true}) @Fail(http:500) | by 1 Filters | (I:UTF-8/O:UTF-8)
[DEBUG] 14:15:39.392 org.nutz.mvc.impl.UrlMappingImpl.print(UrlMappingImpl.java:146) - '/user/delete' >> (UserModule.java:90).delete : Object | @Ok(json:{locked:'password|salt',ignoreNull:true}) @Fail(http:500) | by 1 Filters | (I:UTF-8/O:UTF-8)
[DEBUG] 14:15:39.397 org.nutz.mvc.impl.UrlMappingImpl.print(UrlMappingImpl.java:146) - '/user/query' >> (UserModule.java:101).query : Object | @Ok(json:{locked:'password|salt',ignoreNull:true}) @Fail(http:500) | by 1 Filters | (I:UTF-8/O:UTF-8)
[DEBUG] 14:15:39.398 org.nutz.mvc.impl.UrlMappingImpl.print(UrlMappingImpl.java:146) - '/user/test' >> (UserModule.java:145).test : Object | @Ok(json:{locked:'password|salt',ignoreNull:true}) @Fail(http:500) | by 1 Filters | (I:UTF-8/O:UTF-8)
[DEBUG] 14:15:39.402 org.nutz.mvc.impl.UrlMappingImpl.print(UrlMappingImpl.java:146) - '/user/logout' >> (UserModule.java:55).logout : void | @Ok(>>:/ ) @Fail(http:500) | by 1 Filters | (I:UTF-8/O:UTF-8)
[DEBUG] 14:15:39.403 org.nutz.mvc.impl.UrlMappingImpl.print(UrlMappingImpl.java:146) - '/user/login' >> (UserModule.java:38).login : Object | @Ok(json:{locked:'password|salt',ignoreNull:true}) @Fail(http:500) | by 0 Filters | (I:UTF-8/O:UTF-8)
[DEBUG] 14:15:39.406 org.nutz.mvc.impl.UrlMappingImpl.print(UrlMappingImpl.java:146) - '/user/profile/' >> (UserProfileModule.java:130).index : UserProfile | @Ok(jsp:jsp.user.profile) @Fail(null ) | by 1 Filters | (I:UTF-8/O:UTF-8)
[DEBUG] 14:15:39.407 org.nutz.mvc.impl.UrlMappingImpl.print(UrlMappingImpl.java:146) - '/user/profile/get' >> (UserProfileModule.java:40).get : UserProfile | @Ok(null ) @Fail(null ) | by 1 Filters | (I:UTF-8/O:UTF-8)
[DEBUG] 14:15:39.410 org.nutz.mvc.impl.UrlMappingImpl.print(UrlMappingImpl.java:146) - '/user/profile/update' >> (UserProfileModule.java:55).update : void | @Ok(void ) @Fail(null ) | by 1 Filters | (I:UTF-8/O:UTF-8)
[INFO ] 14:15:39.417 org.nutz.filepool.NutFilePool.<init>(NutFilePool.java:23) - Init file-pool by: F:/gitResp/ShiroForNutzDemo/target/ShiroForNutzDemo/WEB-INF/tmp/user_avatar [20000]
[DEBUG] 14:15:39.420 org.nutz.filepool.NutFilePool.<init>(NutFilePool.java:37) - file-pool.home: 'F:\gitResp\ShiroForNutzDemo\target\ShiroForNutzDemo\WEB-INF\tmp\user_avatar'
[INFO ] 14:15:39.423 org.nutz.filepool.NutFilePool.<init>(NutFilePool.java:66) - file-pool.cursor: 12
[DEBUG] 14:15:39.429 org.nutz.mvc.impl.UrlMappingImpl.print(UrlMappingImpl.java:146) - '/user/profile/avatar' >> (UserProfileModule.java:87).uploadAvatar : void | @Ok(>>:/user/profile) @Fail(null ) | by 1 Filters | (I:UTF-8/O:UTF-8)
[DEBUG] 14:15:39.433 org.nutz.mvc.impl.UrlMappingImpl.print(UrlMappingImpl.java:146) - '/user/profile/avatar' >> (UserProfileModule.java:118).readAvatar : Object | @Ok(raw:jpg) @Fail(null ) | by 1 Filters | (I:UTF-8/O:UTF-8)
[INFO ] 14:15:39.434 org.nutz.mvc.impl.NutLoading.evalUrlMapping(NutLoading.java:220) - Found 14 module methods
[DEBUG] 14:15:39.435 org.nutz.mvc.impl.NutLoading.evalLocalization(NutLoading.java:334) - @Localization not define
[INFO ] 14:15:39.435 org.nutz.mvc.impl.NutLoading.evalSetup(NutLoading.java:274) - Setup application...
[DEBUG] 14:15:39.436 org.nutz.ioc.impl.NutIoc.get(NutIoc.java:151) - Get 'dao'<interface org.nutz.dao.Dao>
[DEBUG] 14:15:39.436 org.nutz.ioc.impl.NutIoc.get(NutIoc.java:151) - Get '$aop_async'<interface org.nutz.ioc.aop.config.AopConfigration>
[DEBUG] 14:15:39.437 org.nutz.ioc.impl.NutIoc.get(NutIoc.java:177) - >> Load definition name=$aop_async
[DEBUG] 14:15:39.439 org.nutz.ioc.loader.combo.ComboIocLoader.load(ComboIocLoader.java:169) - Found IocObject($aop_async) in AsyncAopIocLoader@1425372773
[DEBUG] 14:15:39.440 org.nutz.ioc.impl.NutIoc.get(NutIoc.java:209) - >> Make...'$aop_async'<interface org.nutz.ioc.aop.config.AopConfigration>
[DEBUG] 14:15:39.441 org.nutz.ioc.impl.ScopeContext.save(ScopeContext.java:64) - Save object '$aop_async' to [app]
[DEBUG] 14:15:39.451 org.nutz.ioc.aop.SimpleAopMaker.<init>(SimpleAopMaker.java:79) - Load AopConfigure for anno=org.nutz.ioc.aop.Aop by type=org.nutz.ioc.aop.config.impl.AnnotationAopConfigration
[DEBUG] 14:15:39.451 org.nutz.ioc.impl.NutIoc.get(NutIoc.java:177) - >> Load definition name=dao
[DEBUG] 14:15:39.452 org.nutz.ioc.loader.map.MapLoader.load(MapLoader.java:67) - Loading define for name=dao
[DEBUG] 14:15:39.455 org.nutz.ioc.loader.combo.ComboIocLoader.load(ComboIocLoader.java:169) - Found IocObject(dao) in JsonLoader(paths=[ioc/])
[DEBUG] 14:15:39.455 org.nutz.ioc.impl.NutIoc.get(NutIoc.java:209) - >> Make...'dao'<interface org.nutz.dao.Dao>
[DEBUG] 14:15:39.465 org.nutz.ioc.aop.impl.DefaultMirrorFactory.getMirror(DefaultMirrorFactory.java:70) - Load class org.nutz.dao.impl.NutDao without AOP
[DEBUG] 14:15:39.466 org.nutz.ioc.impl.ScopeContext.save(ScopeContext.java:64) - Save object 'dao' to [app]
[DEBUG] 14:15:39.467 org.nutz.ioc.impl.NutIoc.get(NutIoc.java:151) - Get 'dataSource'<>
[DEBUG] 14:15:39.468 org.nutz.ioc.impl.NutIoc.get(NutIoc.java:177) - >> Load definition name=dataSource
[DEBUG] 14:15:39.468 org.nutz.ioc.loader.map.MapLoader.load(MapLoader.java:67) - Loading define for name=dataSource
[DEBUG] 14:15:39.474 org.nutz.ioc.loader.combo.ComboIocLoader.load(ComboIocLoader.java:169) - Found IocObject(dataSource) in JsonLoader(paths=[ioc/])
[DEBUG] 14:15:39.474 org.nutz.ioc.impl.NutIoc.get(NutIoc.java:209) - >> Make...'dataSource'<>
[DEBUG] 14:15:39.490 org.nutz.ioc.aop.impl.DefaultMirrorFactory.getMirror(DefaultMirrorFactory.java:70) - Load class com.alibaba.druid.pool.DruidDataSource without AOP
[DEBUG] 14:15:39.490 org.nutz.ioc.impl.ScopeContext.save(ScopeContext.java:64) - Save object 'dataSource' to [app]
[DEBUG] 14:15:39.491 org.nutz.ioc.impl.NutIoc.get(NutIoc.java:151) - Get 'conf'<>
[DEBUG] 14:15:39.491 org.nutz.ioc.impl.NutIoc.get(NutIoc.java:177) - >> Load definition name=conf
[DEBUG] 14:15:39.492 org.nutz.ioc.loader.map.MapLoader.load(MapLoader.java:67) - Loading define for name=conf
[DEBUG] 14:15:39.492 org.nutz.ioc.loader.combo.ComboIocLoader.load(ComboIocLoader.java:169) - Found IocObject(conf) in JsonLoader(paths=[ioc/])
[DEBUG] 14:15:39.492 org.nutz.ioc.impl.NutIoc.get(NutIoc.java:209) - >> Make...'conf'<>
[DEBUG] 14:15:39.493 org.nutz.ioc.aop.impl.DefaultMirrorFactory.getMirror(DefaultMirrorFactory.java:70) - Load class org.nutz.ioc.impl.PropertiesProxy without AOP
[DEBUG] 14:15:39.493 org.nutz.ioc.impl.ScopeContext.save(ScopeContext.java:64) - Save object 'conf' to [app]
[DEBUG] 14:15:39.497 org.nutz.resource.Scans.scan(Scans.java:274) - Found 2 resource by src( custom/ ) , regex( ^.+[.]properties$ )
[INFO ] 14:15:39.556 com.alibaba.druid.pool.DruidDataSource.init(DruidDataSource.java:715) - {dataSource-1} inited
[DEBUG] 14:15:39.557 org.nutz.ioc.impl.NutIoc.get(NutIoc.java:151) - Get 'dataSource'<>
[INFO ] 14:15:39.582 org.nutz.filepool.NutFilePool.<init>(NutFilePool.java:23) - Init file-pool by: C:\Users\17194/.nutz/tmp/dao/ [200000]
[DEBUG] 14:15:39.582 org.nutz.filepool.NutFilePool.<init>(NutFilePool.java:37) - file-pool.home: 'C:\Users\17194\.nutz\tmp\dao'
[INFO ] 14:15:39.583 org.nutz.filepool.NutFilePool.<init>(NutFilePool.java:66) - file-pool.cursor: 0
[DEBUG] 14:15:39.591 org.nutz.dao.jdbc.Jdbcs.<clinit>(Jdbcs.java:90) - Jdbcs init complete
[INFO ] 14:15:39.591 org.nutz.dao.jdbc.Jdbcs.getExpert(Jdbcs.java:103) - Get Connection from DataSource for JdbcExpert, if you lock at here, check your database server and configure
[DEBUG] 14:15:39.831 org.nutz.dao.impl.DaoSupport.setDataSource(DaoSupport.java:188) - select expert : org.nutz.dao.impl.jdbc.mysql.MysqlJdbcExpert
[DEBUG] 14:15:39.838 org.nutz.dao.impl.DaoSupport$1.invoke(DaoSupport.java:199) - JDBC Driver --> mysql-connector-java-5.1.40 ( Revision: 402933ef52cad9aa82624e80acbea46e3a701ce6 )
[DEBUG] 14:15:39.838 org.nutz.dao.impl.DaoSupport$1.invoke(DaoSupport.java:200) - JDBC Name --> MySQL Connector Java
[DEBUG] 14:15:39.838 org.nutz.dao.impl.DaoSupport$1.invoke(DaoSupport.java:202) - JDBC URL --> jdbc:mysql://127.0.0.1:3306/nutzbook
[DEBUG] 14:15:39.925 org.nutz.dao.impl.jdbc.mysql.MysqlJdbcExpert.checkDataSource(MysqlJdbcExpert.java:212) - Mysql : character_set_client=utf8
[DEBUG] 14:15:39.926 org.nutz.dao.impl.jdbc.mysql.MysqlJdbcExpert.checkDataSource(MysqlJdbcExpert.java:212) - Mysql : character_set_connection=utf8
[DEBUG] 14:15:39.926 org.nutz.dao.impl.jdbc.mysql.MysqlJdbcExpert.checkDataSource(MysqlJdbcExpert.java:212) - Mysql : character_set_database=utf8
[DEBUG] 14:15:39.926 org.nutz.dao.impl.jdbc.mysql.MysqlJdbcExpert.checkDataSource(MysqlJdbcExpert.java:212) - Mysql : character_set_filesystem=binary
[DEBUG] 14:15:39.926 org.nutz.dao.impl.jdbc.mysql.MysqlJdbcExpert.checkDataSource(MysqlJdbcExpert.java:212) - Mysql : character_set_results=
[DEBUG] 14:15:39.927 org.nutz.dao.impl.jdbc.mysql.MysqlJdbcExpert.checkDataSource(MysqlJdbcExpert.java:212) - Mysql : character_set_server=utf8
[DEBUG] 14:15:39.927 org.nutz.dao.impl.jdbc.mysql.MysqlJdbcExpert.checkDataSource(MysqlJdbcExpert.java:212) - Mysql : character_set_system=utf8
[DEBUG] 14:15:39.927 org.nutz.dao.impl.jdbc.mysql.MysqlJdbcExpert.checkDataSource(MysqlJdbcExpert.java:212) - Mysql : character_sets_dir=C:\Program Files (x86)\MySQL\MySQL Server 5.1\share\charsets\
[DEBUG] 14:15:39.928 org.nutz.dao.impl.jdbc.mysql.MysqlJdbcExpert.checkDataSource(MysqlJdbcExpert.java:219) - Mysql : binlog_format=STATEMENT
[DEBUG] 14:15:39.929 org.nutz.dao.impl.jdbc.mysql.MysqlJdbcExpert.checkDataSource(MysqlJdbcExpert.java:226) - Mysql : database=nutzbook
[DEBUG] 14:15:39.929 org.nutz.dao.impl.jdbc.mysql.MysqlJdbcExpert.checkDataSource(MysqlJdbcExpert.java:232) - Mysql : user=root@localhost
[DEBUG] 14:15:39.962 org.nutz.dao.impl.DaoSupport.setDataSource(DaoSupport.java:221) - Database info --> MYSQL:[MySQL - 5.1.49-community]
[DEBUG] 14:15:39.967 org.nutz.resource.Scans.scan(Scans.java:274) - Found 3 resource by src( net/wendal/nutzbook/bean/ ) , regex( ^.+[.]class$ )
[DEBUG] 14:15:40.028 org.nutz.dao.impl.sql.run.NutDaoExecutor.printSQL(NutDaoExecutor.java:388) - SELECT COUNT(*) FROM t_user
[DEBUG] 14:15:40.030 org.nutz.ioc.impl.NutIoc.get(NutIoc.java:151) - Get 'nutQuartzCronJobFactory'<class org.nutz.integration.quartz.NutQuartzCronJobFactory>
[DEBUG] 14:15:40.031 org.nutz.ioc.impl.NutIoc.get(NutIoc.java:177) - >> Load definition name=nutQuartzCronJobFactory
[DEBUG] 14:15:40.031 org.nutz.ioc.loader.map.MapLoader.load(MapLoader.java:67) - Loading define for name=nutQuartzCronJobFactory
[DEBUG] 14:15:40.031 org.nutz.ioc.loader.combo.ComboIocLoader.load(ComboIocLoader.java:169) - Found IocObject(nutQuartzCronJobFactory) in QuartzIocLoader@1946431070
[DEBUG] 14:15:40.031 org.nutz.ioc.impl.NutIoc.get(NutIoc.java:209) - >> Make...'nutQuartzCronJobFactory'<class org.nutz.integration.quartz.NutQuartzCronJobFactory>
[DEBUG] 14:15:40.033 org.nutz.ioc.aop.impl.DefaultMirrorFactory.getMirror(DefaultMirrorFactory.java:70) - Load class org.nutz.integration.quartz.NutQuartzCronJobFactory without AOP
[DEBUG] 14:15:40.033 org.nutz.ioc.impl.ScopeContext.save(ScopeContext.java:64) - Save object 'nutQuartzCronJobFactory' to [app]
[DEBUG] 14:15:40.035 org.nutz.ioc.impl.NutIoc.get(NutIoc.java:151) - Get 'scheduler'<>
[DEBUG] 14:15:40.035 org.nutz.ioc.impl.NutIoc.get(NutIoc.java:177) - >> Load definition name=scheduler
[DEBUG] 14:15:40.035 org.nutz.ioc.loader.map.MapLoader.load(MapLoader.java:67) - Loading define for name=scheduler
[DEBUG] 14:15:40.036 org.nutz.ioc.loader.combo.ComboIocLoader.load(ComboIocLoader.java:169) - Found IocObject(scheduler) in QuartzIocLoader@1946431070
[DEBUG] 14:15:40.036 org.nutz.ioc.impl.NutIoc.get(NutIoc.java:209) - >> Make...'scheduler'<>
[DEBUG] 14:15:40.036 org.nutz.ioc.impl.ScopeContext.save(ScopeContext.java:64) - Save object 'scheduler' to [app]
[DEBUG] 14:15:40.093 org.nutz.ioc.impl.NutIoc.get(NutIoc.java:151) - Get 'jobFactory'<>
[DEBUG] 14:15:40.093 org.nutz.ioc.impl.NutIoc.get(NutIoc.java:177) - >> Load definition name=jobFactory
[DEBUG] 14:15:40.094 org.nutz.ioc.loader.map.MapLoader.load(MapLoader.java:67) - Loading define for name=jobFactory
[DEBUG] 14:15:40.094 org.nutz.ioc.loader.combo.ComboIocLoader.load(ComboIocLoader.java:169) - Found IocObject(jobFactory) in QuartzIocLoader@1946431070
[DEBUG] 14:15:40.095 org.nutz.ioc.impl.NutIoc.get(NutIoc.java:209) - >> Make...'jobFactory'<>
[DEBUG] 14:15:40.096 org.nutz.ioc.aop.impl.DefaultMirrorFactory.getMirror(DefaultMirrorFactory.java:70) - Load class org.nutz.integration.quartz.NutQuartzJobFactory without AOP
[DEBUG] 14:15:40.096 org.nutz.ioc.impl.ScopeContext.save(ScopeContext.java:64) - Save object 'jobFactory' to [app]
[DEBUG] 14:15:40.097 org.nutz.ioc.impl.NutIoc.get(NutIoc.java:151) - Get 'conf'<>
[DEBUG] 14:15:40.097 org.nutz.ioc.impl.NutIoc.get(NutIoc.java:151) - Get 'htmlEmail'<class org.apache.commons.mail.HtmlEmail>
[DEBUG] 14:15:40.097 org.nutz.ioc.impl.NutIoc.get(NutIoc.java:177) - >> Load definition name=htmlEmail
[DEBUG] 14:15:40.098 org.nutz.ioc.loader.map.MapLoader.load(MapLoader.java:67) - Loading define for name=htmlEmail
[DEBUG] 14:15:40.099 org.nutz.ioc.loader.combo.ComboIocLoader.load(ComboIocLoader.java:169) - Found IocObject(htmlEmail) in JsonLoader(paths=[ioc/])
[DEBUG] 14:15:40.100 org.nutz.ioc.impl.NutIoc.get(NutIoc.java:209) - >> Make...'htmlEmail'<class org.apache.commons.mail.HtmlEmail>
[DEBUG] 14:15:40.111 org.nutz.ioc.aop.impl.DefaultMirrorFactory.getMirror(DefaultMirrorFactory.java:70) - Load class org.apache.commons.mail.ImageHtmlEmail without AOP
[DEBUG] 14:15:40.123 org.nutz.ioc.impl.NutIoc.get(NutIoc.java:151) - Get 'conf'<>
[DEBUG] 14:15:40.124 org.nutz.ioc.impl.NutIoc.get(NutIoc.java:151) - Get 'conf'<>
[DEBUG] 14:15:40.124 org.nutz.ioc.impl.NutIoc.get(NutIoc.java:151) - Get 'emailAuthenticator'<>
[DEBUG] 14:15:40.124 org.nutz.ioc.impl.NutIoc.get(NutIoc.java:177) - >> Load definition name=emailAuthenticator
[DEBUG] 14:15:40.124 org.nutz.ioc.loader.map.MapLoader.load(MapLoader.java:67) - Loading define for name=emailAuthenticator
[DEBUG] 14:15:40.125 org.nutz.ioc.loader.combo.ComboIocLoader.load(ComboIocLoader.java:169) - Found IocObject(emailAuthenticator) in JsonLoader(paths=[ioc/])
[DEBUG] 14:15:40.125 org.nutz.ioc.impl.NutIoc.get(NutIoc.java:209) - >> Make...'emailAuthenticator'<>
[DEBUG] 14:15:40.126 org.nutz.ioc.aop.impl.DefaultMirrorFactory.getMirror(DefaultMirrorFactory.java:70) - Load class org.apache.commons.mail.DefaultAuthenticator without AOP
[DEBUG] 14:15:40.126 org.nutz.ioc.impl.ScopeContext.save(ScopeContext.java:64) - Save object 'emailAuthenticator' to [app]
[DEBUG] 14:15:40.127 org.nutz.ioc.impl.NutIoc.get(NutIoc.java:151) - Get 'conf'<>
[DEBUG] 14:15:40.127 org.nutz.ioc.impl.NutIoc.get(NutIoc.java:151) - Get 'conf'<>
[DEBUG] 14:15:40.127 org.nutz.ioc.impl.NutIoc.get(NutIoc.java:151) - Get 'conf'<>
[DEBUG] 14:15:40.128 org.nutz.ioc.impl.NutIoc.get(NutIoc.java:151) - Get 'conf'<>
[DEBUG] 14:15:40.128 org.nutz.ioc.impl.NutIoc.get(NutIoc.java:151) - Get 'conf'<>
[DEBUG] 14:15:40.128 org.nutz.ioc.impl.NutIoc.get(NutIoc.java:151) - Get 'conf'<>
[DEBUG] 14:15:40.132 org.nutz.ioc.impl.NutIoc.get(NutIoc.java:151) - Get 'conf'<>
15-Jun-2017 14:15:40.159 严重 [RMI TCP Connection(3)-127.0.0.1] org.apache.catalina.core.StandardContext.startInternal One or more Filters failed to start. Full details will be found in the appropriate container log file
15-Jun-2017 14:15:40.159 严重 [RMI TCP Connection(3)-127.0.0.1] org.apache.catalina.core.StandardContext.startInternal Context [/nutzbook] startup failed due to previous errors
15-Jun-2017 14:15:40.162 警告 [RMI TCP Connection(3)-127.0.0.1] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesJdbc The web application [nutzbook] registered the JDBC driver [com.alibaba.druid.proxy.DruidDriver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.
15-Jun-2017 14:15:40.163 警告 [RMI TCP Connection(3)-127.0.0.1] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesJdbc The web application [nutzbook] registered the JDBC driver [com.mysql.jdbc.Driver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.
15-Jun-2017 14:15:40.164 警告 [RMI TCP Connection(3)-127.0.0.1] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesThreads The web application [nutzbook] appears to have started a thread named [NutzbookScheduler_QuartzSchedulerThread] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:
java.lang.Object.wait(Native Method)
org.quartz.core.QuartzSchedulerThread.run(QuartzSchedulerThread.java:410)
[2017-06-15 02:15:40,175] Artifact ShiroForNutzDemo:war exploded: Error during artifact deployment. See server log for details.
15-Jun-2017 14:15:47.053 信息 [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory E:\Dev\apache-tomcat-8.0.44\webapps\manager
15-Jun-2017 14:15:47.120 信息 [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory E:\Dev\apache-tomcat-8.0.44\webapps\manager has finished in 65 ms
最后几句日志是发邮件的报错信息,然后是不是我的mail.properties配置错了啊???