春天云与Eureka - Eureka Web UI URL(Spring cloud with Eureka - Eureka Web UI URL)
我在我的春季启动应用程序中安装了Eureka,并且Eureka内置了一个整洁的Web UI,我喜欢它
这是
application.yml
的配置server: port: 8081 management: context_path: /admin ## EUREKA CONFIG ## eureka: instance: hostname: localhost metadataMap: instanceId: ${spring.application.name}:${spring.application.instance_id:${random.value}} client: registerWithEureka: true fetchRegistry: true server: waitTimeInMsWhenSyncEmpty: 0 serviceUrl: defaultZone: http://${eureka.instance.hostname}:${server.port}/eureka/
但是,Web UI显示在我的eureka服务器上
http://localhost:8081/
有没有办法改变网络的网址ui只是类似的东西
http://localhost:8081/eurekawebui
谢谢
I have Eureka setup with my spring boot application, and Eureka has a neat web UI built in which I like
Here's my config in
application.yml
server: port: 8081 management: context_path: /admin ## EUREKA CONFIG ## eureka: instance: hostname: localhost metadataMap: instanceId: ${spring.application.name}:${spring.application.instance_id:${random.value}} client: registerWithEureka: true fetchRegistry: true server: waitTimeInMsWhenSyncEmpty: 0 serviceUrl: defaultZone: http://${eureka.instance.hostname}:${server.port}/eureka/
However, the web UI shows up on my eureka server at
http://localhost:8081/
is there a way to change the url of the web ui only to something like
http://localhost:8081/eurekawebui
Thanks
原文:https://stackoverflow.com/questions/30200988
最满意答案
EXPLAIN
的输出有时会产生误导。例如,
filesort
与文件无关,using where
并不意味着你正在使用WHERE
子句,并且using index
可以在没有定义单个索引的情况下显示在表上。
Using where
只表示表上有一些限制条款(WHERE
或ON
),并不会返回所有记录。 请注意,LIMIT
不算作限制条款(尽管可以)。
Using index
意味着从索引返回所有信息,而不寻求表中的记录。 只有在索引覆盖查询所需的所有字段时,才可以执行此操作。由于您选择
*
,这是不可能的。category_id
,board_id
,display
和order
以外的字段不在索引中,应该查找。The output of
EXPLAIN
can sometimes be misleading.For instance,
filesort
has nothing to do with files,using where
does not mean you are using aWHERE
clause, andusing index
can show up on the tables without a single index defined.
Using where
just means there is some restricting clause on the table (WHERE
orON
), and not all record will be returned. Note thatLIMIT
does not count as a restricting clause (though it can be).
Using index
means that all information is returned from the index, without seeking the records in the table. This is only possible if all fields required by the query are covered by the index.Since you are selecting
*
, this is impossible. Fields other thancategory_id
,board_id
,display
andorder
are not covered by the index and should be looked up.
相关问答
更多-
由于您在where子句中使用的列有许多相同的值(根据您的数字,所有表行的78%),数据库将得出结论,使用全表扫描比浪费额外的时间读取更便宜指数。 大多数数据库供应商的经验法则是,如果无法将搜索范围缩小到所有表记录的约5%,则可能不会使用该索引。 Since there are many identical values for the column which you use in the where clause (78% of all the table rows according to your n ...
-
我如何使用Mongo $ index,以便查询不会使用任何索引(How can I use Mongo $index so the query would NOT use any index)[2021-07-09]
我认为插入不会像你想象的那样工作。 插入将根据集合本身的索引数将其所需的字段编目到btree。 因此,对于特权插入,您必须销毁集合上的所有索引。 因此使用$natural命令提示将对读写顺序没有影响。 更不用说$natural order是一个磁盘插入索引,只是一个你无法在查询中有效使用的索引,因为它会强制进行全表扫描。 然而,这实际上并没有特权,因为维护btree是插入数据的一部分,因此没有办法通过索引来优先插入。 写入和读取锁定是两个完全不同的事情,所以我不确定你的问题是否有意义。 您是否更喜欢寻找原子 ... -
如何从查询中排除索引(How to exclude index from query)[2022-06-20]
如果你这样做 SELECT * FROM [Table] WITH (INDEX(0)) WHERE "IndexColumn" = 0 桌面扫描将被触发。 If you do SELECT * FROM [Table] WITH (INDEX(0)) WHERE "IndexColumn" = 0 tablescan will be triggered. -
如何在查询之间使用索引(how Index used in between query)[2024-02-07]
您正在将datetime字段与greater_than / less_than比较中的字符串进行比较。 如果您使用强制转换或函数(如UNIX_TIMESTAMP())并将其他日期转换为unixtimestamp,那将会解决问题,但会破坏索引的使用。 也许更好的解决方案是将日期作为unix时间戳存储在表中并在其上放置索引。 然后,你只需要这样做: select * from table where DateInUnixTimeStampFormat between UNIX_TIMESTAMP(date ... -
基于索引的查询太慢(Query based on index too slow)[2022-05-03]
请参阅: Titan限制 边缘检索不是O(1) 通过id检索边缘,例如tx.getEdge(edge.getId()),不是恒定时间操作。 Titan将检索要检索的边的相邻顶点,然后执行顶点查询以识别边。 前者是恒定时间,但后者在入射到具有相同边缘标签的顶点上的边缘数量上可能是线性的。 这也适用于通过标准或外部索引检索边的索引。 这种行为的原因是Titan存储顶点和边的方式(参见数据模型 )。 只能直接访问顶点(O(1))。 底线:即使您有属性的边缘索引,Titan仍然必须迭代所有相邻顶点以通过id标识边缘 ... -
您的解决方案将起作用,但当您的桌面增长时,您将遇到很多性能问题。 我建议您使用以下解决方案: 将另一个字段添加到整数类型的GlobTable中。 该字段将是增量字段,并将存储您的行索引(让我们调用此字段rowIndex ) 每次将新对象保存到此表时,请确保使用以下命令增加此字段: object.increment("rowIndex"); 现在,您的查询应如下所示: var thisRow = Parse.Object.extend(GlobTable); var query= new Parse.Que ...
-
你告诉SQL Server的是不使用任何索引来执行查询。 因此,我希望查询计划显示正在使用的聚簇索引(因为这是您的数据),但扫描正在完成而不是搜索。 是这样的吗? 根据文件: 如果存在聚簇索引,则INDEX(0)强制进行聚簇索引扫描,而INDEX(1)强制进行聚簇索引扫描或搜索。 这正是你所看到的。 What you are telling SQL Server is to execute the query not using any indexes. Therefore, I would expect ...
-
正如您已经意识到的那样,问题与使用equals以外的运算符有关。 索引只能最有效地用于与equals(加上一个范围条件)进行比较的最左侧列。 在你的例子中: create index i on t (a,b,c,d); where a=1 and b=11 and c!=5 and d<8; 它只能有效地使用索引a和b 。 这意味着DB获取与a和b条件匹配的所有行,然后根据剩余条件检查每一行。 当您将c上的过滤器更改为等于时,它会(可能)获取较少的行(仅限于匹配a和b和c ),然后针对d过滤器检查这些(较 ...
-
在SQL Management Studio中,只需输入查询,然后点击Control-L(显示查询执行计划)。 在那里,您将能够看到是否正在使用任何索引。 “表扫描”表示不使用索引。 “索引扫描”意味着使用索引。 In SQL Management Studio, just type in the query, and hit Control-L (display query execution plan). There, you will be able to see whether any indexe ...
-
EXPLAIN的输出有时会产生误导。 例如, filesort与文件无关, using where并不意味着你正在使用WHERE子句,并且using index可以在没有定义单个索引的情况下显示在表上。 Using where只表示表上有一些限制条款( WHERE或ON ),并不会返回所有记录。 请注意, LIMIT不算作限制条款(尽管可以)。 Using index意味着从索引返回所有信息,而不寻求表中的记录。 只有在索引覆盖查询所需的所有字段时,才可以执行此操作。 由于您选择* ,这是不可能的。 cat ...