Merge remote-tracking branch 'origin/main'

main
jiho83 2 years ago
commit d996ea3f5f

@ -82,13 +82,19 @@ public class CmmFileController {
e.printStackTrace(); e.printStackTrace();
} }
String absFile = ""; // String absFile = "";
//
// if (Arrays.asList(env.getActiveProfiles()).contains("prod"))
// absFile = String.format("%s%s%s", "entity.getInFileurl()", File.separator, fileName);
// else
// absFile = String.format(
// "%s%s%s%s",
// rootPath,
// (CtgyConstants.Judge.DATAGB_RESIDENT.getCode().equals(scDatagb)? judgeUploadPath[0] : judgeUploadPath[1]),
// File.separator, fileName);
// TODO : 운영환경에 맞게 적용 필요 String absFile = String.format(
if (Arrays.asList(env.getActiveProfiles()).contains("prod"))
absFile = String.format("%s%s%s", "entity.getInFileurl()", File.separator, fileName);
else
absFile = String.format(
"%s%s%s%s", "%s%s%s%s",
rootPath, rootPath,
(CtgyConstants.Judge.DATAGB_RESIDENT.getCode().equals(scDatagb)? judgeUploadPath[0] : judgeUploadPath[1]), (CtgyConstants.Judge.DATAGB_RESIDENT.getCode().equals(scDatagb)? judgeUploadPath[0] : judgeUploadPath[1]),

@ -31,7 +31,7 @@ import java.util.Objects;
@Slf4j @Slf4j
public class LoggerAspect { public class LoggerAspect {
// respons 출력 여부 // respons 출력 여부
@Value("${api.reponse.logging}") @Value("${api.response.logging}")
private boolean isResLogging; private boolean isResLogging;
@Pointcut("execution(* com.xit..*Controller.*(..))") // 이런 패턴이 실행될 경우 수행 @Pointcut("execution(* com.xit..*Controller.*(..))") // 이런 패턴이 실행될 경우 수행

@ -36,15 +36,10 @@ public abstract class BaseMpowerDaoSupport {
@Value("${mpower.file.serviceName}") @Value("${mpower.file.serviceName}")
private String fileServiceName; private String fileServiceName;
// 단속사진 // 주정차이미지경로
@Value("${mpower.file.picadPath}") @Value("${mpower.file.parkingImagePath}")
private String picadPath; private String parkingImagePath;
// 진술서
@Value("${mpower.file.frecadPath}")
private String frecadPath;
// 첨부자료
@Value("${mpower.file.contadPath}")
private String contadPath;
@Value("${mpower.file.savedImgPath}") @Value("${mpower.file.savedImgPath}")
private String savedImgPath; private String savedImgPath;
@ -478,7 +473,7 @@ public abstract class BaseMpowerDaoSupport {
Client client = new Client(fileHostIp, fileHostPort); Client client = new Client(fileHostIp, fileHostPort);
String filePath = getAbsImgPath(photocode); String filePath = getAbsImgPath(photocode);
String svrImgPath = picadPath + filePath; //터널링에 저장된 단속사진 경로 String svrImgPath = parkingImagePath + filePath; //터널링에 저장된 단속사진 경로
String svrSavedPhotoPath = savedImgPath + "/" + filePath; String svrSavedPhotoPath = savedImgPath + "/" + filePath;
log.info("Mpower 이미지경로:::::" + svrImgPath); log.info("Mpower 이미지경로:::::" + svrImgPath);
log.info("서버 download file path :::::" + svrSavedPhotoPath); log.info("서버 download file path :::::" + svrSavedPhotoPath);

@ -12,6 +12,9 @@ import java.io.IOException;
import java.util.Objects; import java.util.Objects;
import java.util.Properties; import java.util.Properties;
/**
* .yaml @PeopertySource annotaion (.property )
*/
public class YamlPropertySourceFactory implements PropertySourceFactory { public class YamlPropertySourceFactory implements PropertySourceFactory {
@Override @Override
public PropertySource<?> createPropertySource(@Nullable String name, EncodedResource resource) throws IOException { public PropertySource<?> createPropertySource(@Nullable String name, EncodedResource resource) throws IOException {

@ -13,8 +13,6 @@ spring:
init: init:
mode: always mode: always
platform: oracle platform: oracle
#schema-locations: classpath:/data/h2/schema.sql
#data-locations: classpath:/data/h2/data.sql
# ================================================================================================================== # ==================================================================================================================
# logging lib setting # logging lib setting
@ -37,3 +35,47 @@ logging:
springdoc: springdoc:
api-docs: api-docs:
enabled: true enabled: true
# ==================================================================================================================
# project config
# ==================================================================================================================
cors:
allowed-origins: https://fonts.gstatic.com,http://localhost,http://211.119.124.107
# api response logging 여부
api:
response:
logging: false
file:
cmm:
upload:
root: d:/data/file/upload
# root: /Users/minuk/data/file/upload
# 공지사항
pboard: /simUpFile #/kangnamSIM/simUpFile
simsaPath: /simUpFile_sc1, /simUpFile_sc2 # 거주자 simUpFile_sc1, 장애인 simUpFile_sc2
url: http://traffic.gangnam.go.kr
allow:
ext:
max:
size: 10000000
mpower:
master:
hostIp: 127.0.0.1
port: 9999
dbName: gn
slave:
hostIp: 127.0.0.1
port: 9999
dbName: gn_seconddb
file:
hostIp: 127.0.0.1
port: 9999
serviceName: XitFile.XitDownload
# 주정차이미지경로-mpower
parkingImagePath: C:/NewTraffic_Photo/JUCHA_PHOTO/
# 주정차이미지 다운로드 저장 경로
savedImgPath: D:/data/file/juchaPhoto

@ -2,6 +2,9 @@ server:
port: 8090 port: 8090
spring: spring:
output:
ansi:
enabled: always # always / detect / never
config: config:
activate: activate:
on-profile: local on-profile: local
@ -35,3 +38,46 @@ logging:
springdoc: springdoc:
api-docs: api-docs:
enabled: true enabled: true
# ==================================================================================================================
# project config
# ==================================================================================================================
cors:
allowed-origins: https://fonts.gstatic.com,http://localhost:3000
# api response logging 여부
api:
response:
logging: true
file:
cmm:
upload:
root: d:/data/file/upload
# root: /Users/minuk/data/file/upload
# 공지사항
pboard: /simUpFile #/kangnamSIM/simUpFile
simsaPath: /simUpFile_sc1, /simUpFile_sc2 # 거주자 simUpFile_sc1, 장애인 simUpFile_sc2
url: http://traffic.gangnam.go.kr
allow:
ext:
max:
size: 10000000
mpower:
master:
hostIp: 127.0.0.1
port: 9999
dbName: gn
slave:
hostIp: 127.0.0.1
port: 9999
dbName: gn_seconddb
file:
hostIp: 127.0.0.1
port: 9999
serviceName: XitFile.XitDownload
# 주정차이미지경로-mpower
parkingImagePath: C:/NewTraffic_Photo/JUCHA_PHOTO/
# 주정차이미지 다운로드 저장 경로
savedImgPath: D:/data/file/juchaPhoto

@ -66,14 +66,6 @@ spring:
tokenUri: https://graph.facebook.com/v3.0/oauth/access_token tokenUri: https://graph.facebook.com/v3.0/oauth/access_token
userInfoUri: https://graph.facebook.com/v3.0/me?fields=id,first_name,middle_name,last_name,name,email,verified,is_verified,picture.width(250).height(250) userInfoUri: https://graph.facebook.com/v3.0/me?fields=id,first_name,middle_name,last_name,name,email,verified,is_verified,picture.width(250).height(250)
# Spring Security cors 설정 :: CorsConfiguration 설정 값
cors:
allowed-origins: https://fonts.gstatic.com,http://localhost:3000,http://localhost,http://211.119.124.107,http://211.119.124.107:3000
allowed-methods: GET,POST,PUT,DELETE,OPTIONS
allowed-headers: '*'
max-age: 3600
# HS512 알고리즘을 사용할 것이기 때문에 512bit, 즉 64byte 이상의 secret key를 사용해야 한다. # HS512 알고리즘을 사용할 것이기 때문에 512bit, 즉 64byte 이상의 secret key를 사용해야 한다.
# Base64.getEncoder().withoutPadding().encodeToString(orgString.getBytes()) # Base64.getEncoder().withoutPadding().encodeToString(orgString.getBytes())
# new String(Base64.getDecoder().decode(encodedString)) # new String(Base64.getDecoder().decode(encodedString))

@ -0,0 +1,77 @@
server:
port: 8090
spring:
config:
activate:
on-profile: prod
sql:
init:
mode: always
# ==================================================================================================================
# logging lib setting
# ==================================================================================================================
logging:
level:
root: INFO
# spring.mvc.log-request-details=debug 활성화
web: debug
org:
springframework:
transaction:
interceptor: TRACE
orm:
jpa: TRACE
# ==================================================================================================================
# Spring-doc 활성
# ==================================================================================================================
springdoc:
api-docs:
enabled: true
# ==================================================================================================================
# project config
# ==================================================================================================================
cors:
allowed-origins: https://fonts.gstatic.com,http://localhost:3000,http:211.35.57.20:3000
# api response logging 여부
api:
response:
logging: false
file:
cmm:
upload:
root: d:/data/file/upload
# root: /Users/minuk/data/file/upload
# 공지사항
pboard: /simUpFile #/kangnamSIM/simUpFile
simsaPath: /simUpFile_sc1, /simUpFile_sc2 # 거주자 simUpFile_sc1, 장애인 simUpFile_sc2
url: http://traffic.gangnam.go.kr
allow:
ext:
max:
size: 10000000
mpower:
master:
hostIp: 127.0.0.1
port: 9999
dbName: gn
slave:
hostIp: 127.0.0.1
port: 9999
dbName: gn_seconddb
file:
hostIp: 127.0.0.1
port: 9999
serviceName: XitFile.XitDownload
# 주정차이미지경로-mpower
parkingImagePath: C:/NewTraffic_Photo/JUCHA_PHOTO/
# 주정차이미지 다운로드 저장 경로
savedImgPath: D:/data/file/juchaPhoto

@ -1,51 +0,0 @@
server:
port: 18080
spring:
config:
activate:
on-profile: test
sql:
init:
mode: always
platform: h2
datasource:
driver-class-name: org.h2.Driver
url: jdbc:h2:mem:xitdb;MODE=PostgreSQL;DATABASE_TO_LOWER=TRUE;DB_CLOSE_DELAY=-1;DB_CLOSE_ON_EXIT=FALSE
username: sa
password: ''
hikari:
driver-class-name: ${spring.datasource.driver-class-name}
jdbc-url: ${spring.datasource.url}
username: ${spring.datasource.username}
password: ${spring.datasource.password}
jpa:
database-platform: org.hibernate.dialect.H2Dialect
show-sql: false
properties:
hibernate:
format_sql: true
use_sql_comments: false
hbm2ddl:
auto: create-drop
decorator:
datasource:
p6spy:
enable-logging: true
logging:
level:
root: info
org:
hibernate:
type: trace
springframework:
web:
filter: error
springdoc:
api-docs:
enabled: false

@ -2,10 +2,8 @@ spring:
application: application:
name: xit-framework name: xit-framework
#description: XIT api for development #description: XIT api for development
config:
import: classpath:config/conf.yml
profiles: profiles:
active: dev active: local
include: oauth include: oauth
main: main:
# bean name 중복 허용 - junit 사용시 true?? # bean name 중복 허용 - junit 사용시 true??
@ -131,4 +129,25 @@ server:
whitelabel: whitelabel:
enabled: true enabled: true
tomcat: tomcat:
basedir: . basedir: .
# ==================================================================================================================
# project config
# ==================================================================================================================
# Spring Security cors 설정 :: CorsConfiguration 설정 값
cors:
allowed-origins: https://fonts.gstatic.com,http://localhost:3000,http://localhost,http://211.119.124.107,http://211.119.124.107:3000
allowed-methods: GET,POST,PUT,DELETE,OPTIONS
allowed-headers: '*'
max-age: 3600
xit:
api:
url: 'http://localhost:${server.port}'
version: '@project.version@'
# Authentification 저장 위치 : header / cookie / token
auth:
save:
type: header
# locale : ko / en
locale: ko

@ -1,51 +0,0 @@
xit:
api:
url: 'http://localhost:${server.port}'
version: '@project.version@'
# Authentification 저장 위치 : header / cookie / token
auth:
save:
type: header
# locale : ko / en
locale: ko
# api response logging 여부
api:
reponse:
logging: false
file:
cmm:
upload:
root: d:/data/file/upload
# root: /Users/minuk/data/file/upload
# 공지사항
pboard: /simUpFile #/kangnamSIM/simUpFile
simsaPath: /simUpFile_sc1, /simUpFile_sc2 # 거주자 simUpFile_sc1, 장애인 simUpFile_sc2
url: http://traffic.gangnam.go.kr
allow:
ext:
max:
size: 10000000
mpower:
master:
hostIp: 127.0.0.1
port: 9999
dbName: gn
slave:
hostIp: 127.0.0.1
port: 9999
dbName: gn_seconddb
file:
hostIp: 127.0.0.1
port: 9999
serviceName: XitFile.XitDownload
# 단속사진
picadPath: C:/NewTraffic_Photo/JUCHA_PHOTO/
# 진술서
frecadPath: /picad
# 첨부자료
contadPath: /picad
# 저장경로
savedImgPath: d:/data/file/juchaPhoto

@ -7,9 +7,11 @@
<property name="LOG_PATH" value="d:/data/xit/logs"/> <property name="LOG_PATH" value="d:/data/xit/logs"/>
<!-- <property name="LOG_PATH" value="/Users/minuk/data/xit/logs"/>--> <!-- <property name="LOG_PATH" value="/Users/minuk/data/xit/logs"/>-->
</springProfile> </springProfile>
<springProfile name="dev,prod"> <springProfile name="dev">
<property name="LOG_PATH" value="d:/data/xit/logs"/>
</springProfile>
<springProfile name="prod">
<property name="LOG_PATH" value="d:/data/xit/logs"/> <property name="LOG_PATH" value="d:/data/xit/logs"/>
<!-- <property name="LOG_PATH" value="/Users/minuk/data/xit/logs"/>-->
</springProfile> </springProfile>
<include resource="org/springframework/boot/logging/logback/defaults.xml"/> <include resource="org/springframework/boot/logging/logback/defaults.xml"/>

@ -376,6 +376,7 @@
, tf680_recall TR , tf680_recall TR
WHERE MS.ms_maincode = MSU.msu_maincode WHERE MS.ms_maincode = MSU.msu_maincode
AND DECODE(MS.ms_result, '1', '1', '2', '2', '0') = '0' AND DECODE(MS.ms_result, '1', '1', '2', '2', '0') = '0'
AND MS.ms_cdate &gt;= SYSDATE
AND MS.ms_maincode = TR.rc_code AND MS.ms_maincode = TR.rc_code
AND MSU.msu_userid = #{msuUserid} AND MSU.msu_userid = #{msuUserid}
ORDER BY MS.ms_sdate, MS.ms_edate, MS.ms_seq ORDER BY MS.ms_sdate, MS.ms_edate, MS.ms_seq

@ -618,6 +618,7 @@
, gn_recall_sc GR , gn_recall_sc GR
WHERE MS.ms_maincode = MSU.msu_maincode WHERE MS.ms_maincode = MSU.msu_maincode
AND DECODE(MS.ms_result, '1', '1', '2', '2', '0') = '0' AND DECODE(MS.ms_result, '1', '1', '2', '2', '0') = '0'
AND MS.ms_cdate &gt;= SYSDATE
AND MSU.msu_userid = #{msuUserid} AND MSU.msu_userid = #{msuUserid}
AND MS.ms_maincode = GR.sc_code AND MS.ms_maincode = GR.sc_code
<if test="msDatagb != null and msDatagb != ''"> <if test="msDatagb != null and msDatagb != ''">

@ -14,7 +14,7 @@ import org.springframework.test.context.junit4.SpringRunner;
//@DataJpaTest //@DataJpaTest
@ContextConfiguration(classes = Application.class) @ContextConfiguration(classes = Application.class)
@ExtendWith(SpringExtension.class) @ExtendWith(SpringExtension.class)
@ActiveProfiles({"dev"}) //@ActiveProfiles({"dev"})
public class ApplicationTest { public class ApplicationTest {
@Test @Test

Loading…
Cancel
Save