Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Java
  4. Spring beginner level

Spring beginner level

Scheduled Pinned Locked Moved Java
learningjavaxmlhelptutorial
1 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • V Offline
    V Offline
    Valentinor
    wrote on last edited by
    #1

    To make it clear from the start, I just started learning Spring. So, at the lowest level, using Spring means: - Making a class for the object you are working with, for example Person (String name, String age), I know I should use int for age, but I haven't seen yet examples with different data types then String, but I'll get there. - Having one or more XML files with data (beans from what I've read), for example People.xml:

    - Using those values in a method, for example in main:

      ApplicationContext context = new ClassPathXmlApplicationContext("People.xml");
      Person person1 = (Person) context.getBean("person1");
      System.out.println(person1.toString());
    
      Person person2 = (Person) context.getBean("person2");
      System.out.println(person2.toString());
    

    Is this one of the simplest things you can do with Spring? I for one, I'm understanding this kind of stuff a lot easier reading some examples, but most Spring tutorials go way too deep in theory and have too few practical examples. If this is the "base", going forward, what should I look at, what will help me understand more practical uses for Spring?

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups