Re: Using SpringMVC in Karaf 4.2.6

2019-11-10 Thread duan2ping
Hi JB Good Job! With it, I can use Spring perfectly in karaf, right? When can I see it. Regards duan -- Sent from: http://karaf.922171.n3.nabble.com/Karaf-User-f930749.html

Re: Using SpringMVC in Karaf 4.2.6

2019-11-10 Thread Jean-Baptiste Onofré
Hi, Spring DM is only required if you want to inject OSGi service in your Spring application context. If you want to inject OSGi services, you can create your own bean using bundleContext. I have in mind to provide a Spring controller, and it's almost already done in Aries Blueprint AFAIR (I have

Re: Using SpringMVC in Karaf 4.2.6

2019-11-10 Thread duan2ping
Hi JB You said that I can use the new SpringMVC, but I can't use SpringDM. I don't know much about SpringDM(SpringDM is a Spring module that implements Spring's interaction with OSGi contexts and acquires or publishes OSGi services.). I understand that Spring DM is required in karaf to use Sprin

Re: Using SpringMVC in Karaf 4.2.6

2019-11-10 Thread Jean-Baptiste Onofré
Hi Duan, I fully agree with you ;) You can use new Spring version (it works fine), but not with Spring DM (as spring dm only works with Spring 3.x). That's why I proposed to refactore either using Spring MVC (and the Dispatcher servlet) or directly using your own controller servlet serving fronte

Re: Using SpringMVC in Karaf 4.2.6

2019-11-10 Thread duan2ping
Hi JB Although Karaf retains spring-legacy, but it should not be a good solution. Spring has stopped maintenance, I think I should not be using it. It seems that I want to use the new version of Spring in Karaf is not very likely. That's a shame, I have to say goodbye to Spring. At present, there

Re: Using SpringMVC in Karaf 4.2.6

2019-11-10 Thread Jean-Baptiste Onofré
Hi, As said early, you can do the same as in Karaf 3.0.8 with Karaf 4.2.x if you first add spring-legacy features repository: it still provides Spring 3.2.14 and spring-dm. Just do feature:repo-add spring-legacy. Regards JB On 11/11/2019 04:42, duan2ping wrote: > Hi JB > > First of all, thank

Re: Using SpringMVC in Karaf 4.2.6

2019-11-10 Thread duan2ping
Hi JB First of all, thank you very much for your suggestions and reply. This is my Web Bundle I want to transform. ob-web.gz It is based on karaf3.0.8 and spring3.2.14. I am trying to upgrade karaf and spring. But unfortunately found t

Re: Using SpringMVC in Karaf 4.2.6

2019-11-08 Thread Jean-Baptiste Onofré
Hi Duan, Karaf doesn't gave up Spring, it's still available. In your bundle, you can still use Spring MVC DispatcherServlet, wiring, etc. Spring DM is also still available but you have to use old Spring version: it's not due to Karaf, it's Spring that doesn't maintain Spring DM anymore. So, my a

Re: Using SpringMVC in Karaf 4.2.6

2019-11-08 Thread duan2ping
Hi JB Because karaf gave up Spring, I can only use Servlet to develop web applications in OSGi. So, I need to do a lot of work to implement a wrapper similar to the SpringMVC framework. Is there any other good advice, or can subsequent versions of Karaf provide a framework that can replace Spri

Re: Using SpringMVC in Karaf 4.2.6

2019-11-08 Thread Jean-Baptiste Onofré
Hi, I compared spring and blueprint. I don't know enough SpringMVC to compare. Anyway, SpringMVC is one think Spring DM is nother one. You also have the Spring extender in blueprint, so, it should be possible. About the servlet, yes, you can deploy a servlet in different ways. You have examples

Re: Using SpringMVC in Karaf 4.2.6

2019-11-08 Thread duan2ping
Hi JB I tried to check out some information about using Blueprint, but there is nothing to gain. If use blueprint and scr instead of spring, does web application development have a similar alternative to springmvc? Or can you only use the original servlet method like the one below? @OsgiService

Re: Using SpringMVC in Karaf 4.2.6

2019-11-04 Thread duan2ping
Hi JBI tried to check out some information about using Blueprint, but there is nothing to gain. Do you have any reference materials related to Blueprint's development of web applications?Thank you very much!Regardsduan -- Sent from: http://karaf.922171.n3.nabble.com/Karaf-User-f930749.html

Re: Using SpringMVC in Karaf 4.2.6

2019-10-30 Thread duan2ping DL•
Thanks JB,I will study blueprint, scr, to replace spring. Regards Duan Jean-Baptiste Onofré 于2019年10月31日周四 下午1:06写道: > Hi, > > Karaf 4.2.6 still supports spring-dm if you add the spring-legacy > features repo: > > feature:repo-add spring-legacy > > The reason is that spring-dm only works if old

Re: Using SpringMVC in Karaf 4.2.6

2019-10-30 Thread Jean-Baptiste Onofré
Hi, Karaf 4.2.6 still supports spring-dm if you add the spring-legacy features repo: feature:repo-add spring-legacy The reason is that spring-dm only works if old Spring version (and it's deprecated now). So, you can still use it with spring-legacy, but I recommend to move to something else (scr

Using SpringMVC in Karaf 4.2.6

2019-10-30 Thread duan2ping DL•
Hi All, I am trying to upgrade from karaf3.0.9 to karaf4.2.6. However, karaf4.2.6 does not support spring-dm. I want to continue using SpringMVC in karaf. What should I do ? Thanks! Best Regards! Duan