springboot:开发环境打jar包,环境部署

我的环境:

windows 是 192.168.124.12 无线局域网,虚拟机Centos7  192.168.65.113

zookeeper,mysql用docker容器

启动service(provider):

root@localhost dubbospringboot]# nohup java -jar /opt/dubbospringboot/dubbo-provider-0.0.1-SNAPSHOT.jar >service.log &
[1] 113277
[root@localhost dubbospringboot]# nohup: 忽略输入重定向错误到标准输出端

[root@localhost dubbospringboot]# 
[root@localhost dubbospringboot]# 
[root@localhost dubbospringboot]# ps -ef | grep dubbo-provider-0.0.1-SNAPSHOT.jar
root     113277 111314 99 18:00 pts/1    00:00:08 java -jar /opt/dubbospringboot/dubbo-provider-0.0.1-SNAPSHOT.jar
root     113289 111314  0 18:00 pts/1    00:00:00 grep --color=auto dubbo-provider-0.0.1-SNAPSHOT.jar

service启动成功日志:


=====开始启动springboot项目=======

  .   ____          _            __ _ _
 /\\ / ___'_ __ _ _(_)_ __  __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
 \\/  ___)| |_)| | | | | || (_| |  ) ) ) )
  '  |____| .__|_| |_|_| |_\__, | / / / /
 =========|_|==============|___/=/_/_/_/
 :: Spring Boot ::        (v2.0.4.RELEASE)

