李俊

内网迁移环境代码调整

...@@ -109,6 +109,23 @@ ...@@ -109,6 +109,23 @@
109 <artifactId>httpclient</artifactId> 109 <artifactId>httpclient</artifactId>
110 <version>4.5.3</version> 110 <version>4.5.3</version>
111 </dependency> 111 </dependency>
112 + <dependency>
113 + <groupId>org.springframework.boot</groupId>
114 + <artifactId>spring-boot-legacy</artifactId>
115 + <version>2.0.0.RELEASE</version>
116 + </dependency>
117 + <dependency>
118 + <groupId>org.springframework.boot</groupId>
119 + <artifactId>spring-boot-starter-tomcat</artifactId>
120 + <scope>provided</scope>
121 + </dependency>
122 + <dependency>
123 + <groupId>org.springframework.boot</groupId>
124 + <artifactId>spring-boot-devtools</artifactId>
125 + <optional>true</optional>
126 + <scope>true</scope>
127 + </dependency>
128 +
112 </dependencies> 129 </dependencies>
113 130
114 <profiles> 131 <profiles>
......
...@@ -4,8 +4,11 @@ import com.erry.iclear.dateInterface.service.SimpleJpaRepositoryImpl; ...@@ -4,8 +4,11 @@ import com.erry.iclear.dateInterface.service.SimpleJpaRepositoryImpl;
4 import lombok.extern.slf4j.Slf4j; 4 import lombok.extern.slf4j.Slf4j;
5 import org.springframework.boot.SpringApplication; 5 import org.springframework.boot.SpringApplication;
6 import org.springframework.boot.autoconfigure.SpringBootApplication; 6 import org.springframework.boot.autoconfigure.SpringBootApplication;
7 +import org.springframework.boot.builder.SpringApplicationBuilder;
8 +import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
7 import org.springframework.data.jpa.repository.config.EnableJpaRepositories; 9 import org.springframework.data.jpa.repository.config.EnableJpaRepositories;
8 import org.springframework.scheduling.annotation.EnableScheduling; 10 import org.springframework.scheduling.annotation.EnableScheduling;
11 +import org.springframework.web.bind.annotation.GetMapping;
9 12
10 13
11 /** 14 /**
...@@ -16,10 +19,18 @@ import org.springframework.scheduling.annotation.EnableScheduling; ...@@ -16,10 +19,18 @@ import org.springframework.scheduling.annotation.EnableScheduling;
16 @SpringBootApplication 19 @SpringBootApplication
17 @EnableScheduling 20 @EnableScheduling
18 //@EnableJpaRepositories(value = "com.erry.iclear.dateInterface.repository", repositoryBaseClass = SimpleJpaRepositoryImpl.class) 21 //@EnableJpaRepositories(value = "com.erry.iclear.dateInterface.repository", repositoryBaseClass = SimpleJpaRepositoryImpl.class)
19 -public class IClearApiApplication { 22 +public class IClearApiApplication extends SpringBootServletInitializer {
23 + @Override
24 + protected SpringApplicationBuilder configure(SpringApplicationBuilder builder) {
25 + return builder.sources(IClearApiApplication.class);
26 + }
20 27
21 public static void main(String[] args) { 28 public static void main(String[] args) {
22 SpringApplication.run(IClearApiApplication.class, args); 29 SpringApplication.run(IClearApiApplication.class, args);
23 } 30 }
24 31
32 + @GetMapping("/test")
33 + public String test(){
34 + return "test";
35 + }
25 } 36 }
......
1 -package com.erry.iclear.dateInterface;
2 -
3 -import org.springframework.boot.builder.SpringApplicationBuilder;
4 -import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
5 -
6 -/**
7 - * @author Administrator
8 - */
9 -public class SpringBootStartApplication extends SpringBootServletInitializer {
10 - @Override
11 - protected SpringApplicationBuilder configure(SpringApplicationBuilder builder) {
12 - return builder.sources(IClearApiApplication.class);
13 - }
14 -}
...\ No newline at end of file ...\ No newline at end of file
1 +//package com.erry.iclear.dateInterface;
2 +//
3 +//import org.springframework.boot.builder.SpringApplicationBuilder;
4 +//import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
5 +//
6 +///**
7 +// * @author Administrator
8 +// */
9 +//public class SpringBootStartApplication extends SpringBootServletInitializer {
10 +// @Override
11 +// protected SpringApplicationBuilder configure(SpringApplicationBuilder builder) {
12 +// return builder.sources(IClearApiApplication.class);
13 +// }
14 +//}
......
...@@ -14,7 +14,7 @@ import org.springframework.stereotype.Component; ...@@ -14,7 +14,7 @@ import org.springframework.stereotype.Component;
14 /** 14 /**
15 * @author Administrator 15 * @author Administrator
16 */ 16 */
17 -@Component 17 +//@Component
18 @Slf4j 18 @Slf4j
19 public class IClearApiTask { 19 public class IClearApiTask {
20 @Autowired 20 @Autowired
......
...@@ -19,6 +19,7 @@ task: ...@@ -19,6 +19,7 @@ task:
19 19
20 #推送地址 20 #推送地址
21 api: 21 api:
22 + base-address: http://localhost:8080
22 token-info: 23 token-info:
23 #获取token账号 24 #获取token账号
24 username: iclear_external_ctm 25 username: iclear_external_ctm
...@@ -26,11 +27,11 @@ api: ...@@ -26,11 +27,11 @@ api:
26 password: toQu3arch6 27 password: toQu3arch6
27 address: 28 address:
28 #IClear校验运单地址 29 #IClear校验运单地址
29 - iclear-check-url: http://139.217.114.139:8082/chmConsignmentController/checkChmAndDetaliD 30 + iclear-check-url: ${api.base-address}/chmConsignmentController/checkChmAndDetaliD
30 #IClearC类提交运单地址 31 #IClearC类提交运单地址
31 - iclear-submit-url: http://139.217.114.139:8082/chmConsignmentController/submitConsignments 32 + iclear-submit-url: ${api.base-address}/chmConsignmentController/submitConsignments
32 #IClear校验C类运单地址 33 #IClear校验C类运单地址
33 - iclear-check-url-c: http://139.217.114.139:8082/chmConsignmentController/checkChmAndDetaliC 34 + iclear-check-url-c: ${api.base-address}/chmConsignmentController/checkChmAndDetaliC
34 #获取token地址 35 #获取token地址
35 token-url: https://apiuat.iclrccd-fedex.com/login 36 token-url: https://apiuat.iclrccd-fedex.com/login
36 #刷新token地址 37 #刷新token地址
......
1 spring: 1 spring:
2 datasource: 2 datasource:
3 - url: jdbc:sqlserver://40.73.78.157:1433;DatabaseName=IClearUat 3 + jndi-name: jdbc/iclearDS
4 - username: sa 4 +# url: jdbc:sqlserver://40.73.78.157:1433;DatabaseName=IClearUat
5 - password: Fedex_123 5 +# username: sa
6 - driver-class-name: com.microsoft.sqlserver.jdbc.SQLServerDriver 6 +# password: Fedex_123
7 - type: com.alibaba.druid.pool.DruidDataSource 7 +# driver-class-name: com.microsoft.sqlserver.jdbc.SQLServerDriver
8 +# type: com.alibaba.druid.pool.DruidDataSource
9 +
8 10
9 task: 11 task:
10 #推送海关回执 12 #推送海关回执
......
1 +<?xml version="1.0" encoding="UTF-8"?>
2 +<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">
3 +<web-app>
4 + <context-param>
5 + <param-name>contextConfigLocation</param-name>
6 + <param-value>com.erry.iclear.dateInterface.IClearApiApplication</param-value>
7 + </context-param>
8 +
9 + <listener>
10 + <listener-class>org.springframework.boot.legacy.context.web.SpringBootContextLoaderListener</listener-class>
11 + </listener>
12 +
13 + <servlet>
14 + <servlet-name>appServlet</servlet-name>
15 + <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
16 + <init-param>
17 + <param-name>contextAttribute</param-name>
18 + <param-value>org.springframework.web.context.WebApplicationContext.ROOT</param-value>
19 + </init-param>
20 + <load-on-startup>1</load-on-startup>
21 + </servlet>
22 +
23 + <servlet-mapping>
24 + <servlet-name>appServlet</servlet-name>
25 + <url-pattern>/API</url-pattern>
26 + </servlet-mapping>
27 +</web-app>
1 +<?xml version='1.0' encoding='UTF-8'?>
2 +<weblogic-web-app xmlns="http://xmlns.oracle.com/weblogic/weblogic-web-app"
3 + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4 + xsi:schemaLocation="http://xmlns.oracle.com/weblogic/weblogic-web-app http://xmlns.oracle.com/weblogic/weblogic-web-app/1.3/weblogic-web-app.xsd">
5 +
6 + <container-descriptor>
7 +
8 + <prefer-application-packages>
9 + <package-name>org.slf4j</package-name>
10 + <package-name>javax.validation.*</package-name>
11 + <package-name>org.hibernate.*</package-name>
12 + <package-name>javax.el.*</package-name>
13 + <package-name>org.springframework.*</package-name>
14 + </prefer-application-packages>
15 + </container-descriptor>
16 + <context-root>/API</context-root>
17 +</weblogic-web-app>