NutzCN Logo
问答 nutz的一个小demo找不到路由
发布于 2240天前 作者 GoodNightZX 1303 次浏览 复制 上一个帖子 下一个帖子
标签:

package com.nutz.nutzbook;

import com.nutz.nutzbook.util.MainSetup;
import org.nutz.mvc.annotation.IocBy;
import org.nutz.mvc.annotation.Modules;
import org.nutz.mvc.annotation.SetupBy;
import org.nutz.mvc.ioc.provider.ComboIocProvider;

@SetupBy(value = MainSetup.class)
// 请注意星号!!不要拷贝少了
@IocBy(type=ComboIocProvider.class, args={"*js", "ioc/",
// 这个package下所有带@IocBean注解的类,都会登记上
"*anno", "com.nutz.nutzbook",
"*tx", // 事务拦截 aop
"*async"}) // 异步执行aop

@Modules(scanPackage = true,packages="com.nutz.nutzbook")
public class MainModule {

}

package com.nutz.nutzbook.module;

import com.nutz.nutzbook.pojo.User;
import org.nutz.dao.Dao;
import org.nutz.ioc.loader.annotation.Inject;
import org.nutz.ioc.loader.annotation.IocBean;
import org.nutz.mvc.annotation.At;
import org.nutz.mvc.annotation.Fail;
import org.nutz.mvc.annotation.Ok;

import java.util.Date;

@IocBean
@At("/user")
@Ok("json")
@Fail("http :500")
public class UserModule {

@Inject
protected Dao dao;//就这么注入了,有@IocBean他才会生效

@At
public int count(){
    return dao.count(User.class);
}

}

