This project will demo the techniques that would be used in our project. This version 1 will be just a general-purpose website (I call it bare version), it has a front-end and a back-end, the backend requires login. The documentation is in another project, it's just my personal learning notes.
Todo
-
Web services security(done) -
Asked one question onstackoverflow(replied) -
RESTful CRUD (@RestController in Spring4.x)(done) -
Slf4j + Log4j(done) - Error handling(ongoing)
- what's the difference between ctx-annotation-config and mvc-annotation-driven(reading)
- i18n: MessageSourceAware
- A simple Android native client consuming RESTful service.(reading a book)
- A hybrid mobile client consuming RESTful service(learning).
How to setup
-
Get the code git clone https://github.com/uniquejava/spring4_rest.git
-
Open project in eclipse, the maven plugin should automatically download the required jars.
Also you can open this project in IDEA but ensure you right click on the pom.xml and mark this project as a Maven project.
-
Run script doc/sql/mysql.sql
-
Deploy to Tomcat
-
Open in browser: http://localhost:8080/rest/
Notes on Eclipse
When you run this project in Eclipse, you may encounter below exceptions.
java.lang.ClassNotFoundException: org.springframework.web.servlet.DispatcherServlet
The solution is very simple, you just need to add the "Maven Dependency" in the Deployement Assembly
right click on your project and choose properties.
click on Deployement Assembly.
click add
click on "Java Build Path Entries"
select Maven Dependencies"
click Finish.
That's it!! rebuild and deploy again
Components
- spring 4.1.4
- jackson 2.5
-
bootstrap-3.3.2 - jquery-1.11.2
Roadmap
Bare version will be proactive and will demo/use the latest techniques if i am happy.
General version would be done if i have time.
Corporation version is for internal use and close source.
Bare:
- i18n
- cluster
- excel, odf, pdf
- jpa
- cache
General
- bootstrap3.3.2
- kindeditor
Corporation:
- V18 integeration
Environment
Here is the environment I am working on.
- Ubuntu12.04.5 LTS
- Eclipse JEE 4.3
- Tomcat 7.0.57
- JDK1.6.0_45
However, this project is fully tested on Win7 + WAS8.5
来源:oschina
链接:https://my.oschina.net/u/113421/blog/377129