配置文件如下
shiro.url.login=/login
shiro.url.unauth=/login/unauth
shiro.ini.urls:
/sys/** = authc
/monitor/** = authc
/tool/** = authc
/cms/** = authc
/wx/** = authc
/index = authc
/druid/** =authc
/swagger/** =authc
/login = anon
/static/** = anon
/open/** = anon
报错信息如下
[DEBUG] 14:36:15.387 org.apache.shiro.web.env.IniWebEnvironment.convertPathToIni(IniWebEnvironment.java:348) - Unable to load optional path 'classpath:shiro.ini'.
java.io.IOException: Resource [classpath:shiro.ini] could not be found.
at org.apache.shiro.io.ResourceUtils.getInputStreamForPath(ResourceUtils.java:139)
at org.apache.shiro.web.env.IniWebEnvironment.convertPathToIni(IniWebEnvironment.java:342)
at org.apache.shiro.web.env.IniWebEnvironment.createIni(IniWebEnvironment.java:244)
at org.apache.shiro.web.env.IniWebEnvironment.getDefaultIni(IniWebEnvironment.java:215)
at org.apache.shiro.web.env.IniWebEnvironment.parseConfig(IniWebEnvironment.java:101)
at org.apache.shiro.web.env.IniWebEnvironment.init(IniWebEnvironment.java:69)
at org.apache.shiro.util.LifecycleUtils.init(LifecycleUtils.java:45)
at org.apache.shiro.util.LifecycleUtils.init(LifecycleUtils.java:40)
at org.apache.shiro.web.env.EnvironmentLoader.createEnvironment(EnvironmentLoader.java:313)
at org.apache.shiro.web.env.EnvironmentLoader.initEnvironment(EnvironmentLoader.java:139)
at org.apache.shiro.web.env.EnvironmentLoaderListener.contextInitialized(EnvironmentLoaderListener.java:58)
at org.nutz.boot.starter.shiro.NbShiroEnvironmentLoaderListener.contextInitialized(NbShiroEnvironmentLoaderListener.java:40)
at org.nutz.boot.starter.servlet3.NbServletContextListener.lambda$contextInitialized$1(NbServletContextListener.java:119)
at java.util.ArrayList.forEach(ArrayList.java:1257)
at org.nutz.boot.starter.servlet3.NbServletContextListener.contextInitialized(NbServletContextListener.java:114)
at org.eclipse.jetty.server.handler.ContextHandler.callContextInitialized(ContextHandler.java:929)
at org.eclipse.jetty.servlet.ServletContextHandler.callContextInitialized(ServletContextHandler.java:554)
at org.eclipse.jetty.server.handler.ContextHandler.startContext(ContextHandler.java:888)
at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:357)
at org.eclipse.jetty.webapp.WebAppContext.startWebapp(WebAppContext.java:1443)
at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1407)
at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:821)
at org.eclipse.jetty.servlet.ServletContextHandler.doStart(ServletContextHandler.java:276)
at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:524)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:72)
at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:169)
at org.eclipse.jetty.server.Server.start(Server.java:407)
at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:110)
at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:106)
at org.eclipse.jetty.server.Server.doStart(Server.java:371)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:72)
at org.nutz.boot.starter.jetty.JettyStarter.start(JettyStarter.java:160)
at org.nutz.boot.AppContext.startServers(AppContext.java:310)
at org.nutz.boot.NbApp.execute(NbApp.java:210)
at org.nutz.boot.NbApp.run(NbApp.java:182)
at io.nutz.demo.dubbo.rpc.DubboRpcTimeClientLauncher.main(DubboRpcTimeClientLauncher.java:27)
[ERROR] 14:36:15.390 org.apache.shiro.web.env.EnvironmentLoader.initEnvironment(EnvironmentLoader.java:152) - Shiro environment initialization failed
org.apache.shiro.config.ConfigurationException: Shiro INI configuration was either not found or discovered to be empty/unconfigured.
at org.apache.shiro.web.env.IniWebEnvironment.parseConfig(IniWebEnvironment.java:110)
at org.apache.shiro.web.env.IniWebEnvironment.init(IniWebEnvironment.java:69)
at org.apache.shiro.util.LifecycleUtils.init(LifecycleUtils.java:45)
at org.apache.shiro.util.LifecycleUtils.init(LifecycleUtils.java:40)
at org.apache.shiro.web.env.EnvironmentLoader.createEnvironment(EnvironmentLoader.java:313)
at org.apache.shiro.web.env.EnvironmentLoader.initEnvironment(EnvironmentLoader.java:139)
at org.apache.shiro.web.env.EnvironmentLoaderListener.contextInitialized(EnvironmentLoaderListener.java:58)
at org.nutz.boot.starter.shiro.NbShiroEnvironmentLoaderListener.contextInitialized(NbShiroEnvironmentLoaderListener.java:40)
at org.nutz.boot.starter.servlet3.NbServletContextListener.lambda$contextInitialized$1(NbServletContextListener.java:119)
at java.util.ArrayList.forEach(ArrayList.java:1257)
at org.nutz.boot.starter.servlet3.NbServletContextListener.contextInitialized(NbServletContextListener.java:114)
at org.eclipse.jetty.server.handler.ContextHandler.callContextInitialized(ContextHandler.java:929)
at org.eclipse.jetty.servlet.ServletContextHandler.callContextInitialized(ServletContextHandler.java:554)
at org.eclipse.jetty.server.handler.ContextHandler.startContext(ContextHandler.java:888)
at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:357)
at org.eclipse.jetty.webapp.WebAppContext.startWebapp(WebAppContext.java:1443)
at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1407)
at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:821)
at org.eclipse.jetty.servlet.ServletContextHandler.doStart(ServletContextHandler.java:276)
at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:524)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:72)
at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:169)
at org.eclipse.jetty.server.Server.start(Server.java:407)
at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:110)
at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:106)
at org.eclipse.jetty.server.Server.doStart(Server.java:371)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:72)
at org.nutz.boot.starter.jetty.JettyStarter.start(JettyStarter.java:160)
at org.nutz.boot.AppContext.startServers(AppContext.java:310)
at org.nutz.boot.NbApp.execute(NbApp.java:210)
at org.nutz.boot.NbApp.run(NbApp.java:182)
at io.nutz.demo.dubbo.rpc.DubboRpcTimeClientLauncher.main(DubboRpcTimeClientLauncher.java:27)
[WARN ] 14:36:15.390 org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:533) - Failed startup of context o.e.j.w.WebAppContext@288214b1{/,[file:///Users/apple/IdeaProjects/nutzboot/nutzboot-demo/nutzboot-demo-dubbo/nutzboot-demo-dubbo-rpc-client/target/classes/static/, jar:file:/Users/apple/.m2/repository/org/nutz/nutzboot-starter-swagger/2.3.9-SNAPSHOT/nutzboot-starter-swagger-2.3.9-20191101.064539-6.jar!/static/],UNAVAILABLE}
org.apache.shiro.config.ConfigurationException: Shiro INI configuration was either not found or discovered to be empty/unconfigured.
at org.apache.shiro.web.env.IniWebEnvironment.parseConfig(IniWebEnvironment.java:110)
at org.apache.shiro.web.env.IniWebEnvironment.init(IniWebEnvironment.java:69)
at org.apache.shiro.util.LifecycleUtils.init(LifecycleUtils.java:45)
at org.apache.shiro.util.LifecycleUtils.init(LifecycleUtils.java:40)
at org.apache.shiro.web.env.EnvironmentLoader.createEnvironment(EnvironmentLoader.java:313)
at org.apache.shiro.web.env.EnvironmentLoader.initEnvironment(EnvironmentLoader.java:139)
at org.apache.shiro.web.env.EnvironmentLoaderListener.contextInitialized(EnvironmentLoaderListener.java:58)
at org.nutz.boot.starter.shiro.NbShiroEnvironmentLoaderListener.contextInitialized(NbShiroEnvironmentLoaderListener.java:40)
at org.nutz.boot.starter.servlet3.NbServletContextListener.lambda$contextInitialized$1(NbServletContextListener.java:119)
at java.util.ArrayList.forEach(ArrayList.java:1257)
at org.nutz.boot.starter.servlet3.NbServletContextListener.contextInitialized(NbServletContextListener.java:114)
at org.eclipse.jetty.server.handler.ContextHandler.callContextInitialized(ContextHandler.java:929)
at org.eclipse.jetty.servlet.ServletContextHandler.callContextInitialized(ServletContextHandler.java:554)
at org.eclipse.jetty.server.handler.ContextHandler.startContext(ContextHandler.java:888)
at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:357)
at org.eclipse.jetty.webapp.WebAppContext.startWebapp(WebAppContext.java:1443)
at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1407)
at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:821)
at org.eclipse.jetty.servlet.ServletContextHandler.doStart(ServletContextHandler.java:276)
at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:524)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:72)
at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:169)
at org.eclipse.jetty.server.Server.start(Server.java:407)
at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:110)
at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:106)
at org.eclipse.jetty.server.Server.doStart(Server.java:371)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:72)
at org.nutz.boot.starter.jetty.JettyStarter.start(JettyStarter.java:160)
at org.nutz.boot.AppContext.startServers(AppContext.java:310)
at org.nutz.boot.NbApp.execute(NbApp.java:210)
at org.nutz.boot.NbApp.run(NbApp.java:182)
at io.nutz.demo.dubbo.rpc.DubboRpcTimeClientLauncher.main(DubboRpcTimeClientLauncher.java:27)
[ERROR] 14:36:15.393 org.nutz.boot.NbApp.execute(NbApp.java:224) - something happen!!
java.io.IOException: Failed to bind to /0.0.0.0:8080
at org.eclipse.jetty.server.ServerConnector.openAcceptChannel(ServerConnector.java:346)
at org.eclipse.jetty.server.ServerConnector.open(ServerConnector.java:307)
at org.eclipse.jetty.server.AbstractNetworkConnector.doStart(AbstractNetworkConnector.java:80)
at org.eclipse.jetty.server.ServerConnector.doStart(ServerConnector.java:231)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:72)
at org.eclipse.jetty.server.Server.doStart(Server.java:385)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:72)
at org.nutz.boot.starter.jetty.JettyStarter.start(JettyStarter.java:160)
at org.nutz.boot.AppContext.startServers(AppContext.java:310)
at org.nutz.boot.NbApp.execute(NbApp.java:210)
at org.nutz.boot.NbApp.run(NbApp.java:182)
at io.nutz.demo.dubbo.rpc.DubboRpcTimeClientLauncher.main(DubboRpcTimeClientLauncher.java:27)
Caused by: java.net.BindException: Address already in use
at sun.nio.ch.Net.bind0(Native Method)
at sun.nio.ch.Net.bind(Net.java:433)
at sun.nio.ch.Net.bind(Net.java:425)
at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:223)
at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:74)
at org.eclipse.jetty.server.ServerConnector.openAcceptChannel(ServerConnector.java:342)
... 11 more
不知道为什么 求大神解答