Spring installation with Eclipse

I have downloaded and installed Spring STS for Eclipse ... But when I created Spring project I cannot

import org.springframework.context.ApplicationContext;

So I tried to add a library like spring.jar, but I couldn't find this jar. (properties -> java build path -> libraries) What's wrong with this setting? Or did my installation fail?

+3


source to share


2 answers


Spring STS is only an Eclipse plugin that helps a developer to manage spring beans. It is not necessary to develop a spring based application.

So your second approach was correct for adding the spring library. You can download spring here: Spring Boot and then add it as a library to your project.



But seriously ... I would suggest you do the tutorial first: http://www.springsource.org/tutorials

+1


source


Plugins do not include spring library.

The plugin is only for managing the config reference in your project build in eclipse.
Libraries are the actual jar file that is required for both compilation and runtime.

If you skip installing the plugin your code will work if your config is correct But if you skip spring installing the library or loading then your code will not compile.



Walk through the step-by-step guide by following the guide below.

Spring Step by Step Tutorial

+1


source







All Articles