You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
1.0 KiB
23 lines
1.0 KiB
|
7 days ago
|
# -*- coding: utf-8 -*-
|
||
|
|
"""票 04:解剖 jar——SubController.class 是否含新端点字符串;比对源文件/jar 时间。"""
|
||
|
|
import io, sys, os, time, zipfile
|
||
|
|
sys.stdout = io.TextIOWrapper(sys.stdout.buffer, encoding='utf-8')
|
||
|
|
|
||
|
|
jar = r'e:\code\crm-backend-matt\crm-app\target\crm-app-1.0.0-SNAPSHOT.jar'
|
||
|
|
src = r'e:\code\crm-backend-matt\crm-opportunity\src\main\java\com\crm\opportunity\controller\OpportunitySubController.java'
|
||
|
|
|
||
|
|
print('jar mtime =', time.strftime('%H:%M:%S', time.localtime(os.stat(jar).st_mtime)))
|
||
|
|
print('src mtime =', time.strftime('%H:%M:%S', time.localtime(os.stat(src).st_mtime)))
|
||
|
|
|
||
|
|
z = zipfile.ZipFile(jar)
|
||
|
|
names = [n for n in z.namelist() if 'OpportunitySubController' in n]
|
||
|
|
print('[entries]', names)
|
||
|
|
for n in names:
|
||
|
|
data = z.read(n)
|
||
|
|
hits = [s for s in (b'customer/add', b'customer/search', b'set-primary', b'team/update', b'team/delete')
|
||
|
|
if s in data]
|
||
|
|
print(f' {n}: size={len(data)} 新端点字符串={hits}')
|
||
|
|
|
||
|
|
cls_mtimes = [(n, z.getinfo(n).date_time) for n in names]
|
||
|
|
print('[entry datetime]', cls_mtimes)
|