commit
96858860c8
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -0,0 +1,11 @@
|
||||
// XNY_itk.cpp : 定义控制台应用程序的入口点。
|
||||
//
|
||||
|
||||
#include "stdafx.h"
|
||||
|
||||
|
||||
int main()
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -0,0 +1,108 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<Filter Include="源文件">
|
||||
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
|
||||
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="头文件">
|
||||
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
|
||||
<Extensions>h;hh;hpp;hxx;hm;inl;inc;xsd</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="资源文件">
|
||||
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
|
||||
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="common">
|
||||
<UniqueIdentifier>{2799e3e0-5454-43a6-a04a-5627cde49936}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="epm_handler">
|
||||
<UniqueIdentifier>{88c2de69-1cc0-4edb-a6ba-b56cb3ec6551}</UniqueIdentifier>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Text Include="ReadMe.txt" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="epm_register_handler.h">
|
||||
<Filter>epm_handler</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="error_handling.h">
|
||||
<Filter>common</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="common_itk_util.h">
|
||||
<Filter>common</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="connor_util.h">
|
||||
<Filter>common</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="ocilib.h">
|
||||
<Filter>common</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="string_helper.h">
|
||||
<Filter>common</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="string_utils.h">
|
||||
<Filter>common</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Supor_register.h">
|
||||
<Filter>epm_handler</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="CRUL_server_call_httpserver.h">
|
||||
<Filter>common</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="ado.h">
|
||||
<Filter>epm_handler</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="lib_custom_main.cpp">
|
||||
<Filter>common</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="epm_register_handler.cpp">
|
||||
<Filter>epm_handler</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="common_itk_util.cxx">
|
||||
<Filter>common</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="connor_util.cpp">
|
||||
<Filter>common</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="ocilib.cxx">
|
||||
<Filter>common</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="string_helper.cpp">
|
||||
<Filter>common</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="string_utils.cxx">
|
||||
<Filter>common</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="CRUL_server_call_httpserver.cpp">
|
||||
<Filter>epm_handler</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Connor_signoff_dataset.cpp">
|
||||
<Filter>epm_handler</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Connor_signoff_form.cpp">
|
||||
<Filter>epm_handler</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="ado.cxx">
|
||||
<Filter>common</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="addLb.cpp">
|
||||
<Filter>epm_handler</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Connor_ChangeTask_SetValue.cpp">
|
||||
<Filter>epm_handler</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Connor_ChangeTask_AssignUser.cpp">
|
||||
<Filter>epm_handler</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Connor_ChangeTask_CheckValue.cpp">
|
||||
<Filter>epm_handler</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Connor_ChangeTask_SetComments.cpp">
|
||||
<Filter>epm_handler</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
@ -0,0 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup />
|
||||
</Project>
|
||||
@ -0,0 +1,40 @@
|
||||
#import "c:\program files\common files\system\ado\msado15.dll" no_namespace rename("EOF", "adoEOF")
|
||||
#include "Supor_register.h"
|
||||
|
||||
bool open(char* username, char* password, char* dbname, char* ip);
|
||||
_RecordsetPtr& execute(_bstr_t SQL);
|
||||
/**
|
||||
* 带输入参数的查询SQL语句.
|
||||
* @param SQL - <I> SQL语句
|
||||
* @param inputValueCount - <I> 输入参数数量
|
||||
* @param inputValue - <I> 输入参数值
|
||||
* @param outputColumn - <O> 输出表的列的数量
|
||||
* @param outputValueCount - <O> 输出表的行的数量
|
||||
* @param outputValue - <O> 输出表内容
|
||||
* @return - OCI_OK or error code
|
||||
*
|
||||
* ORACLE 数据库的连接与封装函数
|
||||
*/
|
||||
int QuerySQL(char* SQL, int inputValueCount, char** inputValue, int* outputColumn, int* outputValueCount, char**** outputValue);
|
||||
|
||||
int QuerySQLNoInputParam(char* SQL, int* outputColumn, int* outputValueCount, char**** outputValue);
|
||||
// 执行类操作
|
||||
int ExecuteSQL(char* SQL, int valueCount, char** value);
|
||||
/**
|
||||
* 不带输入参数的执行SQL语句.
|
||||
* @param SQL - <I> SQL语句
|
||||
* @return - OCI_OK or error code
|
||||
*
|
||||
* ORACLE 数据库的连接与封装函数
|
||||
*/
|
||||
int selectData2(const string& sql, vector<string>& results, vector<string>& fields);
|
||||
int selectData(const string& sql,vector<string>& results);
|
||||
int selectDataNormal(const string& sql, vector<string>& results);
|
||||
int ExecuteSQLNoInputParam(char* SQL);
|
||||
int getPrefStrings(const char* preference, vector<string>& pref_vec);
|
||||
/**
|
||||
* 断开数据库连接.
|
||||
*
|
||||
* ORACLE 数据库的连接与封装函数
|
||||
*/
|
||||
void close();
|
||||
@ -0,0 +1,86 @@
|
||||
#include "Supor_register.h"
|
||||
using namespace std;
|
||||
extern "C" int POM_AM__set_application_bypass(logical bypass);
|
||||
|
||||
/**
|
||||
*
|
||||
* Description:
|
||||
* This handler will set signoff infomation to properties of rev
|
||||
*
|
||||
* Syntax:
|
||||
*
|
||||
*
|
||||
* -SignUserName: 填入用户ID的属性 必填
|
||||
*
|
||||
* -SignDate: 填入时间的属性 必填
|
||||
*
|
||||
* -SignDateFormate: %Y-%m-%d 时间格式 必填
|
||||
*
|
||||
* -SignComment: 填入注释的属性 非必填
|
||||
*
|
||||
* -SignRelation: 审签表和版本的关系 必填
|
||||
*
|
||||
*
|
||||
*/
|
||||
int connor_assign_user(EPM_action_message_t msg) {
|
||||
int ifail = ITK_ok;
|
||||
char* log_file = NULL;
|
||||
|
||||
CreateLogFile("connor_assign_user", &log_file);
|
||||
WriteLog("*************************************************************\n");
|
||||
WriteLog("* connor_assign_user is strat ! *\n");
|
||||
WriteLog("*************************************************************\n");
|
||||
|
||||
|
||||
int arg_cnt = 0, attachments = 0, * attach_type, occur_of_counts = 0, form_count;
|
||||
|
||||
SIGNOFF_TYPE_t memberType;
|
||||
EPM_signoff_decision_t dec;
|
||||
tag_t aUserTag = NULLTAG, responsibleParty = NULLTAG, cur_perform_task = NULLTAG, * attachmentTags = NULLTAG;
|
||||
tag_t root_task = NULLTAG, * taskAttches = NULLTAG, master_form_rel_type = NULLTAG, * form_list = NULLTAG;
|
||||
tag_t type_tag = NULLTAG, * user_tags = NULLTAG;
|
||||
int user_cnt = 0;
|
||||
char* timeinfo = NULL;
|
||||
EPM_ask_root_task(msg.task, &root_task);
|
||||
EPM_ask_attachments(root_task, EPM_target_attachment, &occur_of_counts, &taskAttches);
|
||||
POM_AM__set_application_bypass(true);
|
||||
for (int count = 0; count < occur_of_counts; count++) {
|
||||
char* id = NULL;//用户id
|
||||
ITKCALL(AOM_ask_value_string(taskAttches[count], "ly6_assignUser", &id));
|
||||
printf("id=========%s\n", id);
|
||||
if (id != NULL) {
|
||||
tag_t tmp_select_signoff_task = NULLTAG;
|
||||
ITKCALL(EPM_ask_sub_task(root_task, EPM_select_signoff_team_task, &tmp_select_signoff_task));
|
||||
|
||||
tag_t user;
|
||||
ITKCALL(SA_find_user2(id, &user));
|
||||
if (user) {
|
||||
printf("11111111111111111111\n");
|
||||
}
|
||||
if (user && tmp_select_signoff_task) {
|
||||
printf("=========\n");
|
||||
int signoff_cnt = 0;
|
||||
tag_t* signoffs = NULL;
|
||||
ITKCALL(EPM_create_adhoc_signoff(tmp_select_signoff_task, user, &signoff_cnt, &signoffs));
|
||||
ITKCALL(EPM_set_adhoc_signoff_selection_done(tmp_select_signoff_task, true));
|
||||
|
||||
if (signoffs)
|
||||
{
|
||||
MEM_free(signoffs);
|
||||
signoffs = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
POM_AM__set_application_bypass(false);
|
||||
WriteLog("*************************************************************\n");
|
||||
WriteLog("* connor_assign_user is end ! *\n");
|
||||
WriteLog("*************************************************************\n");
|
||||
CloseLog();
|
||||
return ifail;
|
||||
}
|
||||
|
||||
@ -0,0 +1,8 @@
|
||||
// stdafx.cpp : 只包括标准包含文件的源文件
|
||||
// XNY_itk.pch 将作为预编译头
|
||||
// stdafx.obj 将包含预编译类型信息
|
||||
|
||||
#include "stdafx.h"
|
||||
|
||||
// TODO: 在 STDAFX.H 中引用任何所需的附加头文件,
|
||||
//而不是在此文件中引用
|
||||
@ -0,0 +1,15 @@
|
||||
// stdafx.h : 标准系统包含文件的包含文件,
|
||||
// 或是经常使用但不常更改的
|
||||
// 特定于项目的包含文件
|
||||
//
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "targetver.h"
|
||||
|
||||
#include <stdio.h>
|
||||
#include <tchar.h>
|
||||
|
||||
|
||||
|
||||
// TODO: 在此处引用程序需要的其他头文件
|
||||
@ -0,0 +1,103 @@
|
||||
/**
|
||||
* @file common_itk_util.cpp
|
||||
* @brief itk warpper utility function
|
||||
* @author James
|
||||
* @history
|
||||
* ===================================================================================
|
||||
* Date Name Description of Change
|
||||
* 18-July-2008 Ray
|
||||
*/
|
||||
#include <tc/tc.h>
|
||||
#include <tc/tc_util.h>
|
||||
#include <tc/tc_arguments.h>
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
#include <time.h>
|
||||
//
|
||||
#ifdef WIN32
|
||||
#include <io.h>
|
||||
#include <direct.h>
|
||||
#else
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
//
|
||||
#include "tc_log.h"
|
||||
|
||||
#define ARGS_LENGTH 200
|
||||
#define MAX_PRINTLINE_LENGTH 2000
|
||||
#define MAX_PATH_LENGTH 2000
|
||||
#define MAX_ARGUMENT_LENGTH 400
|
||||
#define MAX_PARAMNAME_LENGTH 50
|
||||
#define MAX_FILE_EXT_LENGTH 10
|
||||
#define TRUE_FLAG 1
|
||||
#define FALSE_FLAG 0
|
||||
#define DETAILLOG 1
|
||||
|
||||
#define DOFREE(obj) \
|
||||
{ \
|
||||
if(obj) \
|
||||
{ \
|
||||
MEM_free(obj); \
|
||||
obj = NULL; \
|
||||
} \
|
||||
}
|
||||
|
||||
|
||||
FILE* logFile = NULL;
|
||||
|
||||
void CreateLogFile(char* logFileName)
|
||||
{
|
||||
int i=0;
|
||||
|
||||
logFile = NULL;
|
||||
|
||||
|
||||
//get logFileName
|
||||
sprintf(logFileName, "%s", logFileName);
|
||||
printf("log file name: %s\n", logFileName);
|
||||
|
||||
|
||||
//create log file
|
||||
if((logFile = fopen(logFileName, "w"))==NULL)
|
||||
{
|
||||
printf("log file create failed\n");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void WriteLog(const char* format, ...)
|
||||
{
|
||||
va_list arg;
|
||||
char tmp[MAX_PRINTLINE_LENGTH];
|
||||
|
||||
if(logFile)
|
||||
{
|
||||
//get the message
|
||||
memset(tmp, 0, sizeof(tmp));
|
||||
va_start(arg, format);
|
||||
vsprintf(tmp, format, arg);
|
||||
va_end(arg);
|
||||
|
||||
//----------print to command window for trace--------//
|
||||
printf("%s\n", tmp);
|
||||
|
||||
//print message to log file
|
||||
fprintf(logFile, "%s\n", tmp);
|
||||
fflush(logFile);
|
||||
}
|
||||
else
|
||||
{
|
||||
printf("*!Error!*: Log File Not Exist\n");
|
||||
}
|
||||
}
|
||||
|
||||
void CloseLog(void)
|
||||
{
|
||||
if(logFile)
|
||||
{
|
||||
fclose(logFile);
|
||||
logFile = NULL;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,30 @@
|
||||
/**
|
||||
* @file common_itk_util.h
|
||||
* @brief itk warpper utility function
|
||||
* @author Ray
|
||||
* @history
|
||||
* ===================================================================================
|
||||
* Date Name Description of Change
|
||||
* 09-July-2008 Ray
|
||||
*/
|
||||
|
||||
#ifndef TC_LOG_H
|
||||
#define TC_LOG_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
void CreateLogFile(char* logFileName);
|
||||
void WriteLog(const char* format, ...);
|
||||
void CloseLog(void);
|
||||
//int FindDatasetReferenceExt( tag_t datasettype, const char *datasettype_ref, char ext[10] );
|
||||
//int CompareDate( date_t date1, date_t date2 );
|
||||
//int GetRandomTempFile( char tempFile[256] );
|
||||
//logical IsItemRevisionType( char object_type[WSO_name_size_c + 1] );
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@ -0,0 +1,32 @@
|
||||
d:\source\力源\signoff_itk\signoff_itk\x64\release\vc142.pdb
|
||||
d:\source\力源\signoff_itk\signoff_itk\x64\release\connor_signoff_form.obj
|
||||
d:\source\力源\signoff_itk\signoff_itk\x64\release\connor_signoff_dataset.obj
|
||||
d:\source\力源\signoff_itk\signoff_itk\x64\release\string_utils.obj
|
||||
d:\source\力源\signoff_itk\signoff_itk\x64\release\string_helper.obj
|
||||
d:\source\力源\signoff_itk\signoff_itk\x64\release\ocilib.obj
|
||||
d:\source\力源\signoff_itk\signoff_itk\x64\release\lib_custom_main.obj
|
||||
d:\source\力源\signoff_itk\signoff_itk\x64\release\epm_register_handler.obj
|
||||
d:\source\力源\signoff_itk\signoff_itk\x64\release\crul_server_call_httpserver.obj
|
||||
d:\source\力源\signoff_itk\signoff_itk\x64\release\connor_util.obj
|
||||
d:\source\力源\signoff_itk\signoff_itk\x64\release\connor_changetask_setvalue.obj
|
||||
d:\source\力源\signoff_itk\signoff_itk\x64\release\connor_changetask_setcomments.obj
|
||||
d:\source\力源\signoff_itk\signoff_itk\x64\release\connor_changetask_checkvalue.obj
|
||||
d:\source\力源\signoff_itk\signoff_itk\x64\release\connor_changetask_assignuser.obj
|
||||
d:\source\力源\signoff_itk\signoff_itk\x64\release\common_itk_util.obj
|
||||
d:\source\力源\signoff_itk\signoff_itk\x64\release\ado.obj
|
||||
d:\source\力源\signoff_itk\signoff_itk\x64\release\addlb.obj
|
||||
d:\source\力源\signoff_itk\x64\release\signoff_itk.dll
|
||||
d:\source\力源\signoff_itk\signoff_itk\x64\release\signoff_itk.ipdb
|
||||
d:\source\力源\signoff_itk\signoff_itk\x64\release\signoff_itk.iobj
|
||||
d:\source\力源\signoff_itk\x64\release\signoff_itk.pdb
|
||||
d:\source\力源\signoff_itk\x64\release\signoff_itk.lib
|
||||
d:\source\力源\signoff_itk\x64\release\signoff_itk.exp
|
||||
d:\source\力源\signoff_itk\signoff_itk\x64\release\msado15.tli
|
||||
d:\source\力源\signoff_itk\signoff_itk\x64\release\msado15.tlh
|
||||
d:\source\力源\signoff_itk\signoff_itk\x64\release\signoff_itk.tlog\cl.command.1.tlog
|
||||
d:\source\力源\signoff_itk\signoff_itk\x64\release\signoff_itk.tlog\cl.read.1.tlog
|
||||
d:\source\力源\signoff_itk\signoff_itk\x64\release\signoff_itk.tlog\cl.write.1.tlog
|
||||
d:\source\力源\signoff_itk\signoff_itk\x64\release\signoff_itk.tlog\link.command.1.tlog
|
||||
d:\source\力源\signoff_itk\signoff_itk\x64\release\signoff_itk.tlog\link.read.1.tlog
|
||||
d:\source\力源\signoff_itk\signoff_itk\x64\release\signoff_itk.tlog\link.write.1.tlog
|
||||
d:\source\力源\signoff_itk\signoff_itk\x64\release\signoff_itk.tlog\signoff_itk.write.1u.tlog
|
||||
@ -0,0 +1,11 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project>
|
||||
<ProjectOutputs>
|
||||
<ProjectOutput>
|
||||
<FullPath>D:\source\力源\SignOff_itk\x64\Release\SignOff_itk.dll</FullPath>
|
||||
</ProjectOutput>
|
||||
</ProjectOutputs>
|
||||
<ContentFiles />
|
||||
<SatelliteDlls />
|
||||
<NonRecipeFileRefs />
|
||||
</Project>
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -0,0 +1,2 @@
|
||||
PlatformToolSet=v142:VCToolArchitecture=Native32Bit:VCToolsVersion=14.29.30133:TargetPlatformVersion=10.0.19041.0:
|
||||
Release|x64|D:\source\力源\SignOff_itk\|
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,25 @@
|
||||
/target/
|
||||
!.mvn/wrapper/maven-wrapper.jar
|
||||
|
||||
### STS ###
|
||||
.apt_generated
|
||||
.classpath
|
||||
.factorypath
|
||||
.project
|
||||
.settings
|
||||
.springBeans
|
||||
.sts4-cache
|
||||
|
||||
### IntelliJ IDEA ###
|
||||
.idea
|
||||
*.iws
|
||||
*.iml
|
||||
*.ipr
|
||||
|
||||
### NetBeans ###
|
||||
/nbproject/private/
|
||||
/build/
|
||||
/nbbuild/
|
||||
/dist/
|
||||
/nbdist/
|
||||
/.nb-gradle/
|
||||
Binary file not shown.
@ -0,0 +1 @@
|
||||
distributionUrl=https://repo1.maven.org/maven2/org/apache/maven/apache-maven/3.5.3/apache-maven-3.5.3-bin.zip
|
||||
@ -0,0 +1 @@
|
||||
SpringBoot集成JWT实现token验证
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -0,0 +1,225 @@
|
||||
#!/bin/sh
|
||||
# ----------------------------------------------------------------------------
|
||||
# Licensed to the Apache Software Foundation (ASF) under one
|
||||
# or more contributor license agreements. See the NOTICE file
|
||||
# distributed with this work for additional information
|
||||
# regarding copyright ownership. The ASF licenses this file
|
||||
# to you under the Apache License, Version 2.0 (the
|
||||
# "License"); you may not use this file except in compliance
|
||||
# with the License. You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing,
|
||||
# software distributed under the License is distributed on an
|
||||
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
# KIND, either express or implied. See the License for the
|
||||
# specific language governing permissions and limitations
|
||||
# under the License.
|
||||
# ----------------------------------------------------------------------------
|
||||
|
||||
# ----------------------------------------------------------------------------
|
||||
# Maven2 Start Up Batch script
|
||||
#
|
||||
# Required ENV vars:
|
||||
# ------------------
|
||||
# JAVA_HOME - location of a JDK home dir
|
||||
#
|
||||
# Optional ENV vars
|
||||
# -----------------
|
||||
# M2_HOME - location of maven2's installed home dir
|
||||
# MAVEN_OPTS - parameters passed to the Java VM when running Maven
|
||||
# e.g. to debug Maven itself, use
|
||||
# set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000
|
||||
# MAVEN_SKIP_RC - flag to disable loading of mavenrc files
|
||||
# ----------------------------------------------------------------------------
|
||||
|
||||
if [ -z "$MAVEN_SKIP_RC" ] ; then
|
||||
|
||||
if [ -f /etc/mavenrc ] ; then
|
||||
. /etc/mavenrc
|
||||
fi
|
||||
|
||||
if [ -f "$HOME/.mavenrc" ] ; then
|
||||
. "$HOME/.mavenrc"
|
||||
fi
|
||||
|
||||
fi
|
||||
|
||||
# OS specific support. $var _must_ be set to either true or false.
|
||||
cygwin=false;
|
||||
darwin=false;
|
||||
mingw=false
|
||||
case "`uname`" in
|
||||
CYGWIN*) cygwin=true ;;
|
||||
MINGW*) mingw=true;;
|
||||
Darwin*) darwin=true
|
||||
# Use /usr/libexec/java_home if available, otherwise fall back to /Library/Java/Home
|
||||
# See https://developer.apple.com/library/mac/qa/qa1170/_index.html
|
||||
if [ -z "$JAVA_HOME" ]; then
|
||||
if [ -x "/usr/libexec/java_home" ]; then
|
||||
export JAVA_HOME="`/usr/libexec/java_home`"
|
||||
else
|
||||
export JAVA_HOME="/Library/Java/Home"
|
||||
fi
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
if [ -z "$JAVA_HOME" ] ; then
|
||||
if [ -r /etc/gentoo-release ] ; then
|
||||
JAVA_HOME=`java-config --jre-home`
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ -z "$M2_HOME" ] ; then
|
||||
## resolve links - $0 may be a link to maven's home
|
||||
PRG="$0"
|
||||
|
||||
# need this for relative symlinks
|
||||
while [ -h "$PRG" ] ; do
|
||||
ls=`ls -ld "$PRG"`
|
||||
link=`expr "$ls" : '.*-> \(.*\)$'`
|
||||
if expr "$link" : '/.*' > /dev/null; then
|
||||
PRG="$link"
|
||||
else
|
||||
PRG="`dirname "$PRG"`/$link"
|
||||
fi
|
||||
done
|
||||
|
||||
saveddir=`pwd`
|
||||
|
||||
M2_HOME=`dirname "$PRG"`/..
|
||||
|
||||
# make it fully qualified
|
||||
M2_HOME=`cd "$M2_HOME" && pwd`
|
||||
|
||||
cd "$saveddir"
|
||||
# echo Using m2 at $M2_HOME
|
||||
fi
|
||||
|
||||
# For Cygwin, ensure paths are in UNIX format before anything is touched
|
||||
if $cygwin ; then
|
||||
[ -n "$M2_HOME" ] &&
|
||||
M2_HOME=`cygpath --unix "$M2_HOME"`
|
||||
[ -n "$JAVA_HOME" ] &&
|
||||
JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
|
||||
[ -n "$CLASSPATH" ] &&
|
||||
CLASSPATH=`cygpath --path --unix "$CLASSPATH"`
|
||||
fi
|
||||
|
||||
# For Migwn, ensure paths are in UNIX format before anything is touched
|
||||
if $mingw ; then
|
||||
[ -n "$M2_HOME" ] &&
|
||||
M2_HOME="`(cd "$M2_HOME"; pwd)`"
|
||||
[ -n "$JAVA_HOME" ] &&
|
||||
JAVA_HOME="`(cd "$JAVA_HOME"; pwd)`"
|
||||
# TODO classpath?
|
||||
fi
|
||||
|
||||
if [ -z "$JAVA_HOME" ]; then
|
||||
javaExecutable="`which javac`"
|
||||
if [ -n "$javaExecutable" ] && ! [ "`expr \"$javaExecutable\" : '\([^ ]*\)'`" = "no" ]; then
|
||||
# readlink(1) is not available as standard on Solaris 10.
|
||||
readLink=`which readlink`
|
||||
if [ ! `expr "$readLink" : '\([^ ]*\)'` = "no" ]; then
|
||||
if $darwin ; then
|
||||
javaHome="`dirname \"$javaExecutable\"`"
|
||||
javaExecutable="`cd \"$javaHome\" && pwd -P`/javac"
|
||||
else
|
||||
javaExecutable="`readlink -f \"$javaExecutable\"`"
|
||||
fi
|
||||
javaHome="`dirname \"$javaExecutable\"`"
|
||||
javaHome=`expr "$javaHome" : '\(.*\)/bin'`
|
||||
JAVA_HOME="$javaHome"
|
||||
export JAVA_HOME
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ -z "$JAVACMD" ] ; then
|
||||
if [ -n "$JAVA_HOME" ] ; then
|
||||
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
|
||||
# IBM's JDK on AIX uses strange locations for the executables
|
||||
JAVACMD="$JAVA_HOME/jre/sh/java"
|
||||
else
|
||||
JAVACMD="$JAVA_HOME/bin/java"
|
||||
fi
|
||||
else
|
||||
JAVACMD="`which java`"
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ ! -x "$JAVACMD" ] ; then
|
||||
echo "Error: JAVA_HOME is not defined correctly." >&2
|
||||
echo " We cannot execute $JAVACMD" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ -z "$JAVA_HOME" ] ; then
|
||||
echo "Warning: JAVA_HOME environment variable is not set."
|
||||
fi
|
||||
|
||||
CLASSWORLDS_LAUNCHER=org.codehaus.plexus.classworlds.launcher.Launcher
|
||||
|
||||
# traverses directory structure from process work directory to filesystem root
|
||||
# first directory with .mvn subdirectory is considered project base directory
|
||||
find_maven_basedir() {
|
||||
|
||||
if [ -z "$1" ]
|
||||
then
|
||||
echo "Path not specified to find_maven_basedir"
|
||||
return 1
|
||||
fi
|
||||
|
||||
basedir="$1"
|
||||
wdir="$1"
|
||||
while [ "$wdir" != '/' ] ; do
|
||||
if [ -d "$wdir"/.mvn ] ; then
|
||||
basedir=$wdir
|
||||
break
|
||||
fi
|
||||
# workaround for JBEAP-8937 (on Solaris 10/Sparc)
|
||||
if [ -d "${wdir}" ]; then
|
||||
wdir=`cd "$wdir/.."; pwd`
|
||||
fi
|
||||
# end of workaround
|
||||
done
|
||||
echo "${basedir}"
|
||||
}
|
||||
|
||||
# concatenates all lines of a file
|
||||
concat_lines() {
|
||||
if [ -f "$1" ]; then
|
||||
echo "$(tr -s '\n' ' ' < "$1")"
|
||||
fi
|
||||
}
|
||||
|
||||
BASE_DIR=`find_maven_basedir "$(pwd)"`
|
||||
if [ -z "$BASE_DIR" ]; then
|
||||
exit 1;
|
||||
fi
|
||||
|
||||
export MAVEN_PROJECTBASEDIR=${MAVEN_BASEDIR:-"$BASE_DIR"}
|
||||
echo $MAVEN_PROJECTBASEDIR
|
||||
MAVEN_OPTS="$(concat_lines "$MAVEN_PROJECTBASEDIR/.mvn/jvm.config") $MAVEN_OPTS"
|
||||
|
||||
# For Cygwin, switch paths to Windows format before running java
|
||||
if $cygwin; then
|
||||
[ -n "$M2_HOME" ] &&
|
||||
M2_HOME=`cygpath --path --windows "$M2_HOME"`
|
||||
[ -n "$JAVA_HOME" ] &&
|
||||
JAVA_HOME=`cygpath --path --windows "$JAVA_HOME"`
|
||||
[ -n "$CLASSPATH" ] &&
|
||||
CLASSPATH=`cygpath --path --windows "$CLASSPATH"`
|
||||
[ -n "$MAVEN_PROJECTBASEDIR" ] &&
|
||||
MAVEN_PROJECTBASEDIR=`cygpath --path --windows "$MAVEN_PROJECTBASEDIR"`
|
||||
fi
|
||||
|
||||
WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain
|
||||
|
||||
exec "$JAVACMD" \
|
||||
$MAVEN_OPTS \
|
||||
-classpath "$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.jar" \
|
||||
"-Dmaven.home=${M2_HOME}" "-Dmaven.multiModuleProjectDirectory=${MAVEN_PROJECTBASEDIR}" \
|
||||
${WRAPPER_LAUNCHER} $MAVEN_CONFIG "$@"
|
||||
@ -0,0 +1,143 @@
|
||||
@REM ----------------------------------------------------------------------------
|
||||
@REM Licensed to the Apache Software Foundation (ASF) under one
|
||||
@REM or more contributor license agreements. See the NOTICE file
|
||||
@REM distributed with this work for additional information
|
||||
@REM regarding copyright ownership. The ASF licenses this file
|
||||
@REM to you under the Apache License, Version 2.0 (the
|
||||
@REM "License"); you may not use this file except in compliance
|
||||
@REM with the License. You may obtain a copy of the License at
|
||||
@REM
|
||||
@REM http://www.apache.org/licenses/LICENSE-2.0
|
||||
@REM
|
||||
@REM Unless required by applicable law or agreed to in writing,
|
||||
@REM software distributed under the License is distributed on an
|
||||
@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
@REM KIND, either express or implied. See the License for the
|
||||
@REM specific language governing permissions and limitations
|
||||
@REM under the License.
|
||||
@REM ----------------------------------------------------------------------------
|
||||
|
||||
@REM ----------------------------------------------------------------------------
|
||||
@REM Maven2 Start Up Batch script
|
||||
@REM
|
||||
@REM Required ENV vars:
|
||||
@REM JAVA_HOME - location of a JDK home dir
|
||||
@REM
|
||||
@REM Optional ENV vars
|
||||
@REM M2_HOME - location of maven2's installed home dir
|
||||
@REM MAVEN_BATCH_ECHO - set to 'on' to enable the echoing of the batch commands
|
||||
@REM MAVEN_BATCH_PAUSE - set to 'on' to wait for a key stroke before ending
|
||||
@REM MAVEN_OPTS - parameters passed to the Java VM when running Maven
|
||||
@REM e.g. to debug Maven itself, use
|
||||
@REM set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000
|
||||
@REM MAVEN_SKIP_RC - flag to disable loading of mavenrc files
|
||||
@REM ----------------------------------------------------------------------------
|
||||
|
||||
@REM Begin all REM lines with '@' in case MAVEN_BATCH_ECHO is 'on'
|
||||
@echo off
|
||||
@REM enable echoing my setting MAVEN_BATCH_ECHO to 'on'
|
||||
@if "%MAVEN_BATCH_ECHO%" == "on" echo %MAVEN_BATCH_ECHO%
|
||||
|
||||
@REM set %HOME% to equivalent of $HOME
|
||||
if "%HOME%" == "" (set "HOME=%HOMEDRIVE%%HOMEPATH%")
|
||||
|
||||
@REM Execute a user defined script before this one
|
||||
if not "%MAVEN_SKIP_RC%" == "" goto skipRcPre
|
||||
@REM check for pre script, once with legacy .bat ending and once with .cmd ending
|
||||
if exist "%HOME%\mavenrc_pre.bat" call "%HOME%\mavenrc_pre.bat"
|
||||
if exist "%HOME%\mavenrc_pre.cmd" call "%HOME%\mavenrc_pre.cmd"
|
||||
:skipRcPre
|
||||
|
||||
@setlocal
|
||||
|
||||
set ERROR_CODE=0
|
||||
|
||||
@REM To isolate internal variables from possible post scripts, we use another setlocal
|
||||
@setlocal
|
||||
|
||||
@REM ==== START VALIDATION ====
|
||||
if not "%JAVA_HOME%" == "" goto OkJHome
|
||||
|
||||
echo.
|
||||
echo Error: JAVA_HOME not found in your environment. >&2
|
||||
echo Please set the JAVA_HOME variable in your environment to match the >&2
|
||||
echo location of your Java installation. >&2
|
||||
echo.
|
||||
goto error
|
||||
|
||||
:OkJHome
|
||||
if exist "%JAVA_HOME%\bin\java.exe" goto init
|
||||
|
||||
echo.
|
||||
echo Error: JAVA_HOME is set to an invalid directory. >&2
|
||||
echo JAVA_HOME = "%JAVA_HOME%" >&2
|
||||
echo Please set the JAVA_HOME variable in your environment to match the >&2
|
||||
echo location of your Java installation. >&2
|
||||
echo.
|
||||
goto error
|
||||
|
||||
@REM ==== END VALIDATION ====
|
||||
|
||||
:init
|
||||
|
||||
@REM Find the project base dir, i.e. the directory that contains the folder ".mvn".
|
||||
@REM Fallback to current working directory if not found.
|
||||
|
||||
set MAVEN_PROJECTBASEDIR=%MAVEN_BASEDIR%
|
||||
IF NOT "%MAVEN_PROJECTBASEDIR%"=="" goto endDetectBaseDir
|
||||
|
||||
set EXEC_DIR=%CD%
|
||||
set WDIR=%EXEC_DIR%
|
||||
:findBaseDir
|
||||
IF EXIST "%WDIR%"\.mvn goto baseDirFound
|
||||
cd ..
|
||||
IF "%WDIR%"=="%CD%" goto baseDirNotFound
|
||||
set WDIR=%CD%
|
||||
goto findBaseDir
|
||||
|
||||
:baseDirFound
|
||||
set MAVEN_PROJECTBASEDIR=%WDIR%
|
||||
cd "%EXEC_DIR%"
|
||||
goto endDetectBaseDir
|
||||
|
||||
:baseDirNotFound
|
||||
set MAVEN_PROJECTBASEDIR=%EXEC_DIR%
|
||||
cd "%EXEC_DIR%"
|
||||
|
||||
:endDetectBaseDir
|
||||
|
||||
IF NOT EXIST "%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config" goto endReadAdditionalConfig
|
||||
|
||||
@setlocal EnableExtensions EnableDelayedExpansion
|
||||
for /F "usebackq delims=" %%a in ("%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config") do set JVM_CONFIG_MAVEN_PROPS=!JVM_CONFIG_MAVEN_PROPS! %%a
|
||||
@endlocal & set JVM_CONFIG_MAVEN_PROPS=%JVM_CONFIG_MAVEN_PROPS%
|
||||
|
||||
:endReadAdditionalConfig
|
||||
|
||||
SET MAVEN_JAVA_EXE="%JAVA_HOME%\bin\java.exe"
|
||||
|
||||
set WRAPPER_JAR="%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.jar"
|
||||
set WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain
|
||||
|
||||
%MAVEN_JAVA_EXE% %JVM_CONFIG_MAVEN_PROPS% %MAVEN_OPTS% %MAVEN_DEBUG_OPTS% -classpath %WRAPPER_JAR% "-Dmaven.multiModuleProjectDirectory=%MAVEN_PROJECTBASEDIR%" %WRAPPER_LAUNCHER% %MAVEN_CONFIG% %*
|
||||
if ERRORLEVEL 1 goto error
|
||||
goto end
|
||||
|
||||
:error
|
||||
set ERROR_CODE=1
|
||||
|
||||
:end
|
||||
@endlocal & set ERROR_CODE=%ERROR_CODE%
|
||||
|
||||
if not "%MAVEN_SKIP_RC%" == "" goto skipRcPost
|
||||
@REM check for post script, once with legacy .bat ending and once with .cmd ending
|
||||
if exist "%HOME%\mavenrc_post.bat" call "%HOME%\mavenrc_post.bat"
|
||||
if exist "%HOME%\mavenrc_post.cmd" call "%HOME%\mavenrc_post.cmd"
|
||||
:skipRcPost
|
||||
|
||||
@REM pause the script if MAVEN_BATCH_PAUSE is set to 'on'
|
||||
if "%MAVEN_BATCH_PAUSE%" == "on" pause
|
||||
|
||||
if "%MAVEN_TERMINATE_CMD%" == "on" exit %ERROR_CODE%
|
||||
|
||||
exit /B %ERROR_CODE%
|
||||
@ -0,0 +1,356 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<groupId>com.pjb</groupId>
|
||||
<artifactId>ConnorSendMail</artifactId>
|
||||
<version>2.0.0</version>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<name>springboot-jjwt</name>
|
||||
<description>Demo project for Spring Boot</description>
|
||||
|
||||
<parent>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-parent</artifactId>
|
||||
<version>2.3.7.RELEASE</version>
|
||||
<relativePath/> <!-- lookup parent from repository -->
|
||||
</parent>
|
||||
|
||||
<properties>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
|
||||
<java.version>1.8</java.version>
|
||||
<skipTests>true</skipTests>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-mail</artifactId>
|
||||
<version>2.3.7.RELEASE</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-amqp</artifactId>
|
||||
<version>2.3.7.RELEASE</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.microsoft.sqlserver</groupId>
|
||||
<artifactId>mssql-jdbc</artifactId>
|
||||
<version>6.1.0.jre8</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.springfox</groupId>
|
||||
<artifactId>springfox-swagger2</artifactId>
|
||||
<version>2.9.2</version>
|
||||
</dependency>
|
||||
<!-- https://mvnrepository.com/artifact/io.springfox/springfox-swagger-ui -->
|
||||
<dependency>
|
||||
<groupId>io.springfox</groupId>
|
||||
<artifactId>springfox-swagger-ui</artifactId>
|
||||
<version>2.9.2</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-web</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.mybatis.spring.boot</groupId>
|
||||
<artifactId>mybatis-spring-boot-starter</artifactId>
|
||||
<version>1.3.2</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.alibaba</groupId>
|
||||
<artifactId>fastjson</artifactId>
|
||||
<version>1.2.47</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.jsonwebtoken</groupId>
|
||||
<artifactId>jjwt</artifactId>
|
||||
<version>0.9.1</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.auth0</groupId>
|
||||
<artifactId>java-jwt</artifactId>
|
||||
<version>3.4.0</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>mysql</groupId>
|
||||
<artifactId>mysql-connector-java</artifactId>
|
||||
<scope>runtime</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.projectlombok</groupId>
|
||||
<artifactId>lombok</artifactId>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-test</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.oracle</groupId>
|
||||
<artifactId>ojdbc8</artifactId>
|
||||
<version>12.2.0.1</version>
|
||||
</dependency>
|
||||
<!--
|
||||
<dependency>
|
||||
<groupId>teamcenter</groupId>
|
||||
<artifactId>commons-io</artifactId>
|
||||
<version>2.5</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>teamcenter</groupId>
|
||||
<artifactId>commons-logging</artifactId>
|
||||
<version>2.5</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>teamcenter</groupId>
|
||||
<artifactId>fccclient</artifactId>
|
||||
<version>12.3.0</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>teamcenter</groupId>
|
||||
<artifactId>fscclient</artifactId>
|
||||
<version>12.3.0</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>teamcenter</groupId>
|
||||
<artifactId>httpclient</artifactId>
|
||||
<version>12.3.0</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>teamcenter</groupId>
|
||||
<artifactId>httpcore</artifactId>
|
||||
<version>12.3.0</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>teamcenter</groupId>
|
||||
<artifactId>httpmime</artifactId>
|
||||
<version>12.3.0</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>teamcenter</groupId>
|
||||
<artifactId>log4j</artifactId>
|
||||
<version>12.3.0</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>teamcenter</groupId>
|
||||
<artifactId>TcSoaAdministrationStrong</artifactId>
|
||||
<version>12.3.0</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>teamcenter</groupId>
|
||||
<artifactId>TcSoaAiStrong</artifactId>
|
||||
<version>12.3.0</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>teamcenter</groupId>
|
||||
<artifactId>TcSoaAllocationsStrong</artifactId>
|
||||
<version>12.3.0</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>teamcenter</groupId>
|
||||
<artifactId>TcSoaBomStrong</artifactId>
|
||||
<version>12.3.0</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>teamcenter</groupId>
|
||||
<artifactId>TcSoaBusinessModelerStrong</artifactId>
|
||||
<version>12.3.0</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>teamcenter</groupId>
|
||||
<artifactId>TcSoaCadBomAlignmentStrong</artifactId>
|
||||
<version>12.3.0</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>teamcenter</groupId>
|
||||
<artifactId>TcSoaCadStrong</artifactId>
|
||||
<version>12.3.0</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>teamcenter</groupId>
|
||||
<artifactId>TcSoaCaeStrong</artifactId>
|
||||
<version>12.3.0</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>teamcenter</groupId>
|
||||
<artifactId>TcSoaCalendarManagementStrong</artifactId>
|
||||
<version>12.3.0</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>teamcenter</groupId>
|
||||
<artifactId>TcSoaChangeManagementStrong</artifactId>
|
||||
<version>12.3.0</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>teamcenter</groupId>
|
||||
<artifactId>TcSoaClassificationStrong</artifactId>
|
||||
<version>12.3.0</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>teamcenter</groupId>
|
||||
<artifactId>TcSoaClient</artifactId>
|
||||
<version>12.3.0</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>teamcenter</groupId>
|
||||
<artifactId>TcSoaCommon</artifactId>
|
||||
<version>12.3.0</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>teamcenter</groupId>
|
||||
<artifactId>TcSoaConfigurationStrong</artifactId>
|
||||
<version>12.3.0</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>teamcenter</groupId>
|
||||
<artifactId>TcSoaCoreLoose</artifactId>
|
||||
<version>12.3.0</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>teamcenter</groupId>
|
||||
<artifactId>TcSoaCoreStrong</artifactId>
|
||||
<version>12.3.0</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>teamcenter</groupId>
|
||||
<artifactId>TcSoaDocumentManagementStrong</artifactId>
|
||||
<version>12.3.0</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>teamcenter</groupId>
|
||||
<artifactId>TcSoaImportExportStrong</artifactId>
|
||||
<version>12.3.0</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>teamcenter</groupId>
|
||||
<artifactId>TcSoaQueryStrong</artifactId>
|
||||
<version>12.3.0</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>teamcenter</groupId>
|
||||
<artifactId>TcSoaStrongModel</artifactId>
|
||||
<version>12.3.0</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>teamcenter</groupId>
|
||||
<artifactId>TcSoaWorkflowLoose</artifactId>
|
||||
<version>12.3.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>teamcenter</groupId>
|
||||
<artifactId>TcSoaWorkflowStrong</artifactId>
|
||||
<version>12.3.0</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>teamcenter</groupId>
|
||||
<artifactId>tcserverjavabinding</artifactId>
|
||||
<version>12.3.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>teamcenter</groupId>
|
||||
<artifactId>tcmemjavabinding</artifactId>
|
||||
<version>12.3.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>teamcenter</groupId>
|
||||
<artifactId>xercesImpl</artifactId>
|
||||
<version>12.3.0</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>teamcenter</groupId>
|
||||
<artifactId>xml-apis</artifactId>
|
||||
<version>12.3.0</version>
|
||||
</dependency>
|
||||
-->
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter</artifactId>
|
||||
<version>2.0.3.RELEASE</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.itextpdf</groupId>
|
||||
<artifactId>itextpdf</artifactId>
|
||||
<version>5.2.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.itextpdf</groupId>
|
||||
<artifactId>itext-asian</artifactId>
|
||||
<version>5.2.0</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>javax.xml.bind</groupId>
|
||||
<artifactId>jaxb-api</artifactId>
|
||||
<version>2.4.0-b180830.0359</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
|
||||
<plugin>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||
</plugin>
|
||||
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-jar-plugin</artifactId>
|
||||
<version>2.6</version>
|
||||
<configuration>
|
||||
<archive>
|
||||
<manifest>
|
||||
<addClasspath>true</addClasspath>
|
||||
<classpathPrefix>lib/</classpathPrefix>
|
||||
<mainClass>com.pjb.springbootjjwt.SpringbootJjwtApplication</mainClass>
|
||||
</manifest>
|
||||
</archive>
|
||||
</configuration>
|
||||
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
|
||||
</project>
|
||||
@ -0,0 +1,16 @@
|
||||
package com.pjb.springbootjjwt;
|
||||
|
||||
import org.mybatis.spring.annotation.MapperScan;
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
import org.springframework.context.ConfigurableApplicationContext;
|
||||
|
||||
|
||||
@SpringBootApplication
|
||||
//@MapperScan("com.pjb.springbootjjwt.mapper")
|
||||
public class SpringbootJjwtApplication {
|
||||
|
||||
public static void main(String[] args) {
|
||||
ConfigurableApplicationContext contenxt = SpringApplication.run(SpringbootJjwtApplication.class, args);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,13 @@
|
||||
package com.pjb.springbootjjwt.annotation;
|
||||
|
||||
import java.lang.annotation.ElementType;
|
||||
import java.lang.annotation.Retention;
|
||||
import java.lang.annotation.RetentionPolicy;
|
||||
import java.lang.annotation.Target;
|
||||
|
||||
|
||||
@Target({ElementType.METHOD, ElementType.TYPE})
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
public @interface PassToken {
|
||||
boolean required() default true;
|
||||
}
|
||||
@ -0,0 +1,13 @@
|
||||
package com.pjb.springbootjjwt.annotation;
|
||||
|
||||
import java.lang.annotation.ElementType;
|
||||
import java.lang.annotation.Retention;
|
||||
import java.lang.annotation.RetentionPolicy;
|
||||
import java.lang.annotation.Target;
|
||||
|
||||
|
||||
@Target({ElementType.METHOD, ElementType.TYPE})
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
public @interface UserLoginToken {
|
||||
boolean required() default true;
|
||||
}
|
||||
@ -0,0 +1,21 @@
|
||||
package com.pjb.springbootjjwt.config;
|
||||
|
||||
import com.pjb.springbootjjwt.interceptor.AuthenticationInterceptor;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
|
||||
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
|
||||
|
||||
|
||||
@Configuration
|
||||
public class InterceptorConfig implements WebMvcConfigurer {
|
||||
@Override
|
||||
public void addInterceptors(InterceptorRegistry registry) {
|
||||
registry.addInterceptor(authenticationInterceptor())
|
||||
.addPathPatterns("/**"); // 拦截所有请求,通过判断是否有 @LoginRequired 注解 决定是否需要登录
|
||||
}
|
||||
@Bean
|
||||
public AuthenticationInterceptor authenticationInterceptor() {
|
||||
return new AuthenticationInterceptor();
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,10 @@
|
||||
package com.pjb.springbootjjwt.config;
|
||||
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import springfox.documentation.swagger2.annotations.EnableSwagger2;
|
||||
|
||||
@Configuration //说明这是一个配置类
|
||||
@EnableSwagger2// 该注解开启Swagger2的自动配置
|
||||
public class SwaggerConfig {
|
||||
|
||||
}
|
||||
@ -0,0 +1,25 @@
|
||||
package com.pjb.springbootjjwt.entity;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.HashMap;
|
||||
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class ServerDwgtopdfEntry implements Serializable {
|
||||
String[] tccomponentuid;
|
||||
String[] tcdatasetuid;
|
||||
String[] pdfuid;
|
||||
String tccomponentrelation;
|
||||
String dwgtype;
|
||||
String dwgreferencename;
|
||||
String tcoriginalfilename;
|
||||
String tcdepartmentid;
|
||||
String taskpuid;
|
||||
String tcstatus;
|
||||
HashMap<String,String> signinfos;
|
||||
}
|
||||
@ -0,0 +1,19 @@
|
||||
package com.pjb.springbootjjwt.entity;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class ServerMailEntry {
|
||||
String nickname;
|
||||
String from;
|
||||
String[] to;
|
||||
String[] cc;
|
||||
String subject;
|
||||
String title;
|
||||
String content;
|
||||
String finddb;
|
||||
}
|
||||
@ -0,0 +1,15 @@
|
||||
package com.pjb.springbootjjwt.entity;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class User {
|
||||
String app_secret;
|
||||
String username;
|
||||
String password;
|
||||
}
|
||||
@ -0,0 +1,22 @@
|
||||
package com.pjb.springbootjjwt.interceptor;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import org.springframework.web.bind.annotation.ControllerAdvice;
|
||||
import org.springframework.web.bind.annotation.ExceptionHandler;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
|
||||
|
||||
@ControllerAdvice
|
||||
public class GloablExceptionHandler {
|
||||
@ResponseBody
|
||||
@ExceptionHandler(Exception.class)
|
||||
public Object handleException(Exception e) {
|
||||
String msg = e.getMessage();
|
||||
if (msg == null || msg.equals("")) {
|
||||
msg = "服务器出错";
|
||||
}
|
||||
JSONObject jsonObject = new JSONObject();
|
||||
jsonObject.put("message", msg);
|
||||
return jsonObject;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,13 @@
|
||||
package com.pjb.springbootjjwt.mapper;
|
||||
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Mapper
|
||||
@Repository
|
||||
public interface MailContentMapper {
|
||||
String findMailContent(@Param("puid")String puid,@Param("user_mail")String user_mail);
|
||||
}
|
||||
@ -0,0 +1,16 @@
|
||||
package com.pjb.springbootjjwt.mapper;
|
||||
|
||||
import com.pjb.springbootjjwt.entity.User;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
@Mapper
|
||||
@Repository
|
||||
public interface UserMapper {
|
||||
User findByUsername(@Param("username") String username);
|
||||
|
||||
User findByUsernameAndId(@Param("username") String username, @Param("app_secret") String Id);
|
||||
|
||||
User findUserById(@Param("app_secret") String Id);
|
||||
}
|
||||
@ -0,0 +1,34 @@
|
||||
package com.pjb.springbootjjwt.service;
|
||||
|
||||
|
||||
import javax.mail.MessagingException;
|
||||
|
||||
public interface IMailService {
|
||||
|
||||
/**
|
||||
* 发送文本邮件
|
||||
* @param to 收件人
|
||||
* @param subject 主题
|
||||
* @param content 内容
|
||||
*/
|
||||
void sendSimpleMail(String to, String subject, String content);
|
||||
|
||||
/**
|
||||
* 发送HTML邮件
|
||||
* @param to 收件人
|
||||
* @param subject 主题
|
||||
* @param content 内容
|
||||
*/
|
||||
public void sendHtmlMail(String nickName,String[] to,String[] cc, String subject, String content) throws MessagingException, Exception;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 发送带附件的邮件
|
||||
* @param to 收件人
|
||||
* @param subject 主题
|
||||
* @param content 内容
|
||||
* @param filePath 附件
|
||||
*/
|
||||
public void sendAttachmentsMail(String to, String subject, String content, String filePath);
|
||||
}
|
||||
@ -0,0 +1,18 @@
|
||||
package com.pjb.springbootjjwt.service;
|
||||
|
||||
import com.auth0.jwt.JWT;
|
||||
import com.auth0.jwt.algorithms.Algorithm;
|
||||
import com.pjb.springbootjjwt.entity.User;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
|
||||
|
||||
@Service("TokenService")
|
||||
public class TokenService {
|
||||
public String getToken(User user) {
|
||||
String token="";
|
||||
token = JWT.create().withAudience(user.getApp_secret())// 将 user id 保存到 token 里面
|
||||
.sign(Algorithm.HMAC256(user.getPassword()));// 以 password 作为 token 的密钥
|
||||
return token;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,26 @@
|
||||
package com.pjb.springbootjjwt.service;
|
||||
|
||||
import com.pjb.springbootjjwt.entity.User;
|
||||
import com.pjb.springbootjjwt.mapper.UserMapper;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
|
||||
@Service("UserService")
|
||||
public class UserService {
|
||||
@Autowired
|
||||
UserMapper userMapper;
|
||||
|
||||
public User findByUsername(User user) {
|
||||
return userMapper.findByUsername(user.getUsername());
|
||||
}
|
||||
|
||||
public User findByUsernameAndId(User user) {
|
||||
return userMapper.findByUsernameAndId(user.getUsername(), user.getApp_secret());
|
||||
}
|
||||
|
||||
public User findUserById(String userId) {
|
||||
return userMapper.findUserById(userId);
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,29 @@
|
||||
{
|
||||
"properties": [
|
||||
{
|
||||
"name": "teamcenter.url",
|
||||
"type": "java.lang.String",
|
||||
"description": "Description for teamcenter.url."
|
||||
},
|
||||
{
|
||||
"name": "teamcenter.user",
|
||||
"type": "java.lang.String",
|
||||
"description": "Description for teamcenter.user."
|
||||
},
|
||||
{
|
||||
"name": "teamcenter.pwd",
|
||||
"type": "java.lang.String",
|
||||
"description": "Description for teamcenter.pwd."
|
||||
},
|
||||
{
|
||||
"name": "teamcenter.fmsurl",
|
||||
"type": "java.lang.String",
|
||||
"description": "Description for teamcenter.fmsurl."
|
||||
},
|
||||
{
|
||||
"name": "teamcenter.fcccash",
|
||||
"type": "java.lang.String",
|
||||
"description": "Description for teamcenter.fcccash."
|
||||
}
|
||||
]
|
||||
}
|
||||
@ -0,0 +1,16 @@
|
||||
debug: false
|
||||
server:
|
||||
port: 9293
|
||||
spring:
|
||||
application:
|
||||
name: ConnorServer
|
||||
rabbitmq:
|
||||
host: localhost
|
||||
port: 5672
|
||||
username: admin
|
||||
password: admin
|
||||
#虚拟host 可以不设置,使用server默认host
|
||||
virtual-host: suporserver
|
||||
##mybatis配置文件
|
||||
#mybatis:
|
||||
# config-location: classpath:mybatis.xml
|
||||
@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
|
||||
<mapper namespace="com.pjb.springbootjjwt.mapper.MailContentMapper">
|
||||
<select id="findMailContent" parameterType="java.lang.String" resultType="string">
|
||||
select mailcontent
|
||||
from connor_poll_mail
|
||||
where task_puid = #{puid} and user_mail=#{user_mail} and end_date is null
|
||||
</select>
|
||||
</mapper>
|
||||
@ -0,0 +1,21 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
|
||||
<mapper namespace="com.pjb.springbootjjwt.mapper.UserMapper">
|
||||
<select id="findByUsername" resultType="com.pjb.springbootjjwt.entity.User">
|
||||
SELECT app_secret, username, password
|
||||
FROM tcoauser
|
||||
where username = #{username}
|
||||
</select>
|
||||
<select id="findByUsernameAndId" resultType="com.pjb.springbootjjwt.entity.User">
|
||||
SELECT app_secret, username, password
|
||||
FROM tcoauser
|
||||
where username = #{username}
|
||||
and app_secret = #{app_secret}
|
||||
</select>
|
||||
|
||||
<select id="findUserById" resultType="com.pjb.springbootjjwt.entity.User">
|
||||
SELECT app_secret, username, password
|
||||
FROM tcoauser
|
||||
where app_secret = #{app_secret}
|
||||
</select>
|
||||
</mapper>
|
||||
@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE configuration PUBLIC "-//mybatis.org//DTD Config 3.0//EN" "http://mybatis.org/dtd/mybatis-3-config.dtd">
|
||||
<configuration>
|
||||
<settings>
|
||||
<setting name="logImpl" value="SLF4J"/>
|
||||
<!-- 开启驼峰命名转换 Table(create_time) -> Entity(createTime) -->
|
||||
<setting name="mapUnderscoreToCamelCase" value="false"/>
|
||||
</settings>
|
||||
</configuration>
|
||||
@ -0,0 +1,26 @@
|
||||
[
|
||||
{"departmentid":"wuhan",
|
||||
"isleft": true,
|
||||
"pdfsizes": [
|
||||
{
|
||||
"sizename": "A4",
|
||||
"wmin": 123,
|
||||
"wmax": 200,
|
||||
"hmin": 123,
|
||||
"hmax": 124,
|
||||
"poisions":[
|
||||
{
|
||||
"property": "设计",
|
||||
"xposition": 12,
|
||||
"yposition": 25
|
||||
},
|
||||
{
|
||||
"property": "审核",
|
||||
"xposition": 12,
|
||||
"yposition": 25
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue