gitchong commented on issue #7947:
URL: https://github.com/apache/shardingsphere/issues/7947#issuecomment-724583980
when I do this which when application started, load SQLParserConfiguration
manual , the problem resolved. but I dont known why it cant load in tomcat. run
with jar of springboot project is ok.run with war in tomcat is wrong.
@Component
@Slf4j
public class ApplicationStartedListener implements
ApplicationListener<ApplicationStartedEvent> {
@Override
public void onApplicationEvent(ApplicationStartedEvent
applicationStartedEvent) {
onApplicationStarted(applicationStartedEvent);
}
@SneakyThrows
private void onApplicationStarted(ApplicationStartedEvent event) {
String applicationName =
event.getApplicationContext().getApplicationName();
log.info("应用【{}】已启动....", applicationName);
NewInstanceServiceLoader.register(SQLParserConfiguration.class);
log.info("已加载{}", "SQLParserConfiguration");
}
}
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]