2019-05-25 18:00:45.374  INFO 113277 --- [           main] com.tzb.myspringboot.ServiceApplication  : Starting ServiceApplication v0.0.1-SNAPSHOT on localhost.localdomain with PID 113277 (/opt/dubbospringboot/dubbo-provider-0.0.1-SNAPSHOT.jar started by root in /opt/dubbospringboot)
2019-05-25 18:00:45.413  INFO 113277 --- [           main] com.tzb.myspringboot.ServiceApplication  : No active profile set, falling back to default profiles: default
2019-05-25 18:00:45.990  INFO 113277 --- [           main] ConfigServletWebServerApplicationContext : Refreshing org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext@64cee07: startup date [Sat May 25 18:00:45 CST 2019]; root of context hierarchy
2019-05-25 18:00:51.342  INFO 113277 --- [           main] o.s.b.f.xml.XmlBeanDefinitionReader      : Loading XML bean definitions from class path resource [application-dubbo.xml]
2019-05-25 18:00:52.699  INFO 113277 --- [           main] o.s.b.f.xml.XmlBeanDefinitionReader      : Loading XML bean definitions from class path resource [application-dubbo-provider.xml]
2019-05-25 18:00:53.096  INFO 113277 --- [           main] o.s.b.f.xml.XmlBeanDefinitionReader      : Loading XML bean definitions from class path resource [application-dubbo-consumer.xml]
2019-05-25 18:00:56.985  INFO 113277 --- [           main] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration' of type [org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration$$EnhancerBySpringCGLIB$$43bec851] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2019-05-25 18:01:00.309  INFO 113277 --- [           main] o.s.b.w.embedded.tomcat.TomcatWebServer  : Tomcat initialized with port(s): 7722 (http)
2019-05-25 18:01:00.492  INFO 113277 --- [           main] o.apache.catalina.core.StandardService   : Starting service [Tomcat]
2019-05-25 18:01:00.493  INFO 113277 --- [           main] org.apache.catalina.core.StandardEngine  : Starting Servlet Engine: Apache Tomcat/8.5.32
2019-05-25 18:01:00.558  INFO 113277 --- [ost-startStop-1] o.a.catalina.core.AprLifecycleListener   : The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: [/usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib]
2019-05-25 18:01:01.057  INFO 113277 --- [ost-startStop-1] o.a.c.c.C.[Tomcat].[localhost].[/]       : Initializing Spring embedded WebApplicationContext
2019-05-25 18:01:01.061  INFO 113277 --- [ost-startStop-1] o.s.web.context.ContextLoader            : Root WebApplicationContext: initialization completed in 15092 ms
2019-05-25 18:01:01.492  INFO 113277 --- [ost-startStop-1] o.s.b.w.servlet.ServletRegistrationBean  : Servlet dispatcherServlet mapped to [/]
2019-05-25 18:01:01.528  INFO 113277 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean   : Mapping filter: 'characterEncodingFilter' to: [/*]
2019-05-25 18:01:01.535  INFO 113277 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean   : Mapping filter: 'hiddenHttpMethodFilter' to: [/*]
2019-05-25 18:01:01.538  INFO 113277 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean   : Mapping filter: 'httpPutFormContentFilter' to: [/*]
2019-05-25 18:01:01.542  INFO 113277 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean   : Mapping filter: 'requestContextFilter' to: [/*]
2019-05-25 18:01:03.026  INFO 113277 --- [           main] com.zaxxer.hikari.HikariDataSource       : HikariPool-1 - Starting...
2019-05-25 18:01:04.664  INFO 113277 --- [           main] com.zaxxer.hikari.HikariDataSource       : HikariPool-1 - Start completed.
2019-05-25 18:01:04.966  INFO 113277 --- [           main] j.LocalContainerEntityManagerFactoryBean : Building JPA container EntityManagerFactory for persistence unit 'primaryPersistenceUnit'
2019-05-25 18:01:05.210  INFO 113277 --- [           main] o.hibernate.jpa.internal.util.LogHelper  : HHH000204: Processing PersistenceUnitInfo [
	name: primaryPersistenceUnit
	...]
2019-05-25 18:01:05.734  INFO 113277 --- [           main] org.hibernate.Version                    : HHH000412: Hibernate Core {5.2.17.Final}
2019-05-25 18:01:05.739  INFO 113277 --- [           main] org.hibernate.cfg.Environment            : HHH000206: hibernate.properties not found
2019-05-25 18:01:05.976  INFO 113277 --- [           main] o.hibernate.annotations.common.Version   : HCANN000001: Hibernate Commons Annotations {5.0.1.Final}
2019-05-25 18:01:07.102  INFO 113277 --- [           main] org.hibernate.dialect.Dialect            : HHH000400: Using dialect: org.hibernate.dialect.MySQL5Dialect
2019-05-25 18:01:09.979  INFO 113277 --- [           main] j.LocalContainerEntityManagerFactoryBean : Initialized JPA EntityManagerFactory for persistence unit 'primaryPersistenceUnit'
2019-05-25 18:01:10.232  INFO 113277 --- [           main] j.LocalContainerEntityManagerFactoryBean : Building JPA container EntityManagerFactory for persistence unit 'secondPersistenceUnit'
2019-05-25 18:01:10.238  INFO 113277 --- [           main] o.hibernate.jpa.internal.util.LogHelper  : HHH000204: Processing PersistenceUnitInfo [
	name: secondPersistenceUnit
	...]
2019-05-25 18:01:10.566  INFO 113277 --- [           main] com.zaxxer.hikari.HikariDataSource       : HikariPool-2 - Starting...
2019-05-25 18:01:10.681  INFO 113277 --- [           main] com.zaxxer.hikari.HikariDataSource       : HikariPool-2 - Start completed.
2019-05-25 18:01:10.682  INFO 113277 --- [           main] org.hibernate.dialect.Dialect            : HHH000400: Using dialect: org.hibernate.dialect.MySQL5Dialect
2019-05-25 18:01:10.964  INFO 113277 --- [           main] j.LocalContainerEntityManagerFactoryBean : Initialized JPA EntityManagerFactory for persistence unit 'secondPersistenceUnit'
2019-05-25 18:01:14.961  INFO 113277 --- [           main] o.s.w.s.handler.SimpleUrlHandlerMapping  : Mapped URL path [/**/favicon.ico] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
2019-05-25 18:01:16.574  INFO 113277 --- [           main] s.w.s.m.m.a.RequestMappingHandlerAdapter : Looking for @ControllerAdvice: org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext@64cee07: startup date [Sat May 25 18:00:45 CST 2019]; root of context hierarchy
2019-05-25 18:01:16.834  WARN 113277 --- [           main] aWebConfiguration$JpaWebMvcConfiguration : spring.jpa.open-in-view is enabled by default. Therefore, database queries may be performed during view rendering. Explicitly configure spring.jpa.open-in-view to disable this warning
2019-05-25 18:01:17.053  INFO 113277 --- [           main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/test]}" onto public java.lang.String com.tzb.myspringboot.controller.TestController.test()
2019-05-25 18:01:17.085  INFO 113277 --- [           main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/error]}" onto public org.springframework.http.ResponseEntity<java.util.Map<java.lang.String, java.lang.Object>> org.springframework.boot.autoconfigure.web.servlet.error.BasicErrorController.error(javax.servlet.http.HttpServletRequest)
2019-05-25 18:01:17.087  INFO 113277 --- [           main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/error],produces=[text/html]}" onto public org.springframework.web.servlet.ModelAndView org.springframework.boot.autoconfigure.web.servlet.error.BasicErrorController.errorHtml(javax.servlet.http.HttpServletRequest,javax.servlet.http.HttpServletResponse)
2019-05-25 18:01:17.271  INFO 113277 --- [           main] o.s.w.s.handler.SimpleUrlHandlerMapping  : Mapped URL path [/webjars/**] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
2019-05-25 18:01:17.278  INFO 113277 --- [           main] o.s.w.s.handler.SimpleUrlHandlerMapping  : Mapped URL path [/**] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
2019-05-25 18:01:18.684  INFO 113277 --- [           main] o.s.j.e.a.AnnotationMBeanExporter        : Registering beans for JMX exposure on startup
2019-05-25 18:01:18.686  INFO 113277 --- [           main] o.s.j.e.a.AnnotationMBeanExporter        : Bean with name 'primaryDataSource' has been autodetected for JMX exposure
2019-05-25 18:01:18.692  INFO 113277 --- [           main] o.s.j.e.a.AnnotationMBeanExporter        : Bean with name 'secondDataSource' has been autodetected for JMX exposure
2019-05-25 18:01:18.737  INFO 113277 --- [           main] o.s.j.e.a.AnnotationMBeanExporter        : Located MBean 'primaryDataSource': registering with JMX server as MBean [com.zaxxer.hikari:name=primaryDataSource,type=HikariDataSource]
2019-05-25 18:01:18.750  INFO 113277 --- [           main] o.s.j.e.a.AnnotationMBeanExporter        : Located MBean 'secondDataSource': registering with JMX server as MBean [com.zaxxer.hikari:name=secondDataSource,type=HikariDataSource]
2019-05-25 18:01:20.369  INFO 113277 --- [           main] org.apache.zookeeper.ZooKeeper           : Client environment:zookeeper.version=3.4.6-1569965, built on 02/20/2014 09:09 GMT
2019-05-25 18:01:20.372  INFO 113277 --- [           main] org.apache.zookeeper.ZooKeeper           : Client environment:host.name=localhost
2019-05-25 18:01:20.372  INFO 113277 --- [           main] org.apache.zookeeper.ZooKeeper           : Client environment:java.version=1.8.0_131
2019-05-25 18:01:20.373  INFO 113277 --- [           main] org.apache.zookeeper.ZooKeeper           : Client environment:java.vendor=Oracle Corporation
2019-05-25 18:01:20.373  INFO 113277 --- [           main] org.apache.zookeeper.ZooKeeper           : Client environment:java.home=/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.131-11.b12.el7.x86_64/jre
2019-05-25 18:01:20.374  INFO 113277 --- [           main] org.apache.zookeeper.ZooKeeper           : Client environment:java.class.path=/opt/dubbospringboot/dubbo-provider-0.0.1-SNAPSHOT.jar
2019-05-25 18:01:20.374  INFO 113277 --- [           main] org.apache.zookeeper.ZooKeeper           : Client environment:java.library.path=/usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib
2019-05-25 18:01:20.377  INFO 113277 --- [           main] org.apache.zookeeper.ZooKeeper           : Client environment:java.io.tmpdir=/tmp
2019-05-25 18:01:20.381  INFO 113277 --- [           main] org.apache.zookeeper.ZooKeeper           : Client environment:java.compiler=<NA>
2019-05-25 18:01:20.384  INFO 113277 --- [           main] org.apache.zookeeper.ZooKeeper           : Client environment:os.name=Linux
2019-05-25 18:01:20.385  INFO 113277 --- [           main] org.apache.zookeeper.ZooKeeper           : Client environment:os.arch=amd64
2019-05-25 18:01:20.388  INFO 113277 --- [           main] org.apache.zookeeper.ZooKeeper           : Client environment:os.version=3.10.0-693.el7.x86_64
2019-05-25 18:01:20.389  INFO 113277 --- [           main] org.apache.zookeeper.ZooKeeper           : Client environment:user.name=root
2019-05-25 18:01:20.389  INFO 113277 --- [           main] org.apache.zookeeper.ZooKeeper           : Client environment:user.home=/root
2019-05-25 18:01:20.389  INFO 113277 --- [           main] org.apache.zookeeper.ZooKeeper           : Client environment:user.dir=/opt/dubbospringboot
2019-05-25 18:01:20.397  INFO 113277 --- [           main] org.apache.zookeeper.ZooKeeper           : Initiating client connection, connectString=192.168.65.113:2181 sessionTimeout=30000 watcher=org.I0Itec.zkclient.ZkClient@18920cc
2019-05-25 18:01:20.491  INFO 113277 --- [68.65.113:2181)] org.apache.zookeeper.ClientCnxn          : Opening socket connection to server 192.168.65.113/192.168.65.113:2181. Will not attempt to authenticate using SASL (unknown error)
2019-05-25 18:01:20.516  INFO 113277 --- [68.65.113:2181)] org.apache.zookeeper.ClientCnxn          : Socket connection established to 192.168.65.113/192.168.65.113:2181, initiating session
2019-05-25 18:01:20.563  INFO 113277 --- [68.65.113:2181)] org.apache.zookeeper.ClientCnxn          : Session establishment complete on server 192.168.65.113/192.168.65.113:2181, sessionid = 0x100034b57010007, negotiated timeout = 30000
2019-05-25 18:01:21.552  INFO 113277 --- [           main] o.s.b.w.embedded.tomcat.TomcatWebServer  : Tomcat started on port(s): 7722 (http) with context path ''
2019-05-25 18:01:21.598  INFO 113277 --- [           main] com.tzb.myspringboot.ServiceApplication  : Started ServiceApplication in 39.241 seconds (JVM running for 42.449)
=====springboot项目启动成功=======

 

 

启动server(consumer):

 

-rw-r--r--. 1 root root 53732992 5月  25 19:00 dubbo-consumer-0.0.1-SNAPSHOT.jar
-rw-r--r--. 1 root root 37994942 5月  25 17:23 dubbo-provider-0.0.1-SNAPSHOT.jar
-rw-r--r--. 1 root root    13054 5月  25 18:01 service.log
[root@localhost dubbospringboot]# nohup java -jar /opt/dubbospringboot/dubbo-consumer-0.0.1-SNAPSHOT.jar >server.log &
[2] 120437
[root@localhost dubbospringboot]# nohup: 忽略输入重定向错误到标准输出端
^C
[root@localhost dubbospringboot]# ps -ef | grep dubbo-consumer-0.0.1-SNAPSHOT.jar
root     120437 111314 17 19:04 pts/1    00:00:52 java -jar /opt/dubbospringboot/dubbo-consumer-0.0.1-SNAPSHOT.jar
root     121024 111314  0 19:08 pts/1    00:00:00 grep --color=auto dubbo-consumer-0.0.1-SNAPSHOT.jar
[root@localhost dubbospringboot]# 

 

 

server.log 日志:

[root@localhost dubbospringboot]# tail -1000f server.log 
=====开始启动springboot项目=======

  .   ____          _            __ _ _
 /\\ / ___'_ __ _ _(_)_ __  __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
 \\/  ___)| |_)| | | | | || (_| |  ) ) ) )
  '  |____| .__|_| |_|_| |_\__, | / / / /
 =========|_|==============|___/=/_/_/_/
 :: Spring Boot ::        (v2.0.4.RELEASE)

2019-05-25 19:04:09.959  INFO 120437 --- [           main] com.tzb.myspringboot.WebApplication      : Starting WebApplication v0.0.1-SNAPSHOT on localhost.localdomain with PID 120437 (/opt/dubbospringboot/dubbo-consumer-0.0.1-SNAPSHOT.jar started by root in /opt/dubbospringboot)
2019-05-25 19:04:10.008  INFO 120437 --- [           main] com.tzb.myspringboot.WebApplication      : No active profile set, falling back to default profiles: default
2019-05-25 19:04:10.608  INFO 120437 --- [           main] ConfigServletWebServerApplicationContext : Refreshing org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext@6842775d: startup date [Sat May 25 19:04:10 CST 2019]; root of context hierarchy
2019-05-25 19:04:16.459  INFO 120437 --- [           main] o.s.b.f.xml.XmlBeanDefinitionReader      : Loading XML bean definitions from class path resource [application-dubbo.xml]
2019-05-25 19:04:17.547  INFO 120437 --- [           main] o.s.b.f.xml.XmlBeanDefinitionReader      : Loading XML bean definitions from class path resource [application-dubbo-consumer.xml]
2019-05-25 19:04:22.247  INFO 120437 --- [           main] trationDelegate$BeanPostProcessorChecker : Bean 'com.alibaba.dubbo.config.ConsumerConfig' of type [com.alibaba.dubbo.config.ConsumerConfig] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2019-05-25 19:04:22.285  INFO 120437 --- [           main] trationDelegate$BeanPostProcessorChecker : Bean '${dubbo.application.name}' of type [com.alibaba.dubbo.config.ApplicationConfig] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2019-05-25 19:04:22.338  INFO 120437 --- [           main] trationDelegate$BeanPostProcessorChecker : Bean 'com.alibaba.dubbo.config.RegistryConfig' of type [com.alibaba.dubbo.config.RegistryConfig] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2019-05-25 19:04:22.342  INFO 120437 --- [           main] trationDelegate$BeanPostProcessorChecker : Bean 'suibian' of type [com.alibaba.dubbo.config.spring.ReferenceBean] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2019-05-25 19:04:22.386  INFO 120437 --- [           main] trationDelegate$BeanPostProcessorChecker : Bean 'iTestService2' of type [com.alibaba.dubbo.config.spring.ReferenceBean] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2019-05-25 19:04:22.430  INFO 120437 --- [           main] trationDelegate$BeanPostProcessorChecker : Bean 'iCalPageViewService' of type [com.alibaba.dubbo.config.spring.ReferenceBean] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2019-05-25 19:04:22.475  INFO 120437 --- [           main] trationDelegate$BeanPostProcessorChecker : Bean 'iCalCustomerServerService' of type [com.alibaba.dubbo.config.spring.ReferenceBean] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2019-05-25 19:04:23.093  INFO 120437 --- [           main] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration' of type [org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration$$EnhancerBySpringCGLIB$$6479fc3d] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2019-05-25 19:04:27.817  INFO 120437 --- [           main] o.s.b.w.embedded.tomcat.TomcatWebServer  : Tomcat initialized with port(s): 7712 (http)
2019-05-25 19:04:28.029  INFO 120437 --- [           main] o.apache.catalina.core.StandardService   : Starting service [Tomcat]
2019-05-25 19:04:28.031  INFO 120437 --- [           main] org.apache.catalina.core.StandardEngine  : Starting Servlet Engine: Apache Tomcat/8.5.32
2019-05-25 19:04:28.099  INFO 120437 --- [ost-startStop-1] o.a.catalina.core.AprLifecycleListener   : The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: [/usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib]
2019-05-25 19:04:28.652  INFO 120437 --- [ost-startStop-1] o.a.c.c.C.[Tomcat].[localhost].[/]       : Initializing Spring embedded WebApplicationContext
2019-05-25 19:04:28.653  INFO 120437 --- [ost-startStop-1] o.s.web.context.ContextLoader            : Root WebApplicationContext: initialization completed in 18062 ms
2019-05-25 19:04:29.240  INFO 120437 --- [ost-startStop-1] o.s.b.w.servlet.ServletRegistrationBean  : Servlet dispatcherServlet mapped to [/]
2019-05-25 19:04:29.289  INFO 120437 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean   : Mapping filter: 'characterEncodingFilter' to: [/*]
2019-05-25 19:04:29.291  INFO 120437 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean   : Mapping filter: 'hiddenHttpMethodFilter' to: [/*]
2019-05-25 19:04:29.295  INFO 120437 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean   : Mapping filter: 'httpPutFormContentFilter' to: [/*]
2019-05-25 19:04:29.295  INFO 120437 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean   : Mapping filter: 'requestContextFilter' to: [/*]
2019-05-25 19:04:30.453  INFO 120437 --- [           main] com.zaxxer.hikari.HikariDataSource       : HikariPool-1 - Starting...
2019-05-25 19:04:31.957  INFO 120437 --- [           main] com.zaxxer.hikari.HikariDataSource       : HikariPool-1 - Start completed.
2019-05-25 19:04:32.591  INFO 120437 --- [           main] j.LocalContainerEntityManagerFactoryBean : Building JPA container EntityManagerFactory for persistence unit 'primaryPersistenceUnit'
2019-05-25 19:04:32.756  INFO 120437 --- [           main] o.hibernate.jpa.internal.util.LogHelper  : HHH000204: Processing PersistenceUnitInfo [
	name: primaryPersistenceUnit
	...]
2019-05-25 19:04:33.486  INFO 120437 --- [           main] org.hibernate.Version                    : HHH000412: Hibernate Core {5.2.17.Final}
2019-05-25 19:04:33.491  INFO 120437 --- [           main] org.hibernate.cfg.Environment            : HHH000206: hibernate.properties not found
2019-05-25 19:04:33.794  INFO 120437 --- [           main] o.hibernate.annotations.common.Version   : HCANN000001: Hibernate Commons Annotations {5.0.1.Final}
2019-05-25 19:04:36.247  INFO 120437 --- [           main] org.hibernate.dialect.Dialect            : HHH000400: Using dialect: org.hibernate.dialect.MySQL5Dialect
2019-05-25 19:04:39.449  INFO 120437 --- [           main] j.LocalContainerEntityManagerFactoryBean : Initialized JPA EntityManagerFactory for persistence unit 'primaryPersistenceUnit'
2019-05-25 19:04:39.883  INFO 120437 --- [           main] j.LocalContainerEntityManagerFactoryBean : Building JPA container EntityManagerFactory for persistence unit 'secondPersistenceUnit'
2019-05-25 19:04:39.884  INFO 120437 --- [           main] o.hibernate.jpa.internal.util.LogHelper  : HHH000204: Processing PersistenceUnitInfo [
	name: secondPersistenceUnit
	...]
2019-05-25 19:04:40.862  INFO 120437 --- [           main] com.zaxxer.hikari.HikariDataSource       : HikariPool-2 - Starting...
2019-05-25 19:04:40.935  INFO 120437 --- [           main] com.zaxxer.hikari.HikariDataSource       : HikariPool-2 - Start completed.
2019-05-25 19:04:40.936  INFO 120437 --- [           main] org.hibernate.dialect.Dialect            : HHH000400: Using dialect: org.hibernate.dialect.MySQL5Dialect
2019-05-25 19:04:41.285  INFO 120437 --- [           main] j.LocalContainerEntityManagerFactoryBean : Initialized JPA EntityManagerFactory for persistence unit 'secondPersistenceUnit'
2019-05-25 19:04:42.017  INFO 120437 --- [           main] org.apache.zookeeper.ZooKeeper           : Client environment:zookeeper.version=3.4.6-1569965, built on 02/20/2014 09:09 GMT
2019-05-25 19:04:42.018  INFO 120437 --- [           main] org.apache.zookeeper.ZooKeeper           : Client environment:host.name=localhost
2019-05-25 19:04:42.025  INFO 120437 --- [           main] org.apache.zookeeper.ZooKeeper           : Client environment:java.version=1.8.0_131
2019-05-25 19:04:42.027  INFO 120437 --- [           main] org.apache.zookeeper.ZooKeeper           : Client environment:java.vendor=Oracle Corporation
2019-05-25 19:04:42.027  INFO 120437 --- [           main] org.apache.zookeeper.ZooKeeper           : Client environment:java.home=/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.131-11.b12.el7.x86_64/jre
2019-05-25 19:04:42.027  INFO 120437 --- [           main] org.apache.zookeeper.ZooKeeper           : Client environment:java.class.path=/opt/dubbospringboot/dubbo-consumer-0.0.1-SNAPSHOT.jar
2019-05-25 19:04:42.028  INFO 120437 --- [           main] org.apache.zookeeper.ZooKeeper           : Client environment:java.library.path=/usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib
2019-05-25 19:04:42.029  INFO 120437 --- [           main] org.apache.zookeeper.ZooKeeper           : Client environment:java.io.tmpdir=/tmp
2019-05-25 19:04:42.029  INFO 120437 --- [           main] org.apache.zookeeper.ZooKeeper           : Client environment:java.compiler=<NA>
2019-05-25 19:04:42.029  INFO 120437 --- [           main] org.apache.zookeeper.ZooKeeper           : Client environment:os.name=Linux
2019-05-25 19:04:42.029  INFO 120437 --- [           main] org.apache.zookeeper.ZooKeeper           : Client environment:os.arch=amd64
2019-05-25 19:04:42.029  INFO 120437 --- [           main] org.apache.zookeeper.ZooKeeper           : Client environment:os.version=3.10.0-693.el7.x86_64
2019-05-25 19:04:42.030  INFO 120437 --- [           main] org.apache.zookeeper.ZooKeeper           : Client environment:user.name=root
2019-05-25 19:04:42.030  INFO 120437 --- [           main] org.apache.zookeeper.ZooKeeper           : Client environment:user.home=/root
2019-05-25 19:04:42.031  INFO 120437 --- [           main] org.apache.zookeeper.ZooKeeper           : Client environment:user.dir=/opt/dubbospringboot
2019-05-25 19:04:42.034  INFO 120437 --- [           main] org.apache.zookeeper.ZooKeeper           : Initiating client connection, connectString=192.168.65.113:2181 sessionTimeout=30000 watcher=org.I0Itec.zkclient.ZkClient@11bb571c
2019-05-25 19:04:42.216  INFO 120437 --- [68.65.113:2181)] org.apache.zookeeper.ClientCnxn          : Opening socket connection to server 192.168.65.113/192.168.65.113:2181. Will not attempt to authenticate using SASL (unknown error)
2019-05-25 19:04:42.321  INFO 120437 --- [68.65.113:2181)] org.apache.zookeeper.ClientCnxn          : Socket connection established to 192.168.65.113/192.168.65.113:2181, initiating session
2019-05-25 19:04:42.441  INFO 120437 --- [68.65.113:2181)] org.apache.zookeeper.ClientCnxn          : Session establishment complete on server 192.168.65.113/192.168.65.113:2181, sessionid = 0x100034b57010009, negotiated timeout = 30000
2019-05-25 19:04:49.658  INFO 120437 --- [           main] o.s.w.s.handler.SimpleUrlHandlerMapping  : Mapped URL path [/**/favicon.ico] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
2019-05-25 19:04:51.650  INFO 120437 --- [           main] s.w.s.m.m.a.RequestMappingHandlerAdapter : Looking for @ControllerAdvice: org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext@6842775d: startup date [Sat May 25 19:04:10 CST 2019]; root of context hierarchy
2019-05-25 19:04:51.992  WARN 120437 --- [           main] aWebConfiguration$JpaWebMvcConfiguration : spring.jpa.open-in-view is enabled by default. Therefore, database queries may be performed during view rendering. Explicitly configure spring.jpa.open-in-view to disable this warning
2019-05-25 19:04:52.290  INFO 120437 --- [           main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/customerServer-parse/getCalCustomerSignTendency],methods=[POST],produces=[application/json;charset=UTF-8]}" onto public java.lang.String com.tzb.myspringboot.controller.CalCustomerServerParseController.getCalCustomerSignTendency()
2019-05-25 19:04:52.308  INFO 120437 --- [           main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/customerServer-parse/getCalCustomersInfo],methods=[POST],produces=[application/json;charset=UTF-8]}" onto public java.lang.String com.tzb.myspringboot.controller.CalCustomerServerParseController.getCalCustomersInfo(java.lang.String)
2019-05-25 19:04:52.310  INFO 120437 --- [           main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/customerServer-parse/getOppfunnel],methods=[POST],produces=[application/json;charset=UTF-8]}" onto public java.lang.String com.tzb.myspringboot.controller.CalCustomerServerParseController.getOppfunnel(java.lang.String)
2019-05-25 19:04:52.313  INFO 120437 --- [           main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/customerServer-parse/getCalMoneyBackCustomer],methods=[POST],produces=[application/json;charset=UTF-8]}" onto public java.lang.String com.tzb.myspringboot.controller.CalCustomerServerParseController.getCalMoneyBackCustomer(java.lang.String)
2019-05-25 19:04:52.325  INFO 120437 --- [           main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/pvuv/getBrandsPageView],methods=[POST],produces=[application/json;charset=UTF-8]}" onto public java.lang.String com.tzb.myspringboot.controller.CalPageViewController.getBrandsPageView(java.lang.String)
2019-05-25 19:04:52.333  INFO 120437 --- [           main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/pvuv/getBrandsFunctionsPrams],methods=[POST],produces=[application/json;charset=UTF-8]}" onto public java.lang.String com.tzb.myspringboot.controller.CalPageViewController.getBrandsFunctionsPrams()
2019-05-25 19:04:52.339  INFO 120437 --- [           main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/api/login],methods=[POST],produces=[application/json;charset=UTF-8]}" onto public com.tzb.myspringboot.entity.Result com.tzb.myspringboot.controller.LoginController.login(com.tzb.myspringboot.entity.VueLoginInfoVo,org.springframework.validation.BindingResult)
2019-05-25 19:04:52.347  INFO 120437 --- [           main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/testExcel/testExcelDownLoad],methods=[GET]}" onto public void com.tzb.myspringboot.controller.TestExcelDownLoadController.testExcelDownLoad(javax.servlet.http.HttpServletRequest,javax.servlet.http.HttpServletResponse)
2019-05-25 19:04:52.353  INFO 120437 --- [           main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/testExcel/getTableData],methods=[POST],produces=[application/json;charset=UTF-8]}" onto public java.lang.String com.tzb.myspringboot.controller.TestExcelDownLoadController.getTableData(javax.servlet.http.HttpServletRequest,javax.servlet.http.HttpServletResponse)
2019-05-25 19:04:52.362  INFO 120437 --- [           main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/test-interceptor/getOneMessage1],methods=[POST],produces=[application/json;charset=UTF-8]}" onto public java.lang.String com.tzb.myspringboot.controller.TestInterceptorController.getOneMessage1()
2019-05-25 19:04:52.374  INFO 120437 --- [           main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/superset-test/getUrlSuperSetTest],methods=[GET],produces=[application/json;charset=UTF-8]}" onto public java.lang.String com.tzb.myspringboot.controller.TestSupersetController.getUrlSuperSetTest(javax.servlet.http.HttpServletRequest)
2019-05-25 19:04:52.378  INFO 120437 --- [           main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/superset-test-table/getUrlSuperSetTestTable],methods=[GET],produces=[application/json;charset=UTF-8]}" onto public java.lang.String com.tzb.myspringboot.controller.TestSupersetController.getUrlSuperSetTestTable(javax.servlet.http.HttpServletRequest)
2019-05-25 19:04:52.416  INFO 120437 --- [           main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/test/getOneMessage2],methods=[POST],produces=[application/json;charset=UTF-8]}" onto public java.lang.String com.tzb.myspringboot.controller.TestTwoDataSourceController.getOneMessage2()
2019-05-25 19:04:52.419  INFO 120437 --- [           main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/test/getOneMessage3],methods=[POST],produces=[application/json;charset=UTF-8]}" onto public java.lang.String com.tzb.myspringboot.controller.TestTwoDataSourceController.getOneMessage3()
2019-05-25 19:04:52.422  INFO 120437 --- [           main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/test/getOneMessage4],methods=[POST],produces=[application/json;charset=UTF-8]}" onto public java.lang.String com.tzb.myspringboot.controller.TestTwoDataSourceController.getOneMessage4()
2019-05-25 19:04:52.429  INFO 120437 --- [           main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/test/api/getPermission],methods=[POST],produces=[application/json;charset=UTF-8]}" onto public java.lang.String com.tzb.myspringboot.controller.TestTwoDataSourceController.getPermission1(java.lang.String)
2019-05-25 19:04:52.454  INFO 120437 --- [           main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/test/getOneMessage1],methods=[POST],produces=[application/json;charset=UTF-8]}" onto public java.lang.String com.tzb.myspringboot.controller.TestTwoDataSourceController.getOneMessage1()
2019-05-25 19:04:52.457  INFO 120437 --- [           main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/test/getPermission],methods=[POST],produces=[application/json;charset=UTF-8]}" onto public java.lang.String com.tzb.myspringboot.controller.TestTwoDataSourceController.getPermission(java.lang.String)
2019-05-25 19:04:52.468  INFO 120437 --- [           main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/user/register]}" onto public java.lang.String com.tzb.myspringboot.controller.TestUserController.register(javax.servlet.http.HttpServletRequest)
2019-05-25 19:04:52.498  INFO 120437 --- [           main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/error],produces=[text/html]}" onto public org.springframework.web.servlet.ModelAndView org.springframework.boot.autoconfigure.web.servlet.error.BasicErrorController.errorHtml(javax.servlet.http.HttpServletRequest,javax.servlet.http.HttpServletResponse)
2019-05-25 19:04:52.502  INFO 120437 --- [           main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/error]}" onto public org.springframework.http.ResponseEntity<java.util.Map<java.lang.String, java.lang.Object>> org.springframework.boot.autoconfigure.web.servlet.error.BasicErrorController.error(javax.servlet.http.HttpServletRequest)
2019-05-25 19:04:52.633  INFO 120437 --- [           main] o.s.w.s.handler.SimpleUrlHandlerMapping  : Root mapping to handler of type [class org.springframework.web.servlet.mvc.ParameterizableViewController]
2019-05-25 19:04:53.011  INFO 120437 --- [           main] o.s.w.s.handler.SimpleUrlHandlerMapping  : Mapped URL path [/webjars/**] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
2019-05-25 19:04:53.015  INFO 120437 --- [           main] o.s.w.s.handler.SimpleUrlHandlerMapping  : Mapped URL path [/**] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
2019-05-25 19:04:53.016  INFO 120437 --- [           main] o.s.w.s.handler.SimpleUrlHandlerMapping  : Mapped URL path [/static/**] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
2019-05-25 19:04:53.358  INFO 120437 --- [           main] o.s.b.a.w.s.WelcomePageHandlerMapping    : Adding welcome page: class path resource [static/index.html]
2019-05-25 19:04:54.712  INFO 120437 --- [           main] o.s.j.e.a.AnnotationMBeanExporter        : Registering beans for JMX exposure on startup
2019-05-25 19:04:54.716  INFO 120437 --- [           main] o.s.j.e.a.AnnotationMBeanExporter        : Bean with name 'primaryDataSource' has been autodetected for JMX exposure
2019-05-25 19:04:54.720  INFO 120437 --- [           main] o.s.j.e.a.AnnotationMBeanExporter        : Bean with name 'secondDataSource' has been autodetected for JMX exposure
2019-05-25 19:04:54.767  INFO 120437 --- [           main] o.s.j.e.a.AnnotationMBeanExporter        : Located MBean 'primaryDataSource': registering with JMX server as MBean [com.zaxxer.hikari:name=primaryDataSource,type=HikariDataSource]
2019-05-25 19:04:54.785  INFO 120437 --- [           main] o.s.j.e.a.AnnotationMBeanExporter        : Located MBean 'secondDataSource': registering with JMX server as MBean [com.zaxxer.hikari:name=secondDataSource,type=HikariDataSource]
2019-05-25 19:04:54.983  INFO 120437 --- [           main] o.s.b.w.embedded.tomcat.TomcatWebServer  : Tomcat started on port(s): 7712 (http) with context path ''
2019-05-25 19:04:55.016  INFO 120437 --- [           main] com.tzb.myspringboot.WebApplication      : Started WebApplication in 49.4 seconds (JVM running for 53.154)
=====springboot项目启动成功=======
^[^[

 

访问:

这里注意一下,前端我这里应该将访问的接口地址改为我虚拟机的linux的地址。

我分别将不同的页面写成不同的方式

如下:

页面1:配置为linux主机名

页面2:配置为localhost

页面3:配置为127.0.0.1

页面4:配置为Linux的ip

 

我部署完后,登陆系统,事实证明,这几种方式都访问成功了,这里可以用主机名。之后升到

线上配置为域名,用域名去跟ip做映射,而不用主机名。

 

linux访问:

在虚拟机的linux下打开我的项目效果:

superset的图表:

 

windows访问:

 

打开7712端口,更改linux的防火墙规则:

防火墙开启端口访问
firewall-cmd --zone=public --add-port=7712/tcp --permanent
命令含义:  --zone #作用域    --add-port=7712/tcp #添加端口,格式为:端口/通讯协议    --permanent #永久生效,没有此参数重启后失效


注:开启后需要重启防火墙才生效     

【重启命令】:  firewall-cmd --reload

再执行 firewall-cmd --list-ports查看一次,则发现已开启:

 

 

再试一次,可以访问了!!

但是如图:

 

发现只有我配置饼状图这里能展示,但是在linux上却都可以。

饼状图这里我配置的连接是写的 linux的ip,superset这里前端配访问地址时写的ip也可以出来,其他localhost啊,127.0.0.1啊,linux主机名啊都不行的!!!

 

 

 

 

所以我把前端访问连接都改为ip就可以了:

 

 

发布了284 篇原创文章 · 获赞 150 · 访问量 64万+
展开阅读全文

没有更多推荐了,返回首页

©️2019 CSDN 皮肤主题: 大白 设计师: CSDN官方博客

分享到微信朋友圈

×

扫一扫,手机浏览