Want to create a URL in JHipster

I want to create a url like this abc.com/firstName.lastName.how I am implementing this in our project, you can help me.

I have a filter check in the WebConfigurer.java class

        staticResourcesProductionFilter.addMappingForUrlPatterns(disps, true, "/");
        staticResourcesProductionFilter.addMappingForUrlPatterns(disps, true, "/index.html");
        staticResourcesProductionFilter.addMappingForUrlPatterns(disps, true, "/images/*");
        staticResourcesProductionFilter.addMappingForUrlPatterns(disps, true, "/fonts/*");
        staticResourcesProductionFilter.addMappingForUrlPatterns(disps, true, "/scripts/*");
        staticResourcesProductionFilter.addMappingForUrlPatterns(disps, true, "/styles/*");
        staticResourcesProductionFilter.addMappingForUrlPatterns(disps, true, "/views/*");
        staticResourcesProductionFilter.setAsyncSupported(true);

If I change our url to abc.com/profile/firstName.lastName then it will work fine for me, because I have my own filter like this

staticResourcesProductionFilter.addMappingForUrlPatterns(disps, true, "/profile/*");

but if I want to make url like abc.com/firstName.lastName for this url, I need to change

staticResourcesProductionFilter.addMappingForUrlPatterns(disps, true, "/");

to

staticResourcesProductionFilter.addMappingForUrlPatterns(disps, true, "/*");

then he gave an exception, please provide me with any method like regression.

Thanks in advance.

+4
source share
1 answer

, URL- UI api ?

, api, - com.ubnt.japi.web.rest.UserResource.getUser(String).

, , AngularJS /src/main/webapp/scripts/app/app.js. angular, angular . , .

0

Source: https://habr.com/ru/post/1529932/


All Articles