asp.net post 请求需要传Asp.net_Sessionid 10C

post 请求需要传Asp.net_Sessionid 哪位大神知道这个怎么获取,然后再传过去

5个回答

在你的response.Headers.Get("Set-Cookie")里可以得到Sessionid,之后的请求在Cookie里带上就可以。
具体看 https://www.cnblogs.com/guohu/p/5438131.html

ghj8480960
ghj8480960 PostForm(string url, Dictionary<string, string> form) 就用你这个方法获取完是null
一年多之前 回复
showbo
支付宝加好友偷能量挖 回复ghj8480960: 先用httprequest请求一个页面用cookiecontainer接收cookie,后续请求附带上cookiecontainer的值
一年多之前 回复
ghj8480960
ghj8480960 回复caozhy: 获取完为null
一年多之前 回复
caozhy
贵阳老马马善福专业维修游泳池堵漏防水工程 回复ghj8480960: 或者你需要先请求一个“登录页面”以便获取session id
一年多之前 回复
caozhy
贵阳老马马善福专业维修游泳池堵漏防水工程 回复ghj8480960: 第一次请求肯定没有,也不需要
一年多之前 回复
ghj8480960
ghj8480960 请求的时候就需要这个东西,没有这个东西就请求不了啊?
一年多之前 回复
qq_27848369
hot2dog enen 是的
一年多之前 回复

请求的时候就需要这个东西,没有这个东西就请求不了啊?

图片说明

先使用一个一般处理程序Get获得SessionId,然后再Post就可以了