"E:\Program Files\apache-tomcat-7.0.81\bin\catalina.bat" run
[2018-09-27 05:30:02,910] Artifact nutzbook:war exploded: Waiting for server connection to start artifact deployment...
Using CATALINA_BASE: "C:\Users\dell.IntelliJIdea2017.3\system\tomcat_nutzbook"
Using CATALINA_HOME: "E:\Program Files\apache-tomcat-7.0.81"
Using CATALINA_TMPDIR: "E:\Program Files\apache-tomcat-7.0.81\temp"
Using JRE_HOME: "C:\Program Files\Java\jdk1.8.0_144"
Using CLASSPATH: "E:\Program Files\apache-tomcat-7.0.81\bin\bootstrap.jar;E:\Program Files\apache-tomcat-7.0.81\bin\tomcat-juli.jar"
九月 27, 2018 5:30:04 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Server version: Apache Tomcat/7.0.81
九月 27, 2018 5:30:04 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Server built: Aug 11 2017 10:21:27 UTC
九月 27, 2018 5:30:04 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Server number: 7.0.81.0
九月 27, 2018 5:30:04 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: OS Name: Windows 10
九月 27, 2018 5:30:04 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: OS Version: 10.0
九月 27, 2018 5:30:04 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Architecture: amd64
九月 27, 2018 5:30:04 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Java Home: C:\Program Files\Java\jdk1.8.0_144\jre
九月 27, 2018 5:30:04 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: JVM Version: 1.8.0_144-b01
九月 27, 2018 5:30:04 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: JVM Vendor: Oracle Corporation
九月 27, 2018 5:30:04 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: CATALINA_BASE: C:\Users\dell.IntelliJIdea2017.3\system\tomcat_nutzbook
九月 27, 2018 5:30:04 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: CATALINA_HOME: E:\Program Files\apache-tomcat-7.0.81
九月 27, 2018 5:30:04 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Djava.util.logging.config.file=C:\Users\dell.IntelliJIdea2017.3\system\tomcat_nutzbook\conf\logging.properties
九月 27, 2018 5:30:04 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
九月 27, 2018 5:30:04 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Dcom.sun.management.jmxremote=
九月 27, 2018 5:30:04 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Dcom.sun.management.jmxremote.port=1099
九月 27, 2018 5:30:04 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Dcom.sun.management.jmxremote.ssl=false
九月 27, 2018 5:30:04 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Dcom.sun.management.jmxremote.authenticate=false
九月 27, 2018 5:30:04 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Djava.rmi.server.hostname=127.0.0.1
九月 27, 2018 5:30:04 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Djdk.tls.ephemeralDHKeySize=2048
九月 27, 2018 5:30:04 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Djava.endorsed.dirs=E:\Program Files\apache-tomcat-7.0.81\endorsed
九月 27, 2018 5:30:04 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Dcatalina.base=C:\Users\dell.IntelliJIdea2017.3\system\tomcat_nutzbook
九月 27, 2018 5:30:04 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Dcatalina.home=E:\Program Files\apache-tomcat-7.0.81
九月 27, 2018 5:30:04 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Djava.io.tmpdir=E:\Program Files\apache-tomcat-7.0.81\temp
九月 27, 2018 5:30:04 下午 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: C:\Program Files\Java\jdk1.8.0_144\bin;C:\WINDOWS\Sun\Java\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\Program Files\Java\jdk1.8.0_144\bin;C:\Users\dell\AppData\Local\Microsoft\WindowsApps;.
九月 27, 2018 5:30:04 下午 org.apache.coyote.AbstractProtocol init
信息: Initializing ProtocolHandler ["http-bio-8888"]
九月 27, 2018 5:30:04 下午 org.apache.coyote.AbstractProtocol init
信息: Initializing ProtocolHandler ["ajp-bio-8009"]
九月 27, 2018 5:30:04 下午 org.apache.catalina.startup.Catalina load
信息: Initialization processed in 641 ms
九月 27, 2018 5:30:04 下午 org.apache.catalina.core.StandardService startInternal
信息: Starting service Catalina
九月 27, 2018 5:30:04 下午 org.apache.catalina.core.StandardEngine startInternal
信息: Starting Servlet Engine: Apache Tomcat/7.0.81
九月 27, 2018 5:30:04 下午 org.apache.coyote.AbstractProtocol start
信息: Starting ProtocolHandler ["http-bio-8888"]
九月 27, 2018 5:30:04 下午 org.apache.coyote.AbstractProtocol start
信息: Starting ProtocolHandler ["ajp-bio-8009"]
九月 27, 2018 5:30:04 下午 org.apache.catalina.startup.Catalina start
信息: Server startup in 92 ms
Connected to server
[2018-09-27 05:30:04,982] Artifact nutzbook:war exploded: Artifact is being deployed, please wait...
九月 27, 2018 5:30:05 下午 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.
18-09-27 17:30:05.360 INFO [RMI TCP Connection(4)-127.0.0.1] Select SystemLog as Nutz.Log implement
18-09-27 17:30:05.504 INFO [RMI TCP Connection(4)-127.0.0.1] NutFilter[nutz] starting ...
18-09-27 17:30:05.530 DEBUG [RMI TCP Connection(4)-127.0.0.1] Locations count=3 time use 7ms
18-09-27 17:30:05.651 DEBUG [RMI TCP Connection(4)-127.0.0.1] Locations count=7 time use 121ms
18-09-27 17:30:05.664 DEBUG [RMI TCP Connection(4)-127.0.0.1] Loading by class org.nutz.mvc.impl.NutLoading
18-09-27 17:30:05.668 INFO [RMI TCP Connection(4)-127.0.0.1] Nutz Version : 1.r.66-20180614
18-09-27 17:30:05.668 INFO [RMI TCP Connection(4)-127.0.0.1] Nutz.Mvc[nutz] is initializing ...
18-09-27 17:30:05.668 DEBUG [RMI TCP Connection(4)-127.0.0.1] Web Container Information:
18-09-27 17:30:05.670 DEBUG [RMI TCP Connection(4)-127.0.0.1] - Default Charset : GBK
18-09-27 17:30:05.671 DEBUG [RMI TCP Connection(4)-127.0.0.1] - Current . path : E:\Program Files\apache-tomcat-7.0.81\bin.
18-09-27 17:30:05.671 DEBUG [RMI TCP Connection(4)-127.0.0.1] - Java Version : 1.8.0_144
18-09-27 17:30:05.671 DEBUG [RMI TCP Connection(4)-127.0.0.1] - File separator : \
18-09-27 17:30:05.671 DEBUG [RMI TCP Connection(4)-127.0.0.1] - Timezone : Asia/Shanghai
18-09-27 17:30:05.671 DEBUG [RMI TCP Connection(4)-127.0.0.1] - OS : Windows 10 amd64
18-09-27 17:30:05.672 DEBUG [RMI TCP Connection(4)-127.0.0.1] - ServerInfo : Apache Tomcat/7.0.81
18-09-27 17:30:05.673 DEBUG [RMI TCP Connection(4)-127.0.0.1] - Servlet API : 3.0
18-09-27 17:30:05.673 DEBUG [RMI TCP Connection(4)-127.0.0.1] - ContextPath :
18-09-27 17:30:05.673 DEBUG [RMI TCP Connection(4)-127.0.0.1] - context.tempdir : C:\Users\dell.IntelliJIdea2017.3\system\tomcat_nutzbook\work\Catalina\localhost_
18-09-27 17:30:05.674 DEBUG [RMI TCP Connection(4)-127.0.0.1] - MainModule : com.nutz.nutzbook.MainModule
18-09-27 17:30:05.674 DEBUG [RMI TCP Connection(4)-127.0.0.1] >> app.root = D:/Idea 项目/nutzbook/target/nutzbook
18-09-27 17:30:05.739 DEBUG [RMI TCP Connection(4)-127.0.0.1] Using 101 castor for Castors
18-09-27 17:30:05.740 DEBUG [RMI TCP Connection(4)-127.0.0.1] @IocBy(type=org.nutz.mvc.ioc.provider.ComboIocProvider, args=["*js", "ioc/", "*anno", "com.nutz.nutzbook", "*tx", "*async"],init=[])
18-09-27 17:30:05.777 DEBUG [RMI TCP Connection(4)-127.0.0.1] Found 1 resource by src( ioc/ ) , regex( ^(.+[.])(js|json)$ )
18-09-27 17:30:05.778 DEBUG [RMI TCP Connection(4)-127.0.0.1] loading [dao.js]
18-09-27 17:30:05.785 DEBUG [RMI TCP Connection(4)-127.0.0.1] Loaded 2 bean define from path=[ioc/] --> [dataSource, dao]
18-09-27 17:30:05.793 INFO [RMI TCP Connection(4)-127.0.0.1] > scan 'com.nutz.nutzbook'
18-09-27 17:30:05.796 DEBUG [RMI TCP Connection(4)-127.0.0.1] Found 4 resource by src( com/nutz/nutzbook/ ) , regex( ^.+[.]class$ )
18-09-27 17:30:05.801 INFO [RMI TCP Connection(4)-127.0.0.1] Resource can't map to Class, Resource Module/UserModule.class
18-09-27 17:30:05.808 WARN [RMI TCP Connection(4)-127.0.0.1] NONE @IocBean found!! Check your ioc configure!! packages=[com.nutz.nutzbook]
18-09-27 17:30:05.825 DEBUG [RMI TCP Connection(4)-127.0.0.1] Load AopConfigure for anno=org.nutz.aop.interceptor.async.Async by type=org.nutz.aop.interceptor.async.AsyncAopIocLoader
18-09-27 17:30:05.830 INFO [RMI TCP Connection(4)-127.0.0.1] ... NutIoc init complete
18-09-27 17:30:05.834 INFO [RMI TCP Connection(4)-127.0.0.1] Build URL mapping by org.nutz.mvc.impl.UrlMappingImpl ...
18-09-27 17:30:05.839 DEBUG [RMI TCP Connection(4)-127.0.0.1] @Views(DefaultViewMaker.class)
18-09-27 17:30:05.844 DEBUG [RMI TCP Connection(4)-127.0.0.1] @ChainBy(org.nutz.mvc.impl.NutActionChainMaker)
18-09-27 17:30:05.852 DEBUG [RMI TCP Connection(4)-127.0.0.1] > scan 'com.nutz.nutzbook'
18-09-27 17:30:05.854 DEBUG [RMI TCP Connection(4)-127.0.0.1] Found 4 resource by src( com/nutz/nutzbook/ ) , regex( ^.+[.]class$ )
18-09-27 17:30:05.856 INFO [RMI TCP Connection(4)-127.0.0.1] Resource can't map to Class, Resource Module/UserModule.class
18-09-27 17:30:05.859 DEBUG [RMI TCP Connection(4)-127.0.0.1] module class location 'file:/D:/Idea%20项目/nutzbook/target/nutzbook/WEB-INF/classes/'
18-09-27 17:30:05.859 DEBUG [RMI TCP Connection(4)-127.0.0.1] > scan 'com.nutz.nutzbook'
18-09-27 17:30:05.861 DEBUG [RMI TCP Connection(4)-127.0.0.1] Found 4 resource by src( com/nutz/nutzbook/ ) , regex( ^.+[.]class$ )
18-09-27 17:30:05.862 INFO [RMI TCP Connection(4)-127.0.0.1] Resource can't map to Class, Resource Module/UserModule.class
18-09-27 17:30:05.864 DEBUG [RMI TCP Connection(4)-127.0.0.1] Use org.nutz.mvc.impl.NutEntryDeterminer as EntryMethodDeterminer
18-09-27 17:30:05.864 WARN [RMI TCP Connection(4)-127.0.0.1] None module classes found!!!
18-09-27 17:30:05.864 DEBUG [RMI TCP Connection(4)-127.0.0.1] @Localization not define
18-09-27 17:30:05.865 INFO [RMI TCP Connection(4)-127.0.0.1] Setup application...
18-09-27 17:30:05.864 WARN [RMI TCP Connection(4)-127.0.0.1] None @At found in any modules class!!
18-09-27 17:30:05.867 DEBUG [RMI TCP Connection(4)-127.0.0.1] Get 'dao'<interface org.nutz.dao.Dao>
18-09-27 17:30:05.868 DEBUG [RMI TCP Connection(4)-127.0.0.1] Get '$aop_async'<interface org.nutz.ioc.aop.config.AopConfigration>
18-09-27 17:30:05.868 DEBUG [RMI TCP Connection(4)-127.0.0.1] >> Load definition name=$aop_async
18-09-27 17:30:05.874 DEBUG [RMI TCP Connection(4)-127.0.0.1] Found IocObject($aop_async) in AsyncAopIocLoader@1236060443
18-09-27 17:30:05.874 DEBUG [RMI TCP Connection(4)-127.0.0.1] >> Make...'$aop_async'<interface org.nutz.ioc.aop.config.AopConfigration>
18-09-27 17:30:05.900 DEBUG [RMI TCP Connection(4)-127.0.0.1] Save object '$aop_async' to [app]
18-09-27 17:30:05.908 DEBUG [RMI TCP Connection(4)-127.0.0.1] Load AopConfigure for anno=org.nutz.ioc.aop.Aop by type=org.nutz.ioc.aop.config.impl.AnnotationAopConfigration
18-09-27 17:30:05.909 DEBUG [RMI TCP Connection(4)-127.0.0.1] >> Load definition name=dao
18-09-27 17:30:05.909 DEBUG [RMI TCP Connection(4)-127.0.0.1] Found IocObject(dao) in JsonLoader(paths=[ioc/])
18-09-27 17:30:05.909 DEBUG [RMI TCP Connection(4)-127.0.0.1] >> Make...'dao'<interface org.nutz.dao.Dao>
18-09-27 17:30:05.910 DEBUG [RMI TCP Connection(4)-127.0.0.1] Save object 'dao' to [app]
18-09-27 17:30:05.914 DEBUG [RMI TCP Connection(4)-127.0.0.1] Get 'dataSource'<>
18-09-27 17:30:05.914 DEBUG [RMI TCP Connection(4)-127.0.0.1] >> Load definition name=dataSource
18-09-27 17:30:05.914 DEBUG [RMI TCP Connection(4)-127.0.0.1] Found IocObject(dataSource) in JsonLoader(paths=[ioc/])
18-09-27 17:30:05.914 DEBUG [RMI TCP Connection(4)-127.0.0.1] >> Make...'dataSource'<>
18-09-27 17:30:05.914 DEBUG [RMI TCP Connection(4)-127.0.0.1] Save object 'dataSource' to [app]
18-09-27 17:30:05.938 DEBUG [RMI TCP Connection(4)-127.0.0.1] Load class com.alibaba.druid.pool.DruidDataSource without AOP
九月 27, 2018 5:30:06 下午 com.alibaba.druid.pool.DruidDataSource info
信息: {dataSource-1} inited
18-09-27 17:30:06.280 DEBUG [RMI TCP Connection(4)-127.0.0.1] Load class org.nutz.dao.impl.NutDao without AOP
18-09-27 17:30:06.281 DEBUG [RMI TCP Connection(4)-127.0.0.1] Get 'dataSource'<>
18-09-27 17:30:06.426 DEBUG [RMI TCP Connection(4)-127.0.0.1] Jdbcs init complete
18-09-27 17:30:06.427 INFO [RMI TCP Connection(4)-127.0.0.1] Get Connection from DataSource for JdbcExpert, if you lock at here, check your database server and configure
18-09-27 17:30:06.780 DEBUG [RMI TCP Connection(4)-127.0.0.1] select expert : org.nutz.dao.impl.jdbc.mysql.MysqlJdbcExpert
18-09-27 17:30:06.787 DEBUG [RMI TCP Connection(4)-127.0.0.1] JDBC Driver --> mysql-connector-java-5.1.40 ( Revision: 402933ef52cad9aa82624e80acbea46e3a701ce6 )
18-09-27 17:30:06.787 DEBUG [RMI TCP Connection(4)-127.0.0.1] JDBC Name --> MySQL Connector Java
18-09-27 17:30:06.787 DEBUG [RMI TCP Connection(4)-127.0.0.1] JDBC URL --> jdbc:mysql://127.0.0.1:3306/nutzdemo
18-09-27 17:30:06.795 DEBUG [RMI TCP Connection(4)-127.0.0.1] Mysql : character_set_client=utf8
18-09-27 17:30:06.795 DEBUG [RMI TCP Connection(4)-127.0.0.1] Mysql : character_set_connection=utf8
18-09-27 17:30:06.795 DEBUG [RMI TCP Connection(4)-127.0.0.1] Mysql : character_set_database=utf8
18-09-27 17:30:06.795 DEBUG [RMI TCP Connection(4)-127.0.0.1] Mysql : character_set_filesystem=binary
18-09-27 17:30:06.796 DEBUG [RMI TCP Connection(4)-127.0.0.1] Mysql : character_set_results=
18-09-27 17:30:06.796 DEBUG [RMI TCP Connection(4)-127.0.0.1] Mysql : character_set_server=utf8
18-09-27 17:30:06.796 DEBUG [RMI TCP Connection(4)-127.0.0.1] Mysql : character_set_system=utf8
18-09-27 17:30:06.796 DEBUG [RMI TCP Connection(4)-127.0.0.1] Mysql : character_sets_dir=C:\Program Files (x86)\MySQL\MySQL Server 5.5\share\charsets\
18-09-27 17:30:06.797 DEBUG [RMI TCP Connection(4)-127.0.0.1] Mysql : binlog_format=STATEMENT
18-09-27 17:30:06.797 DEBUG [RMI TCP Connection(4)-127.0.0.1] Mysql : database=nutzdemo
18-09-27 17:30:06.797 DEBUG [RMI TCP Connection(4)-127.0.0.1] Mysql : user=root@localhost
18-09-27 17:30:06.813 DEBUG [RMI TCP Connection(4)-127.0.0.1] Database info --> MYSQL:[MySQL - 5.5.21]
18-09-27 17:30:06.854 DEBUG [RMI TCP Connection(4)-127.0.0.1] Found 1 resource by src( com/nutz/nutzbook/util/ ) , regex( ^.+[.]class$ )
18-09-27 17:30:06.864 DEBUG [RMI TCP Connection(4)-127.0.0.1] SELECT COUNT(*) FROM t_user
18-09-27 17:30:06.865 INFO [RMI TCP Connection(4)-127.0.0.1] Nutz.Mvc[nutz] is up in 1191ms
[2018-09-27 05:30:06,895] Artifact nutzbook:war exploded: Artifact is deployed successfully
[2018-09-27 05:30:06,895] Artifact nutzbook:war exploded: Deploy took 1,913 milliseconds
18-09-27 17:30:07.108 DEBUG [http-bio-8888-exec-1] Search mapping for [GET] path=/nutzbook : NOT Action match
18-09-27 17:30:08.148 DEBUG [http-bio-8888-exec-6] Search mapping for [GET] path=/nutzbook : NOT Action match
九月 27, 2018 5:30:14 下午 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deploying web application directory E:\Program Files\apache-tomcat-7.0.81\webapps\manager
九月 27, 2018 5:30:14 下午 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.
九月 27, 2018 5:30:14 下午 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deployment of web application directory E:\Program Files\apache-tomcat-7.0.81\webapps\manager has finished in 48 ms
18-09-27 17:30:36.751 DEBUG [http-bio-8888-exec-7] Search mapping for [GET] path=/user/count : NOT Action match

