Commit 4af67822a12dffdf0b3be934dcf3361ff0d20963
1 parent
f7bbe213
Fixed dao could not find class exception during tests and added license header
Showing
2 changed files
with
17 additions
and
0 deletions
1 | +/** | ||
2 | + * Copyright © 2016-2017 The Thingsboard Authors | ||
3 | + * | ||
4 | + * Licensed under the Apache License, Version 2.0 (the "License"); | ||
5 | + * you may not use this file except in compliance with the License. | ||
6 | + * You may obtain a copy of the License at | ||
7 | + * | ||
8 | + * http://www.apache.org/licenses/LICENSE-2.0 | ||
9 | + * | ||
10 | + * Unless required by applicable law or agreed to in writing, software | ||
11 | + * distributed under the License is distributed on an "AS IS" BASIS, | ||
12 | + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
13 | + * See the License for the specific language governing permissions and | ||
14 | + * limitations under the License. | ||
15 | + */ | ||
1 | package org.thingsboard.server.dao.sql.relation; | 16 | package org.thingsboard.server.dao.sql.relation; |
2 | 17 | ||
3 | import com.google.common.util.concurrent.ListenableFuture; | 18 | import com.google.common.util.concurrent.ListenableFuture; |
@@ -20,6 +20,7 @@ import com.github.springtestdbunit.bean.DatabaseDataSourceConnectionFactoryBean; | @@ -20,6 +20,7 @@ import com.github.springtestdbunit.bean.DatabaseDataSourceConnectionFactoryBean; | ||
20 | import org.dbunit.DatabaseUnitException; | 20 | import org.dbunit.DatabaseUnitException; |
21 | import org.dbunit.ext.postgresql.PostgresqlDataTypeFactory; | 21 | import org.dbunit.ext.postgresql.PostgresqlDataTypeFactory; |
22 | import org.springframework.beans.factory.annotation.Autowired; | 22 | import org.springframework.beans.factory.annotation.Autowired; |
23 | +import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; | ||
23 | import org.springframework.context.annotation.Bean; | 24 | import org.springframework.context.annotation.Bean; |
24 | import org.springframework.context.annotation.Configuration; | 25 | import org.springframework.context.annotation.Configuration; |
25 | 26 | ||
@@ -31,6 +32,7 @@ import java.sql.SQLException; | @@ -31,6 +32,7 @@ import java.sql.SQLException; | ||
31 | * Created by Valerii Sosliuk on 5/6/2017. | 32 | * Created by Valerii Sosliuk on 5/6/2017. |
32 | */ | 33 | */ |
33 | @Configuration | 34 | @Configuration |
35 | +@ConditionalOnProperty(prefix = "sql", value = "enabled", havingValue = "true") | ||
34 | public class JpaDbunitTestConfig { | 36 | public class JpaDbunitTestConfig { |
35 | 37 | ||
36 | @Autowired | 38 | @Autowired |