NutzCN Logo
问答 where子句中匹配中文返回空值
发布于 2852天前 作者 qq_d1e6ee51 1768 次浏览 复制 上一个帖子 下一个帖子
标签:
List<SightsRecommend> asians=dao.query(SightsRecommend.class, Cnd.where("district", "=", "亚洲"), dao.createPager(1, 4));

这样匹配不到对应的值,如果是英文就会有效
注:eclipse和数据都是utf-8

11 回复

其他中文记录能匹配到吗?

List<SightsRecommend> asians=dao.query(SightsRecommend.class, Cnd.where("district", "=", "亚洲"), dao.createPager(1, 4));

		List<SightsRecommend> europes=dao.query(SightsRecommend.class, Cnd.where("district", "=", "欧美"), dao.createPager(1, 4));

		List<SightsRecommend> ocieans=dao.query(SightsRecommend.class, Cnd.where("district", "=", "大洋洲"), dao.createPager(1, 4));

这些都匹配不到

数据库字段类型是什么???

还有一个检查, 就是按主键的值取出来记录, 然后对比一下district属性的值是否相等.

SightsRecommend sr = dao.fetch(SightsRecommend.class, ????);
sr.getDistrict().equal("亚洲");

SightsRecommend s=dao.fetch(SightsRecommend.class,Cnd.where("id","=","20001"));
		System.out.println("取出的值为:"+s.getDistrict());
		System.out.println("与‘亚洲’的对比值为:"+s.getDistrict().equals("亚洲"));

结果为:

取出的值为:亚洲
与‘亚洲’的对比值为:true

字段类型为:varchar
mysql数据库

启动日志贴一下, 我想看看容器编码和mysql的编码信息

