What you’ll need
- About 30 minutes
- JDK 1.8 or later.
- Eclipse <Oxigene>
- Weblogic12c
- Maven
- Postman (Optional)
Last update:
It has not been updated as Jersey face many problems to intregrate with Spring.
Pending to update all of the problems face with the integration.
There are many problems as well to included in Weblogic. Version 1.8 by default try to include version 6.
6 Hours estimated to document all...
Name with project for Jersey Architecture DMS.
Name with project for Jersey Architecture DMS.
Preconditions:
Update dependencies to Pom.xml
Add dispatcherServlet to web.xml
Reference: Spring concepts - dispatcherServlet
Add webApplicationContext.xml to the project
Initially we will add just the basic setting, reference to the services package.
Add weblogic.xml to the project
<display-name>Archetype Created Web Application</display-name>
Initially we will add just the basic setting, reference to the services package.
<beans xmlns="http://www.springframework.org/schema/beans"xmlns:context="http://www.springframework.org/schema/context"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-4.0.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-4.0.xsd">
<context:component-scan base-package="eu.cec.empl.dms.presentation.rest.services" />
</beans>
We will do the same as we have done with the webApplicationContext.xml, we just add the basic settings.
(Pending code)
Testing the installation
http://www.codingpedia.org/ama/restful-web-services-example-in-java-with-jersey-spring-and-mybatis/
<?xml version="1.0" encoding="UTF-8"?>
<wls:weblogic-web-app xmlns:wls="http://xmlns.oracle.com/weblogic/weblogic-web-app" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/ejb-jar_3_0.xsd http://xmlns.oracle.com/weblogic/weblogic-web-app http://xmlns.oracle.com/weblogic/weblogic-web-app/1.2/weblogic-web-app.xsd">
<wls:context-root>dms</wls:context-root>
</wls:weblogic-web-app>
Add the Sources files
- Domain object
- Persistence DAO
Testing the installation
See Also
The following reference may also be helpful:
http://www.codingpedia.org/ama/restful-web-services-example-in-java-with-jersey-spring-and-mybatis/


Comments
Post a Comment