updated java depenencies
This commit is contained in:
1 parent
fa45c13482
commit
c3bf752a57
10 files changed
+31
-21
No files matched your search
+1
-1
@@ -32,4 +32,4 @@ tags
|
||||
**/yarn.lock
|
||||
**/*.blg
|
||||
**/*.log
|
||||
**/.*.out
|
||||
**/*.out
|
||||
@@ -22,12 +22,12 @@
|
||||
|
||||
<properties>
|
||||
<java.version>1.8</java.version>
|
||||
<spring.version>5.0.5.RELEASE</spring.version>
|
||||
<spring.security.version>5.0.4.RELEASE</spring.security.version>
|
||||
<spring.version>5.0.7.RELEASE</spring.version>
|
||||
<spring.security.version>5.0.6.RELEASE</spring.security.version>
|
||||
<main.basedir>${project.basedir}</main.basedir>
|
||||
<hibernate.version>5.2.16.Final</hibernate.version>
|
||||
<flyway.version>5.0.7</flyway.version>
|
||||
<leak-prevention.version>2.6.0</leak-prevention.version>
|
||||
<flyway.version>5.1.4</flyway.version>
|
||||
<leak-prevention.version>2.6.1</leak-prevention.version>
|
||||
<current.version>1.0.0-RELEASE</current.version>
|
||||
<slf4j.version>1.7.25</slf4j.version>
|
||||
<findbugs.version>3.0.5</findbugs.version>
|
||||
@@ -295,7 +295,7 @@
|
||||
<dependency>
|
||||
<groupId>org.springframework.data</groupId>
|
||||
<artifactId>spring-data-jpa</artifactId>
|
||||
<version>2.0.6.RELEASE</version>
|
||||
<version>2.0.8.RELEASE</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
|
||||
@@ -57,12 +57,12 @@
|
||||
<dependency>
|
||||
<groupId>org.apache.commons</groupId>
|
||||
<artifactId>commons-dbcp2</artifactId>
|
||||
<version>2.2.0</version>
|
||||
<version>2.4.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.commons</groupId>
|
||||
<artifactId>commons-pool2</artifactId>
|
||||
<version>2.5.0</version>
|
||||
<version>2.6.0</version>
|
||||
</dependency>
|
||||
|
||||
<!-- Apache http client -->
|
||||
|
||||
@@ -110,7 +110,7 @@ public class PortalDataSource {
|
||||
pcf.setValidationQuery("SELECT 1");
|
||||
pcf.setDefaultAutoCommit(true);
|
||||
|
||||
GenericObjectPoolConfig poolConfig = new GenericObjectPoolConfig();
|
||||
GenericObjectPoolConfig<PoolableConnection> poolConfig = new GenericObjectPoolConfig<>();
|
||||
poolConfig.setMinIdle(10);
|
||||
poolConfig.setMaxTotal(100);
|
||||
|
||||
|
||||
@@ -91,13 +91,6 @@
|
||||
</exclusions>
|
||||
</dependency>
|
||||
|
||||
<!-- https://mvnrepository.com/artifact/com.google.protobuf/protobuf-java -->
|
||||
<dependency>
|
||||
<groupId>com.google.protobuf</groupId>
|
||||
<artifactId>protobuf-java</artifactId>
|
||||
<version>3.5.1</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.hibernate</groupId>
|
||||
<artifactId>hibernate-core</artifactId>
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
|
||||
<properties>
|
||||
<main.basedir>${project.parent.basedir}</main.basedir>
|
||||
<database.driver>com.mysql.jdbc.Driver</database.driver>
|
||||
<database.driver>com.mysql.cj.jdbc.Driver</database.driver>
|
||||
</properties>
|
||||
|
||||
<reporting>
|
||||
|
||||
+14
@@ -50,6 +50,20 @@ public class MigrationItem {
|
||||
return pendingMigrations.length;
|
||||
}
|
||||
|
||||
public void repair() {
|
||||
//Perform a repair just in case an upgrade before 5.0 happens
|
||||
try {
|
||||
//TODO find a better way to perform repair if previous version was before 5.0
|
||||
String schemas = Arrays.toString(getSchemas()).replace("[", "").replace("]", "");
|
||||
logger.info(String.format("Repair status for %s:%n%s", schemas, getAllMigrationsLog()));
|
||||
flyway.repair();
|
||||
} catch (Exception e) {
|
||||
String message = String.format("%nDatabase repair error:%n %s %nPortal webapp cannot continue.", e.getMessage());
|
||||
logger.error(message);
|
||||
throw new RuntimeException(message, e);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Perform the migration
|
||||
*/
|
||||
|
||||
+4
-1
@@ -40,7 +40,10 @@ public class MigrationManager {
|
||||
|
||||
DataSource ds = portalDatasource.getPortalRootDataSource();
|
||||
migrations = Utils.toList( new MigrationItem(PortalMigration.getFlyway(ds)) );
|
||||
migrations.forEach(item -> item.migrate());
|
||||
migrations.forEach(item -> {
|
||||
item.repair();
|
||||
item.migrate();
|
||||
});
|
||||
portalDatasource.closeRootDataSource();
|
||||
}
|
||||
}
|
||||
@@ -216,7 +216,7 @@
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jgit</groupId>
|
||||
<artifactId>org.eclipse.jgit</artifactId>
|
||||
<version>4.11.0.201803080745-r</version>
|
||||
<version>5.0.1.201806211838-r</version>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>org.slf4j</groupId>
|
||||
|
||||
+2
-2
@@ -2,7 +2,7 @@ package net.locusworks.portal.websocket;
|
||||
|
||||
import org.springframework.messaging.Message;
|
||||
import org.springframework.messaging.MessageChannel;
|
||||
import org.springframework.messaging.support.ChannelInterceptorAdapter;
|
||||
import org.springframework.messaging.support.ChannelInterceptor;
|
||||
|
||||
/**
|
||||
* class to handle websocket outbound connections
|
||||
@@ -11,7 +11,7 @@ import org.springframework.messaging.support.ChannelInterceptorAdapter;
|
||||
* @version 1.0
|
||||
*
|
||||
*/
|
||||
public class WebsocketOutboundChannelInterceptor extends ChannelInterceptorAdapter {
|
||||
public class WebsocketOutboundChannelInterceptor implements ChannelInterceptor {
|
||||
|
||||
@Override
|
||||
public Message<?> preSend(Message<?> message, MessageChannel channel) {
|
||||
|
||||
Reference in new issue
Block a user