2017-03-03 22:32:49,869 org.apache.shiro.web.env.EnvironmentLoader.initEnvironment(EnvironmentLoader.java:128) INFO  - Starting Shiro environment initialization.
2017-03-03 22:32:49,889 org.apache.shiro.web.env.IniWebEnvironment.init(IniWebEnvironment.java:76) DEBUG - Checking any specified config locations.
2017-03-03 22:32:49,890 org.apache.shiro.web.env.IniWebEnvironment.init(IniWebEnvironment.java:81) DEBUG - No INI instance or config locations specified.  Trying default config locations.
2017-03-03 22:32:49,897 org.apache.shiro.io.ResourceUtils.loadFromClassPath(ResourceUtils.java:159) DEBUG - Opening resource from class path [shiro.ini]
2017-03-03 22:32:49,904 org.apache.shiro.config.Ini.load(Ini.java:351) DEBUG - Parsing [main]
2017-03-03 22:32:49,904 org.apache.shiro.config.Ini.load(Ini.java:351) DEBUG - Parsing [urls]
2017-03-03 22:32:49,906 org.apache.shiro.web.env.IniWebEnvironment.getDefaultIni(IniWebEnvironment.java:136) DEBUG - Discovered non-empty INI configuration at location 'classpath:shiro.ini'.  Using for configuration.
2017-03-03 22:32:49,918 org.apache.shiro.config.IniFactorySupport.createInstance(IniFactorySupport.java:122) DEBUG - Creating instance from Ini [sections=urls]
2017-03-03 22:32:50,251 org.apache.shiro.config.IniFactorySupport.createInstance(IniFactorySupport.java:122) DEBUG - Creating instance from Ini [sections=urls]
2017-03-03 22:32:50,257 org.apache.shiro.web.filter.mgt.DefaultFilterChainManager.createChain(DefaultFilterChainManager.java:127) DEBUG - Creating chain [/*] from String definition [anon]
2017-03-03 22:32:50,257 org.apache.shiro.web.filter.mgt.DefaultFilterChainManager.applyChainConfig(DefaultFilterChainManager.java:278) DEBUG - Attempting to apply path [/*] to filter [anon] with config [null]
2017-03-03 22:32:50,259 org.apache.shiro.web.env.EnvironmentLoader.initEnvironment(EnvironmentLoader.java:136) DEBUG - Published WebEnvironment as ServletContext attribute with name [org.apache.shiro.web.env.EnvironmentLoader.ENVIRONMENT_ATTRIBUTE_KEY]
2017-03-03 22:32:50,259 org.apache.shiro.web.env.EnvironmentLoader.initEnvironment(EnvironmentLoader.java:141) INFO  - Shiro environment initialized in 387 ms.
2017-03-03 22:32:50,300 org.nutz.mvc.NutFilter._init(NutFilter.java:81) INFO  - NutFilter[nutz] starting ...
2017-03-03 22:32:50,422 org.nutz.resource.impl.ErrorResourceLocation.<init>(ErrorResourceLocation.java:28) INFO  - [loc=E:\ToolBox\Developer\Tomcat%206.0\wtpwebapps\Travel\WEB-INF\classes]not exist
2017-03-03 22:32:50,569 org.nutz.resource.Scans.<init>(Scans.java:497) DEBUG - Locations for Scans:
[Dir[path=E:\ToolBox\Developer\eclipse], Jar[path=E:\ToolBox\Developer\Tomcat 6.0\wtpwebapps\Travel\WEB-INF\lib\nutz-1.r.58.jar], ErrorResourceLocation [loc=E:\ToolBox\Developer\Tomcat%206.0\wtpwebapps\Travel\WEB-INF\classes], Jar[path=E:\ToolBox\Developer\Tomcat 6.0\bin\bootstrap.jar], Jar[path=E:\ToolBox\Developer\java6\lib\tools.jar]]
2017-03-03 22:32:50,768 org.nutz.resource.Scans.init(Scans.java:104) DEBUG - Locations for Scans:
{E:\ToolBox\Developer\eclipse=Dir[path=E:\ToolBox\Developer\eclipse], E:\ToolBox\Developer\Tomcat 6.0\wtpwebapps\Travel\WEB-INF\lib\nutz-1.r.58.jar=Jar[path=E:\ToolBox\Developer\Tomcat 6.0\wtpwebapps\Travel\WEB-INF\lib\nutz-1.r.58.jar], E:\ToolBox\Developer\Tomcat%206.0\wtpwebapps\Travel\WEB-INF\classes=ErrorResourceLocation [loc=E:\ToolBox\Developer\Tomcat%206.0\wtpwebapps\Travel\WEB-INF\classes], E:\ToolBox\Developer\Tomcat 6.0\bin\bootstrap.jar=Jar[path=E:\ToolBox\Developer\Tomcat 6.0\bin\bootstrap.jar], E:\ToolBox\Developer\java6\lib\tools.jar=Jar[path=E:\ToolBox\Developer\java6\lib\tools.jar], E:\ToolBox\Developer\Tomcat 6.0\wtpwebapps\Travel\WEB-INF\classes=Dir[path=E:\ToolBox\Developer\Tomcat 6.0\wtpwebapps\Travel\WEB-INF\classes], E:\ToolBox\Developer\Tomcat 6.0\wtpwebapps\Travel\WEB-INF\lib\commons-fileupload-1.3.2.jar=Jar[path=E:\ToolBox\Developer\Tomcat 6.0\wtpwebapps\Travel\WEB-INF\lib\commons-fileupload-1.3.2.jar], E:\ToolBox\Developer\Tomcat 6.0\wtpwebapps\Travel\WEB-INF\lib\commons-email-1.3.3.jar=Jar[path=E:\ToolBox\Developer\Tomcat 6.0\wtpwebapps\Travel\WEB-INF\lib\commons-email-1.3.3.jar], E:\ToolBox\Developer\Tomcat 6.0\wtpwebapps\Travel\WEB-INF\lib\mysql-connector-java-5.1.37.jar=Jar[path=E:\ToolBox\Developer\Tomcat 6.0\wtpwebapps\Travel\WEB-INF\lib\mysql-connector-java-5.1.37.jar], E:\ToolBox\Developer\Tomcat 6.0\wtpwebapps\Travel\WEB-INF\lib\quartz-2.2.3.jar=Jar[path=E:\ToolBox\Developer\Tomcat 6.0\wtpwebapps\Travel\WEB-INF\lib\quartz-2.2.3.jar], E:\ToolBox\Developer\Tomcat 6.0\wtpwebapps\Travel\WEB-INF\lib\taglibs-standard-jstlel-1.2.5.jar=Jar[path=E:\ToolBox\Developer\Tomcat 6.0\wtpwebapps\Travel\WEB-INF\lib\taglibs-standard-jstlel-1.2.5.jar], E:\ToolBox\Developer\Tomcat 6.0\wtpwebapps\Travel\WEB-INF\lib\taglibs-standard-spec-1.2.5.jar=Jar[path=E:\ToolBox\Developer\Tomcat 6.0\wtpwebapps\Travel\WEB-INF\lib\taglibs-standard-spec-1.2.5.jar], E:\ToolBox\Developer\Tomcat 6.0\wtpwebapps\Travel\WEB-INF\lib\slf4j-api-1.7.23.jar=Jar[path=E:\ToolBox\Developer\Tomcat 6.0\wtpwebapps\Travel\WEB-INF\lib\slf4j-api-1.7.23.jar], E:\ToolBox\Developer\Tomcat 6.0\wtpwebapps\Travel\WEB-INF\lib\shiro-all-1.3.2.jar=Jar[path=E:\ToolBox\Developer\Tomcat 6.0\wtpwebapps\Travel\WEB-INF\lib\shiro-all-1.3.2.jar], E:\ToolBox\Developer\Tomcat 6.0\wtpwebapps\Travel\WEB-INF\lib\commons-io-2.5.jar=Jar[path=E:\ToolBox\Developer\Tomcat 6.0\wtpwebapps\Travel\WEB-INF\lib\commons-io-2.5.jar], E:\ToolBox\Developer\Tomcat 6.0\wtpwebapps\Travel\WEB-INF\lib\taglibs-standard-impl-1.2.5.jar=Jar[path=E:\ToolBox\Developer\Tomcat 6.0\wtpwebapps\Travel\WEB-INF\lib\taglibs-standard-impl-1.2.5.jar], E:\ToolBox\Developer\Tomcat 6.0\wtpwebapps\Travel\WEB-INF\lib\slf4j-log4j12-1.7.23.jar=Jar[path=E:\ToolBox\Developer\Tomcat 6.0\wtpwebapps\Travel\WEB-INF\lib\slf4j-log4j12-1.7.23.jar], E:\ToolBox\Developer\Tomcat 6.0\wtpwebapps\Travel\WEB-INF\lib\nutz-integration-quartz-1.r.59.jar=Jar[path=E:\ToolBox\Developer\Tomcat 6.0\wtpwebapps\Travel\WEB-INF\lib\nutz-integration-quartz-1.r.59.jar], E:\ToolBox\Developer\Tomcat 6.0\wtpwebapps\Travel\WEB-INF\lib\simplecaptcha-1.2.2.jar=Jar[path=E:\ToolBox\Developer\Tomcat 6.0\wtpwebapps\Travel\WEB-INF\lib\simplecaptcha-1.2.2.jar], E:\ToolBox\Developer\Tomcat 6.0\wtpwebapps\Travel\WEB-INF\lib\taglibs-standard-compat-1.2.5.jar=Jar[path=E:\ToolBox\Developer\Tomcat 6.0\wtpwebapps\Travel\WEB-INF\lib\taglibs-standard-compat-1.2.5.jar], E:\ToolBox\Developer\Tomcat 6.0\wtpwebapps\Travel\WEB-INF\lib\log4j-1.2.17.jar=Jar[path=E:\ToolBox\Developer\Tomcat 6.0\wtpwebapps\Travel\WEB-INF\lib\log4j-1.2.17.jar], E:\ToolBox\Developer\Tomcat 6.0\wtpwebapps\Travel\WEB-INF\lib\quartz-jobs-2.2.3.jar=Jar[path=E:\ToolBox\Developer\Tomcat 6.0\wtpwebapps\Travel\WEB-INF\lib\quartz-jobs-2.2.3.jar], E:\ToolBox\Developer\Tomcat 6.0\wtpwebapps\Travel\WEB-INF\lib\commons-logging-1.2.jar=Jar[path=E:\ToolBox\Developer\Tomcat 6.0\wtpwebapps\Travel\WEB-INF\lib\commons-logging-1.2.jar], E:\ToolBox\Developer\Tomcat 6.0\wtpwebapps\Travel\WEB-INF\lib\javax.mail-1.5.2.jar=Jar[path=E:\ToolBox\Developer\Tomcat 6.0\wtpwebapps\Travel\WEB-INF\lib\javax.mail-1.5.2.jar], E:\ToolBox\Developer\Tomcat 6.0\wtpwebapps\Travel\WEB-INF\lib\commons-beanutils-1.9.3.jar=Jar[path=E:\ToolBox\Developer\Tomcat 6.0\wtpwebapps\Travel\WEB-INF\lib\commons-beanutils-1.9.3.jar], E:\ToolBox\Developer\Tomcat 6.0\wtpwebapps\Travel\WEB-INF\lib\druid-1.0.16.jar=Jar[path=E:\ToolBox\Developer\Tomcat 6.0\wtpwebapps\Travel\WEB-INF\lib\druid-1.0.16.jar]}
2017-03-03 22:32:50,862 org.nutz.castor.Castors.reload(Castors.java:115) DEBUG - Using 94 castor for Castors
2017-03-03 22:32:50,893 org.nutz.mvc.config.AbstractNutConfig.createLoading(AbstractNutConfig.java:59) DEBUG - Loading by class org.nutz.mvc.impl.NutLoading
2017-03-03 22:32:50,896 org.nutz.mvc.impl.NutLoading.load(NutLoading.java:55) INFO  - Nutz Version : 1.r.58 
2017-03-03 22:32:50,896 org.nutz.mvc.impl.NutLoading.load(NutLoading.java:56) INFO  - Nutz.Mvc[nutz] is initializing ...
2017-03-03 22:32:50,897 org.nutz.mvc.impl.NutLoading.load(NutLoading.java:60) DEBUG - Web Container Information:
2017-03-03 22:32:50,898 org.nutz.mvc.impl.NutLoading.load(NutLoading.java:61) DEBUG -  - Default Charset : UTF-8
2017-03-03 22:32:50,899 org.nutz.mvc.impl.NutLoading.load(NutLoading.java:62) DEBUG -  - Current . path  : E:\ToolBox\Developer\eclipse\.
2017-03-03 22:32:50,899 org.nutz.mvc.impl.NutLoading.load(NutLoading.java:63) DEBUG -  - Java Version    : 1.6.0_45
2017-03-03 22:32:50,899 org.nutz.mvc.impl.NutLoading.load(NutLoading.java:64) DEBUG -  - File separator  : \
2017-03-03 22:32:50,899 org.nutz.mvc.impl.NutLoading.load(NutLoading.java:65) DEBUG -  - Timezone        : Asia/Shanghai
2017-03-03 22:32:50,899 org.nutz.mvc.impl.NutLoading.load(NutLoading.java:66) DEBUG -  - OS              : Windows 7 amd64
2017-03-03 22:32:50,899 org.nutz.mvc.impl.NutLoading.load(NutLoading.java:67) DEBUG -  - ServerInfo      : Apache Tomcat/6.0.45
2017-03-03 22:32:50,900 org.nutz.mvc.impl.NutLoading.load(NutLoading.java:68) DEBUG -  - Servlet API     : 2.5
2017-03-03 22:32:50,900 org.nutz.mvc.impl.NutLoading.load(NutLoading.java:73) DEBUG -  - ContextPath     : /Travel
2017-03-03 22:32:50,900 org.nutz.mvc.impl.NutLoading.load(NutLoading.java:74) DEBUG -  - context.tempdir : E:\ToolBox\Developer\Tomcat 6.0\work\Catalina\localhost\Travel
2017-03-03 22:32:50,900 org.nutz.mvc.impl.NutLoading.load(NutLoading.java:75) DEBUG -  - MainModule      : net.leon.travel.MainModule
2017-03-03 22:32:50,901 org.nutz.mvc.impl.NutLoading.createContext(NutLoading.java:238) DEBUG - >> app.root = E:/ToolBox/Developer/Tomcat 6.0/wtpwebapps/Travel
2017-03-03 22:32:50,905 org.nutz.mvc.impl.NutLoading.createIoc(NutLoading.java:379) DEBUG - @IocBy(type=org.nutz.mvc.ioc.provider.ComboIocProvider, args=["*js", "ioc/", "*anno", "net.leon.travel", "*tx", "*org.nutz.integration.quartz.QuartzIocLoader"],init=[])
2017-03-03 22:32:50,941 org.nutz.resource.Scans.scan(Scans.java:262) DEBUG - Found 1 resource by src( ioc/ ) , regex( ^(.+[.])(js|json)$ )
2017-03-03 22:32:50,942 org.nutz.ioc.loader.json.JsonLoader.<init>(JsonLoader.java:48) DEBUG - loading ioc js config from [dao.js]
2017-03-03 22:32:50,947 org.nutz.ioc.loader.json.JsonLoader.<init>(JsonLoader.java:56) DEBUG - Loaded 3 bean define from path=[ioc/] --> [dataSource, dao, conf]
2017-03-03 22:32:50,967 org.nutz.resource.Scans.scan(Scans.java:262) DEBUG - Found 23 resource by src( net/leon/travel/ ) , regex( ^.+[.]class$ )
2017-03-03 22:32:51,018 org.nutz.ioc.loader.annotation.AnnotationIocLoader.addClass(AnnotationIocLoader.java:74) DEBUG - Found @IocBean : class net.leon.travel.module.ArticleBO
2017-03-03 22:32:51,029 org.nutz.ioc.loader.annotation.AnnotationIocLoader.addClass(AnnotationIocLoader.java:74) DEBUG - Found @IocBean : class net.leon.travel.module.GalleryBO
2017-03-03 22:32:51,033 org.nutz.ioc.loader.annotation.AnnotationIocLoader.addClass(AnnotationIocLoader.java:74) DEBUG - Found @IocBean : class net.leon.travel.module.HomeBO
2017-03-03 22:32:51,036 org.nutz.ioc.loader.annotation.AnnotationIocLoader.addClass(AnnotationIocLoader.java:74) DEBUG - Found @IocBean : class net.leon.travel.module.PhotoSelfBO
2017-03-03 22:32:51,037 org.nutz.ioc.loader.annotation.AnnotationIocLoader.addClass(AnnotationIocLoader.java:74) DEBUG - Found @IocBean : class net.leon.travel.module.SightsBO
2017-03-03 22:32:51,041 org.nutz.ioc.loader.annotation.AnnotationIocLoader.addClass(AnnotationIocLoader.java:74) DEBUG - Found @IocBean : class net.leon.travel.module.UserBO
2017-03-03 22:32:51,045 org.nutz.ioc.loader.annotation.AnnotationIocLoader.addClass(AnnotationIocLoader.java:74) DEBUG - Found @IocBean : class net.leon.travel.module.WelcomeBO
2017-03-03 22:32:51,047 org.nutz.ioc.loader.annotation.AnnotationIocLoader.<init>(AnnotationIocLoader.java:50) INFO  - Found 7 classes in 1 base-packages!
beans = ["sightsBO", "articleBO", "photoSelfBO", "galleryBO", "welcomeBO", "userBO", "homeBO"]
2017-03-03 22:32:51,050 org.nutz.ioc.loader.json.JsonLoader.<init>(JsonLoader.java:40) DEBUG - Loaded 5 bean define from reader --
[txREPEATABLE_READ, txREAD_COMMITTED, txNONE, txSERIALIZABLE, txREAD_UNCOMMITTED]
2017-03-03 22:32:51,057 org.nutz.ioc.impl.NutIoc.<init>(NutIoc.java:98) INFO  - NutIoc init begin ...
2017-03-03 22:32:51,060 org.nutz.ioc.impl.NutIoc.<init>(NutIoc.java:115) INFO  - ... NutIoc init complete
2017-03-03 22:32:51,064 org.nutz.mvc.impl.NutLoading.evalUrlMapping(NutLoading.java:159) INFO  - Build URL mapping by org.nutz.mvc.impl.UrlMappingImpl ...
2017-03-03 22:32:51,067 org.nutz.mvc.impl.NutLoading.createViewMakers(NutLoading.java:369) DEBUG - @Views(DefaultViewMaker.class)
2017-03-03 22:32:51,077 org.nutz.resource.Scans.scan(Scans.java:262) DEBUG - Found 1 resource by src( mvc/nutzbook-mvc-chain.js ) , regex( ^(.+[.])(js|json)$ )
2017-03-03 22:32:51,084 org.nutz.mvc.impl.chainconfig.JsonActionChainMakerConfiguretion.<init>(JsonActionChainMakerConfiguretion.java:37) DEBUG - ActionChain Config:
{
   "default": {
      "ps": ["net.leon.travel.mvc.LogTimeProcessor", "org.nutz.mvc.impl.processor.UpdateRequestAttributesProcessor", "org.nutz.mvc.impl.processor.EncodingProcessor", "org.nutz.mvc.impl.processor.ModuleProcessor", "org.nutz.mvc.impl.processor.ActionFiltersProcessor", "org.nutz.mvc.impl.processor.AdaptorProcessor", "org.nutz.mvc.impl.processor.MethodInvokeProcessor", "org.nutz.mvc.impl.processor.ViewProcessor"],
      "error": "org.nutz.mvc.impl.processor.FailProcessor"
   }
}
2017-03-03 22:32:51,084 org.nutz.mvc.impl.NutLoading.createChainMaker(NutLoading.java:266) DEBUG - @ChainBy(org.nutz.mvc.impl.NutActionChainMaker)
2017-03-03 22:32:51,090 org.nutz.mvc.impl.Loadings.scanModules(Loadings.java:154) DEBUG - module class location 'file:/E:/ToolBox/Developer/Tomcat 6.0/wtpwebapps/Travel/WEB-INF/classes/net/leon/travel/MainModule.class'
2017-03-03 22:32:51,091 org.nutz.mvc.impl.Loadings.scanModuleInPackage(Loadings.java:184) DEBUG -  > scan 'net.leon.travel'
2017-03-03 22:32:51,099 org.nutz.resource.Scans.scan(Scans.java:262) DEBUG - Found 23 resource by src( net/leon/travel/ ) , regex( ^.+[.]class$ )
2017-03-03 22:32:51,102 org.nutz.mvc.impl.Loadings.checkModule(Loadings.java:198) DEBUG -    >> add 'net.leon.travel.module.HomeBO'
2017-03-03 22:32:51,103 org.nutz.mvc.impl.Loadings.checkModule(Loadings.java:198) DEBUG -    >> add 'net.leon.travel.module.SightsBO'
2017-03-03 22:32:51,104 org.nutz.mvc.impl.Loadings.checkModule(Loadings.java:198) DEBUG -    >> add 'net.leon.travel.module.UserBO'
2017-03-03 22:32:51,144 org.nutz.mvc.impl.UrlMappingImpl.print(UrlMappingImpl.java:148) DEBUG -    '/home/user/register'       >> UserBO.register(...)           : Map        | @Ok(json ) @Fail(json ) | by 0 Filters | (I:UTF-8/O:UTF-8)
2017-03-03 22:32:51,151 org.nutz.mvc.impl.UrlMappingImpl.print(UrlMappingImpl.java:148) DEBUG -    '/home/user/login'          >> UserBO.login(...)              : Map        | @Ok(json ) @Fail(json ) | by 0 Filters | (I:UTF-8/O:UTF-8)
2017-03-03 22:32:51,154 org.nutz.mvc.impl.UrlMappingImpl.print(UrlMappingImpl.java:148) DEBUG -    '/home/user/logout'         >> UserBO.logout(...)             : void       | @Ok(json ) @Fail(json ) | by 1 Filters | (I:UTF-8/O:UTF-8)
2017-03-03 22:32:51,165 org.nutz.mvc.impl.UrlMappingImpl.print(UrlMappingImpl.java:148) DEBUG -    '/home/sights/getsights'    >> SightsBO.getSights(...)        : Map        | @Ok(json ) @Fail(http:500) | by 0 Filters | (I:UTF-8/O:UTF-8)
2017-03-03 22:32:51,172 org.nutz.mvc.impl.UrlMappingImpl.print(UrlMappingImpl.java:148) DEBUG -    '/home/', '/homehome'       >> HomeBO.Home(...)               : Map        | @Ok(jsp:/index.jsp) @Fail(http:500) | by 0 Filters | (I:UTF-8/O:UTF-8)
2017-03-03 22:32:51,172 org.nutz.mvc.impl.NutLoading.evalUrlMapping(NutLoading.java:220) INFO  - Found 5 module methods
2017-03-03 22:32:51,172 org.nutz.mvc.impl.NutLoading.evalLocalization(NutLoading.java:306) DEBUG - Localization: org.nutz.mvc.impl.NutMessageLoader('msg/')  dft<zh-CN>
2017-03-03 22:32:51,175 org.nutz.resource.Scans.scan(Scans.java:262) DEBUG - Found 1 resource by src( msg/ ) , regex( ^.+[.]properties$ )
2017-03-03 22:32:51,176 org.nutz.mvc.impl.NutMessageLoader.load(NutMessageLoader.java:27) DEBUG - Load Messages in 1 resource : [[NutResource[zh-CN/user.properties]]]
2017-03-03 22:32:51,178 org.nutz.mvc.impl.NutMessageLoader.load(NutMessageLoader.java:95) DEBUG - Message Loaded, size = 2
2017-03-03 22:32:51,179 org.nutz.mvc.impl.NutLoading.evalSetup(NutLoading.java:274) INFO  - Setup application...
2017-03-03 22:32:51,179 org.nutz.ioc.impl.NutIoc.get(NutIoc.java:151) DEBUG - Get 'dao'<interface org.nutz.dao.Dao>
2017-03-03 22:32:51,183 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-03-03 22:32:51,184 org.nutz.ioc.impl.NutIoc.get(NutIoc.java:177) DEBUG - 	 >> Load definition name=dao
2017-03-03 22:32:51,186 org.nutz.ioc.loader.map.MapLoader.load(MapLoader.java:67) DEBUG - Loading define for name=dao
2017-03-03 22:32:51,194 org.nutz.ioc.loader.combo.ComboIocLoader.load(ComboIocLoader.java:169) DEBUG - Found IocObject(dao) in JsonLoader(paths=[ioc/])
2017-03-03 22:32:51,194 org.nutz.ioc.impl.NutIoc.get(NutIoc.java:209) DEBUG - 	 >> Make...'dao'<interface org.nutz.dao.Dao>
2017-03-03 22:32:51,222 org.nutz.ioc.aop.impl.DefaultMirrorFactory.getMirror(DefaultMirrorFactory.java:70) DEBUG - Load class org.nutz.dao.impl.NutDao without AOP
2017-03-03 22:32:51,224 org.nutz.ioc.impl.ScopeContext.save(ScopeContext.java:64) DEBUG - Save object 'dao' to [app] 
2017-03-03 22:32:51,229 org.nutz.ioc.impl.NutIoc.get(NutIoc.java:151) DEBUG - Get 'dataSource'<>
2017-03-03 22:32:51,230 org.nutz.ioc.impl.NutIoc.get(NutIoc.java:177) DEBUG - 	 >> Load definition name=dataSource
2017-03-03 22:32:51,230 org.nutz.ioc.loader.map.MapLoader.load(MapLoader.java:67) DEBUG - Loading define for name=dataSource
2017-03-03 22:32:51,243 org.nutz.ioc.loader.combo.ComboIocLoader.load(ComboIocLoader.java:169) DEBUG - Found IocObject(dataSource) in JsonLoader(paths=[ioc/])
2017-03-03 22:32:51,244 org.nutz.ioc.impl.NutIoc.get(NutIoc.java:209) DEBUG - 	 >> Make...'dataSource'<>
2017-03-03 22:32:51,278 org.nutz.ioc.aop.impl.DefaultMirrorFactory.getMirror(DefaultMirrorFactory.java:70) DEBUG - Load class com.alibaba.druid.pool.DruidDataSource without AOP
2017-03-03 22:32:51,278 org.nutz.ioc.impl.ScopeContext.save(ScopeContext.java:64) DEBUG - Save object 'dataSource' to [app] 
2017-03-03 22:32:51,324 org.nutz.ioc.impl.NutIoc.get(NutIoc.java:151) DEBUG - Get 'conf'<>
2017-03-03 22:32:51,325 org.nutz.ioc.impl.NutIoc.get(NutIoc.java:177) DEBUG - 	 >> Load definition name=conf
2017-03-03 22:32:51,325 org.nutz.ioc.loader.map.MapLoader.load(MapLoader.java:67) DEBUG - Loading define for name=conf
2017-03-03 22:32:51,326 org.nutz.ioc.loader.combo.ComboIocLoader.load(ComboIocLoader.java:169) DEBUG - Found IocObject(conf) in JsonLoader(paths=[ioc/])
2017-03-03 22:32:51,327 org.nutz.ioc.impl.NutIoc.get(NutIoc.java:209) DEBUG - 	 >> Make...'conf'<>
2017-03-03 22:32:51,328 org.nutz.ioc.aop.impl.DefaultMirrorFactory.getMirror(DefaultMirrorFactory.java:70) DEBUG - Load class org.nutz.ioc.impl.PropertiesProxy without AOP
2017-03-03 22:32:51,328 org.nutz.ioc.impl.ScopeContext.save(ScopeContext.java:64) DEBUG - Save object 'conf' to [app] 
2017-03-03 22:32:51,333 org.nutz.resource.Scans.scan(Scans.java:262) DEBUG - Found 1 resource by src( custom/db.properties ) , regex( ^.+[.]properties$ )
2017-03-03 22:32:51,342 org.nutz.ioc.impl.NutIoc.get(NutIoc.java:151) DEBUG - Get 'conf'<>
2017-03-03 22:32:51,342 org.nutz.ioc.impl.NutIoc.get(NutIoc.java:151) DEBUG - Get 'conf'<>
2017-03-03 22:32:51,344 org.nutz.ioc.impl.NutIoc.get(NutIoc.java:151) DEBUG - Get 'conf'<>
2017-03-03 22:32:51,345 org.nutz.ioc.impl.NutIoc.get(NutIoc.java:151) DEBUG - Get 'conf'<>
2017-03-03 22:32:51,498 com.alibaba.druid.pool.DruidDataSource.init(DruidDataSource.java:669) INFO  - {dataSource-1} inited
2017-03-03 22:32:51,500 org.nutz.ioc.impl.NutIoc.get(NutIoc.java:151) DEBUG - Get 'dataSource'<>
2017-03-03 22:32:51,520 org.nutz.dao.impl.NutDao.<init>(NutDao.java:108) DEBUG - NutDao[_selfId=0] init ...
2017-03-03 22:32:51,573 org.nutz.filepool.NutFilePool.<init>(NutFilePool.java:23) INFO  - Init file-pool by: C:\Users\Administrator/.nutz/tmp/dao/ [200000]
2017-03-03 22:32:51,575 org.nutz.filepool.NutFilePool.<init>(NutFilePool.java:37) DEBUG - file-pool.home: 'C:\Users\Administrator\.nutz\tmp\dao'
2017-03-03 22:32:51,577 org.nutz.filepool.NutFilePool.<init>(NutFilePool.java:66) INFO  - file-pool.cursor: 0
2017-03-03 22:32:51,593 org.nutz.dao.jdbc.Jdbcs.<clinit>(Jdbcs.java:90) DEBUG - Jdbcs init complete
2017-03-03 22:32:51,593 org.nutz.dao.jdbc.Jdbcs.getExpert(Jdbcs.java:103) INFO  - Get Connection from DataSource for JdbcExpert, if I lock at here, check your database server and configure
2017-03-03 22:32:51,876 org.nutz.dao.impl.DaoSupport$1.invoke(DaoSupport.java:200) DEBUG - JDBC Driver --> mysql-connector-java-5.1.37 ( Revision: 09940f05b4c98150f352e787a2549f11a2e9da93 )
2017-03-03 22:32:51,877 org.nutz.dao.impl.DaoSupport$1.invoke(DaoSupport.java:201) DEBUG - JDBC Name   --> MySQL Connector Java
2017-03-03 22:32:51,877 org.nutz.dao.impl.DaoSupport$1.invoke(DaoSupport.java:203) DEBUG - JDBC URL    --> jdbc:mysql://127.0.0.1:3306/travel
2017-03-03 22:32:52,026 org.nutz.dao.impl.DaoSupport$1.invoke(DaoSupport.java:219) DEBUG - Mysql : character_set_client=latin1
2017-03-03 22:32:52,026 org.nutz.dao.impl.DaoSupport$1.invoke(DaoSupport.java:219) DEBUG - Mysql : character_set_connection=latin1
2017-03-03 22:32:52,027 org.nutz.dao.impl.DaoSupport$1.invoke(DaoSupport.java:219) DEBUG - Mysql : character_set_database=utf8
2017-03-03 22:32:52,027 org.nutz.dao.impl.DaoSupport$1.invoke(DaoSupport.java:219) DEBUG - Mysql : character_set_filesystem=binary
2017-03-03 22:32:52,027 org.nutz.dao.impl.DaoSupport$1.invoke(DaoSupport.java:219) DEBUG - Mysql : character_set_results=
2017-03-03 22:32:52,027 org.nutz.dao.impl.DaoSupport$1.invoke(DaoSupport.java:219) DEBUG - Mysql : character_set_server=latin1
2017-03-03 22:32:52,028 org.nutz.dao.impl.DaoSupport$1.invoke(DaoSupport.java:219) DEBUG - Mysql : character_set_system=utf8
2017-03-03 22:32:52,028 org.nutz.dao.impl.DaoSupport$1.invoke(DaoSupport.java:219) DEBUG - Mysql : character_sets_dir=E:\ToolBox\Developer\mysql-5.6.24-win32\share\charsets\
2017-03-03 22:32:52,030 org.nutz.dao.impl.DaoSupport$1.invoke(DaoSupport.java:226) DEBUG - Mysql : database=travel
2017-03-03 22:32:52,031 org.nutz.dao.impl.DaoSupport$1.invoke(DaoSupport.java:232) DEBUG - Mysql : user=root@localhost
2017-03-03 22:32:52,434 org.nutz.dao.impl.DaoSupport.setDataSource(DaoSupport.java:247) DEBUG - Database info --> MYSQL:[MySQL - 5.6.24]
2017-03-03 22:32:52,446 org.nutz.resource.Scans.scan(Scans.java:262) DEBUG - Found 23 resource by src( net/leon/travel/ ) , regex( ^.+[.]class$ )
2017-03-03 22:32:52,799 org.nutz.dao.impl.sql.run.NutDaoExecutor.printSQL(NutDaoExecutor.java:388) DEBUG - SELECT COUNT(*) FROM user 
2017-03-03 22:32:52,804 org.nutz.ioc.impl.NutIoc.get(NutIoc.java:151) DEBUG - Get 'nutQuartzCronJobFactory'<class org.nutz.integration.quartz.NutQuartzCronJobFactory>
2017-03-03 22:32:52,804 org.nutz.ioc.impl.NutIoc.get(NutIoc.java:177) DEBUG - 	 >> Load definition name=nutQuartzCronJobFactory
2017-03-03 22:32:52,804 org.nutz.ioc.loader.map.MapLoader.load(MapLoader.java:67) DEBUG - Loading define for name=nutQuartzCronJobFactory
2017-03-03 22:32:52,805 org.nutz.ioc.loader.combo.ComboIocLoader.load(ComboIocLoader.java:169) DEBUG - Found IocObject(nutQuartzCronJobFactory) in QuartzIocLoader@611127977
2017-03-03 22:32:52,805 org.nutz.ioc.impl.NutIoc.get(NutIoc.java:209) DEBUG - 	 >> Make...'nutQuartzCronJobFactory'<class org.nutz.integration.quartz.NutQuartzCronJobFactory>
2017-03-03 22:32:52,807 org.nutz.ioc.aop.impl.DefaultMirrorFactory.getMirror(DefaultMirrorFactory.java:70) DEBUG - Load class org.nutz.integration.quartz.NutQuartzCronJobFactory without AOP
2017-03-03 22:32:52,808 org.nutz.ioc.impl.ScopeContext.save(ScopeContext.java:64) DEBUG - Save object 'nutQuartzCronJobFactory' to [app] 
2017-03-03 22:32:52,809 org.nutz.ioc.impl.NutIoc.get(NutIoc.java:151) DEBUG - Get 'scheduler'<>
2017-03-03 22:32:52,810 org.nutz.ioc.impl.NutIoc.get(NutIoc.java:177) DEBUG - 	 >> Load definition name=scheduler
2017-03-03 22:32:52,810 org.nutz.ioc.loader.map.MapLoader.load(MapLoader.java:67) DEBUG - Loading define for name=scheduler
2017-03-03 22:32:52,811 org.nutz.ioc.loader.combo.ComboIocLoader.load(ComboIocLoader.java:169) DEBUG - Found IocObject(scheduler) in QuartzIocLoader@611127977
2017-03-03 22:32:52,811 org.nutz.ioc.impl.NutIoc.get(NutIoc.java:209) DEBUG - 	 >> Make...'scheduler'<>
2017-03-03 22:32:52,811 org.nutz.ioc.impl.ScopeContext.save(ScopeContext.java:64) DEBUG - Save object 'scheduler' to [app] 
2017-03-03 22:32:52,859 org.quartz.impl.StdSchedulerFactory.instantiate(StdSchedulerFactory.java:1172) INFO  - Using default implementation for ThreadExecutor
2017-03-03 22:32:52,898 org.quartz.core.SchedulerSignalerImpl.<init>(SchedulerSignalerImpl.java:61) INFO  - Initialized Scheduler Signaller of type: class org.quartz.core.SchedulerSignalerImpl
2017-03-03 22:32:52,899 org.quartz.core.QuartzScheduler.<init>(QuartzScheduler.java:240) INFO  - Quartz Scheduler v.2.2.3 created.
2017-03-03 22:32:52,901 org.quartz.simpl.RAMJobStore.initialize(RAMJobStore.java:155) INFO  - RAMJobStore initialized.
2017-03-03 22:32:52,901 org.quartz.core.QuartzScheduler.initialize(QuartzScheduler.java:305) INFO  - Scheduler meta-data: Quartz Scheduler (v2.2.3) 'NutzbookScheduler' with instanceId 'NON_CLUSTERED'
  Scheduler class: 'org.quartz.core.QuartzScheduler' - running locally.
  NOT STARTED.
  Currently in standby mode.
  Number of jobs executed: 0
  Using thread pool 'org.quartz.simpl.SimpleThreadPool' - with 3 threads.
  Using job-store 'org.quartz.simpl.RAMJobStore' - which does not support persistence. and is not clustered.

2017-03-03 22:32:52,902 org.quartz.impl.StdSchedulerFactory.instantiate(StdSchedulerFactory.java:1327) INFO  - Quartz scheduler 'NutzbookScheduler' initialized from default resource file in Quartz package: 'quartz.properties'
2017-03-03 22:32:52,902 org.quartz.impl.StdSchedulerFactory.instantiate(StdSchedulerFactory.java:1331) INFO  - Quartz scheduler version: 2.2.3
2017-03-03 22:32:52,903 org.nutz.ioc.impl.NutIoc.get(NutIoc.java:151) DEBUG - Get 'jobFactory'<>
2017-03-03 22:32:52,903 org.nutz.ioc.impl.NutIoc.get(NutIoc.java:177) DEBUG - 	 >> Load definition name=jobFactory
2017-03-03 22:32:52,903 org.nutz.ioc.loader.map.MapLoader.load(MapLoader.java:67) DEBUG - Loading define for name=jobFactory
2017-03-03 22:32:52,905 org.nutz.ioc.loader.combo.ComboIocLoader.load(ComboIocLoader.java:169) DEBUG - Found IocObject(jobFactory) in QuartzIocLoader@611127977
2017-03-03 22:32:52,906 org.nutz.ioc.impl.NutIoc.get(NutIoc.java:209) DEBUG - 	 >> Make...'jobFactory'<>
2017-03-03 22:32:52,908 org.nutz.ioc.aop.impl.DefaultMirrorFactory.getMirror(DefaultMirrorFactory.java:70) DEBUG - Load class org.nutz.integration.quartz.NutQuartzJobFactory without AOP
2017-03-03 22:32:52,908 org.nutz.ioc.impl.ScopeContext.save(ScopeContext.java:64) DEBUG - Save object 'jobFactory' to [app] 
2017-03-03 22:32:52,910 org.quartz.core.QuartzScheduler.setJobFactory(QuartzScheduler.java:2311) INFO  - JobFactory set to: org.nutz.integration.quartz.NutQuartzJobFactory@159576c3
2017-03-03 22:32:52,910 org.quartz.core.QuartzScheduler.start(QuartzScheduler.java:575) INFO  - Scheduler NutzbookScheduler_$_NON_CLUSTERED started.
2017-03-03 22:32:52,910 org.quartz.core.QuartzSchedulerThread.run(QuartzSchedulerThread.java:276) DEBUG - batch acquisition of 0 triggers
2017-03-03 22:32:52,911 org.nutz.ioc.impl.NutIoc.get(NutIoc.java:151) DEBUG - Get 'conf'<>
2017-03-03 22:32:52,911 org.nutz.mvc.impl.NutLoading.load(NutLoading.java:141) INFO  - Nutz.Mvc[nutz] is up in 2010ms

我全都摘下来了, 比较多, 烦请看下

mysql没有工作在utf8

2017-03-03 22:32:51,877 org.nutz.dao.impl.DaoSupport$1.invoke(DaoSupport.java:203) DEBUG - JDBC URL    --> jdbc:mysql://127.0.0.1:3306/travel
2017-03-03 22:32:52,026 org.nutz.dao.impl.DaoSupport$1.invoke(DaoSupport.java:219) DEBUG - Mysql : character_set_client=latin1
2017-03-03 22:32:52,026 org.nutz.dao.impl.DaoSupport$1.invoke(DaoSupport.java:219) DEBUG - Mysql : character_set_connection=latin1
2017-03-03 22:32:52,027 org.nutz.dao.impl.DaoSupport$1.invoke(DaoSupport.java:219) DEBUG - Mysql : character_set_database=utf8
2017-03-03 22:32:52,027 org.nutz.dao.impl.DaoSupport$1.invoke(DaoSupport.java:219) DEBUG - Mysql : character_set_filesystem=binary
2017-03-03 22:32:52,027 org.nutz.dao.impl.DaoSupport$1.invoke(DaoSupport.java:219) DEBUG - Mysql : character_set_results=
2017-03-03 22:32:52,027 org.nutz.dao.impl.DaoSupport$1.invoke(DaoSupport.java:219) DEBUG - Mysql : character_set_server=latin1
2017-03-03 22:32:52,028 org.nutz.dao.impl.DaoSupport$1.invoke(DaoSupport.java:219) DEBUG - Mysql : character_set_system=utf8

非常感谢,已经解决了,我的mysql没有设置在utf-8的字符集,设置mysql的字符集还真是有点麻烦, 抱歉过了这么久才来表示感谢

能解决就好 ^_^

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