|
@@ -3,7 +3,6 @@ package com.jpsoft.smart.lapi;
|
|
import com.jpsoft.smart.lapi.handler.HeartReportHandler;
|
|
import com.jpsoft.smart.lapi.handler.HeartReportHandler;
|
|
import com.jpsoft.smart.lapi.handler.ParseRequestHandler;
|
|
import com.jpsoft.smart.lapi.handler.ParseRequestHandler;
|
|
import com.jpsoft.smart.lapi.handler.PersonVerificationHandler;
|
|
import com.jpsoft.smart.lapi.handler.PersonVerificationHandler;
|
|
-import com.jpsoft.smart.lapi.handler.TextDecodeHandler;
|
|
|
|
import io.netty.bootstrap.ServerBootstrap;
|
|
import io.netty.bootstrap.ServerBootstrap;
|
|
import io.netty.channel.Channel;
|
|
import io.netty.channel.Channel;
|
|
import io.netty.channel.ChannelFuture;
|
|
import io.netty.channel.ChannelFuture;
|
|
@@ -19,7 +18,6 @@ import org.springframework.beans.factory.annotation.Value;
|
|
import org.springframework.boot.CommandLineRunner;
|
|
import org.springframework.boot.CommandLineRunner;
|
|
import org.springframework.boot.SpringApplication;
|
|
import org.springframework.boot.SpringApplication;
|
|
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
|
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
|
-import org.springframework.context.annotation.ComponentScan;
|
|
|
|
import org.springframework.transaction.annotation.EnableTransactionManagement;
|
|
import org.springframework.transaction.annotation.EnableTransactionManagement;
|
|
|
|
|
|
import javax.annotation.PreDestroy;
|
|
import javax.annotation.PreDestroy;
|
|
@@ -28,7 +26,6 @@ import javax.annotation.PreDestroy;
|
|
@SpringBootApplication
|
|
@SpringBootApplication
|
|
@EnableTransactionManagement
|
|
@EnableTransactionManagement
|
|
@MapperScan("com.jpsoft.smart.**.dao")
|
|
@MapperScan("com.jpsoft.smart.**.dao")
|
|
-@ComponentScan("com.jpsoft.smart.**")
|
|
|
|
public class LapiApplication implements CommandLineRunner {
|
|
public class LapiApplication implements CommandLineRunner {
|
|
public static void main(String[] args) {
|
|
public static void main(String[] args) {
|
|
SpringApplication.run(LapiApplication.class, args);
|
|
SpringApplication.run(LapiApplication.class, args);
|
|
@@ -57,10 +54,10 @@ public class LapiApplication implements CommandLineRunner {
|
|
.childHandler(new ChannelInitializer(){
|
|
.childHandler(new ChannelInitializer(){
|
|
@Override
|
|
@Override
|
|
protected void initChannel(Channel channel) throws Exception {
|
|
protected void initChannel(Channel channel) throws Exception {
|
|
- channel.pipeline().addLast(new TextDecodeHandler());
|
|
|
|
|
|
+// channel.pipeline().addLast(new TextDecodeHandler());
|
|
// channel.pipeline().addLast(new HttpRequestDecoder());
|
|
// channel.pipeline().addLast(new HttpRequestDecoder());
|
|
channel.pipeline().addLast(new HttpServerCodec());
|
|
channel.pipeline().addLast(new HttpServerCodec());
|
|
- channel.pipeline().addLast(new HttpObjectAggregator(2048*10000*10));
|
|
|
|
|
|
+ channel.pipeline().addLast(new HttpObjectAggregator(2048*10000));
|
|
channel.pipeline().addLast(new ParseRequestHandler());
|
|
channel.pipeline().addLast(new ParseRequestHandler());
|
|
channel.pipeline().addLast(heartReportHandler);
|
|
channel.pipeline().addLast(heartReportHandler);
|
|
channel.pipeline().addLast(personVerificationHandler);
|
|
channel.pipeline().addLast(personVerificationHandler);
|