Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
I am creating a simple web application using Spring MVC and Spring Data that will relate to a database.
What are the first steps that I should take when designing/programming this?
Set up database?
Create simple project using maven?
Follow the Quick Start on Spring Boot: http://projects.spring.io/spring-boot/
Spring Boot will let you fire up a Spring MVC application very quickly and easily.
If it were me, I would take this opportunity to use Gradle instead of maven (http://gradle.org/getting-started-gradle-java/).
Once you have the basic MVC setup and tested, then you can move on to setting up the database and Spring Data. You can get more information on how to setup Spring Data for Spring Boot in section 29 here:
https://docs.spring.io/spring-boot/docs/current/reference/html/boot-features-sql.html
Related
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 2 years ago.
Improve this question
I have a project in the company that is running with spring web, they asked me for a batch job in which they want to implement spring batch. I have tried to elaborate it but it always gives me an error The web server cannot be started.
I would like to know if spring web is compatible with spring batch running at the same time in the same project
Yes, they are compatible. Can you post the error that you got?
By the way, consider to use #Schedule on you project, if it's possible.
#Scheduled(fixedRate = 1000)
public void executeJob() {
}
In some cases, it resolves the problem and you don't need to put a middleware to increase complexity to you business.
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 1 year ago.
Improve this question
I'm beginner to spring and i want to develop web application. Which should I study between spring mvc and spring boot?
The answer is "both". :-)
More specifically: you learn web development by writing web services. Spring Boot makes it easy to get a Spring MVC service up and running quickly. The concepts you learn will map to non-Boot, even non-Spring, projects.
Spring boot uses spring-mvc under the hood (if you use the web dependency).
So better learn spring boot which will get you up and running quickly.
You will learn spring-mvc specific feature eventually if you keep going...
Spring Boot is a easier way to use Spring MVC, because you don't need to install dependency manager, container, configs are simpler, etc.
But I got your question and I suggest you to start with Spring Boot, because you will make things work easily, so you won't get frustrated in the beginning. If you feel the need to use only Spring mvc, try it in the future.
Go to https://start.spring.io/ to generate your first project.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 4 years ago.
Improve this question
I have a Java web project with JSP as frontend and Java for backend. I want to convert this project to Angular Frontend and Java backend. I tried googling but didn't get anything. I am really stuck on how to do this.
Can anyone tell how can I achieve this?
You can change your project to MVC structure. May be you have separate service layer in your current project. Try to implement Controller layer. It will be better If you use REST controller. REST API is more suitable for Angular. You need to change bindings with JSP UI. Try to convert it with REST controller. And make service layer and dao layer separate. So Structure will be like this:
UI->Controller -> Service->Dao
I dont know your project is spring based or not. If spring based then you can covert your project with Spring boot project. There are many sample is now currently available for Spring based project.
If your project is not spring based you just need to implement REST API to your codebase and remove JSP bindings.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
I want to implement an angular 2 based app with a backend in Spring MVC. I was able to implement a basic web app using maven in eclipse on the Spring MVC. I know how the basic jsp system works. I now need to know how to integrate angular 2 into the project. I have a basic idea of angular 2 but am having some problems regarding how to deal with its dependencies in the spring mvc. Could you give me some directions?
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 7 years ago.
Improve this question
I am new bee to spring. I am trying to build an application using JSP and Hibernate with Spring. Is it a good practice to use jsp, servlets and use spring to declare the database connectivity and beans in xml or should i use spring mvc please guide me.
You can use whatever part you need from spring. That is one of the best thing about springframework. If you need to use spring just for data access layer then that is fine use it just for that. If you will use it dependency injection frawework for your project then you can use it that way.
Spring MVC is just a presentation layer part of spring. I have been using springframework for last 12 years and I haven't used SpringMVC until last year. So I recommend you to use what you know best for presentation layer but I also strongly recommend using spring for back-end layer.