5 回复

用 "插入代码" 按钮!

没看到"回复" 旁边还有个"插入代码或日志片段"的按钮吗?

"E:\Program Files\apache-tomcat-7.0.81\bin\catalina.bat" run
[2018-09-27 05:45:21,107] Artifact nutzbook:war exploded: Waiting for server connection to start artifact deployment...
Using CATALINA_BASE:   "C:\Users\dell\.IntelliJIdea2017.3\system\tomcat\_nutzbook"
Using CATALINA_HOME:   "E:\Program Files\apache-tomcat-7.0.81"
Using CATALINA_TMPDIR: "E:\Program Files\apache-tomcat-7.0.81\temp"
Using JRE_HOME:        "C:\Program Files\Java\jdk1.8.0_144"
Using CLASSPATH:       "E:\Program Files\apache-tomcat-7.0.81\bin\bootstrap.jar;E:\Program Files\apache-tomcat-7.0.81\bin\tomcat-juli.jar"
九月 27, 2018 5:45:22 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Server version:        Apache Tomcat/7.0.81
九月 27, 2018 5:45:22 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Server built:          Aug 11 2017 10:21:27 UTC
九月 27, 2018 5:45:22 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Server number:         7.0.81.0
九月 27, 2018 5:45:22 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: OS Name:               Windows 10
九月 27, 2018 5:45:22 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: OS Version:            10.0
九月 27, 2018 5:45:22 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Architecture:          amd64
九月 27, 2018 5:45:22 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Java Home:             C:\Program Files\Java\jdk1.8.0_144\jre
九月 27, 2018 5:45:22 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: JVM Version:           1.8.0_144-b01
九月 27, 2018 5:45:22 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: JVM Vendor:            Oracle Corporation
九月 27, 2018 5:45:22 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: CATALINA_BASE:         C:\Users\dell\.IntelliJIdea2017.3\system\tomcat\_nutzbook
九月 27, 2018 5:45:22 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: CATALINA_HOME:         E:\Program Files\apache-tomcat-7.0.81
九月 27, 2018 5:45:22 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Djava.util.logging.config.file=C:\Users\dell\.IntelliJIdea2017.3\system\tomcat\_nutzbook\conf\logging.properties
九月 27, 2018 5:45:22 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
九月 27, 2018 5:45:22 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Dcom.sun.management.jmxremote=
九月 27, 2018 5:45:22 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Dcom.sun.management.jmxremote.port=1099
九月 27, 2018 5:45:22 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Dcom.sun.management.jmxremote.ssl=false
九月 27, 2018 5:45:22 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Dcom.sun.management.jmxremote.authenticate=false
九月 27, 2018 5:45:22 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Djava.rmi.server.hostname=127.0.0.1
九月 27, 2018 5:45:22 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Djdk.tls.ephemeralDHKeySize=2048
九月 27, 2018 5:45:22 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Djava.endorsed.dirs=E:\Program Files\apache-tomcat-7.0.81\endorsed
九月 27, 2018 5:45:22 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Dcatalina.base=C:\Users\dell\.IntelliJIdea2017.3\system\tomcat\_nutzbook
九月 27, 2018 5:45:22 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Dcatalina.home=E:\Program Files\apache-tomcat-7.0.81
九月 27, 2018 5:45:22 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Djava.io.tmpdir=E:\Program Files\apache-tomcat-7.0.81\temp
九月 27, 2018 5:45:22 下午 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: C:\Program Files\Java\jdk1.8.0_144\bin;C:\WINDOWS\Sun\Java\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\Program Files\Java\jdk1.8.0_144\bin;C:\Users\dell\AppData\Local\Microsoft\WindowsApps;.
九月 27, 2018 5:45:23 下午 org.apache.coyote.AbstractProtocol init
信息: Initializing ProtocolHandler ["http-bio-8888"]
九月 27, 2018 5:45:23 下午 org.apache.coyote.AbstractProtocol init
信息: Initializing ProtocolHandler ["ajp-bio-8009"]
九月 27, 2018 5:45:23 下午 org.apache.catalina.startup.Catalina load
信息: Initialization processed in 709 ms
九月 27, 2018 5:45:23 下午 org.apache.catalina.core.StandardService startInternal
信息: Starting service Catalina
九月 27, 2018 5:45:23 下午 org.apache.catalina.core.StandardEngine startInternal
信息: Starting Servlet Engine: Apache Tomcat/7.0.81
九月 27, 2018 5:45:23 下午 org.apache.coyote.AbstractProtocol start
信息: Starting ProtocolHandler ["http-bio-8888"]
九月 27, 2018 5:45:23 下午 org.apache.coyote.AbstractProtocol start
信息: Starting ProtocolHandler ["ajp-bio-8009"]
九月 27, 2018 5:45:23 下午 org.apache.catalina.startup.Catalina start
信息: Server startup in 107 ms
[2018-09-27 05:45:23,314] Artifact nutzbook:war exploded: Artifact is being deployed, please wait...
Connected to server
九月 27, 2018 5:45:23 下午 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.
18-09-27 17:45:24.008 INFO [RMI TCP Connection(2)-127.0.0.1] Select SystemLog as Nutz.Log implement
18-09-27 17:45:24.184 INFO [RMI TCP Connection(2)-127.0.0.1] NutFilter[nutz] starting ...
18-09-27 17:45:24.215 DEBUG [RMI TCP Connection(2)-127.0.0.1] Locations count=3 time use 4ms
18-09-27 17:45:24.255 DEBUG [RMI TCP Connection(2)-127.0.0.1] Locations count=7 time use 39ms
18-09-27 17:45:24.267 DEBUG [RMI TCP Connection(2)-127.0.0.1] Loading by class org.nutz.mvc.impl.NutLoading
18-09-27 17:45:24.270 INFO [RMI TCP Connection(2)-127.0.0.1] Nutz Version : 1.r.66-20180614 
18-09-27 17:45:24.270 INFO [RMI TCP Connection(2)-127.0.0.1] Nutz.Mvc[nutz] is initializing ...
18-09-27 17:45:24.271 DEBUG [RMI TCP Connection(2)-127.0.0.1] Web Container Information:
18-09-27 17:45:24.272 DEBUG [RMI TCP Connection(2)-127.0.0.1]  - Default Charset : GBK
18-09-27 17:45:24.273 DEBUG [RMI TCP Connection(2)-127.0.0.1]  - Current . path  : E:\Program Files\apache-tomcat-7.0.81\bin\.
18-09-27 17:45:24.273 DEBUG [RMI TCP Connection(2)-127.0.0.1]  - Java Version    : 1.8.0_144
18-09-27 17:45:24.273 DEBUG [RMI TCP Connection(2)-127.0.0.1]  - File separator  : \
18-09-27 17:45:24.274 DEBUG [RMI TCP Connection(2)-127.0.0.1]  - Timezone        : Asia/Shanghai
18-09-27 17:45:24.274 DEBUG [RMI TCP Connection(2)-127.0.0.1]  - OS              : Windows 10 amd64
18-09-27 17:45:24.274 DEBUG [RMI TCP Connection(2)-127.0.0.1]  - ServerInfo      : Apache Tomcat/7.0.81
18-09-27 17:45:24.275 DEBUG [RMI TCP Connection(2)-127.0.0.1]  - Servlet API     : 3.0
18-09-27 17:45:24.275 DEBUG [RMI TCP Connection(2)-127.0.0.1]  - ContextPath     : 
18-09-27 17:45:24.275 DEBUG [RMI TCP Connection(2)-127.0.0.1]  - context.tempdir : C:\Users\dell\.IntelliJIdea2017.3\system\tomcat\_nutzbook\work\Catalina\localhost\_
18-09-27 17:45:24.275 DEBUG [RMI TCP Connection(2)-127.0.0.1]  - MainModule      : com.nutz.nutzbook.MainModule
18-09-27 17:45:24.275 DEBUG [RMI TCP Connection(2)-127.0.0.1] >> app.root = D:/Idea 项目/nutzbook/target/nutzbook
18-09-27 17:45:24.340 DEBUG [RMI TCP Connection(2)-127.0.0.1] Using 101 castor for Castors
18-09-27 17:45:24.341 DEBUG [RMI TCP Connection(2)-127.0.0.1] @IocBy(type=org.nutz.mvc.ioc.provider.ComboIocProvider, args=["*js", "ioc/", "*anno", "com.nutz.nutzbook", "*tx", "*async"],init=[])
18-09-27 17:45:24.373 DEBUG [RMI TCP Connection(2)-127.0.0.1] Found 1 resource by src( ioc/ ) , regex( ^(.+[.])(js|json)$ )
18-09-27 17:45:24.374 DEBUG [RMI TCP Connection(2)-127.0.0.1] loading [dao.js]
18-09-27 17:45:24.378 DEBUG [RMI TCP Connection(2)-127.0.0.1] Loaded 2 bean define from path=[ioc/] --> [dataSource, dao]
18-09-27 17:45:24.386 INFO [RMI TCP Connection(2)-127.0.0.1]  > scan 'com.nutz.nutzbook'
18-09-27 17:45:24.389 DEBUG [RMI TCP Connection(2)-127.0.0.1] Found 4 resource by src( com/nutz/nutzbook/ ) , regex( ^.+[.]class$ )
18-09-27 17:45:24.393 INFO [RMI TCP Connection(2)-127.0.0.1] Resource can't map to Class, Resource Module/UserModule.class
18-09-27 17:45:24.398 WARN [RMI TCP Connection(2)-127.0.0.1] NONE @IocBean found!! Check your ioc configure!! packages=[com.nutz.nutzbook]
18-09-27 17:45:24.420 DEBUG [RMI TCP Connection(2)-127.0.0.1] Load AopConfigure for anno=org.nutz.aop.interceptor.async.Async by type=org.nutz.aop.interceptor.async.AsyncAopIocLoader
18-09-27 17:45:24.426 INFO [RMI TCP Connection(2)-127.0.0.1] ... NutIoc init complete
18-09-27 17:45:24.432 INFO [RMI TCP Connection(2)-127.0.0.1] Build URL mapping by org.nutz.mvc.impl.UrlMappingImpl ...
18-09-27 17:45:24.440 DEBUG [RMI TCP Connection(2)-127.0.0.1] @Views(DefaultViewMaker.class)
18-09-27 17:45:24.453 DEBUG [RMI TCP Connection(2)-127.0.0.1] @ChainBy(org.nutz.mvc.impl.NutActionChainMaker)
18-09-27 17:45:24.499 DEBUG [RMI TCP Connection(2)-127.0.0.1]  > scan 'com.nutz.nutzbook'
18-09-27 17:45:24.507 DEBUG [RMI TCP Connection(2)-127.0.0.1] Found 4 resource by src( com/nutz/nutzbook/ ) , regex( ^.+[.]class$ )
18-09-27 17:45:24.514 INFO [RMI TCP Connection(2)-127.0.0.1] Resource can't map to Class, Resource Module/UserModule.class
18-09-27 17:45:24.523 DEBUG [RMI TCP Connection(2)-127.0.0.1] module class location 'file:/D:/Idea%20项目/nutzbook/target/nutzbook/WEB-INF/classes/'
18-09-27 17:45:24.523 DEBUG [RMI TCP Connection(2)-127.0.0.1]  > scan 'com.nutz.nutzbook'
18-09-27 17:45:24.526 DEBUG [RMI TCP Connection(2)-127.0.0.1] Found 4 resource by src( com/nutz/nutzbook/ ) , regex( ^.+[.]class$ )
18-09-27 17:45:24.527 INFO [RMI TCP Connection(2)-127.0.0.1] Resource can't map to Class, Resource Module/UserModule.class
18-09-27 17:45:24.529 DEBUG [RMI TCP Connection(2)-127.0.0.1] Use org.nutz.mvc.impl.NutEntryDeterminer as EntryMethodDeterminer
18-09-27 17:45:24.530 DEBUG [RMI TCP Connection(2)-127.0.0.1] @Localization not define
18-09-27 17:45:24.532 INFO [RMI TCP Connection(2)-127.0.0.1] Setup application...
18-09-27 17:45:24.529 WARN [RMI TCP Connection(2)-127.0.0.1] None module classes found!!!
18-09-27 17:45:24.530 WARN [RMI TCP Connection(2)-127.0.0.1] None @At found in any modules class!!
18-09-27 17:45:24.540 DEBUG [RMI TCP Connection(2)-127.0.0.1] Get 'dao'<interface org.nutz.dao.Dao>
18-09-27 17:45:24.540 DEBUG [RMI TCP Connection(2)-127.0.0.1] Get '$aop_async'<interface org.nutz.ioc.aop.config.AopConfigration>
18-09-27 17:45:24.543 DEBUG [RMI TCP Connection(2)-127.0.0.1] 	 >> Load definition name=$aop_async
18-09-27 17:45:24.546 DEBUG [RMI TCP Connection(2)-127.0.0.1] Found IocObject($aop_async) in AsyncAopIocLoader@2097277837
18-09-27 17:45:24.546 DEBUG [RMI TCP Connection(2)-127.0.0.1] 	 >> Make...'$aop_async'<interface org.nutz.ioc.aop.config.AopConfigration>
18-09-27 17:45:24.607 DEBUG [RMI TCP Connection(2)-127.0.0.1] Save object '$aop_async' to [app] 
18-09-27 17:45:24.645 DEBUG [RMI TCP Connection(2)-127.0.0.1] Load AopConfigure for anno=org.nutz.ioc.aop.Aop by type=org.nutz.ioc.aop.config.impl.AnnotationAopConfigration
18-09-27 17:45:24.645 DEBUG [RMI TCP Connection(2)-127.0.0.1] 	 >> Load definition name=dao
18-09-27 17:45:24.646 DEBUG [RMI TCP Connection(2)-127.0.0.1] Found IocObject(dao) in JsonLoader(paths=[ioc/])
18-09-27 17:45:24.646 DEBUG [RMI TCP Connection(2)-127.0.0.1] 	 >> Make...'dao'<interface org.nutz.dao.Dao>
18-09-27 17:45:24.646 DEBUG [RMI TCP Connection(2)-127.0.0.1] Save object 'dao' to [app] 
18-09-27 17:45:24.648 DEBUG [RMI TCP Connection(2)-127.0.0.1] Get 'dataSource'<>
18-09-27 17:45:24.658 DEBUG [RMI TCP Connection(2)-127.0.0.1] 	 >> Load definition name=dataSource
18-09-27 17:45:24.673 DEBUG [RMI TCP Connection(2)-127.0.0.1] Found IocObject(dataSource) in JsonLoader(paths=[ioc/])
18-09-27 17:45:24.674 DEBUG [RMI TCP Connection(2)-127.0.0.1] 	 >> Make...'dataSource'<>
18-09-27 17:45:24.675 DEBUG [RMI TCP Connection(2)-127.0.0.1] Save object 'dataSource' to [app] 
18-09-27 17:45:24.719 DEBUG [RMI TCP Connection(2)-127.0.0.1] Load class com.alibaba.druid.pool.DruidDataSource without AOP
九月 27, 2018 5:45:25 下午 com.alibaba.druid.pool.DruidDataSource info
信息: {dataSource-1} inited
18-09-27 17:45:25.275 DEBUG [RMI TCP Connection(2)-127.0.0.1] Load class org.nutz.dao.impl.NutDao without AOP
18-09-27 17:45:25.276 DEBUG [RMI TCP Connection(2)-127.0.0.1] Get 'dataSource'<>
18-09-27 17:45:25.449 DEBUG [RMI TCP Connection(2)-127.0.0.1] Jdbcs init complete
18-09-27 17:45:25.449 INFO [RMI TCP Connection(2)-127.0.0.1] Get Connection from DataSource for JdbcExpert, if you lock at here, check your database server and configure
18-09-27 17:45:25.686 DEBUG [RMI TCP Connection(2)-127.0.0.1] select expert : org.nutz.dao.impl.jdbc.mysql.MysqlJdbcExpert
18-09-27 17:45:25.693 DEBUG [RMI TCP Connection(2)-127.0.0.1] JDBC Driver --> mysql-connector-java-5.1.40 ( Revision: 402933ef52cad9aa82624e80acbea46e3a701ce6 )
18-09-27 17:45:25.693 DEBUG [RMI TCP Connection(2)-127.0.0.1] JDBC Name   --> MySQL Connector Java
18-09-27 17:45:25.693 DEBUG [RMI TCP Connection(2)-127.0.0.1] JDBC URL    --> jdbc:mysql://127.0.0.1:3306/nutzdemo
18-09-27 17:45:25.702 DEBUG [RMI TCP Connection(2)-127.0.0.1] Mysql : character_set_client=utf8
18-09-27 17:45:25.702 DEBUG [RMI TCP Connection(2)-127.0.0.1] Mysql : character_set_connection=utf8
18-09-27 17:45:25.702 DEBUG [RMI TCP Connection(2)-127.0.0.1] Mysql : character_set_database=utf8
18-09-27 17:45:25.702 DEBUG [RMI TCP Connection(2)-127.0.0.1] Mysql : character_set_filesystem=binary
18-09-27 17:45:25.702 DEBUG [RMI TCP Connection(2)-127.0.0.1] Mysql : character_set_results=
18-09-27 17:45:25.703 DEBUG [RMI TCP Connection(2)-127.0.0.1] Mysql : character_set_server=utf8
18-09-27 17:45:25.703 DEBUG [RMI TCP Connection(2)-127.0.0.1] Mysql : character_set_system=utf8
18-09-27 17:45:25.703 DEBUG [RMI TCP Connection(2)-127.0.0.1] Mysql : character_sets_dir=C:\Program Files (x86)\MySQL\MySQL Server 5.5\share\charsets\
18-09-27 17:45:25.704 DEBUG [RMI TCP Connection(2)-127.0.0.1] Mysql : binlog_format=STATEMENT
18-09-27 17:45:25.705 DEBUG [RMI TCP Connection(2)-127.0.0.1] Mysql : database=nutzdemo
18-09-27 17:45:25.705 DEBUG [RMI TCP Connection(2)-127.0.0.1] Mysql : user=root@localhost
18-09-27 17:45:25.722 DEBUG [RMI TCP Connection(2)-127.0.0.1] Database info --> MYSQL:[MySQL - 5.5.21]
18-09-27 17:45:25.764 DEBUG [RMI TCP Connection(2)-127.0.0.1] Found 1 resource by src( com/nutz/nutzbook/util/ ) , regex( ^.+[.]class$ )
18-09-27 17:45:25.773 DEBUG [RMI TCP Connection(2)-127.0.0.1] SELECT COUNT(*) FROM t_user 
18-09-27 17:45:25.774 INFO [RMI TCP Connection(2)-127.0.0.1] Nutz.Mvc[nutz] is up in 1499ms
[2018-09-27 05:45:25,802] Artifact nutzbook:war exploded: Artifact is deployed successfully
[2018-09-27 05:45:25,803] Artifact nutzbook:war exploded: Deploy took 2,489 milliseconds
18-09-27 17:45:26.089 DEBUG [http-bio-8888-exec-1] Search mapping for [GET] path=/nutzbook : NOT Action match
18-09-27 17:45:27.298 DEBUG [http-bio-8888-exec-5] Search mapping for [GET] path=/nutzbook : NOT Action match
18-09-27 17:45:33.178 DEBUG [http-bio-8888-exec-5] Search mapping for [GET] path=/nutzbook : NOT Action match
九月 27, 2018 5:45:33 下午 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deploying web application directory E:\Program Files\apache-tomcat-7.0.81\webapps\manager
九月 27, 2018 5:45:33 下午 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.
九月 27, 2018 5:45:33 下午 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deployment of web application directory E:\Program Files\apache-tomcat-7.0.81\webapps\manager has finished in 79 ms
18-09-27 17:45:41.489 DEBUG [http-bio-8888-exec-5] Search mapping for [GET] path=/user/count : NOT Action match

