How to implement spring boot regular routing

effect you want to achieve:

all access except / static/** is implemented by a single controller.

clipboard.png
as shown in figure

expects the HomeController@index method to handle all requests, except for the / static/** path.
the above code can"t realize this function yet. what"s the problem and how to adjust it?

@GetMapping("/{path:^(?!static).*}/{path:[^\\.]*}")
Menu