一、配置文件 1、SpringBoot使用一个全局的配置文件,配置文件名是固定的 application.properties:配置文件的作用:修改SpringBoot自动配置的默认值; application.yml:标记语言,以数据为中心,比json、xml等更适合做配置文件; YAML格式: ...
分类:
编程语言 时间:
2019-12-20 00:54:29
阅读次数:
95
func (this *LoadBalance) RoundRobinByWeight() *HttpServer { server := this.Servers[ServerIndices[this.CurIndex]] this.CurIndex = (this.CurIndex + 1) %... ...
分类:
编程语言 时间:
2019-12-19 23:39:47
阅读次数:
117
<!-- 外部导入文件 --><context:property-placeholder location="classpath:db.properties"/> <bean id="dataSource" class="com.mchange.v2.c3p0.ComboPooledDataSour ...
分类:
编程语言 时间:
2019-12-19 23:23:26
阅读次数:
108
Models.proto syntax = "proto3"; package services; //商品模型 message ProdModel { int32 prod_id = 1; string prod_name = 2; float prod_price = 3; } Prod.pro ...
分类:
其他好文 时间:
2019-12-19 23:19:46
阅读次数:
138
创建服务端并调用 syntax = "proto3"; package services; message ProdRequest { int32 prod_id = 1; //传入id } message ProdResponse { int32 prod_stock = 1; //商品库存 } ...
分类:
其他好文 时间:
2019-12-19 23:03:27
阅读次数:
125
sudo service network-manager stop sudo rm /var/lib/NetworkManager/NetworkManager.state sudo service network-manager start sudo gedit /etc/NetworkManag... ...
分类:
系统相关 时间:
2019-12-19 21:26:02
阅读次数:
112
在美妙的数学王国中畅游 数学王国中,每个人的智商可以用一个属于 $[0,1]$ 的实数表示。数学王国中有 $n$ 个城市,编号从 $0$ 到 $n 1$ ,这些城市由若干座魔法桥连接。每个城市的中心都有一个魔法球,每个魔法球中藏有一道数学题。每个人在做完这道数学题之后都会得到一个在 $[0,1]$ ...
分类:
其他好文 时间:
2019-12-19 21:23:55
阅读次数:
79
package main import ( "fmt" "unsafe" ) type TestStructTobytes struct { data int64 s int8 } type SliceMock struct { addr uintptr len int cap int } func... ...
分类:
其他好文 时间:
2019-12-19 21:15:46
阅读次数:
128
package main import ( "fmt" "html/template" "net/http" ) type User struct { UserName string Age int } func info(w http.ResponseWriter, r *http.Request... ...
分类:
Web程序 时间:
2019-12-19 20:47:00
阅读次数:
190
配置多实例: 选择Idea右上角启动按钮边上的Edit Configurations,在打开的对话框中,去掉Single Instance Only的选项,VM Options中增加-Dserver.port=8082,Apply应用,如图 2. 第一个完成后,接着配置第二个,左上角有个复制按钮,点 ...
分类:
其他好文 时间:
2019-12-19 19:05:34
阅读次数:
166