Skip to content

Commit

Permalink
Workaround for spring-projects/spring-framework#29699 not needed anymore
Browse files Browse the repository at this point in the history
  • Loading branch information
lukas-krecan committed Jan 12, 2023
1 parent 0d43bb9 commit e0d1462
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Expand Up @@ -21,6 +21,7 @@
import net.javacrumbs.shedlock.support.annotation.NonNull;
import org.springframework.dao.ConcurrencyFailureException;
import org.springframework.dao.DataIntegrityViolationException;
import org.springframework.dao.DuplicateKeyException;
import org.springframework.jdbc.BadSqlGrammarException;
import org.springframework.jdbc.UncategorizedSQLException;
import org.springframework.jdbc.core.namedparam.NamedParameterJdbcTemplate;
Expand Down Expand Up @@ -65,10 +66,10 @@ public boolean insertRecord(@NonNull LockConfiguration lockConfiguration) {
try {
String sql = sqlStatementsSource().getInsertStatement();
return execute(sql, lockConfiguration);
} catch (DataIntegrityViolationException | ConcurrencyFailureException | TransactionSystemException e) {
} catch (DuplicateKeyException | ConcurrencyFailureException | TransactionSystemException e) {
logger.debug("Duplicate key", e);
return false;
} catch (BadSqlGrammarException | UncategorizedSQLException e) {
} catch (DataIntegrityViolationException | BadSqlGrammarException | UncategorizedSQLException e) {
logger.error("Unexpected exception", e);
return false;
}
Expand Down
Expand Up @@ -7,7 +7,7 @@
</appender>

<logger name="com.zaxxer.hikari.HikariDataSource" level="WARN" />

<root level="INFO">
<appender-ref ref="STDOUT"/>
</root>
Expand Down

0 comments on commit e0d1462

Please sign in to comment.