NutzCN Logo
问答 nutz同样控制层下,有些请求无法访问
发布于 1744天前 作者 hryc 1647 次浏览 复制 上一个帖子 下一个帖子
标签:
[DEBUG] 12:12:44.441 [main-SendThread(120.92.153.163:2181)] org.apache.zookeeper.ClientCnxn - Got ping response for sessionid: 0x170042d433205ac after 12ms
[DEBUG] 12:12:44.803 [qtp527247308-35] org.apache.shiro.web.servlet.SimpleCookie - Found 'sid' cookie value [qqefa94qb4gdbo5v0d79kmbhnb]
[DEBUG] 12:12:44.803 [qtp527247308-35] org.nutz.mvc.impl.UrlMappingImpl - Found mapping for [GET] path=/open/api/pc/home/getLogo : ApiPcHomeController.getLogo(ApiPcHomeController.java:156)
[DEBUG] 12:12:44.803 [qtp527247308-35] org.nutz.ioc.impl.NutIoc - Get 'apiPcHomeController'<class cn.wizzer.app.web.modules.controllers.front.pc.memberRegister.ApiPcHomeController>
[DEBUG] 12:12:44.804 [qtp527247308-35] io.seata.integration.dubbo.alibaba.TransactionPropagationFilter - xid in RootContext[null] xid in RpcContext[null]
[DEBUG] 12:12:44.826 [qtp527247308-35] cn.wizzer.app.web.commons.processor.LogTimeProcessor - [GET ]URI=/open/api/pc/home/getLogo 23ms
[DEBUG] 12:12:45.167 [qtp527247308-28] org.apache.shiro.web.servlet.SimpleCookie - Found 'sid' cookie value [qqefa94qb4gdbo5v0d79kmbhnb]
[DEBUG] 12:12:45.168 [qtp527247308-28] org.nutz.mvc.impl.UrlMappingImpl - Search mapping for [GET] path=/open/api/pc/home/getCarousel : NOT Action match
[DEBUG] 12:12:45.169 [qtp527247308-87] org.apache.shiro.web.servlet.SimpleCookie - Found 'sid' cookie value [qqefa94qb4gdbo5v0d79kmbhnb]
[DEBUG] 12:12:45.169 [qtp527247308-37] org.apache.shiro.web.servlet.SimpleCookie - Found 'sid' cookie value [qqefa94qb4gdbo5v0d79kmbhnb]
[DEBUG] 12:12:45.170 [qtp527247308-87] org.nutz.mvc.impl.UrlMappingImpl - Search mapping for [GET] path=/open/api/pc/home/getLive : NOT Action match
[DEBUG] 12:12:45.170 [qtp527247308-37] org.nutz.mvc.impl.UrlMappingImpl - Search mapping for [POST] path=/open/api/pc/home/getCourse : NOT Action match
[DEBUG] 12:12:45.173 [qtp527247308-31] org.apache.shiro.web.servlet.SimpleCookie - Found 'sid' cookie value [qqefa94qb4gdbo5v0d79kmbhnb]
[DEBUG] 12:12:45.173 [qtp527247308-31] org.nutz.mvc.impl.UrlMappingImpl - Search mapping for [GET] path=/open/api/pc/home/getOutLink : NOT Action match
[DEBUG] 12:12:45.174 [qtp527247308-86] org.apache.shiro.web.servlet.SimpleCookie - Found 'sid' cookie value [qqefa94qb4gdbo5v0d79kmbhnb]
[DEBUG] 12:12:45.174 [qtp527247308-86] org.nutz.mvc.impl.UrlMappingImpl - Search mapping for [GET] path=/open/api/pc/home/getNotice : NOT Action match
[DEBUG] 12:12:45.178 [qtp527247308-35] org.apache.shiro.web.servlet.SimpleCookie - Found 'sid' cookie value [qqefa94qb4gdbo5v0d79kmbhnb]
[DEBUG] 12:12:45.178 [qtp527247308-28] org.apache.shiro.web.servlet.SimpleCookie - Found 'sid' cookie value [qqefa94qb4gdbo5v0d79kmbhnb]
[DEBUG] 12:12:45.179 [qtp527247308-28] org.nutz.mvc.impl.UrlMappingImpl - Found mapping for [GET] path=/open/api/pc/home/getExam : ApiPcHomeController.getExam(ApiPcHomeController.java:384)
[DEBUG] 12:12:45.179 [qtp527247308-35] org.nutz.mvc.impl.UrlMappingImpl - Found mapping for [GET] path=/open/api/pc/home/getClass : ApiPcHomeController.getClass(ApiPcHomeController.java:367)
[DEBUG] 12:12:45.179 [qtp527247308-35] org.nutz.ioc.impl.NutIoc - Get 'apiPcHomeController'<class cn.wizzer.app.web.modules.controllers.front.pc.memberRegister.ApiPcHomeController>
[DEBUG] 12:12:45.179 [qtp527247308-28] org.nutz.ioc.impl.NutIoc - Get 'apiPcHomeController'<class cn.wizzer.app.web.modules.controllers.front.pc.memberRegister.ApiPcHomeController>
[DEBUG] 12:12:45.179 [qtp527247308-28] io.seata.integration.dubbo.alibaba.TransactionPropagationFilter - xid in RootContext[null] xid in RpcContext[null]
[DEBUG] 12:12:45.179 [qtp527247308-35] io.seata.integration.dubbo.alibaba.TransactionPropagationFilter - xid in RootContext[null] xid in RpcContext[null]
[DEBUG] 12:12:45.182 [qtp527247308-35] io.seata.integration.dubbo.alibaba.TransactionPropagationFilter - xid in RootContext[null] xid in RpcContext[null]
[DEBUG] 12:12:45.213 [qtp527247308-28] cn.wizzer.app.web.commons.processor.LogTimeProcessor - [GET ]URI=/open/api/pc/home/getExam 34ms
[DEBUG] 12:12:45.213 [qtp527247308-35] io.seata.integration.dubbo.alibaba.TransactionPropagationFilter - xid in RootContext[null] xid in RpcContext[null]
[DEBUG] 12:12:45.229 [qtp527247308-35] io.seata.integration.dubbo.alibaba.TransactionPropagationFilter - xid in RootContext[null] xid in RpcContext[null]
[DEBUG] 12:12:45.244 [qtp527247308-35] io.seata.integration.dubbo.alibaba.TransactionPropagationFilter - xid in RootContext[null] xid in RpcContext[null]
[DEBUG] 12:12:45.261 [qtp527247308-35] io.seata.integration.dubbo.alibaba.TransactionPropagationFilter - xid in RootContext[null] xid in RpcContext[null]
[DEBUG] 12:12:45.320 [qtp527247308-35] io.seata.integration.dubbo.alibaba.TransactionPropagationFilter - xid in RootContext[null] xid in RpcContext[null]
[DEBUG] 12:12:45.335 [qtp527247308-35] io.seata.integration.dubbo.alibaba.TransactionPropagationFilter - xid in RootContext[null] xid in RpcContext[null]
[DEBUG] 12:12:45.350 [qtp527247308-35] io.seata.integration.dubbo.alibaba.TransactionPropagationFilter - xid in RootContext[null] xid in RpcContext[null]
[DEBUG] 12:12:45.806 [NettyClientSelector_TMROLE_1] io.seata.core.rpc.netty.AbstractRpcRemotingClient - will send ping msg,channel[id: 0x2150590a, L:/10.204.27.221:57233 - R:/120.92.153.163:8091]
[DEBUG] 12:12:45.806 [NettyClientSelector_TMROLE_1] io.seata.core.rpc.netty.AbstractRpcRemoting - write message:services ping, channel:[id: 0x2150590a, L:/10.204.27.221:57233 - R:/120.92.153.163:8091],active?true,writable?true,isopen?true
[DEBUG] 12:12:45.821 [NettyClientSelector_TMROLE_1] io.seata.core.rpc.netty.AbstractRpcRemotingClient - received PONG from /120.92.153.163:8091

在同一个控制层下有的请求正常,有的请求却访问不了
比如:open/api/pc/home/getLogo 这个就是正常的
open/api/pc/home/getCarousel 这个访问就是404
控制层代码

@IocBean
@At("/open/api/pc/home")
public class ApiPcHomeController {
@At("/getLogo")
    @Ok("json")
    public Object getLogo(String shopId) {
 @At(value = "/getCarousel")
    @Ok("json")
    private Object getCarousel(String shopId) {
5 回复

@qq_0e08b035 重新编译并install试试

问题找到了,nutz还是有点不同的
请求不到的方法使用private修饰的
不过在springMVC里没有这个问题

改成public 就好了

只能public, 都对外服务了, 怎么能private呢

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