更换云数据库为MariaDB;添加MariaDB驱动;
This commit is contained in:
parent
3a101a9a39
commit
e1f25720c0
7
pom.xml
7
pom.xml
@ -138,6 +138,13 @@
|
|||||||
<version>1.1.71.android</version>
|
<version>1.1.71.android</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.mariadb.jdbc</groupId>
|
||||||
|
<artifactId>mariadb-java-client</artifactId>
|
||||||
|
<version>2.5.4</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
<build>
|
<build>
|
||||||
|
@ -40,7 +40,7 @@ public class ASEUsernamePasswordAuthenticationFilter extends UsernamePasswordAut
|
|||||||
String timestamp = request.getHeader("timestamp");
|
String timestamp = request.getHeader("timestamp");
|
||||||
|
|
||||||
// 检查时间戳是否合理(60秒内)
|
// 检查时间戳是否合理(60秒内)
|
||||||
if(!timestampExpiredChecker.checkTimestampBeforeMaxTime(timestamp, 60)){
|
if(timestamp == null || !timestampExpiredChecker.checkTimestampBeforeMaxTime(timestamp, 60)){
|
||||||
throw new AuthenticationServiceException("Timestamp Expired.");
|
throw new AuthenticationServiceException("Timestamp Expired.");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -61,11 +61,11 @@ public class LoginController {
|
|||||||
// 构造返回对象
|
// 构造返回对象
|
||||||
UserLoginCheckerJSONRespond respond = new UserLoginCheckerJSONRespond();
|
UserLoginCheckerJSONRespond respond = new UserLoginCheckerJSONRespond();
|
||||||
respond.setUserExist(existStatus);
|
respond.setUserExist(existStatus);
|
||||||
return jsonParameter.getJSONString(respond);
|
return jsonParameter.getJSONStandardRespond200(respond);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
// 返回失败对象
|
// 返回失败对象
|
||||||
return jsonParameter.getJSONString(new JSONStandardFailedRespond());
|
return jsonParameter.getJSONStandardRespond500("Error");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -82,11 +82,11 @@ public class LoginController {
|
|||||||
if(loginChecker.getCheckType().equals("UIDGeneratorChecker")) {
|
if(loginChecker.getCheckType().equals("UIDGeneratorChecker")) {
|
||||||
UserLoginCheckerJSONRespond respond = new UserLoginCheckerJSONRespond();
|
UserLoginCheckerJSONRespond respond = new UserLoginCheckerJSONRespond();
|
||||||
respond.setRespondInformation(userService.getUsernameByStudentId(loginChecker.getUsername()));
|
respond.setRespondInformation(userService.getUsernameByStudentId(loginChecker.getUsername()));
|
||||||
return jsonParameter.getJSONString(respond);
|
return jsonParameter.getJSONStandardRespond200(respond);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
// 返回失败对象
|
// 返回失败对象
|
||||||
return jsonParameter.getJSONString(new JSONStandardFailedRespond());
|
return jsonParameter.getJSONStandardRespond500("Error");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -16,10 +16,10 @@ import java.util.Map;
|
|||||||
@Controller
|
@Controller
|
||||||
public class RegisterController {
|
public class RegisterController {
|
||||||
@Resource
|
@Resource
|
||||||
UserService userService;
|
private UserService userService;
|
||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
BaseInformationService baseInformationService;
|
private BaseInformationService baseInformationService;
|
||||||
|
|
||||||
@RequestMapping(value = "/register")
|
@RequestMapping(value = "/register")
|
||||||
String registerView(Model model){
|
String registerView(Model model){
|
||||||
|
@ -20,25 +20,25 @@ import java.util.Vector;
|
|||||||
public class BaseInformationService implements IBaseInformationService {
|
public class BaseInformationService implements IBaseInformationService {
|
||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
BaseAdministrativeDivisionRepository administrativeDivisionRepository;
|
private BaseAdministrativeDivisionRepository administrativeDivisionRepository;
|
||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
BaseCandidateCategoryRepository candidateCategoryRepository;
|
private BaseCandidateCategoryRepository candidateCategoryRepository;
|
||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
BaseCollegeRepository collegeRepository;
|
private BaseCollegeRepository collegeRepository;
|
||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
BaseEthnicRepository ethnicRepository;
|
private BaseEthnicRepository ethnicRepository;
|
||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
BaseMajorRepository majorRepository;
|
private BaseMajorRepository majorRepository;
|
||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
BasePoliticalStatusRepository politicalStatusRepository;
|
private BasePoliticalStatusRepository politicalStatusRepository;
|
||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
BaseStudentInfoRepository studentInfoRepository;
|
private BaseStudentInfoRepository studentInfoRepository;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean checkAdministrativeDivision(String name) {
|
public boolean checkAdministrativeDivision(String name) {
|
||||||
|
@ -7,14 +7,15 @@ spring.thymeleaf.encoding=UTF-8
|
|||||||
|
|
||||||
spring.jpa.generate-ddl=false
|
spring.jpa.generate-ddl=false
|
||||||
spring.jpa.show-sql=true
|
spring.jpa.show-sql=true
|
||||||
spring.jpa.hibernate.ddl-auto=none
|
spring.jpa.hibernate.ddl-auto=update
|
||||||
spring.jooq.sql-dialect=org.hibernate.dialect.MySQL5InnoDBDialect
|
spring.jooq.sql-dialect=org.hibernate.dialect.MariaDB102Dialect
|
||||||
spring.jpa.open-in-view=true
|
spring.jpa.open-in-view=true
|
||||||
spring.jpa.properties.hibernate.enable_lazy_load_no_trans=true
|
spring.jpa.properties.hibernate.enable_lazy_load_no_trans=true
|
||||||
|
|
||||||
spring.datasource.url=jdbc:mysql://${MYSQL_HOST:39.100.94.111}:3306/ase?useUnicode=true&characterEncoding=UTF-8&serverTimezone=UTC
|
spring.datasource.url=jdbc:mariadb://39.100.94.111:3306/ase?useUnicode=true&characterEncoding=UTF-8&serverTimezone=UTC
|
||||||
spring.datasource.username=codedream
|
spring.datasource.username=codedream
|
||||||
spring.datasource.password=zP1+LKi?,{Kyv)uyYgd8
|
spring.datasource.password=codedreampasswd
|
||||||
|
spring.datasource.driver-class-name=org.mariadb.jdbc.Driver
|
||||||
|
|
||||||
server.error.whitelabel.enabled=false
|
server.error.whitelabel.enabled=false
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user