Post方法改为用JS提交

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
其他相关推荐
产生了2个ASP.NET_SessionId
在我的电脑上访问公司用.net mvc的开发的网站,有2个ASP.NET_SessionId, 用fiddler拦截到的截图如下,![图片说明](https://img-ask.csdn.net/upload/201707/28/1501206924_334276.png) 在其他电脑上访问同一网站,只会产生一个ASP.NET_SessionId,非guid的那个,请大神赐教。
ASP.NET MVC SessionID每次都变化
![图片说明](https://img-ask.csdn.net/upload/201612/16/1481875622_466105.png) 如上图,如果我加这2个方法,SessionID就不会每次都变化了,要不然,我每次打开一个页面,SessionID 就会不一样
Java项目运行后点击登录就一直在缓冲
reach acegiajaxfilter Hibernate: select operator0_.opUserName as opUserName4_0_, operator0_.opAddress as opAddress4_0_, operator0_.opCreateTime as opCreate3_4_0_, operator0_.opMobile as opMobile4_0_, operator0_.opName as opName4_0_, operator0_.opPassword as opPassword4_0_, operator0_.opPrivilege as opPrivil7_4_0_, operator0_.opTelephone as opTeleph8_4_0_, operator0_.opZip as opZip4_0_ from tb_operator operator0_ where operator0_.opUserName=? 2017-04-07 12:00:18,248 INFO [com.hotelmaster.home.security.HotelUserDetailService] - <Username admin loaded successfully.> 2017-04-07 12:00:18,250 WARN [org.acegisecurity.event.authentication.LoggerListener] - <Authentication event AuthenticationSuccessEvent: admin; details: org.acegisecurity.ui.WebAuthenticationDetails@166c8: RemoteIpAddress: 0:0:0:0:0:0:0:1; SessionId: 12FC60406E142A7CB117A6CF32B8AE18> 2017-04-07 12:00:18,250 WARN [org.acegisecurity.event.authentication.LoggerListener] - <Authentication event InteractiveAuthenticationSuccessEvent: admin; details: org.acegisecurity.ui.WebAuthenticationDetails@166c8: RemoteIpAddress: 0:0:0:0:0:0:0:1; SessionId: 12FC60406E142A7CB117A6CF32B8AE18> 2017-04-07 12:00:18,318 INFO [com.hotelmaster.action.FrontdeskController] - <Someone come from ip address <0:0:0:0:0:0:0:1>> reach frontdeskcontroller init Hibernate: select reservorde0_.roId as roId2_, reservorde0_.roCreateTime as roCreate2_2_, reservorde0_.roEarliestTime as roEarlie3_2_, reservorde0_.roEmail as roEmail2_, reservorde0_.roFax as roFax2_, reservorde0_.roGroupName as roGroupN6_2_, reservorde0_.roGuestCardCatalog as roGuestC7_2_, reservorde0_.roGuestCardId as roGuestC8_2_, reservorde0_.roGuestGender as roGuestG9_2_, reservorde0_.roGuestName as roGuest10_2_, reservorde0_.roInDateTime as roInDat11_2_, reservorde0_.roLatestTime as roLates12_2_, reservorde0_.roOperator as roOperator2_, reservorde0_.roOrderId as roOrderId2_, reservorde0_.roPaidMoney as roPaidM15_2_, reservorde0_.roPaymentModel as roPayme16_2_, reservorde0_.roPreAssignRoom as roPreAs17_2_, reservorde0_.roPreOutDateTime as roPreOu18_2_, reservorde0_.roRemark as roRemark2_, reservorde0_.roReservModel as roReser20_2_, reservorde0_.roReservState as roReser21_2_, reservorde0_.roTelphone as roTelphone2_, reservorde0_.roTotalRate as roTotal23_2_ from tb_reservorder reservorde0_ where reservorde0_.roInDateTime=? Hibernate: select room0_.rmId as rmId0_, room0_.rmArea as rmArea0_, room0_.rmAvailable as rmAvaila3_0_, room0_.rmCatalog as rmCatalog0_, room0_.rmFloor as rmFloor0_, room0_.rmPicture as rmPicture0_, room0_.rmPrctDiscount as rmPrctDi7_0_, room0_.rmPrctPrice as rmPrctPr8_0_, room0_.rmState as rmState0_, room0_.rmTelphone as rmTelphone0_ from tb_room room0_ where room0_.rmState='1' ![图片说明](https://img-ask.csdn.net/upload/201704/07/1491550030_536776.jpg) ``` ```
scrapy爬虫post请求,参数以回车隔开如何爬取
我再爬取一个ashx网页时,它的post请求参数是已回车换行隔开的而不是以'&'符号,我在spider里应该怎么写呢,求赐教 网页是:http://www.lzggzyjy.cn/InfoPage/InfoList.aspx?SiteItem=38 我这样写: def start_requests(self): body1={'currentPage':'1','Query':''} yield FormRequest('http://www.lzggzyjy.cn/ajax/Controls_InfoListControl,App_Web_czrtjgzk.ashx?_method=getCurrentData&_session=rw', headers = {"Content-Type": "text/plain;charset=UTF-8"},callback=self.parse,formdata=body1,method ='POST',cookies= {"ASP.NET_SessionId":"qpzxibfguvi452oujhorwdi5","SERVERID":"0c51fcf27e5a43864444c2a531b3c0e0|1482238131|1482234645"}) 报错:new Object();r.error = new ajax_error('System.ArgumentException','类型“System.DBNull”的对象无法转换为类型“System.Int32”。',0)
Spring boot项目,使用IP访问正常,使用域名访问时请求头出现多个JSESSIONID
如题 Spring Boot + shiro + freemarker项目,使用IP访问一切正常,切换为域名访问就出现异常了,导致后台无法正常提取session 如图: ![图片说明](https://img-ask.csdn.net/upload/202001/15/1579089726_304557.png) 第二个sessionid才是系统后台生成的,第一个不知道怎么来的 请大神帮忙!!
asp.net sessionState设置后session值永远第一个怎么回事?
1.将Session的mode设置为StateServer以后,发现Session取值老是取到第一个赋值的值。打个比方 比如Session["V"]="1236",一会不管你怎么赋值,Session["V"]=“aaa”,调式的时候发现Session["V"]的值是aaa,但是实际取的值就是Session["V"]=“1236”。 上面是简单描述,下面的代码:(具体问题在图片最后) (用ajax实现向后台获取进度条的值,Session用来保存进度条的值) 图2.ascx用户控件前台js: ![图片说明](https://img-ask.csdn.net/upload/201502/13/1423841133_906229.jpg) 图3.ascx后台cs代码: ![图片说明](https://img-ask.csdn.net/upload/201502/13/1423841164_515577.jpg) 图4.用于处理ajax请求的ashx文件 ![图片说明](https://img-ask.csdn.net/upload/201502/13/1423841217_563558.jpg) 图5.在aspx页面上调用这个控 ![图片说明](https://img-ask.csdn.net/upload/201502/13/1423841235_430436.jpg) 上面的代码在正常情况下可以正常运行,但是在webconfig里面加了..session的配置之后,就出现了问题 加了这句:<sessionState mode="StateServer" cookieless="false" timeout="30" stateConnectionString="tcpip=127.0.0.1:42424" stateNetworkTimeout="10"/> 主要是:图3里面的SetValue函数调式发现 Session["McsBarValue"] = value;一直都是在变的, 这个value就是图5里面的i,但是在图4里面(ashx文件)发现context.Session["McsBarValue"]一直都是0,这个0就是开始的第一个值。而且这两个SessionID是一样的。 但是只要我把<sessionState mode="StateServer" cookieless="false" timeout="30" stateConnectionString="tcpip=127.0.0.1:42424" stateNetworkTimeout="10"/>去了就一切正常了。 我怀疑过是Session缓存的问题,但是不懂怎么删除缓存,因为全部都删掉的话,那保存登陆信息的Session也被清掉了
ORA-01691: Lob 段 SYS_xxxx无法通过 1024 (在表空间中) 扩展
java.sql.SQLException: ORA-01691: Lob 段 GWTRAVEL.SYS_LOB0000104910C00003$$ 无法通过 1024 (在表空间 GWTRAVEL 中) 扩展 ORA-06512: 在 "GWTRAVEL.CALL_POST_WEB", line 49 ORA-29266: 已达到正文的末尾 **存储过程如下:** create or replace procedure CALL_POST_WEB( requrl in varchar2 , reqbody in varchar2 , sessionId in INTEGER,resenv out clob,statuscode out NUMBER, newSessionId out INTEGER) IS http_req UTL_HTTP.REQ; http_Resp UTL_HTTP.RESP; request_env VARCHAR2(32767); l_Replyline VARCHAR2(32767); http_url VARCHAR2(1000); UUID VARCHAR2(32); respText clob; begin request_env := reqbody; http_url := requrl; if sessionId is not null then RESTORE_COOKIES(sessionId); end if; http_req:=Utl_Http.begin_request(http_url,'POST',UTL_HTTP.http_version_1_1); Utl_Http.Set_Persistent_Conn_Support(http_req, TRUE); --set header UTL_HTTP.set_header(http_req, 'Accept', 'application/json;charset=UTF-8'); UTL_HTTP.set_header(http_req, 'Accept-Encoding', 'gzip, deflate'); UTL_HTTP.set_header(http_req, 'Accept-Language', 'zh-CN,zh;q=0.8,en-US;q=0.5,en;q=0.3'); Utl_Http.set_header(http_req, 'Connection', 'keep-alive'); Utl_Http.Set_Header(http_req, 'Content-Length', Lengthb(request_env)); Utl_Http.set_header(http_req, 'Content-Type','application/json;charset=UTF-8'); Utl_Http.Set_Body_Charset(http_req, 'utf-8'); Utl_Http.Write_Line(http_req, request_env); http_Resp := Utl_Http.Get_Response(http_req); statuscode := http_Resp.status_code; if sessionId is null then newSessionId:=save_cookies(); end if; -- dbms_output.put_line(statuscode); begin select sys_guid() into UUID from dual; dbms_lob.createtemporary(respText,true); loop Utl_Http.read_text(http_Resp, l_Replyline,800); dbms_lob.append(respText,to_clob(l_Replyline)); end loop; end; EXCEPTION WHEN utl_http.end_of_body THEN resenv:= UUID; insert into DATA_RECV values(UUID,http_url,respText,sysdate); commit; Utl_Http.end_response(http_Resp); UTL_TCP.CLOSE_ALL_CONNECTIONS(); when others then statuscode := -99; resenv := 'error!'; Utl_Http.end_response(http_Resp); Utl_Http.end_request(http_req); UTL_TCP.CLOSE_ALL_CONNECTIONS(); --dbms_output.put_line(statuscode); --dbms_output.put_line(resenv); raise; end CALL_POST_WEB; 问题: 显示在insert into DATA_RECV values(UUID,http_url,respText,sysdate);报错 错误信息: ORA-06512: 在 "GWTRAVEL.CALL_POST_WEB", line 49 ORA-29266: 已达到正文的末尾 求大神帮忙解决
我这样做asp.net异步文件上传进度条
前台两个请求  1.上传文件的请求  2.获取上传进度的请求 1. ``` $("#ufrm").ajaxSubmit({ url: "ReceivFile.ashx", type: "post", success: function (data) { ... ``` 2. ``` $.ajax({ type: "post", url: "Filepro.aspx", data: { type: "gp" }, success: function (data) { ... ``` 后台两个处理: 1.接收文件的处理 ```       int readcount = 0; int tcount = 0; tcount = files.ContentLength; byte[] buffer=new byte[10]; System.IO.FileStream fs= System.IO.File.Create(context.Server.MapPath(pic)); HttpContext.Current.Session["fp"] = "1"; while ((readcount=stream.Read(buffer,0,10))>0) { fs.Write(buffer, 0, readcount); HttpContext.Current.Session["fp"] = fs.Length + "/" + tcount; } ``` 2.返回进度 ```  if (tag.Equals("gp")) { if (Session["fp"] != null) { Response.Write(Session["fp"].ToString()); Response.End(); } else { Response.Write("NULL"); Response.End(); } } ``` 服务器接收文件的过程中把上传的进度存到session中 前台请求上传进度的时候 服务器从这个session里获取值发送给前台 前台再显示出来 我这样去实现上传的进度显示可以吗? 现在的问题是 返回的进度总是NULL 像是被接收文件那个线程给独占了一样  应该怎样去改进 求指教 我查了这两个请求(上传文件请求和获取进度请求)的sessionid是一样的!
SpringBoot项目中加入spring session后每次请求接口获取到的sessionId都不一致是什么请款
我在项目中按照这个方法: https://www.cnblogs.com/yanggb/p/10886520.html 加入spring session想实现session的共享,但是我现在不跨域访问,每次请求接口的时候获取到的sessionId都不一致是什么原因导致的呢? 后来我把下面这两段代码注释掉请求获取到的sessionId就一样了 ``` package com.test.common.config; import org.springframework.beans.factory.annotation.Value; import org.springframework.context.annotation.Bean; import org.springframework.data.redis.connection.RedisConnectionFactory; import org.springframework.data.redis.connection.RedisStandaloneConfiguration; import org.springframework.data.redis.connection.jedis.JedisConnectionFactory; import org.springframework.data.redis.core.StringRedisTemplate; import org.springframework.session.data.redis.config.annotation.web.http.EnableRedisHttpSession; @EnableRedisHttpSession(maxInactiveIntervalInSeconds = 3600) public class SessionConfig { @Value("${redis.hostname:localhost}") private String hostName; @Value("${redis.port:6379}") private int port; // @Value("${redis.password}") // private String password; @Bean public JedisConnectionFactory jedisConnectionFactory(){ RedisStandaloneConfiguration redisStandaloneConfiguration=new RedisStandaloneConfiguration(); redisStandaloneConfiguration.setHostName(hostName); redisStandaloneConfiguration.setPort(port); // redisStandaloneConfiguration.setPassword(password); redisStandaloneConfiguration.setDatabase(0); return new JedisConnectionFactory(redisStandaloneConfiguration); } @Bean public StringRedisTemplate redisTemplate(RedisConnectionFactory redisConnectionFactory){ return new StringRedisTemplate(redisConnectionFactory); } } ``` ``` package com.test.user.config; import com.test.common.config.SessionConfig; import org.springframework.session.web.context.AbstractHttpSessionApplicationInitializer; public class RedisSessionInitializer extends AbstractHttpSessionApplicationInitializer { public RedisSessionInitializer(){ super(SessionConfig.class); } } ``` 问题出在哪里啊~ 下面是我后台打印的日志: ![图片说明](https://img-ask.csdn.net/upload/201911/08/1573199256_608561.png)
python爬取ashx页面的post请求
我以一个类似的情况来提问,也是论坛中有个网友1年前提出的问题,但是他没有写出后续.... 网页地址:http://www.lzggzyjy.cn/InfoPage/InfoList.aspx?SiteItem=8 需求:python post请求获取该页面(感觉很简单) 分析页面: ![图片说明](https://img-ask.csdn.net/upload/201803/18/1521356034_57752.png) ![图片说明](https://img-ask.csdn.net/upload/201803/18/1521356049_933670.png) 我把代码贴上来: ``` #! /usr/bin/env python3 # -*- coding:utf-8 –*- import requests import json import sys reload(sys) sys.setdefaultencoding('utf-8') def testDownloadLanZhou(): testUrl = 'http://www.lzggzyjy.cn/ajax/Controls_InfoListControl,App_Web_2ewqtbev.ashx?_method=getCurrentData&_session=rw' testHeaders = { 'User-Agent':'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/65.0.3325.162 Safari/537.36', 'Host':'www.lzggzyjy.cn', 'Referer':'http://www.lzggzyjy.cn/InfoPage/InfoList.aspx?SiteItem=8', 'X-Requested-With':'XMLHttpRequest', # "Content-Type":'text/plain;charset=UTF-8', "Cookie":'ASP.NET_SessionId=hcdc1tywt5dgszd5bziox4sc; SERVERID=b925605187c7d5d37f1395627a969c75|1521298751|1521298681' } # testParams = {'_method':'getCurrentData', '_session':'rw'} testData = {'currentPage':'1', 'Query':''} # 将dic 转换成json字符串 # jsonDataString = json.dumps(testData) # print(jsonDataString) # print(type(jsonDataString)) # # 对应每个参数添加换行隔开 # newString = jsonDataString.replace(',', '\n') # print(newString) resq = requests.post(testUrl, headers=testHeaders, data=testData) print(resq.content) ``` 这个请求怎么弄都不对,获取不到正确的html页面......请各位指点迷津
Asp.Net MVC HttpContext.User.Identity.Name为空
做单点登录的时候遇到的问题. Hashtable singleOnline = (Hashtable)filterContext.HttpContext.Application["Online"]; // 判断当前SessionID是否存在 if (singleOnline != null && singleOnline.ContainsKey(filterContext.HttpContext.User.Identity.Name)) { if (!singleOnline[filterContext.HttpContext.User.Identity.Name].Equals(filterContext.HttpContext.Session.SessionID)) { filterContext.Result = new ContentResult() { Content = "<script>if(confirm('你的账号已在别处登陆,是否返回登陆页面重新登陆?')){window.location.href='/Authentication/Login';}else{window.close();}</script>" }; } }
通过python去爬网站,但是无法获取网站cookies。
1、尝试用python抓取网站里的一个值,页面是login.aspx,首先向页面抓取cookies,但是获取到的结果显示为 ```<RequestsCookieJar[<Cookie ASP.NET_SessionId=li5evtzfavnsshcvsiwhihyb for 10.23.10.20/>, <Cookie UICulture=ZH-CN for 10.23.10.20/>]>``` 2、我的步骤是这样: 首先打开登入界面,10.23.10.20/login.aspx: ![图片说明](https://img-ask.csdn.net/upload/201912/13/1576218442_193246.jpg) 然后点击登入后跳转到新页面,http://10.23.10.20/index.aspx ![图片说明](https://img-ask.csdn.net/upload/201912/13/1576217736_206768.jpg) 3、我的代码如下: ``` import requests session = requests.session() headers = { 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.110 Safari/537.36', 'content-type': 'application/json' } url = 'http://10.23.10.20/Login.aspx' data = { '__EVENTTARGET':'', '__EVENTARGUMENT':'', '__LASTFOCUS':'', '__VIEWSTATE': '/wEPDwUKLTU4MDcwODY1NA9kFgICAw9kFgoCBA8QDxYGHg1EYXRhVGV4dEZpZWxkBQdSZXNOYW1lHg5EYXRhVmFsdWVGaWVsZAUIUGFyYUNvZGUeC18hRGF0YUJvdW5kZ2QQFQMM566A5L2T5Lit5paHBuiLseaWhwznuYHkvZPkuK3mlocVAwVaSC1DTgVFTi1VUwVaSC1ISxQrAwNnZ2cWAWZkAgUPDxYCHgdWaXNpYmxlaGRkAgYPDxYCHwNoZGQCBw8PFgIeBFRleHQFEumqjOivgeeggeW3suemgeeUqGRkAgsPDxYEHghDc3NDbGFzcwUFc3ViYnQeBF8hU0ICAmRkZDv8A1G1UoCThtCFhAOH9WUJNdJM/dRKUFJVTapERgX8', '__VIEWSTATEGENERATOR': 'C2EE9ABB', 'txtUserName': 'admin', 'txtPSW': '123456', 'HiddenField1':'', 'HiddenField2':'', 'UICultureDropDownList': 'ZH-CN', 'LoginButton':'' } session.post(url, headers=headers, data=data) cookies = session.cookies print(cookies) ``` 获取到的结果就是第一步写结果,得到的cookies不对。 我查看登入后index.aspx的resquest headers内容,如下图: ![图片说明](https://img-ask.csdn.net/upload/201912/13/1576218072_179501.jpg) 个人认为系统的cookies应该是红框里面显示的。 所以不知道是我哪里错误了?取不到正确的cookies。 完整的截图: ![图片说明](https://img-ask.csdn.net/upload/201912/13/1576225689_54923.jpg) ![图片说明](https://img-ask.csdn.net/upload/201912/13/1576225770_664683.jpg)
Springboot+shiro整合时,登录时地址栏带有sessionID,然后打开登录页的时候特别慢!
![图片说明](https://img-ask.csdn.net/upload/201907/23/1563852152_523074.jpg)![图片说明](https://img-ask.csdn.net/upload/201907/23/1563852159_783423.jpg)![图片说明](https://img-ask.csdn.net/upload/201907/23/1563852165_896167.jpg)![图片说明](https://img-ask.csdn.net/upload/201907/23/1563852170_734343.jpg)
关联查询查询多个字段的 并希望对查询结果中的某一个字段去重。
SELECT distinct (a.id), a.sessionid, a.mobile, a.content, a.pass_id, a.extend, j.smg_desc, j.accountid, a.enter_time, a.reserved3, a.request_time, a.ifreport, j.reportflag, j.state, j.result, c.username, a.deal_time, a.reserved4, j.mid, j.reserved3 as bakTime FROM cs_mt_bak a left join cs_user c on a.reserved1 = c.id left join cs_resp j on a.id = j.mid WHERE 1 = 1 and a.reserved4=2 and to_char(a.request_time, 'YYYY-MM-DD') >= to_char(sysdate, 'YYYY-MM-DD') and to_char(a.request_time, 'YYYY-MM-DD') <= to_char(sysdate, 'YYYY-MM-DD') ORDER BY a.request_time desc, a.id 因为字段后面有些值不一样 导致去重失败 。我希望的id不重复的 后面字段可以重复 ![图片说明](https://img-ask.csdn.net/upload/201706/02/1496391043_369152.png) ![图片说明](https://img-ask.csdn.net/upload/201706/02/1496390933_94463.png)
Get请求到网站首页源码
android 登录成功后获取sessionID 使用此id可以通过get请求到新闻列表 问题情况: get不到数据 debug显示的是网站首页源码 同样app中有post请求上传数据debug返回的数据也是网站首页源码 如图: 登录成功 ![图片说明](https://img-ask.csdn.net/upload/201604/18/1460964126_867598.png) 返回网站首页源码 ![图片说明](https://img-ask.csdn.net/upload/201604/18/1460964183_864847.png) 求解 QAQ
No provider available from registry ip for service com.zys.store.service.api.HelloServiceApi:1.0.0 on consumer ip use dubbo version 2.6.2
springboot整合zookeeper和dubbo报错 linux上zk版本号是3.4.14 项目用的zk包是3.4.9 dubbo用的是2.6.2 springboot是2.1.6 用main方式先运行store的模块 再运行order的模块 这个时候用浏览器去访问http://localhost:8088/hello?name=zys这个时候控制台就报错No provider available from registry 启动的时候不报错 浏览器访问就报错了 看zk日志有说是HelloServiceApi这个类的节点已经存在 但是我觉得跟这个问题不大 因为运行一次就会创建一个节点 多次的话肯定报节点存在的错 我的linux是虚拟机 并且已经关闭了防火墙 不存在端口跑不通的情况 1. 项目架构是maven的聚合项目![图片说明](https://img-ask.csdn.net/upload/201911/20/1574220333_973372.png) 2. 在zys-store-api写接口 package com.zys.store.service.api; public interface HelloServiceApi { String sayHello(String name); } 3.在zys-store暴露接口 package com.zys.store.service.provider; import com.alibaba.dubbo.config.annotation.Service; import com.zys.store.service.api.HelloServiceApi; @Service( version = "1.0.0", application = "zys-store", protocol = "dubbo", registry = "zys-store-registry" ) public class HelloServiceProvider implements HelloServiceApi{ @Override public String sayHello(String name) { return "hello" + name; } } 下面是zys-store的yml的配置 dubbo: application: id: zys-store name: zys-store qos-port: 22212 qos-enable: true scan: base-packages: com.zys.store.* protocol: id: dubbo name: dubbo port: 12343 registry: id: zys-store-registry address: zookeeper://192.168.146.132:2181?backup=192.168.146.131:2181,192.168.146.133:2181 4.在zys-order调用接口 package com.zys.order.controller; import com.alibaba.dubbo.config.annotation.Reference; import com.zys.store.service.api.HelloServiceApi; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RestController; import javax.annotation.Resource; @RestController public class HelloController { @Reference( version = "1.0.0", application = "zys-order", interfaceName = "com.zys.store.service.api.HelloServiceApi", check = false, timeout = 3000, retries = 0 //读请求3次 写请求不重复 ) private HelloServiceApi helloServiceApi; @RequestMapping("/hello") public String hello(@RequestParam("name") String name){ return helloServiceApi.sayHello(name); } } 下面是zys-order的yml的配置 ```dubbo: application: id: zys-order name: zys-order qos-port: 22211 qos-enable: true qos-accept-foreign-ip: false scan: base-packages: com.zys.order.* protocol: id: dubbo name: dubbo port: 12343 registry: id: zys-order-registry address: zookeeper://192.168.146.132:2181?backup=192.168.146.131:2181,192.168.146.133:2181 store端的启动日志 2019-11-20 10:18:35.426 INFO 50632 --- [ main] a.b.d.c.e.WelcomeLogoApplicationListener : :: Dubbo Spring Boot (v0.2.0) : https://github.com/apache/incubator-dubbo-spring-boot-project :: Dubbo (v2.6.2) : https://github.com/apache/incubator-dubbo :: Google group : dev@dubbo.incubator.apache.org 2019-11-20 10:18:35.430 INFO 50632 --- [ main] e.OverrideDubboConfigApplicationListener : Dubbo Config was overridden by externalized configuration {dubbo.application.id=zys-store, dubbo.application.name=zys-store, dubbo.application.qos-enable=true, dubbo.application.qos-port=22212, dubbo.protocol.id=dubbo, dubbo.protocol.name=dubbo, dubbo.protocol.port=12343, dubbo.registry.address=zookeeper://192.168.146.132:2181?backup=192.168.146.131:2181,192.168.146.133:2181, dubbo.registry.id=zys-store-registry, dubbo.scan.base-packages=com.zys.store.*} . ____ _ __ _ _ /\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \ ( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \ \\/ ___)| |_)| | | | | || (_| | ) ) ) ) ' |____| .__|_| |_|_| |_\__, | / / / / =========|_|==============|___/=/_/_/_/ :: Spring Boot :: (v2.1.6.RELEASE) 2019-11-20 10:18:35.488 INFO 50632 --- [ main] com.zys.store.ZysStoreApplication : Starting ZysStoreApplication on DESKTOP-O0S84K8 with PID 50632 (D:\ideaworkspace\zys-project\zys-store\target\classes started by Administrator in D:\ideaworkspace\zys-project) 2019-11-20 10:18:35.489 INFO 50632 --- [ main] com.zys.store.ZysStoreApplication : No active profile set, falling back to default profiles: default 2019-11-20 10:18:35.963 WARN 50632 --- [ main] o.m.s.mapper.ClassPathMapperScanner : No MyBatis mapper was found in '[com.zys.store.dao, com.zys.store.mapper]' package. Please check your configuration. 2019-11-20 10:18:36.030 WARN 50632 --- [ main] o.s.boot.actuate.endpoint.EndpointId : Endpoint ID 'dubbo-configs' contains invalid characters, please migrate to a valid format. 2019-11-20 10:18:36.031 WARN 50632 --- [ main] o.s.boot.actuate.endpoint.EndpointId : Endpoint ID 'dubbo-properties' contains invalid characters, please migrate to a valid format. 2019-11-20 10:18:36.031 WARN 50632 --- [ main] o.s.boot.actuate.endpoint.EndpointId : Endpoint ID 'dubbo-references' contains invalid characters, please migrate to a valid format. 2019-11-20 10:18:36.031 WARN 50632 --- [ main] o.s.boot.actuate.endpoint.EndpointId : Endpoint ID 'dubbo-services' contains invalid characters, please migrate to a valid format. 2019-11-20 10:18:36.031 WARN 50632 --- [ main] o.s.boot.actuate.endpoint.EndpointId : Endpoint ID 'dubbo-shutdown' contains invalid characters, please migrate to a valid format. 2019-11-20 10:18:36.037 INFO 50632 --- [ main] .a.d.c.s.c.a.DubboConfigBindingRegistrar : The dubbo config bean definition [name : zys-store, class : com.alibaba.dubbo.config.ApplicationConfig] has been registered. 2019-11-20 10:18:36.037 INFO 50632 --- [ main] .a.d.c.s.c.a.DubboConfigBindingRegistrar : The BeanPostProcessor bean definition [com.alibaba.dubbo.config.spring.beans.factory.annotation.DubboConfigBindingBeanPostProcessor] for dubbo config bean [name : zys-store] has been registered. 2019-11-20 10:18:36.037 INFO 50632 --- [ main] .a.d.c.s.c.a.DubboConfigBindingRegistrar : The dubbo config bean definition [name : zys-store-registry, class : com.alibaba.dubbo.config.RegistryConfig] has been registered. 2019-11-20 10:18:36.037 INFO 50632 --- [ main] .a.d.c.s.c.a.DubboConfigBindingRegistrar : The BeanPostProcessor bean definition [com.alibaba.dubbo.config.spring.beans.factory.annotation.DubboConfigBindingBeanPostProcessor] for dubbo config bean [name : zys-store-registry] has been registered. 2019-11-20 10:18:36.037 INFO 50632 --- [ main] .a.d.c.s.c.a.DubboConfigBindingRegistrar : The dubbo config bean definition [name : dubbo, class : com.alibaba.dubbo.config.ProtocolConfig] has been registered. 2019-11-20 10:18:36.038 INFO 50632 --- [ main] .a.d.c.s.c.a.DubboConfigBindingRegistrar : The BeanPostProcessor bean definition [com.alibaba.dubbo.config.spring.beans.factory.annotation.DubboConfigBindingBeanPostProcessor] for dubbo config bean [name : dubbo] has been registered. 2019-11-20 10:18:36.060 WARN 50632 --- [ main] o.m.s.mapper.ClassPathMapperScanner : No MyBatis mapper was found in '[com.zys.store]' package. Please check your configuration. 2019-11-20 10:18:36.307 INFO 50632 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'com.alibaba.boot.dubbo.autoconfigure.DubboAutoConfiguration' of type [com.alibaba.boot.dubbo.autoconfigure.DubboAutoConfiguration$$EnhancerBySpringCGLIB$$437665e0] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) 2019-11-20 10:18:36.357 INFO 50632 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'relaxedDubboConfigBinder' of type [com.alibaba.boot.dubbo.autoconfigure.RelaxedDubboConfigBinder] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) 2019-11-20 10:18:36.364 INFO 50632 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration' of type [org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration$$EnhancerBySpringCGLIB$$3474c06e] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) 2019-11-20 10:18:36.382 INFO 50632 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'relaxedDubboConfigBinder' of type [com.alibaba.boot.dubbo.autoconfigure.RelaxedDubboConfigBinder] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) 2019-11-20 10:18:36.383 INFO 50632 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'relaxedDubboConfigBinder' of type [com.alibaba.boot.dubbo.autoconfigure.RelaxedDubboConfigBinder] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) 2019-11-20 10:18:36.657 INFO 50632 --- [ main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat initialized with port(s): 8089 (http) 2019-11-20 10:18:36.675 INFO 50632 --- [ main] o.apache.catalina.core.StandardService : Starting service [Tomcat] 2019-11-20 10:18:36.675 INFO 50632 --- [ main] org.apache.catalina.core.StandardEngine : Starting Servlet engine: [Apache Tomcat/9.0.21] 2019-11-20 10:18:36.770 INFO 50632 --- [ main] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring embedded WebApplicationContext 2019-11-20 10:18:36.770 INFO 50632 --- [ main] o.s.web.context.ContextLoader : Root WebApplicationContext: initialization completed in 1249 ms 2019-11-20 10:18:37.038 INFO 50632 --- [ main] .f.a.DubboConfigBindingBeanPostProcessor : The properties of bean [name : dubbo] have been binding by prefix of configuration properties : dubbo.protocol 2019-11-20 10:18:37.568 INFO 50632 --- [ main] o.s.s.concurrent.ThreadPoolTaskExecutor : Initializing ExecutorService 'applicationTaskExecutor' 2019-11-20 10:18:37.744 INFO 50632 --- [ main] .f.a.DubboConfigBindingBeanPostProcessor : The properties of bean [name : zys-store] have been binding by prefix of configuration properties : dubbo.application 2019-11-20 10:18:37.747 INFO 50632 --- [ main] .f.a.DubboConfigBindingBeanPostProcessor : The properties of bean [name : zys-store-registry] have been binding by prefix of configuration properties : dubbo.registry 2019-11-20 10:18:37.816 INFO 50632 --- [ main] com.zaxxer.hikari.HikariDataSource : MyHikariCP - Starting... 2019-11-20 10:18:37.993 INFO 50632 --- [ main] com.zaxxer.hikari.HikariDataSource : MyHikariCP - Start completed. order端的启动日志 ```2019-11-20 10:18:47.233 INFO 48096 --- [ main] a.b.d.c.e.WelcomeLogoApplicationListener : :: Dubbo Spring Boot (v0.2.0) : https://github.com/apache/incubator-dubbo-spring-boot-project :: Dubbo (v2.6.2) : https://github.com/apache/incubator-dubbo :: Google group : dev@dubbo.incubator.apache.org 2019-11-20 10:18:47.239 INFO 48096 --- [ main] e.OverrideDubboConfigApplicationListener : Dubbo Config was overridden by externalized configuration {dubbo.application.id=zys-order, dubbo.application.name=zys-order, dubbo.application.qos-accept-foreign-ip=false, dubbo.application.qos-enable=true, dubbo.application.qos-port=22211, dubbo.protocol.id=dubbo, dubbo.protocol.name=dubbo, dubbo.protocol.port=12343, dubbo.registry.address=zookeeper://192.168.146.132:2181?backup=192.168.146.131:2181,192.168.146.133:2181, dubbo.registry.id=zys-order-registry, dubbo.scan.base-packages=com.zys.order.*} . ____ _ __ _ _ /\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \ ( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \ \\/ ___)| |_)| | | | | || (_| | ) ) ) ) ' |____| .__|_| |_|_| |_\__, | / / / / =========|_|==============|___/=/_/_/_/ :: Spring Boot :: (v2.1.6.RELEASE) 2019-11-20 10:18:47.301 INFO 48096 --- [ main] com.zys.order.ZysOrderApplication : Starting ZysOrderApplication on DESKTOP-O0S84K8 with PID 48096 (D:\ideaworkspace\zys-project\zys-order\target\classes started by Administrator in D:\ideaworkspace\zys-project) 2019-11-20 10:18:47.302 INFO 48096 --- [ main] com.zys.order.ZysOrderApplication : No active profile set, falling back to default profiles: default 2019-11-20 10:18:47.803 WARN 48096 --- [ main] o.m.s.mapper.ClassPathMapperScanner : No MyBatis mapper was found in '[com.zys.order.dao, com.zys.order.mapper]' package. Please check your configuration. 2019-11-20 10:18:47.868 WARN 48096 --- [ main] o.s.boot.actuate.endpoint.EndpointId : Endpoint ID 'dubbo-configs' contains invalid characters, please migrate to a valid format. 2019-11-20 10:18:47.869 WARN 48096 --- [ main] o.s.boot.actuate.endpoint.EndpointId : Endpoint ID 'dubbo-properties' contains invalid characters, please migrate to a valid format. 2019-11-20 10:18:47.870 WARN 48096 --- [ main] o.s.boot.actuate.endpoint.EndpointId : Endpoint ID 'dubbo-references' contains invalid characters, please migrate to a valid format. 2019-11-20 10:18:47.870 WARN 48096 --- [ main] o.s.boot.actuate.endpoint.EndpointId : Endpoint ID 'dubbo-services' contains invalid characters, please migrate to a valid format. 2019-11-20 10:18:47.870 WARN 48096 --- [ main] o.s.boot.actuate.endpoint.EndpointId : Endpoint ID 'dubbo-shutdown' contains invalid characters, please migrate to a valid format. 2019-11-20 10:18:47.875 INFO 48096 --- [ main] .a.d.c.s.c.a.DubboConfigBindingRegistrar : The dubbo config bean definition [name : zys-order, class : com.alibaba.dubbo.config.ApplicationConfig] has been registered. 2019-11-20 10:18:47.875 INFO 48096 --- [ main] .a.d.c.s.c.a.DubboConfigBindingRegistrar : The BeanPostProcessor bean definition [com.alibaba.dubbo.config.spring.beans.factory.annotation.DubboConfigBindingBeanPostProcessor] for dubbo config bean [name : zys-order] has been registered. 2019-11-20 10:18:47.875 INFO 48096 --- [ main] .a.d.c.s.c.a.DubboConfigBindingRegistrar : The dubbo config bean definition [name : zys-order-registry, class : com.alibaba.dubbo.config.RegistryConfig] has been registered. 2019-11-20 10:18:47.875 INFO 48096 --- [ main] .a.d.c.s.c.a.DubboConfigBindingRegistrar : The BeanPostProcessor bean definition [com.alibaba.dubbo.config.spring.beans.factory.annotation.DubboConfigBindingBeanPostProcessor] for dubbo config bean [name : zys-order-registry] has been registered. 2019-11-20 10:18:47.876 INFO 48096 --- [ main] .a.d.c.s.c.a.DubboConfigBindingRegistrar : The dubbo config bean definition [name : dubbo, class : com.alibaba.dubbo.config.ProtocolConfig] has been registered. 2019-11-20 10:18:47.876 INFO 48096 --- [ main] .a.d.c.s.c.a.DubboConfigBindingRegistrar : The BeanPostProcessor bean definition [com.alibaba.dubbo.config.spring.beans.factory.annotation.DubboConfigBindingBeanPostProcessor] for dubbo config bean [name : dubbo] has been registered. 2019-11-20 10:18:47.894 WARN 48096 --- [ main] o.m.s.mapper.ClassPathMapperScanner : No MyBatis mapper was found in '[com.zys.order]' package. Please check your configuration. 2019-11-20 10:18:48.164 INFO 48096 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'com.alibaba.boot.dubbo.autoconfigure.DubboAutoConfiguration' of type [com.alibaba.boot.dubbo.autoconfigure.DubboAutoConfiguration$$EnhancerBySpringCGLIB$$5fbcce96] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) 2019-11-20 10:18:48.239 INFO 48096 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration' of type [org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration$$EnhancerBySpringCGLIB$$50bb2924] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) 2019-11-20 10:18:48.261 INFO 48096 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'relaxedDubboConfigBinder' of type [com.alibaba.boot.dubbo.autoconfigure.RelaxedDubboConfigBinder] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) 2019-11-20 10:18:48.263 INFO 48096 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'relaxedDubboConfigBinder' of type [com.alibaba.boot.dubbo.autoconfigure.RelaxedDubboConfigBinder] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) 2019-11-20 10:18:48.264 INFO 48096 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'relaxedDubboConfigBinder' of type [com.alibaba.boot.dubbo.autoconfigure.RelaxedDubboConfigBinder] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) 2019-11-20 10:18:48.482 INFO 48096 --- [ main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat initialized with port(s): 8088 (http) 2019-11-20 10:18:48.496 INFO 48096 --- [ main] o.apache.catalina.core.StandardService : Starting service [Tomcat] 2019-11-20 10:18:48.496 INFO 48096 --- [ main] org.apache.catalina.core.StandardEngine : Starting Servlet engine: [Apache Tomcat/9.0.21] 2019-11-20 10:18:48.596 INFO 48096 --- [ main] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring embedded WebApplicationContext 2019-11-20 10:18:48.596 INFO 48096 --- [ main] o.s.web.context.ContextLoader : Root WebApplicationContext: initialization completed in 1268 ms 2019-11-20 10:18:48.847 INFO 48096 --- [ main] .f.a.DubboConfigBindingBeanPostProcessor : The properties of bean [name : dubbo] have been binding by prefix of configuration properties : dubbo.protocol 2019-11-20 10:18:49.338 INFO 48096 --- [ main] .f.a.DubboConfigBindingBeanPostProcessor : The properties of bean [name : zys-order] have been binding by prefix of configuration properties : dubbo.application 2019-11-20 10:18:49.345 INFO 48096 --- [ main] .f.a.DubboConfigBindingBeanPostProcessor : The properties of bean [name : zys-order-registry] have been binding by prefix of configuration properties : dubbo.registry 2019-11-20 10:18:49.919 INFO 48096 --- [ main] o.a.c.f.imps.CuratorFrameworkImpl : Starting 2019-11-20 10:18:58.930 INFO 48096 --- [ main] org.apache.zookeeper.ZooKeeper : Client environment:zookeeper.version=3.4.9-1757313, built on 08/23/2016 06:50 GMT 2019-11-20 10:18:58.930 INFO 48096 --- [ main] org.apache.zookeeper.ZooKeeper : Client environment:host.name=DESKTOP-O0S84K8 2019-11-20 10:18:58.930 INFO 48096 --- [ main] org.apache.zookeeper.ZooKeeper : Client environment:java.version=1.8.0_211 2019-11-20 10:18:58.930 INFO 48096 --- [ main] org.apache.zookeeper.ZooKeeper : Client environment:java.vendor=Oracle Corporation 2019-11-20 10:18:58.930 INFO 48096 --- [ main] org.apache.zookeeper.ZooKeeper : Client environment:java.home=C:\Program Files\Java\jdk1.8.0_211\jre 2019-11-20 10:18:58.930 INFO 48096 --- [ main] org.apache.zookeeper.ZooKeeper : Client environment:java.class.path=C:\Program Files\Java\jdk1.8.0_211\jre\lib\charsets.jar;C:\Program Files\Java\jdk1.8.0_211\jre\lib\deploy.jar;C:\Program Files\Java\jdk1.8.0_211\jre\lib\ext\access-bridge-64.jar;C:\Program Files\Java\jdk1.8.0_211\jre\lib\ext\cldrdata.jar;C:\Program Files\Java\jdk1.8.0_211\jre\lib\ext\dnsns.jar;C:\Program Files\Java\jdk1.8.0_211\jre\lib\ext\jaccess.jar;C:\Program Files\Java\jdk1.8.0_211\jre\lib\ext\jfxrt.jar;C:\Program Files\Java\jdk1.8.0_211\jre\lib\ext\localedata.jar;C:\Program Files\Java\jdk1.8.0_211\jre\lib\ext\nashorn.jar;C:\Program Files\Java\jdk1.8.0_211\jre\lib\ext\sunec.jar;C:\Program Files\Java\jdk1.8.0_211\jre\lib\ext\sunjce_provider.jar;C:\Program Files\Java\jdk1.8.0_211\jre\lib\ext\sunmscapi.jar;C:\Program Files\Java\jdk1.8.0_211\jre\lib\ext\sunpkcs11.jar;C:\Program Files\Java\jdk1.8.0_211\jre\lib\ext\zipfs.jar;C:\Program Files\Java\jdk1.8.0_211\jre\lib\javaws.jar;C:\Program Files\Java\jdk1.8.0_211\jre\lib\jce.jar;C:\Program Files\Java\jdk1.8.0_211\jre\lib\jfr.jar;C:\Program Files\Java\jdk1.8.0_211\jre\lib\jfxswt.jar;C:\Program Files\Java\jdk1.8.0_211\jre\lib\jsse.jar;C:\Program Files\Java\jdk1.8.0_211\jre\lib\management-agent.jar;C:\Program Files\Java\jdk1.8.0_211\jre\lib\plugin.jar;C:\Program Files\Java\jdk1.8.0_211\jre\lib\resources.jar;C:\Program Files\Java\jdk1.8.0_211\jre\lib\rt.jar;D:\ideaworkspace\zys-project\zys-order\target\classes;D:\repository\org\springframework\boot\spring-boot-starter-web\2.1.6.RELEASE\spring-boot-starter-web-2.1.6.RELEASE.jar;D:\repository\org\springframework\boot\spring-boot-starter-json\2.1.6.RELEASE\spring-boot-starter-json-2.1.6.RELEASE.jar;D:\repository\com\fasterxml\jackson\core\jackson-databind\2.9.9\jackson-databind-2.9.9.jar;D:\repository\com\fasterxml\jackson\datatype\jackson-datatype-jdk8\2.9.9\jackson-datatype-jdk8-2.9.9.jar;D:\repository\com\fasterxml\jackson\datatype\jackson-datatype-jsr310\2.9.9\jackson-datatype-jsr310-2.9.9.jar;D:\repository\com\fasterxml\jackson\module\jackson-module-parameter-names\2.9.9\jackson-module-parameter-names-2.9.9.jar;D:\repository\org\springframework\boot\spring-boot-starter-tomcat\2.1.6.RELEASE\spring-boot-starter-tomcat-2.1.6.RELEASE.jar;D:\repository\org\apache\tomcat\embed\tomcat-embed-core\9.0.21\tomcat-embed-core-9.0.21.jar;D:\repository\org\apache\tomcat\embed\tomcat-embed-el\9.0.21\tomcat-embed-el-9.0.21.jar;D:\repository\org\apache\tomcat\embed\tomcat-embed-websocket\9.0.21\tomcat-embed-websocket-9.0.21.jar;D:\repository\org\hibernate\validator\hibernate-validator\6.0.17.Final\hibernate-validator-6.0.17.Final.jar;D:\repository\javax\validation\validation-api\2.0.1.Final\validation-api-2.0.1.Final.jar;D:\repository\org\jboss\logging\jboss-logging\3.3.2.Final\jboss-logging-3.3.2.Final.jar;D:\repository\com\fasterxml\classmate\1.4.0\classmate-1.4.0.jar;D:\repository\org\springframework\spring-web\5.1.8.RELEASE\spring-web-5.1.8.RELEASE.jar;D:\repository\org\springframework\spring-beans\5.1.8.RELEASE\spring-beans-5.1.8.RELEASE.jar;D:\repository\org\springframework\spring-webmvc\5.1.8.RELEASE\spring-webmvc-5.1.8.RELEASE.jar;D:\repository\org\springframework\spring-aop\5.1.8.RELEASE\spring-aop-5.1.8.RELEASE.jar;D:\repository\org\springframework\spring-context\5.1.8.RELEASE\spring-context-5.1.8.RELEASE.jar;D:\repository\org\springframework\spring-expression\5.1.8.RELEASE\spring-expression-5.1.8.RELEASE.jar;D:\repository\org\springframework\boot\spring-boot-starter-actuator\2.1.6.RELEASE\spring-boot-starter-actuator-2.1.6.RELEASE.jar;D:\repository\org\springframework\boot\spring-boot-actuator-autoconfigure\2.1.6.RELEASE\spring-boot-actuator-autoconfigure-2.1.6.RELEASE.jar;D:\repository\org\springframework\boot\spring-boot-actuator\2.1.6.RELEASE\spring-boot-actuator-2.1.6.RELEASE.jar;D:\repository\io\micrometer\micrometer-core\1.1.5\micrometer-core-1.1.5.jar;D:\repository\org\latencyutils\LatencyUtils\2.0.3\LatencyUtils-2.0.3.jar;D:\repository\org\springframework\spring-core\5.1.8.RELEASE\spring-core-5.1.8.RELEASE.jar;D:\repository\org\springframework\spring-jcl\5.1.8.RELEASE\spring-jcl-5.1.8.RELEASE.jar;D:\repository\org\springframework\boot\spring-boot-starter-jdbc\2.1.6.RELEASE\spring-boot-starter-jdbc-2.1.6.RELEASE.jar;D:\repository\com\zaxxer\HikariCP\3.2.0\HikariCP-3.2.0.jar;D:\repository\org\springframework\spring-jdbc\5.1.8.RELEASE\spring-jdbc-5.1.8.RELEASE.jar;D:\repository\org\springframework\spring-tx\5.1.8.RELEASE\spring-tx-5.1.8.RELEASE.jar;D:\repository\com\baomidou\mybatis-plus-boot-starter\3.1.1\mybatis-plus-boot-starter-3.1.1.jar;D:\repository\com\baomidou\mybatis-plus\3.1.1\mybatis-plus-3.1.1.jar;D:\repository\com\baomidou\mybatis-plus-extension\3.1.1\mybatis-plus-extension-3.1.1.jar;D:\repository\com\baomidou\mybatis-plus-core\3.1.1\mybatis-plus-core-3.1.1.jar;D:\repository\com\baomidou\mybatis-plus-annotation\3.1.1\mybatis-plus-annotation-3.1.1.jar;D:\repository\com\github\jsqlparser\jsqlparser\1.2\jsqlparser-1.2.jar;D:\repository\org\mybatis\mybatis\3.5.1\mybatis-3.5.1.jar;D:\repository\org\mybatis\mybatis-spring\2.0.1\mybatis-spring-2.0.1.jar;D:\repository\org\springframework\boot\spring-boot-autoconfigure\2.1.6.RELEASE\spring-boot-autoconfigure-2.1.6.RELEASE.jar;D:\repository\log4j\log4j\1.2.17\log4j-1.2.17.jar;D:\repository\mysql\mysql-connector-java\6.0.6\mysql-connector-java-6.0.6.jar;D:\repository\com\alibaba\boot\dubbo-spring-boot-starter\0.2.0\dubbo-spring-boot-starter-0.2.0.jar;D:\repository\com\alibaba\dubbo\2.6.2\dubbo-2.6.2.jar;D:\repository\org\javassist\javassist\3.20.0-GA\javassist-3.20.0-GA.jar;D:\repository\org\jboss\netty\netty\3.2.5.Final\netty-3.2.5.Final.jar;D:\repository\org\apache\zookeeper\zookeeper\3.4.9\zookeeper-3.4.9.jar;D:\repository\jline\jline\0.9.94\jline-0.9.94.jar;D:\repository\io\netty\netty\3.10.5.Final\netty-3.10.5.Final.jar;D:\repository\org\apache\curator\curator-framework\2.12.0\curator-framework-2.12.0.jar;D:\repository\org\apache\curator\curator-client\2.12.0\curator-client-2.12.0.jar;D:\repository\com\alibaba\boot\dubbo-spring-boot-autoconfigure\0.2.0\dubbo-spring-boot-autoconfigure-0.2.0.jar;D:\repository\com\alibaba\boot\dubbo-spring-boot-actuator\0.2.0\dubbo-spring-boot-actuator-0.2.0.jar;D:\repository\com\netflix\hystrix\hystrix-core\1.5.12\hystrix-core-1.5.12.jar;D:\repository\org\slf4j\slf4j-api\1.7.26\slf4j-api-1.7.26.jar;D:\repository\com\netflix\archaius\archaius-core\0.4.1\archaius-core-0.4.1.jar;D:\repository\commons-configuration\commons-configuration\1.8\commons-configuration-1.8.jar;D:\repository\commons-lang\commons-lang\2.6\commons-lang-2.6.jar;D:\repository\io\reactivex\rxjava\1.3.8\rxjava-1.3.8.jar;D:\repository\org\hdrhistogram\HdrHistogram\2.1.9\HdrHistogram-2.1.9.jar;D:\repository\com\netflix\hystrix\hystrix-metrics-event-stream\1.5.12\hystrix-metrics-event-stream-1.5.12.jar;D:\repository\com\netflix\hystrix\hystrix-serialization\1.5.12\hystrix-serialization-1.5.12.jar;D:\repository\com\fasterxml\jackson\module\jackson-module-afterburner\2.9.9\jackson-module-afterburner-2.9.9.jar;D:\repository\com\fasterxml\jackson\core\jackson-core\2.9.9\jackson-core-2.9.9.jar;D:\repository\com\fasterxml\jackson\core\jackson-annotations\2.9.0\jackson-annotations-2.9.0.jar;D:\repository\com\netflix\hystrix\hystrix-javanica\1.5.12\hystrix-javanica-1.5.12.jar;D:\repository\org\aspectj\aspectjrt\1.9.4\aspectjrt-1.9.4.jar;D:\repository\org\apache\commons\commons-lang3\3.3.1\commons-lang3-3.3.1.jar;D:\repository\org\ow2\asm\asm\5.0.4\asm-5.0.4.jar;D:\repository\org\aspectj\aspectjweaver\1.9.4\aspectjweaver-1.9.4.jar;D:\repository\com\google\guava\guava\15.0\guava-15.0.jar;D:\repository\com\google\code\findbugs\jsr305\2.0.0\jsr305-2.0.0.jar;D:\repository\org\apache\rocketmq\rocketmq-client\4.3.0\rocketmq-client-4.3.0.jar;D:\repository\org\apache\rocketmq\rocketmq-common\4.3.0\rocketmq-common-4.3.0.jar;D:\repository\org\apache\rocketmq\rocketmq-remoting\4.3.0\rocketmq-remoting-4.3.0.jar;D:\repository\com\alibaba\fastjson\1.2.29\fastjson-1.2.29.jar;D:\repository\io\netty\netty-all\4.1.36.Final\netty-all-4.1.36.Final.jar;D:\repository\org\apache\rocketmq\rocketmq-logging\4.3.0\rocketmq-logging-4.3.0.jar;D:\repository\io\netty\netty-tcnative-boringssl-static\2.0.25.Final\netty-tcnative-boringssl-static-2.0.25.Final.jar;D:\repository\com\zys\zys-store-api\0.0.1-SNAPSHOT\zys-store-api-0.0.1-SNAPSHOT.jar;D:\repository\org\springframework\boot\spring-boot-starter\2.1.6.RELEASE\spring-boot-starter-2.1.6.RELEASE.jar;D:\repository\org\springframework\boot\spring-boot\2.1.6.RELEASE\spring-boot-2.1.6.RELEASE.jar;D:\repository\org\springframework\boot\spring-boot-starter-logging\2.1.6.RELEASE\spring-boot-starter-logging-2.1.6.RELEASE.jar;D:\repository\ch\qos\logback\logback-classic\1.2.3\logback-classic-1.2.3.jar;D:\repository\ch\qos\logback\logback-core\1.2.3\logback-core-1.2.3.jar;D:\repository\org\apache\logging\log4j\log4j-to-slf4j\2.11.2\log4j-to-slf4j-2.11.2.jar;D:\repository\org\apache\logging\log4j\log4j-api\2.11.2\log4j-api-2.11.2.jar;D:\repository\org\slf4j\jul-to-slf4j\1.7.26\jul-to-slf4j-1.7.26.jar;D:\repository\javax\annotation\javax.annotation-api\1.3.2\javax.annotation-api-1.3.2.jar;D:\repository\org\yaml\snakeyaml\1.23\snakeyaml-1.23.jar;D:\idea\IntelliJ IDEA 2019.2\lib\idea_rt.jar 2019-11-20 10:18:58.930 INFO 48096 --- [ main] org.apache.zookeeper.ZooKeeper : Client environment:java.library.path=C:\Program Files\Java\jdk1.8.0_211\bin;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;D:\idea\IntelliJ IDEA 2019.2\jbr\\bin;D:\idea\IntelliJ IDEA 2019.2\jbr\\bin\server;D:\oracleClient\product\11.2.0\client_1\bin;D:\xshell\;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\Program Files\Java\jdk1.8.0_211;D:\Git\cmd;C:\Program Files\MySQL\MySQL Server 5.7\bin;D:\TortoiseSVN1.10\bin;D:\apache-maven-idea\bin;C:\Users\Administrator\AppData\Local\Microsoft\WindowsApps;;. 2019-11-20 10:18:58.931 INFO 48096 --- [ main] org.apache.zookeeper.ZooKeeper : Client environment:java.io.tmpdir=C:\Users\ADMINI~1\AppData\Local\Temp\ 2019-11-20 10:18:58.931 INFO 48096 --- [ main] org.apache.zookeeper.ZooKeeper : Client environment:java.compiler=<NA> 2019-11-20 10:18:58.931 INFO 48096 --- [ main] org.apache.zookeeper.ZooKeeper : Client environment:os.name=Windows 10 2019-11-20 10:18:58.931 INFO 48096 --- [ main] org.apache.zookeeper.ZooKeeper : Client environment:os.arch=amd64 2019-11-20 10:18:58.931 INFO 48096 --- [ main] org.apache.zookeeper.ZooKeeper : Client environment:os.version=10.0 2019-11-20 10:18:58.931 INFO 48096 --- [ main] org.apache.zookeeper.ZooKeeper : Client environment:user.name=Administrator 2019-11-20 10:18:58.931 INFO 48096 --- [ main] org.apache.zookeeper.ZooKeeper : Client environment:user.home=C:\Users\Administrator 2019-11-20 10:18:58.931 INFO 48096 --- [ main] org.apache.zookeeper.ZooKeeper : Client environment:user.dir=D:\ideaworkspace\zys-project 2019-11-20 10:18:58.932 INFO 48096 --- [ main] org.apache.zookeeper.ZooKeeper : Initiating client connection, connectString=192.168.146.132:2181,192.168.146.131:2181,192.168.146.133:2181 sessionTimeout=60000 watcher=org.apache.curator.ConnectionState@5a3a1bf9 2019-11-20 10:18:58.942 INFO 48096 --- [8.146.132:2181)] org.apache.zookeeper.ClientCnxn : Opening socket connection to server 192.168.146.132/192.168.146.132:2181. Will not attempt to authenticate using SASL (unknown error) 2019-11-20 10:18:58.942 INFO 48096 --- [8.146.132:2181)] org.apache.zookeeper.ClientCnxn : Socket connection established to 192.168.146.132/192.168.146.132:2181, initiating session 2019-11-20 10:18:58.953 INFO 48096 --- [8.146.132:2181)] org.apache.zookeeper.ClientCnxn : Session establishment complete on server 192.168.146.132/192.168.146.132:2181, sessionid = 0x200000235350000, negotiated timeout = 40000 2019-11-20 10:18:58.957 INFO 48096 --- [ain-EventThread] o.a.c.f.state.ConnectionStateManager : State change: CONNECTED 2019-11-20 10:18:59.030 INFO 48096 --- [ main] c.a.d.c.s.b.f.a.ReferenceBeanBuilder : <dubbo:reference object="com.alibaba.dubbo.common.bytecode.proxy0@3b5c665c" singleton="true" interface="com.zys.store.service.api.HelloServiceApi" uniqueServiceName="com.zys.store.service.api.HelloServiceApi:1.0.0" generic="false" version="1.0.0" check="false" timeout="3000" id="com.zys.store.service.api.HelloServiceApi" /> has been built. 2019-11-20 10:18:59.242 INFO 48096 --- [ main] o.s.s.concurrent.ThreadPoolTaskExecutor : Initializing ExecutorService 'applicationTaskExecutor' 2019-11-20 10:18:59.420 INFO 48096 --- [ main] com.zaxxer.hikari.HikariDataSource : MyHikariCP - Starting... 2019-11-20 10:18:59.592 INFO 48096 --- [ main] com.zaxxer.hikari.HikariDataSource : MyHikariCP - Start completed. _ _ |_ _ _|_. ___ _ | _ | | |\/|_)(_| | |_\ |_)||_|_\ / | 3.1.1 2019-11-20 10:18:59.836 INFO 48096 --- [ main] o.s.b.a.e.web.EndpointLinksResolver : Exposing 2 endpoint(s) beneath base path '/actuator' 2019-11-20 10:18:59.897 INFO 48096 --- [ main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat started on port(s): 8088 (http) with context path '' 2019-11-20 10:18:59.899 INFO 48096 --- [ main] com.zys.order.ZysOrderApplication : Started ZysOrderApplication in 12.907 seconds (JVM running for 13.464) 2019-11-20 10:18:59.956 INFO 48096 --- [-192.168.255.54] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring DispatcherServlet 'dispatcherServlet' 2019-11-20 10:18:59.956 INFO 48096 --- [-192.168.255.54] o.s.web.servlet.DispatcherServlet : Initializing Servlet 'dispatcherServlet' 2019-11-20 10:18:59.969 INFO 48096 --- [-192.168.255.54] o.s.web.servlet.DispatcherServlet : Completed initialization in 13 ms ```
cookieless设置为true后导致的sessionID每次都变化的问题
问大神们一个问题,我把cookless设置为true了,现在sessionID存在URL里面了,可是为什么刷新页面这个sessionID都会变呢,不是说一个会话的sessionID是不变的吗 ![图片说明](https://img-ask.csdn.net/upload/201501/05/1420438483_137816.png)
spring boot中一直刷新一个请求得到的sessionid会变化
controller中的代码: @RequestMapping(value = "/sessions", method = RequestMethod.GET) public Object sessions(HttpServletRequest request) { Map<String, Object> sessionIdPortMap = new HashMap<String, Object>(); // 获取session信息 sessionIdPortMap.put("sessionId:", request.getSession().getId()); sessionIdPortMap.put("服务器端口:", request.getServerPort()); return sessionIdPortMap; } 请求: http://localhost:8004/sessions 两次请求一样,sessionId不同: { "sessionId:": "c8636f78-6a04-48f7-a9b6-c452108d74f3", "服务器端口:": 8004 } { "sessionId:": "9cee7886-b85f-4078-9310-b1b580403e7d", "服务器端口:": 8004 } 这种配置代码也配了,没用: @Configuration public class WebMvcConfig extends WebMvcConfigurerAdapter { @Override public void addCorsMappings(CorsRegistry registry) { System.out.println("我是MyWebConfig跨域"); // 设置允许跨域的路径 registry.addMapping("/**") // 设置允许跨域请求的域名 .allowedOrigins("*")// 设置跨域访问的域名,如果是*,默认都可以访问。 // 是否允许证书 不再默认开启 .allowCredentials(true)// 设置是否允许客户端发送cookie信息。默认是false // 设置允许的方法 .allowedMethods("GET", "HEAD", "POST", "PUT", "DELETE", "OPTIONS") // 跨域允许时间 .maxAge(3600); } } 哪位大神可以解决呀!!!
java模拟登录记住cookie还是无法访问须登录才能访问的页面
用HttpURlConnection实现模拟登录,获取的cookie为 ASP.NET_SessionId=2gajq4a3qlb5ewhb4n5ot04u; path=/; HttpOnly 使用该cookie为什么还是不能访问需要登录才能访问的页面
爬虫福利二 之 妹子图网MM批量下载
爬虫福利一:27报网MM批量下载 点击 看了本文,相信大家对爬虫一定会产生强烈的兴趣,激励自己去学习爬虫,在这里提前祝:大家学有所成! 目标网站:妹子图网 环境:Python3.x 相关第三方模块:requests、beautifulsoup4 Re:各位在测试时只需要将代码里的变量path 指定为你当前系统要保存的路径,使用 python xxx.py 或IDE运行即可。 ...
Java学习的正确打开方式
在博主认为,对于入门级学习java的最佳学习方法莫过于视频+博客+书籍+总结,前三者博主将淋漓尽致地挥毫于这篇博客文章中,至于总结在于个人,实际上越到后面你会发现学习的最好方式就是阅读参考官方文档其次就是国内的书籍,博客次之,这又是一个层次了,这里暂时不提后面再谈。博主将为各位入门java保驾护航,各位只管冲鸭!!!上天是公平的,只要不辜负时间,时间自然不会辜负你。 何谓学习?博主所理解的学习,它是一个过程,是一个不断累积、不断沉淀、不断总结、善于传达自己的个人见解以及乐于分享的过程。
大学四年自学走来,这些私藏的实用工具/学习网站我贡献出来了
大学四年,看课本是不可能一直看课本的了,对于学习,特别是自学,善于搜索网上的一些资源来辅助,还是非常有必要的,下面我就把这几年私藏的各种资源,网站贡献出来给你们。主要有:电子书搜索、实用工具、在线视频学习网站、非视频学习网站、软件下载、面试/求职必备网站。 注意:文中提到的所有资源,文末我都给你整理好了,你们只管拿去,如果觉得不错,转发、分享就是最大的支持了。 一、电子书搜索 对于大部分程序员...
linux系列之常用运维命令整理笔录
本博客记录工作中需要的linux运维命令,大学时候开始接触linux,会一些基本操作,可是都没有整理起来,加上是做开发,不做运维,有些命令忘记了,所以现在整理成博客,当然vi,文件操作等就不介绍了,慢慢积累一些其它拓展的命令,博客不定时更新 free -m 其中:m表示兆,也可以用g,注意都要小写 Men:表示物理内存统计 total:表示物理内存总数(total=used+free) use...
比特币原理详解
一、什么是比特币 比特币是一种电子货币,是一种基于密码学的货币,在2008年11月1日由中本聪发表比特币白皮书,文中提出了一种去中心化的电子记账系统,我们平时的电子现金是银行来记账,因为银行的背后是国家信用。去中心化电子记账系统是参与者共同记账。比特币可以防止主权危机、信用风险。其好处不多做赘述,这一层面介绍的文章很多,本文主要从更深层的技术原理角度进行介绍。 二、问题引入 假设现有4个人...
程序员接私活怎样防止做完了不给钱?
首先跟大家说明一点,我们做 IT 类的外包开发,是非标品开发,所以很有可能在开发过程中会有这样那样的需求修改,而这种需求修改很容易造成扯皮,进而影响到费用支付,甚至出现做完了项目收不到钱的情况。 那么,怎么保证自己的薪酬安全呢? 我们在开工前,一定要做好一些证据方面的准备(也就是“讨薪”的理论依据),这其中最重要的就是需求文档和验收标准。一定要让需求方提供这两个文档资料作为开发的基础。之后开发...
网页实现一个简单的音乐播放器(大佬别看。(⊙﹏⊙))
今天闲着无事,就想写点东西。然后听了下歌,就打算写个播放器。 于是乎用h5 audio的加上js简单的播放器完工了。 演示地点演示 html代码如下` music 这个年纪 七月的风 音乐 ` 然后就是css`*{ margin: 0; padding: 0; text-decoration: none; list-...
Python十大装B语法
Python 是一种代表简单思想的语言,其语法相对简单,很容易上手。不过,如果就此小视 Python 语法的精妙和深邃,那就大错特错了。本文精心筛选了最能展现 Python 语法之精妙的十个知识点,并附上详细的实例代码。如能在实战中融会贯通、灵活使用,必将使代码更为精炼、高效,同时也会极大提升代码B格,使之看上去更老练,读起来更优雅。
数据库优化 - SQL优化
以实际SQL入手,带你一步一步走上SQL优化之路!
2019年11月中国大陆编程语言排行榜
2019年11月2日,我统计了某招聘网站,获得有效程序员招聘数据9万条。针对招聘信息,提取编程语言关键字,并统计如下: 编程语言比例 rank pl_ percentage 1 java 33.62% 2 cpp 16.42% 3 c_sharp 12.82% 4 javascript 12.31% 5 python 7.93% 6 go 7.25% 7 p...
通俗易懂地给女朋友讲:线程池的内部原理
餐盘在灯光的照耀下格外晶莹洁白,女朋友拿起红酒杯轻轻地抿了一小口,对我说:“经常听你说线程池,到底线程池到底是个什么原理?”
经典算法(5)杨辉三角
杨辉三角 是经典算法,这篇博客对它的算法思想进行了讲解,并有完整的代码实现。
腾讯算法面试题:64匹马8个跑道需要多少轮才能选出最快的四匹?
昨天,有网友私信我,说去阿里面试,彻底的被打击到了。问了为什么网上大量使用ThreadLocal的源码都会加上private static?他被难住了,因为他从来都没有考虑过这个问题。无独有偶,今天笔者又发现有网友吐槽了一道腾讯的面试题,我们一起来看看。 腾讯算法面试题:64匹马8个跑道需要多少轮才能选出最快的四匹? 在互联网职场论坛,一名程序员发帖求助到。二面腾讯,其中一个算法题:64匹...
面试官:你连RESTful都不知道我怎么敢要你?
干货,2019 RESTful最贱实践
JDK12 Collectors.teeing 你真的需要了解一下
前言 在 Java 12 里面有个非常好用但在官方 JEP 没有公布的功能,因为它只是 Collector 中的一个小改动,它的作用是 merge 两个 collector 的结果,这句话显得很抽象,老规矩,我们先来看个图(这真是一个不和谐的图????): 管道改造经常会用这个小东西,通常我们叫它「三通」,它的主要作用就是将 downstream1 和 downstre...
为啥国人偏爱Mybatis,而老外喜欢Hibernate/JPA呢?
关于SQL和ORM的争论,永远都不会终止,我也一直在思考这个问题。昨天又跟群里的小伙伴进行了一番讨论,感触还是有一些,于是就有了今天这篇文。 声明:本文不会下关于Mybatis和JPA两个持久层框架哪个更好这样的结论。只是摆事实,讲道理,所以,请各位看官勿喷。 一、事件起因 关于Mybatis和JPA孰优孰劣的问题,争论已经很多年了。一直也没有结论,毕竟每个人的喜好和习惯是大不相同的。我也看...
SQL-小白最佳入门sql查询一
不要偷偷的查询我的个人资料,即使你再喜欢我,也不要这样,真的不好;
项目中的if else太多了,该怎么重构?
介绍 最近跟着公司的大佬开发了一款IM系统,类似QQ和微信哈,就是聊天软件。我们有一部分业务逻辑是这样的 if (msgType = "文本") { // dosomething } else if(msgType = "图片") { // doshomething } else if(msgType = "视频") { // doshomething } else { // doshom...
【图解经典算法题】如何用一行代码解决约瑟夫环问题
约瑟夫环问题算是很经典的题了,估计大家都听说过,然后我就在一次笔试中遇到了,下面我就用 3 种方法来详细讲解一下这道题,最后一种方法学了之后保证让你可以让你装逼。 问题描述:编号为 1-N 的 N 个士兵围坐在一起形成一个圆圈,从编号为 1 的士兵开始依次报数(1,2,3…这样依次报),数到 m 的 士兵会被杀死出列,之后的士兵再从 1 开始报数。直到最后剩下一士兵,求这个士兵的编号。 1、方...
致 Python 初学者
欢迎来到“Python进阶”专栏!来到这里的每一位同学,应该大致上学习了很多 Python 的基础知识,正在努力成长的过程中。在此期间,一定遇到了很多的困惑,对未来的学习方向感到迷茫。我非常理解你们所面临的处境。我从2007年开始接触 python 这门编程语言,从2009年开始单一使用 python 应对所有的开发工作,直至今天。回顾自己的学习过程,也曾经遇到过无数的困难,也曾经迷茫过、困惑过。开办这个专栏,正是为了帮助像我当年一样困惑的 Python 初学者走出困境、快速成长。希望我的经验能真正帮到你
“狗屁不通文章生成器”登顶GitHub热榜,分分钟写出万字形式主义大作
一、垃圾文字生成器介绍 最近在浏览GitHub的时候,发现了这样一个骨骼清奇的雷人项目,而且热度还特别高。 项目中文名:狗屁不通文章生成器 项目英文名:BullshitGenerator 根据作者的介绍,他是偶尔需要一些中文文字用于GUI开发时测试文本渲染,因此开发了这个废话生成器。但由于生成的废话实在是太过富于哲理,所以最近已经被小伙伴们给玩坏了。 他的文风可能是这样的: 你发现,...
程序员:我终于知道post和get的区别
是一个老生常谈的话题,然而随着不断的学习,对于以前的认识有很多误区,所以还是需要不断地总结的,学而时习之,不亦说乎
GitHub标星近1万:只需5秒音源,这个网络就能实时“克隆”你的声音
作者 | Google团队 译者 | 凯隐 编辑 | Jane 出品 | AI科技大本营(ID:rgznai100) 本文中,Google 团队提出了一种文本语音合成(text to speech)神经系统,能通过少量样本学习到多个不同说话者(speaker)的语音特征,并合成他们的讲话音频。此外,对于训练时网络没有接触过的说话者,也能在不重新训练的情况下,仅通过未知...
《程序人生》系列-这个程序员只用了20行代码就拿了冠军
你知道的越多,你不知道的越多 点赞再看,养成习惯GitHub上已经开源https://github.com/JavaFamily,有一线大厂面试点脑图,欢迎Star和完善 前言 这一期不算《吊打面试官》系列的,所有没前言我直接开始。 絮叨 本来应该是没有这期的,看过我上期的小伙伴应该是知道的嘛,双十一比较忙嘛,要值班又要去帮忙拍摄年会的视频素材,还得搞个程序员一天的Vlog,还要写BU...
加快推动区块链技术和产业创新发展,2019可信区块链峰会在京召开
11月8日,由中国信息通信研究院、中国通信标准化协会、中国互联网协会、可信区块链推进计划联合主办,科技行者协办的2019可信区块链峰会将在北京悠唐皇冠假日酒店开幕。   区块链技术被认为是继蒸汽机、电力、互联网之后,下一代颠覆性的核心技术。如果说蒸汽机释放了人类的生产力,电力解决了人类基本的生活需求,互联网彻底改变了信息传递的方式,区块链作为构造信任的技术有重要的价值。   1...
程序员把地府后台管理系统做出来了,还有3.0版本!12月7号最新消息:已在开发中有github地址
第一幕:缘起 听说阎王爷要做个生死簿后台管理系统,我们派去了一个程序员…… 996程序员做的梦: 第一场:团队招募 为了应对地府管理危机,阎王打算找“人”开发一套地府后台管理系统,于是就在地府总经办群中发了项目需求。 话说还是中国电信的信号好,地府都是满格,哈哈!!! 经常会有外行朋友问:看某网站做的不错,功能也简单,你帮忙做一下? 而这次,面对这样的需求,这个程序员...
网易云6亿用户音乐推荐算法
网易云音乐是音乐爱好者的集聚地,云音乐推荐系统致力于通过 AI 算法的落地,实现用户千人千面的个性化推荐,为用户带来不一样的听歌体验。 本次分享重点介绍 AI 算法在音乐推荐中的应用实践,以及在算法落地过程中遇到的挑战和解决方案。 将从如下两个部分展开: AI算法在音乐推荐中的应用 音乐场景下的 AI 思考 从 2013 年 4 月正式上线至今,网易云音乐平台持续提供着:乐屏社区、UGC...
【技巧总结】位运算装逼指南
位算法的效率有多快我就不说,不信你可以去用 10 亿个数据模拟一下,今天给大家讲一讲位运算的一些经典例子。不过,最重要的不是看懂了这些例子就好,而是要在以后多去运用位运算这些技巧,当然,采用位运算,也是可以装逼的,不信,你往下看。我会从最简单的讲起,一道比一道难度递增,不过居然是讲技巧,那么也不会太难,相信你分分钟看懂。 判断奇偶数 判断一个数是基于还是偶数,相信很多人都做过,一般的做法的代码如下...
【管理系统课程设计】美少女手把手教你后台管理
【文章后台管理系统】URL设计与建模分析+项目源码+运行界面 栏目管理、文章列表、用户管理、角色管理、权限管理模块(文章最后附有源码) 1. 这是一个什么系统? 1.1 学习后台管理系统的原因 随着时代的变迁,现如今各大云服务平台横空出世,市面上有许多如学生信息系统、图书阅读系统、停车场管理系统等的管理系统,而本人家里就有人在用烟草销售系统,直接在网上完成挑选、购买与提交收货点,方便又快捷。 试想,若没有烟草销售系统,本人家人想要购买烟草,还要独自前往药...
4G EPS 第四代移动通信系统
目录 文章目录目录4G 与 LTE/EPCLTE/EPC 的架构E-UTRANE-UTRAN 协议栈eNodeBEPCMMES-GWP-GWHSSLTE/EPC 协议栈概览 4G 与 LTE/EPC 4G,即第四代移动通信系统,提供了 3G 不能满足的无线网络宽带化,主要提供数据(上网)业务。而 LTE(Long Term Evolution,长期演进技术)是电信领域用于手机及数据终端的高速无线通...
相关热词 c# 图片上传 c# gdi 占用内存 c#中遍历字典 c#控制台模拟dos c# 斜率 最小二乘法 c#进程延迟 c# mysql完整项目 c# grid 总行数 c# web浏览器插件 c# xml 生成xsd
立即提问