This journey is all about
* Edge stack like Scala,Spark,Kafka etc
* Cloud(Kubernetes,Docker,CloudFoundry etc)
* Historically it was about mainly on JEE, SOA, BPEL/BPM but now mainly on Microservices
Bu Blogda Ara
creating a war serving web service both soap and rest style with spring
This evening I spend my time to create a war that serving web service both soap and rest style together with spring. Although it is easy to create it, the java developers often faced some annoying class cast or class not found exceptions. in fact responsible from these errors are not the developers but the designers, but I don't know why they are stay developing packages with same name and also put them into rt.jar and also another package and so on. It is clear that the way preventing these errors is putting one class only one package and also a package is must be ONLY one place, not two or more.
I want to prove it to you, if you have a big system that contains a lot of libraries, just grep the jars for packages and find it in your system. you will most probably see that packages are represent more than one jar. and the other thing is the jar names. why you don't give the jar name form the package name. I thing it must be a restrinction package names and jar names must identical as in java that Class name and file names are equal.
whatever,
you can check it out from https://github.com/farukonder/rest-jaxws-spring-maven
here the pom that is containing your all the dependencies and also exclusions!!!!.
4.0.0eu.tyrkiahuseu.tyrkiahus.web.webservice1.0wareu.tyrkiahus.web.webservice${project.build.directory}/endorsedUTF-8com.sun.jerseyjersey-server1.8org.springframeworkspring-core3.0.5.RELEASEorg.springframeworkspring-context3.0.5.RELEASEorg.springframeworkspring-web3.0.5.RELEASEcom.sun.jersey.contribsjersey-spring1.8org.springframeworkspringorg.springframeworkspring-coreorg.springframeworkspring-weborg.springframeworkspring-beansorg.springframeworkspring-contextorg.springframeworkspring-aopcom.sun.xml.bindjaxb-impl2.1.6org.jvnet.jax-ws-commons.springjaxws-spring1.8com.sun.xml.bindjaxb-implspringorg.springframeworkspring-coreorg.springframeworkspring-contextorg.springframeworkorg.apache.maven.pluginsmaven-compiler-plugin2.3.21.61.6${endorsed.dir}org.apache.maven.pluginsmaven-war-plugin2.1.1falseorg.mortbay.jettymaven-jetty-plugin6.1.1010foo9999maven2-repository.java.netJava.net Repository for Mavenhttp://download.java.net/maven/2/
Yorumlar
Yorum Gönder