Spring Explorer not showing beans from bean definition file
Asked Answered
B

4

15

I just downloaded the Springsource Tool Suite, and I created a simple bean configuration file called myDefinition.xml and placed it in the root directory of the Spring Project. However, the Spring Explorer is not showing any data. I'm using eclipse 3.5 and the latest SpringSource all-in-one installation.

Also, if I specify invalid property names in the configuration file, I get no error. Autocomplete, however, is working.

Thoughts?

Botanist answered 16/10, 2009 at 18:42 Comment(0)
C
25

In the Spring Explorer tab in Eclipse, right click on your project > properties. Then go to Spring > Beans Support and select the Config Files tab. You can then select files or scan a directory and that should add them. I haven't found a way to autoscan a directory so I don't have to do this whenever I add a new spring bean file. The beans that appear in that list are stored in the .springbeans file.

Chamfer answered 16/10, 2009 at 19:5 Comment(2)
Sure thing. If you figure out a way to have it autoscan the directory when new files are added, please post that as well. Thanks.Chamfer
This answer and the one from Claudio below solved the riddle for me.Mancuso
S
8

Just want to add that if you want to generate a diagram of a webflow of an existing project, you have to right-click said project in Eclipses Project Explorer and "Add Spring Project Nature" by using the Spring Tools entry of the context menu.

Sibyl answered 8/11, 2010 at 12:15 Comment(0)
A
0

There currently (as of 2012-04-10) seem to be problems with the Spring Explorer view when using a purely annotation driven bean definition (i.e. using Java annotations to wire everything up instead of using XML files).

There is a workaround though, by providing a minimum XML file that declares scanning for components. http://forum.springsource.org/showthread.php?118928-Spring-Explorer-with-Java-based-Web-Container-configuration

Unfortunately, this procedure is still flawed, missing some components.

Arrester answered 10/4, 2012 at 21:58 Comment(0)
L
0

Just to add Claudio030

Make sure you have JEE perspective selected for your project, otherwise it won't show in Java perspective.

Lubra answered 20/3, 2016 at 19:43 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.