Learn JPOS Part 4 throw rest service to Host
This part actually my experiment to throw rest message to host we will using spring boot as RestFul service and using those service to throw ISOMsg as JSON data upon the request on web.
If you read the previous tutorial (Part 3) the code almost same instead we add new QBean to run webservice when Q2 start.
QBean XML for webservice
<qrest class="com.gl.qbean.QRestService">
</qrest>
QBean class
Actually the Qbean class contain spring boot run method.
import org.jpos.q2.QBeanSupport;
import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.ComponentScan;
/**
* Created by ggpratama on 10/9/2015.
*/
@SpringBootApplication
@ComponentScan(basePackages = "com.gl")
public class QRestService extends QBeanSupport {
@Override
...