Don't wanna be here? Send us removal request.
Text
Learning Spring
Since most of my programming experience is in Java, I decided I might try learning to build a project using the Spring framework. I’ve been trying to follow a few different Spring tutorials (the ones that I don’t have to pay), but I think some of them might be outdated. Right now it’s August 2018, and I’m currently going through the tutorial at https://www.javatpoint.com/spring-tutorial.
Setting Up the Project: I was a little confused about how to set up the project at first. I wanted to directly download the Spring .jar files from the original website, but I couldn’t find them there. I found an answer on StackOverflow that using Maven might be a good idea. I already have Eclipse on my PC and it includes Maven, so I followed the example at http://www.vogella.com/tutorials/EclipseMaven/article.html to create the project. In the pom.xml file I added the dependencies:
<dependency> <groupId>org.springframework</groupId> <artifactId>spring-context</artifactId> <version>3.1.2.RELEASE</version> <scope>runtime</scope> </dependency> <!-- https://mvnrepository.com/artifact/commons-logging/commons-logging --> <dependency> <groupId>commons-logging</groupId> <artifactId>commons-logging</artifactId> <version>1.2</version> </dependency>
The tutorial said to use org.springframework.beans.factory.xml.XmlBeanFactory, but evidently this is deprecated. I looked at an answer on StackOverflow to do the following:
ApplicationContext factory = new ClassPathXmlApplicationContext([insert xml file]);
instead of the XmlBeanFactory. Also, the program continued to throw an error because the String I used for the xml file was incorrect. So I either had to use “src/main/java/filename.xml” or “classpath:filename.xml” to fix the error.
I’ll write more when I have more problems.
0 notes
Text
New Blog
This is really just a personal blog for me to keep track of the problems I have during my project building experience. I really enjoy learning programming languages and frameworks to build different kinds of projects, and I decided to start writing about my experiences in case I’d like to look back on the challenges I’ve had and the resources I used. If you continue to read my posts, I hope you might find it helpful in some way.
0 notes