<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title>Spring on Felix Seifert</title>
		<link>https://felix-seifert.com/blog/tags/spring/</link>
		<description>Recent content in Spring on Felix Seifert</description>
		<generator>Hugo</generator>
		<language>en-gb</language>
		
		
		
			<copyright>Felix Seifert</copyright>
		
		
			<lastBuildDate>Sun, 14 Jul 2019 13:29:21 +0000</lastBuildDate>
		
			<atom:link href="https://felix-seifert.com/blog/tags/spring/index.xml" rel="self" type="application/rss+xml" />
			<item>
				<title>Limit and Offset in Spring Data JPA</title>
				<link>https://felix-seifert.com/blog/limit-and-offset-spring-data-jpa-repositories/</link>
				<pubDate>Sun, 14 Jul 2019 13:29:21 +0000</pubDate>
				<guid>https://felix-seifert.com/blog/limit-and-offset-spring-data-jpa-repositories/</guid>
				<description>&lt;p&gt;Limit and offset are two properties often requested for requesting data out of a database. Implementing them with a SQL query is also not that difficult. In this article I will describe how to achieve this with the magic of Spring Data JPA repositories (without SQL).&lt;/p&gt;&#xA;&lt;h2 id=&#34;the-entity&#34;&gt;The Entity&lt;/h2&gt;&#xA;&lt;p&gt;First, we need a class describing the entities which should be retrieved from the database. We annotate the class with &lt;code&gt;@Entity&lt;/code&gt; to mark it as a representative of a database table. The class describes how the table in the database should look like. Each object of this class would be stored as one row in this table (in a relational database).&lt;/p&gt;</description>
			</item>
			<item>
				<title>autobahn-spring: Autobahn|Java and Spring</title>
				<link>https://felix-seifert.com/blog/integrate-autobahnjava-and-spring/</link>
				<pubDate>Sun, 27 Jan 2019 16:24:36 +0000</pubDate>
				<guid>https://felix-seifert.com/blog/integrate-autobahnjava-and-spring/</guid>
				<description>&lt;p&gt;Are you an enthusiastic user of Spring and do you also want to benefit from the &lt;a href=&#34;https://felix-seifert.com/blog/web-application-messaging-protocol/&#34;&gt;Web Application Messaging Protocol&lt;/a&gt;? Even though &lt;a href=&#34;https://felix-seifert.com/blog/wamp2spring-router-topics-procedures/&#34;&gt;wamp2spring&lt;/a&gt; mainly serves as a router, Spring users often want to create several microservices communicating with each other. A comfortable solution is using the WAMP library &lt;a href=&#34;https://felix-seifert.com/blog/autobahnjava-wamp-library-crossbar/&#34;&gt;Autobahn|Java&lt;/a&gt;. This article will describe how to combine Spring and Autobahn|Java.&lt;/p&gt;&#xA;&lt;h2 id=&#34;create-a-controller-for-wamp&#34;&gt;Create a Controller for WAMP&lt;/h2&gt;&#xA;&lt;p&gt;Autobahn|Java could be implemented as a controller. Therefore, the bean of Spring should be created with the annotation &lt;code&gt;@Controller&lt;/code&gt;. &lt;a href=&#34;https://felix-seifert.com/blog/web-application-messaging-protocol/&#34;&gt;Topics and procedures&lt;/a&gt; could be handled exactly as described in the article about &lt;a href=&#34;https://felix-seifert.com/blog/autobahnjava-wamp-library-crossbar/&#34;&gt;Autobahn|Java&lt;/a&gt;. The methods implementing this should be registered as listeners. This could be achieved in the constructor of the controller.&lt;/p&gt;</description>
			</item>
			<item>
				<title>wamp2spring: Topics and Procedures</title>
				<link>https://felix-seifert.com/blog/wamp2spring-router-topics-procedures/</link>
				<pubDate>Fri, 02 Nov 2018 17:36:02 +0000</pubDate>
				<guid>https://felix-seifert.com/blog/wamp2spring-router-topics-procedures/</guid>
				<description>&lt;figure&gt;&#xA;  &lt;img src=&#34;https://felix-seifert.com/images/posts/wamp2spring2publicationsprocedures-1_hu_9ed4f8e5b618946e.webp&#34;&#xA;       &#xA;       srcset=&#34;https://felix-seifert.com/images/posts/wamp2spring2publicationsprocedures-1_hu_4cc26896e091d48a.webp 640w, https://felix-seifert.com/images/posts/wamp2spring2publicationsprocedures-1_hu_9ed4f8e5b618946e.webp 1280w&#34;&#xA;       sizes=&#34;(min-width: 42rem) 40rem, 100vw&#34;&#xA;       width=&#34;1280&#34; height=&#34;550&#34;&#xA;       alt=&#34;wamp2spring serves as a WAMP router and could register remote procedures and publish on topics.&#34;&#xA;       loading=&#34;lazy&#34; decoding=&#34;async&#34;&gt;&#xA;&lt;/figure&gt;&#xA;&#xA;&lt;p&gt;wamp2spring offers the option to serve as Web Application Messaging Protocol (WAMP) router publishing on topics and registering remote procedures. The article &lt;a href=&#34;https://felix-seifert.com/blog/wamp2spring-wamp-router/&#34;&gt;wamp2spring - Router for WAMP&lt;/a&gt; has already described how to set up a router with wamp2spring. In this article, we would learn how the router could publish on topics and register remote procedures.&#xA;Understanding RPC and Pub/Sub might be quite helpful for creating microservices communicating via WAMP. The different ways of communicating via the protocol are described in the article &lt;a href=&#34;https://felix-seifert.com/blog/web-application-messaging-protocol/&#34;&gt;Web Application Messaging Protocol&lt;/a&gt;.&lt;/p&gt;</description>
			</item>
			<item>
				<title>wamp2spring - Router for WAMP</title>
				<link>https://felix-seifert.com/blog/wamp2spring-wamp-router/</link>
				<pubDate>Sun, 21 Oct 2018 14:57:56 +0000</pubDate>
				<guid>https://felix-seifert.com/blog/wamp2spring-wamp-router/</guid>
				<description>&lt;figure&gt;&#xA;  &lt;img src=&#34;https://felix-seifert.com/images/posts/wamp2spring2_hu_166425c4cd6e44f4.webp&#34;&#xA;       &#xA;       srcset=&#34;https://felix-seifert.com/images/posts/wamp2spring2_hu_b90b0b0c8c686307.webp 640w, https://felix-seifert.com/images/posts/wamp2spring2_hu_166425c4cd6e44f4.webp 1280w&#34;&#xA;       sizes=&#34;(min-width: 42rem) 40rem, 100vw&#34;&#xA;       width=&#34;1280&#34; height=&#34;427&#34;&#xA;       alt=&#34;wamp2spring is a library used for setting up a WAMP router.&#34;&#xA;       loading=&#34;lazy&#34; decoding=&#34;async&#34;&gt;&#xA;&lt;/figure&gt;&#xA;&#xA;&lt;p&gt;As I am a strong advocate of Spring Boot, I would present you with another way to set up a router for the Web Application Messaging Protocol (WAMP). This is based on the Java library &lt;a href=&#34;https://github.com/ralscha/wamp2spring&#34; target=&#34;_blank&#34; rel=&#34;noopener&#34;&gt;wamp2spring&lt;/a&gt; and Spring Boot (you could also use the Spring framework).&#xA;Besides setting up one or multiple WAMP clients (for example with &lt;a href=&#34;https://felix-seifert.com/blog/autobahnjava-wamp-library-crossbar/&#34;&gt;Autobahn|Java&lt;/a&gt;), a router is needed so that the clients could communicate with each other via WAMP. I have already described the idea in the article &lt;a href=&#34;https://felix-seifert.com/blog/web-application-messaging-protocol/&#34;&gt;Web Application Messaging Protocol&lt;/a&gt;.&#xA;Even though there are multiple options for settings, it is quite convenient to set up a router with the default settings.&#xA;A wamp2spring router itself could register remote procedures, as well as publish on topics, which could be addressed by the wamp clients. This article would present a solution of a router that does not register or publish.&lt;/p&gt;</description>
			</item>
	</channel>
</rss>
