Spring Controller Mapping Issues - Double Wildcard -


i map following url:

/resource/{path/to/git/repo.git}/{branch}/{path/within/repository}

to spring framework controller. having issues. have tried following pattern no success:

/resource/**.git/{branch}/**

  • matches resource/anything.git/branch/path/etc (no slashes in path git repo)
  • does not match resource/path/anything.git/branch/path/etc expect

i have tried /resource/**/.git/{branch}/** in testing behaves expected, allowing number of slashes in both ant pattern wildcards, not suit situation added slash.

is there way map without resorting /resource/** , doing work of matching in controller?

i ended fixing using mapping:

/resource/**/*.git/{branch}/**

a side effect of example given in original post working


Comments

Popular posts from this blog

networking - Vagrant-provisioned VirtualBox VM is not reachable from Ubuntu host -

c# - ASP.NET Core - There is already an object named 'AspNetRoles' in the database -

ruby on rails - ArgumentError: Missing host to link to! Please provide the :host parameter, set default_url_options[:host], or set :only_path to true -