Solve the invalidation of springboot project configuration context path

Table of contents

foreword

The recently built springbootboot gateway, configuration request path, did not take effect

Phenomenon

The configuration file is as follows:

insert image description here
Start the class, the results printed on the console are as follows:
insert image description here
I can change the port at will and it will take effect, it is the configuration file: /api can never be loaded

Solution

The gateway itself does not have contextPath, so it can handle contextPath by forwarding itself

Guess you like

Origin blog.csdn.net/qq_32370913/article/details/129988278