ip2region & GeoLite2 ip地址转换,支持国家、省、市、地域

This commit is contained in:
MaxKey
2023-10-05 10:09:14 +08:00
parent 465ea18cc5
commit baa46a8013
17 changed files with 108 additions and 28 deletions

View File

@@ -18,6 +18,7 @@
package org.dromara.maxkey.autoconfigure;
import org.dromara.maxkey.authn.realm.jdbc.JdbcAuthenticationRealm;
import org.dromara.maxkey.ip2location.IpLocationParser;
import org.dromara.maxkey.password.onetimepwd.AbstractOtpAuthn;
import org.dromara.maxkey.password.onetimepwd.impl.TimeBasedOtpAuthn;
import org.dromara.maxkey.persistence.repository.LoginHistoryRepository;
@@ -44,6 +45,7 @@ public class MaxKeyOpenApiConfig implements InitializingBean {
LoginRepository loginRepository,
LoginHistoryRepository loginHistoryRepository,
UserInfoService userInfoService,
IpLocationParser ipLocationParser,
JdbcTemplate jdbcTemplate) {
JdbcAuthenticationRealm authenticationRealm = new JdbcAuthenticationRealm(
@@ -52,6 +54,7 @@ public class MaxKeyOpenApiConfig implements InitializingBean {
loginRepository,
loginHistoryRepository,
userInfoService,
ipLocationParser,
jdbcTemplate);
logger.debug("JdbcAuthenticationRealm inited.");