Win a copy of 97 Things Every Java Programmer Should Know this week in the Java in General forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • salvin francis
  • fred rosenberger

How to import Spring MVC framework

 
Ranch Hand
Posts: 210
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello, I have an eclipse NEON 3 version 4.6.3, maven is already active and hibernate and junit.
my question is how can I import the framework <Spring MVC> in my project eclipse.
I start on spring MVC.
my working environment is: 64-bit Fedora, MySql 5.7 and Tomcat 8.5, hibernate 2.1,
junit 4.12, maven 3.5.2 as build tools.


Regards
Philippe
 
Ranch Hand
Posts: 49
Eclipse IDE MySQL Database Fedora
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Here is the pom.xml dependencies to add use spring mvc framework.
 
Sheriff
Posts: 21950
106
Eclipse IDE Spring VI Editor Chrome Java Ubuntu Windows
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
But use a more up-to-date version. Spring 4.1.6 is quite old, the latest 4.x version is 4.3.15. I suggest that, if you're starting a new project, you use Spring 5.x (latest: 5.0.5). Also check out http://mvnrepository.com/artifact/org.springframework/spring-webmvc for all available versions.

One more suggestion: use a property to specify the Spring version, that way you only need to define it once (and change it once to upgrade).
 
Ranch Hand
Posts: 65
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Take source code and add it to your eclipse workspace.

Click on your project (Right Click) -> Debug As -> Debug Configuration -> Source Tab

Add one or more projects by click add button. Achives, Directories supported as well.

 
Rob Spoor
Sheriff
Posts: 21950
106
Eclipse IDE Spring VI Editor Chrome Java Ubuntu Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you add a proper Maven dependency then a good IDE will automatically download the Spring source code from Maven Central. No need to do all that stuff manually.
 
Morning came much too soon and it brought along a friend named Margarita Hangover, and a tiny ad.
Devious Experiments for a Truly Passive Greenhouse!
https://www.kickstarter.com/projects/paulwheaton/greenhouse-1
    Bookmark Topic Watch Topic
  • New Topic