package com.nutz.nutzbook;

import com.nutz.nutzbook.util.MainSetup;
import org.nutz.mvc.annotation.IocBy;
import org.nutz.mvc.annotation.Modules;
import org.nutz.mvc.annotation.SetupBy;
import org.nutz.mvc.ioc.provider.ComboIocProvider;

@SetupBy(value = MainSetup.class)
// 请注意星号!!不要拷贝少了
@IocBy(type=ComboIocProvider.class, args={"*js", "ioc/",
        // 这个package下所有带@IocBean注解的类,都会登记上
        "*anno", "com.nutz.nutzbook",
        "*tx", // 事务拦截 aop
        "*async"}) // 异步执行aop


@Modules(scanPackage = true,packages="com.nutz.nutzbook")
public class MainModule {

}

package com.nutz.nutzbook.module;

import com.nutz.nutzbook.pojo.User;
import org.nutz.dao.Dao;
import org.nutz.ioc.loader.annotation.Inject;
import org.nutz.ioc.loader.annotation.IocBean;
import org.nutz.mvc.annotation.At;
import org.nutz.mvc.annotation.Fail;
import org.nutz.mvc.annotation.Ok;

import java.util.Date;

@IocBean
@At("/user")
@Ok("json")
@Fail("http :500")
public class UserModule {

    @Inject
    protected Dao dao;//就这么注入了,有@IocBean他才会生效

    @At
    public int count(){
        return dao.count(User.class);
    }
}

8-09-27 17:45:24.514 INFO [RMI TCP Connection(2)-127.0.0.1] Resource can't map to Class, Resource Module/UserModule.class

最初写的com.nutz.nutzbook.Module.UserModule ??然后发现大小写错了, 改成module了?? 但文件系统上没有变, 删掉重新写UserModule吧

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