New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

STS 3.9.1: RequestMapping View shows all the Resource URL with the same / value #227

Closed
manueljordan opened this Issue Dec 14, 2017 · 4 comments

Comments

Projects
None yet
3 participants
@manueljordan

manueljordan commented Dec 14, 2017

Hello STS developers

I have read:

Now I am working with:

Spring Tool Suite 

Version: 3.9.1.RELEASE
Build Id: 201710111105
Platform: Eclipse Oxygen.1a (4.7.1a)

Thus for a Spring Framework Web Application working with Gradle through multi-modules, for a module named web-29-controller, right click -> Spring Tools -> Add Spring Project Nature

For that module I have:

@Configuration
@RequestMappingsViewProfile
@ComponentScan(basePackages="com.manuel.jordan.controller")
public class RequestMappingsViewConfig {

	@Bean
	public String requestMappingsView(){
		throw new RuntimeException("This @Configuration with @Bean NEVER must be created in runtime");
	}

}

Where @RequestMappingsViewProfile applies to the request-mappings-view profile

Thus the following is mandatory:

  • web-29-controller, right click -> Properties

and then

First Tab
01

Third Tab
02

Second Tab
03
04

RequestMapping View
05

Why according with the previous figure all the Resource URL have the / value?
For the selected item I expect see /locale/changelocale, it according the following code

@Controller
@RequestMapping(path="/locale")
public class LocaleController {

	...

	/**
	 * Inform the new current locale established by the user.
	 *
	 * @param model for internal view purposes
	 * @return view location
	 */
	@GetMapping(path="/changelocale")
	public String changeLocale(Model model){
         ...	
        }

}

Not sure what is wrong or missing

@martinlippert

This comment has been minimized.

Member

martinlippert commented Dec 19, 2017

Hey @manueljordan can you attach a sample project?

@manueljordan

This comment has been minimized.

manueljordan commented Mar 24, 2018

Hello @martinlippert

Sorry by the huge delay, the project sample is here: sts-rmw.

I share now the following experience in STS version 3.9.2 and Spring Framework version 5.0.4, below the situation:

Root and child project with Spring Nature
01

Scanned the @Configuration classes
02
03
04

For the sts-rmw-spring project opening the @RequestMappings view

05

Nothing

06
07

Solution Clean and Build Project

Thus appears the following

08

Problem: all the Resource URL have /

@martinlippert

This comment has been minimized.

Member

martinlippert commented Apr 24, 2018

Thanks a lot for the detailed bug report and the sample project, that helped a lot to reproduce and fix this issue. Very much appreciated. Debugged this today and fixed the issue. Should be up tomorrow in the nightly distribution builds as well as published as part of STS 3.9.5.

@manueljordan

This comment has been minimized.

manueljordan commented Apr 24, 2018

Thanks to you for your valuable, quick and polite support ... I enjoy work in this IDE

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment