![]() ![]() Truezip plugin to move spring.handlers and spring.schemas to classes/META-INF.Shade plugin to make single files from spring.schemas and spring.handlers and transform them to a single file independently.Bundle plugin make necessary changes in Manifest file to create it a bundle.War plugin to exclude all jars from final war.If you find more errors with same type, you can add your class name here. In this class we are initializing or loading the necessary classes from static method. : .ContextNamespaceHandler cannot be found. When you deploy the portlet without this class, you get errors like this. You are just done, Try & Enjoy the "unused") Note : You need to deploy gson bundle as well to access it! If you don't want it in one of your portlet, simply remove it. If you know this way please share it here.Īdvantage out of this interceptor is you can call this interceptor in any of your portlet by just making an entry in your spring portlet xml. I tried to make it work with bean creation inside interceptor module only and use it inside portlet module, but was unable to. In default annotation handler we added the interceptor.We defined portletHandlerInterceptor and provided property as gson bean.Reason behind creating two modules is to demonstrate bundle development where you can interact between these.īundle 1 Portlet Interceptor - MyPortletInterceptor I have created two modules for this example, one contains portlet and another contains interceptor and annotation class. Methods are available for each of the phase of portlet With Spring interceptor, you can execute before and after the phase executes. Interceptors are more coupled with request/response objects. You can use filters as well for the same tasks you want to perform with interceptors. It has nothing to do with Liferay, but as we are using Liferay environment to run portlet, it's spring osgi liferay portlet.īy Creating this interceptor you create one more layer between View and Controller. In this example, we will create an annotation and use that annotation in our portlet class and then by reflection we will call that method in our interceptor.We can do it without all of it, but as we are doing example, let's learn something more out of it. To create an osgi spring portlet please look at the spring osgi portlet. Today we will be learning about portlet handler interceptor or simply you can say MVC interceptor with spring.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |