2025-05-23 17:42

@sbw 你理解错了,这个方法是传递复合主键的,复合主键有几个字段,这里就要传递几个值,这个方法功能还是删除一条数据。并不是你理解的传递多个主键值可以删除多条记录。

2025-05-21 09:50

这个强引用,我们还被安全部门扫出来漏洞被通报了。不得已,只能换成noautotype版本的fastjson库应付过去。

2025-05-14 17:16

@杜福忠 我这里没有src/main/webapp/common/_layout.html这个文件。所以,我把#define layout()去掉了,然后手动把jquery库加进去,已经跑通了,谢谢。

2025-05-14 16:21

@sioui 好的,我试一下。

2025-05-14 15:14

@sioui 下次报错的时候,让我运维telnet数据库服务器,看看大概延迟多少,再过来反馈。max-wait通常配置多少比较合适?DruidPlugin默认是-1,就是永久等待,我现在配置的是100(单位应该是毫秒)。

2025-05-14 15:07

@杜福忠 html文件里的#@layout()这个函数在哪里?能告知一下吗?

2025-05-13 11:38

@杜福忠 @sioui 在反馈内容的后面我更新了跟踪内容,麻烦帮我看看可能会是哪里出了问题。数据库服务器上配置的最大连接数2000,SHOW STATUS LIKE 'Max_used_connections';显示的结果是152,SHOW VARIABLES LIKE 'max_connections';显示的结果是2000。数据库服务器32线程,64G内存。

2025-05-08 09:44

@杜福忠 @sioui 客户都是自建机房,所以,服务器都是实体服务器,没有云服务器。给实施人员的文档里,都是要求mysql设置的连接数是2000。SHOW STATUS LIKE 'max_used_connections';没有超出设置的最大连接数。用户大约5千人,因为是体制内,都是工作日上班时间在用。比如五一放假5天就没出现过系统卡死的现象。很多页面都存在打开一个页面会有好几个甚至10几个异步的请求(比如有些下拉框的选项都要请求)。我让运维人员再配置连接池的最大连接数到300试试,看是否有改善,然后再来这里反馈。

2025-05-07 16:55

收藏备用

2025-04-22 11:29

@北流家园网 如果你之前用的是fastjson-1.2.83,最好的办法就是换成fastjson-1.2.83_noneautotype.jar,这个库就是把autotype去掉的了,彻底解决安全问题。换成fastjson-2.0.57(注意这个是兼容fastjson1的库,就是把fastjson2用fastjson的api包装了一层,底层是调的fastjson2)并且配置ParserConfig.getGlobalInstance().setSafeMode(true),我的测试是常见的实例化对象都可以过滤(注意是会抛异常,记得拦截异常)。但这个是靠fastjson库里内置的黑名单实现的,这个黑名单会不断增加,但就怕安全部门发现黑名单之外的对象也可以实例化,估计还是过不了。我个人建议,如果之前用的是fastjson-1.2.83,直接换成fastjson-1.2.83_noneautotype.jar,就不操这个心了。

2025-04-18 09:53

上面回复里maven坐标标签没了。知道是什么意思就行了

2025-04-18 09:52

@杜福忠 已经做测试。结果如下:1、根据官方说明,可以在configConstant 里再增加ParserConfig.getGlobalInstance().setSafeMode(true)代码,可以全局开启fastjson的autotype的黑名单功能,只要@type指定的类名在fastjson的jar包里的黑名单里,就可以控制住。但需要依赖fastjson库里黑名单的不断完善,有可能过不了等保扫描。2、把依赖库fastjson-1.2.83.jar换成fastjson-1.2.83_noneautotype.jar,这样就完全屏蔽了autotype功能,彻底解决fastjson的这个安全问题。3、升级到fastjson2,我测试的是这个坐标:

com.alibaba
fastjson
2.0.57

这是兼容fastjson1但实际使用的是fastjson2的库,测试也可以通过,但一样是需要在在configConstant 里再增加ParserConfig.getGlobalInstance().setSafeMode(true)代码。
最后感谢杜总的大力支持!

2025-04-17 14:52

@杜福忠 确实是启用了me.setResolveJsonRequest(true),那我是不是只要在configConstant 里再增加ParserConfig.getGlobalInstance().setSafeMode(true);就可以全局禁用autoType了?

2025-04-17 14:48

quartz可以通过配置,适配多节点调度。
#
#============================================================================
# Configure Main Scheduler Properties 调度器属性
#============================================================================
org.quartz.scheduler.instanceName: DefaultQuartzScheduler
org.quartz.scheduler.instanceId = AUTO
org.quartz.scheduler.rmi.export: false
org.quartz.scheduler.rmi.proxy: false
org.quartz.scheduler.wrapJobExecutionInUserTransaction: false
org.quartz.threadPool.class: org.quartz.simpl.SimpleThreadPool
org.quartz.threadPool.threadCount= 10
org.quartz.threadPool.threadPriority: 5
org.quartz.threadPool.threadsInheritContextClassLoaderOfInitializingThread: true

#============================================================================
# Configure JobStore
#============================================================================
#存储方式使用JobStoreTX,也就是数据库
org.quartz.jobStore.class: org.quartz.impl.jdbcjobstore.JobStoreTX
org.quartz.jobStore.driverDelegateClass:org.quartz.impl.jdbcjobstore.StdJDBCDelegate
#使用自己的配置文件
org.quartz.jobStore.useProperties:true
#数据库中quartz表的表名前缀
org.quartz.jobStore.tablePrefix:QRTZ_
org.quartz.jobStore.dataSource:QuartzDS
#是否使用集群(如果项目只部署到 一台服务器,就不用了)
org.quartz.jobStore.isClustered = false
org.quartz.jobStore.misfireThreshold: 60000
org.quartz.jobStore.clusterCheckinInterval: 10000
#============================================================================
# Configure Datasources
#============================================================================
#配置数据库源
org.quartz.dataSource.QuartzDS.connectionProvider.class: cn.york.common.quartz.util.DruidConnectionProvider
org.quartz.dataSource.QuartzDS.driver: com.mysql.cj.jdbc.Driver
org.quartz.dataSource.QuartzDS.url: jdbc:mysql://192.168.0.46:3306/pt?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false&autoReconnect=true
org.quartz.dataSource.QuartzDS.user: root
org.quartz.dataSource.QuartzDS.password: ***********
org.quartz.dataSource.QuartzDS.validationQuery: select 0 from dual
org.quartz.dataSource.QuartzDS.maxConnection: 10

然后你就需要实现cn.york.common.quartz.util.DruidConnectionProvider这个数据源就行了