Merge pull request #1 from eugenp/master
merging eugenp/tutorials/master
This commit is contained in:
commit
b11033bebf
|
@ -148,7 +148,7 @@ public class Board {
|
|||
System.out.println("Game Draw");
|
||||
break;
|
||||
case IN_PROGRESS:
|
||||
System.out.println("Game In rogress");
|
||||
System.out.println("Game In Progress");
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -13,7 +13,7 @@ import static org.junit.Assert.assertEquals;
|
|||
import static org.junit.Assert.assertNotNull;
|
||||
import static org.junit.Assert.assertTrue;
|
||||
|
||||
public class HillClimbingAlgorithmTest {
|
||||
public class HillClimbingAlgorithmUnitTest {
|
||||
private Stack<String> initStack;
|
||||
private Stack<String> goalStack;
|
||||
|
|
@ -6,7 +6,7 @@ import org.junit.Test;
|
|||
|
||||
import com.baeldung.algorithms.string.search.StringSearchAlgorithms;
|
||||
|
||||
public class StringSearchAlgorithmsTest {
|
||||
public class StringSearchAlgorithmsUnitTest {
|
||||
|
||||
|
||||
@Test
|
|
@ -7,7 +7,7 @@ import org.junit.Assert;
|
|||
import org.junit.Test;
|
||||
import com.baeldung.algorithms.binarysearch.BinarySearch;
|
||||
|
||||
public class BinarySearchTest {
|
||||
public class BinarySearchUnitTest {
|
||||
|
||||
int[] sortedArray = { 0, 1, 2, 3, 4, 5, 5, 6, 7, 8, 9, 9 };
|
||||
int key = 6;
|
|
@ -15,7 +15,7 @@ import com.baeldung.algorithms.mcts.tictactoe.Board;
|
|||
import com.baeldung.algorithms.mcts.tictactoe.Position;
|
||||
import com.baeldung.algorithms.mcts.tree.Tree;
|
||||
|
||||
public class MCTSTest {
|
||||
public class MCTSUnitTest {
|
||||
private Tree gameTree;
|
||||
private MonteCarloTreeSearch mcts;
|
||||
|
|
@ -7,7 +7,7 @@ import static org.junit.Assert.*;
|
|||
import com.baeldung.algorithms.minimax.MiniMax;
|
||||
import com.baeldung.algorithms.minimax.Tree;
|
||||
|
||||
public class MinimaxTest {
|
||||
public class MinimaxUnitTest {
|
||||
private Tree gameTree;
|
||||
private MiniMax miniMax;
|
||||
|
|
@ -4,7 +4,7 @@ import static org.junit.Assert.*;
|
|||
|
||||
import org.junit.Test;
|
||||
|
||||
public class BubbleSortTest {
|
||||
public class BubbleSortUnitTest {
|
||||
|
||||
@Test
|
||||
public void givenIntegerArray_whenSortedWithBubbleSort_thenGetSortedArray() {
|
|
@ -7,13 +7,13 @@ import org.junit.runners.Parameterized;
|
|||
import static org.junit.Assert.assertEquals;
|
||||
|
||||
@RunWith(Parameterized.class)
|
||||
public class EditDistanceTest extends EditDistanceDataProvider {
|
||||
public class EditDistanceUnitTest extends EditDistanceDataProvider {
|
||||
|
||||
private String x;
|
||||
private String y;
|
||||
private int result;
|
||||
|
||||
public EditDistanceTest(String a, String b, int res) {
|
||||
public EditDistanceUnitTest(String a, String b, int res) {
|
||||
super();
|
||||
x = a;
|
||||
y = b;
|
|
@ -6,11 +6,11 @@ import org.junit.runner.RunWith;
|
|||
import org.junit.runners.Parameterized;
|
||||
|
||||
@RunWith(value = Parameterized.class)
|
||||
public class CycleDetectionBruteForceTest extends CycleDetectionTestBase {
|
||||
public class CycleDetectionBruteForceUnitTest extends CycleDetectionTestBase {
|
||||
boolean cycleExists;
|
||||
Node<Integer> head;
|
||||
|
||||
public CycleDetectionBruteForceTest(Node<Integer> head, boolean cycleExists) {
|
||||
public CycleDetectionBruteForceUnitTest(Node<Integer> head, boolean cycleExists) {
|
||||
super();
|
||||
this.cycleExists = cycleExists;
|
||||
this.head = head;
|
|
@ -6,11 +6,11 @@ import org.junit.runner.RunWith;
|
|||
import org.junit.runners.Parameterized;
|
||||
|
||||
@RunWith(value = Parameterized.class)
|
||||
public class CycleDetectionByFastAndSlowIteratorsTest extends CycleDetectionTestBase {
|
||||
public class CycleDetectionByFastAndSlowIteratorsUnitTest extends CycleDetectionTestBase {
|
||||
boolean cycleExists;
|
||||
Node<Integer> head;
|
||||
|
||||
public CycleDetectionByFastAndSlowIteratorsTest(Node<Integer> head, boolean cycleExists) {
|
||||
public CycleDetectionByFastAndSlowIteratorsUnitTest(Node<Integer> head, boolean cycleExists) {
|
||||
super();
|
||||
this.cycleExists = cycleExists;
|
||||
this.head = head;
|
|
@ -6,11 +6,11 @@ import org.junit.runner.RunWith;
|
|||
import org.junit.runners.Parameterized;
|
||||
|
||||
@RunWith(value = Parameterized.class)
|
||||
public class CycleDetectionByHashingTest extends CycleDetectionTestBase {
|
||||
public class CycleDetectionByHashingUnitTest extends CycleDetectionTestBase {
|
||||
boolean cycleExists;
|
||||
Node<Integer> head;
|
||||
|
||||
public CycleDetectionByHashingTest(Node<Integer> head, boolean cycleExists) {
|
||||
public CycleDetectionByHashingUnitTest(Node<Integer> head, boolean cycleExists) {
|
||||
super();
|
||||
this.cycleExists = cycleExists;
|
||||
this.head = head;
|
|
@ -6,11 +6,11 @@ import org.junit.runner.RunWith;
|
|||
import org.junit.runners.Parameterized;
|
||||
|
||||
@RunWith(value = Parameterized.class)
|
||||
public class CycleRemovalBruteForceTest extends CycleDetectionTestBase {
|
||||
public class CycleRemovalBruteForceUnitTest extends CycleDetectionTestBase {
|
||||
boolean cycleExists;
|
||||
Node<Integer> head;
|
||||
|
||||
public CycleRemovalBruteForceTest(Node<Integer> head, boolean cycleExists) {
|
||||
public CycleRemovalBruteForceUnitTest(Node<Integer> head, boolean cycleExists) {
|
||||
super();
|
||||
this.cycleExists = cycleExists;
|
||||
this.head = head;
|
|
@ -6,11 +6,11 @@ import org.junit.runner.RunWith;
|
|||
import org.junit.runners.Parameterized;
|
||||
|
||||
@RunWith(value = Parameterized.class)
|
||||
public class CycleRemovalByCountingLoopNodesTest extends CycleDetectionTestBase {
|
||||
public class CycleRemovalByCountingLoopNodesUnitTest extends CycleDetectionTestBase {
|
||||
boolean cycleExists;
|
||||
Node<Integer> head;
|
||||
|
||||
public CycleRemovalByCountingLoopNodesTest(Node<Integer> head, boolean cycleExists) {
|
||||
public CycleRemovalByCountingLoopNodesUnitTest(Node<Integer> head, boolean cycleExists) {
|
||||
super();
|
||||
this.cycleExists = cycleExists;
|
||||
this.head = head;
|
|
@ -6,11 +6,11 @@ import org.junit.runner.RunWith;
|
|||
import org.junit.runners.Parameterized;
|
||||
|
||||
@RunWith(value = Parameterized.class)
|
||||
public class CycleRemovalWithoutCountingLoopNodesTest extends CycleDetectionTestBase {
|
||||
public class CycleRemovalWithoutCountingLoopNodesUnitTest extends CycleDetectionTestBase {
|
||||
boolean cycleExists;
|
||||
Node<Integer> head;
|
||||
|
||||
public CycleRemovalWithoutCountingLoopNodesTest(Node<Integer> head, boolean cycleExists) {
|
||||
public CycleRemovalWithoutCountingLoopNodesUnitTest(Node<Integer> head, boolean cycleExists) {
|
||||
super();
|
||||
this.cycleExists = cycleExists;
|
||||
this.head = head;
|
|
@ -6,7 +6,7 @@ import org.junit.Test;
|
|||
|
||||
import com.baeldung.algorithms.numberwordconverter.NumberWordConverter;
|
||||
|
||||
public class NumberWordConverterTest {
|
||||
public class NumberWordConverterUnitTest {
|
||||
|
||||
@Test
|
||||
public void whenMoneyNegative_thenReturnInvalidInput() {
|
|
@ -7,7 +7,7 @@ import java.util.List;
|
|||
import org.junit.Test;
|
||||
import static org.junit.Assert.*;
|
||||
|
||||
public class PrimeGeneratorTest {
|
||||
public class PrimeGeneratorUnitTest {
|
||||
@Test
|
||||
public void whenBruteForced_returnsSuccessfully() {
|
||||
final List<Integer> primeNumbers = primeNumbersBruteForce(20);
|
|
@ -12,7 +12,7 @@ import org.jgrapht.graph.SimpleWeightedGraph;
|
|||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
|
||||
public class CompleteGraphTest {
|
||||
public class CompleteGraphUnitTest {
|
||||
|
||||
static SimpleWeightedGraph<String, DefaultEdge> completeGraph;
|
||||
static int size = 10;
|
|
@ -24,7 +24,7 @@ import org.jgrapht.traverse.DepthFirstIterator;
|
|||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
|
||||
public class DirectedGraphTests {
|
||||
public class DirectedGraphUnitTest {
|
||||
DirectedGraph<String, DefaultEdge> directedGraph;
|
||||
|
||||
@Before
|
|
@ -12,7 +12,7 @@ import org.jgrapht.graph.SimpleWeightedGraph;
|
|||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
|
||||
public class EulerianCircuitTest {
|
||||
public class EulerianCircuitUnitTest {
|
||||
SimpleWeightedGraph<String, DefaultEdge> simpleGraph;
|
||||
|
||||
@Before
|
|
@ -5,7 +5,7 @@
|
|||
<artifactId>animal-sniffer-mvn-plugin</artifactId>
|
||||
<packaging>jar</packaging>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
<name>example-animal-sniffer-mvn-plugin</name>
|
||||
<name>animal-sniffer-mvn-plugin</name>
|
||||
<url>http://maven.apache.org</url>
|
||||
|
||||
<parent>
|
||||
|
|
|
@ -19,7 +19,7 @@ import java.util.List;
|
|||
import static junit.framework.Assert.assertEquals;
|
||||
import static org.junit.Assert.assertNotNull;
|
||||
|
||||
public class CayenneAdvancedOperationIntegrationTest {
|
||||
public class CayenneAdvancedOperationLiveTest {
|
||||
private static ObjectContext context = null;
|
||||
|
||||
@BeforeClass
|
|
@ -16,7 +16,7 @@ import static junit.framework.Assert.assertEquals;
|
|||
import static org.junit.Assert.assertNull;
|
||||
|
||||
|
||||
public class CayenneOperationIntegrationTest {
|
||||
public class CayenneOperationLiveTest {
|
||||
private static ObjectContext context = null;
|
||||
|
||||
@BeforeClass
|
|
@ -6,7 +6,7 @@ import org.apache.curator.framework.CuratorFrameworkFactory;
|
|||
import org.apache.curator.retry.RetryNTimes;
|
||||
import org.junit.Before;
|
||||
|
||||
public abstract class BaseTest {
|
||||
public abstract class BaseManualTest {
|
||||
|
||||
@Before
|
||||
public void setup() {
|
|
@ -12,9 +12,9 @@ import org.apache.curator.framework.CuratorFramework;
|
|||
import org.apache.curator.x.async.AsyncCuratorFramework;
|
||||
import org.junit.Test;
|
||||
|
||||
import com.baeldung.apache.curator.BaseTest;
|
||||
import com.baeldung.apache.curator.BaseManualTest;
|
||||
|
||||
public class ConfigurationManagementManualTest extends BaseTest {
|
||||
public class ConfigurationManagementManualTest extends BaseManualTest {
|
||||
|
||||
private static final String KEY_FORMAT = "/%s";
|
||||
|
||||
|
|
|
@ -11,9 +11,9 @@ import org.apache.curator.x.async.modeled.ModeledFramework;
|
|||
import org.apache.curator.x.async.modeled.ZPath;
|
||||
import org.junit.Test;
|
||||
|
||||
import com.baeldung.apache.curator.BaseTest;
|
||||
import com.baeldung.apache.curator.BaseManualTest;
|
||||
|
||||
public class ModelTypedExamplesManualTest extends BaseTest {
|
||||
public class ModelTypedExamplesManualTest extends BaseManualTest {
|
||||
|
||||
@Test
|
||||
public void givenPath_whenStoreAModel_thenNodesAreCreated()
|
||||
|
|
|
@ -10,9 +10,9 @@ import org.apache.curator.framework.recipes.shared.SharedCount;
|
|||
import org.apache.curator.framework.state.ConnectionState;
|
||||
import org.junit.Test;
|
||||
|
||||
import com.baeldung.apache.curator.BaseTest;
|
||||
import com.baeldung.apache.curator.BaseManualTest;
|
||||
|
||||
public class RecipesManualTest extends BaseTest {
|
||||
public class RecipesManualTest extends BaseManualTest {
|
||||
|
||||
@Test
|
||||
public void givenRunningZookeeper_whenUsingLeaderElection_thenNoErrors() {
|
||||
|
|
|
@ -10,7 +10,7 @@ import opennlp.tools.tokenize.SimpleTokenizer;
|
|||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
import org.junit.Test;
|
||||
|
||||
public class ChunkerTest {
|
||||
public class ChunkerUnitTest {
|
||||
|
||||
@Test
|
||||
public void givenChunkerModel_whenChunk_thenChunksAreDetected() throws Exception {
|
|
@ -19,7 +19,7 @@ import static org.assertj.core.api.Assertions.assertThat;
|
|||
import static org.assertj.core.api.Assertions.tuple;
|
||||
import org.junit.Test;
|
||||
|
||||
public class LanguageDetectorAndTrainingDataTest {
|
||||
public class LanguageDetectorAndTrainingDataUnitTest {
|
||||
|
||||
@Test
|
||||
public void givenLanguageDictionary_whenLanguageDetect_thenLanguageIsDetected() throws FileNotFoundException, IOException {
|
|
@ -8,7 +8,7 @@ import opennlp.tools.tokenize.SimpleTokenizer;
|
|||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
import org.junit.Test;
|
||||
|
||||
public class LemmetizerTest {
|
||||
public class LemmetizerUnitTest {
|
||||
|
||||
@Test
|
||||
public void givenEnglishDictionary_whenLemmatize_thenLemmasAreDetected() throws Exception {
|
|
@ -11,7 +11,7 @@ import opennlp.tools.util.Span;
|
|||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
import org.junit.Test;
|
||||
|
||||
public class NamedEntityRecognitionTest {
|
||||
public class NamedEntityRecognitionUnitTest {
|
||||
|
||||
@Test
|
||||
public void givenEnglishPersonModel_whenNER_thenPersonsAreDetected() throws Exception {
|
|
@ -7,7 +7,7 @@ import opennlp.tools.tokenize.SimpleTokenizer;
|
|||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
import org.junit.Test;
|
||||
|
||||
public class POSTaggerTest {
|
||||
public class POSTaggerUnitTest {
|
||||
|
||||
@Test
|
||||
public void givenPOSModel_whenPOSTagging_thenPOSAreDetected() throws Exception {
|
|
@ -6,7 +6,7 @@ import opennlp.tools.sentdetect.SentenceModel;
|
|||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
import org.junit.Test;
|
||||
|
||||
public class SentenceDetectionTest {
|
||||
public class SentenceDetectionUnitTest {
|
||||
|
||||
@Test
|
||||
public void givenEnglishModel_whenDetect_thenSentencesAreDetected() throws Exception {
|
|
@ -8,7 +8,7 @@ import opennlp.tools.tokenize.WhitespaceTokenizer;
|
|||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
import org.junit.Test;
|
||||
|
||||
public class TokenizerTest {
|
||||
public class TokenizerUnitTest {
|
||||
|
||||
@Test
|
||||
public void givenEnglishModel_whenTokenize_thenTokensAreDetected() throws Exception {
|
|
@ -1,2 +1,3 @@
|
|||
### Relevant Articles:
|
||||
- [Introduction to AutoValue](http://www.baeldung.com/introduction-to-autovalue)
|
||||
- [Introduction to AutoFactory](http://www.baeldung.com/autofactory)
|
||||
|
|
|
@ -0,0 +1,25 @@
|
|||
/target/
|
||||
!.mvn/wrapper/maven-wrapper.jar
|
||||
|
||||
### STS ###
|
||||
.apt_generated
|
||||
.classpath
|
||||
.factorypath
|
||||
.project
|
||||
.settings
|
||||
.springBeans
|
||||
.sts4-cache
|
||||
|
||||
### IntelliJ IDEA ###
|
||||
.idea
|
||||
*.iws
|
||||
*.iml
|
||||
*.ipr
|
||||
|
||||
### NetBeans ###
|
||||
/nbproject/private/
|
||||
/build/
|
||||
/nbbuild/
|
||||
/dist/
|
||||
/nbdist/
|
||||
/.nb-gradle/
|
|
@ -0,0 +1,4 @@
|
|||
### Relevant Articles:
|
||||
|
||||
- [Deploy Spring Boot App to Azure](http://www.baeldung.com/spring-boot-azure)
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
FROM frolvlad/alpine-oraclejdk8:slim
|
||||
VOLUME /tmp
|
||||
ADD azure-0.1.jar app.jar
|
||||
RUN sh -c 'touch /app.jar'
|
||||
EXPOSE 8080
|
||||
ENTRYPOINT [ "sh", "-c", "java -Djava.security.egd=file:/dev/./urandom -jar /app.jar" ]
|
|
@ -0,0 +1,131 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<groupId>com.baeldung</groupId>
|
||||
<artifactId>azure</artifactId>
|
||||
<version>0.1</version>
|
||||
<packaging>war</packaging>
|
||||
<name>azure</name>
|
||||
<description>Demo project for Spring Boot on Azure</description>
|
||||
|
||||
<parent>
|
||||
<artifactId>parent-boot-2</artifactId>
|
||||
<groupId>com.baeldung</groupId>
|
||||
<version>0.0.1-SNAPSHOT</version>
|
||||
<relativePath>../parent-boot-2</relativePath>
|
||||
</parent>
|
||||
|
||||
<properties>
|
||||
<azure.containerRegistry>baeldungadr</azure.containerRegistry>
|
||||
<docker.image.prefix>${azure.containerRegistry}.azurecr.io</docker.image.prefix>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-web</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-tomcat</artifactId>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-data-jpa</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.h2database</groupId>
|
||||
<artifactId>h2</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>mysql</groupId>
|
||||
<artifactId>mysql-connector-java</artifactId>
|
||||
<version>5.1.6</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>com.spotify</groupId>
|
||||
<artifactId>docker-maven-plugin</artifactId>
|
||||
<version>1.1.0</version>
|
||||
<configuration>
|
||||
<imageName>${docker.image.prefix}/${project.artifactId}</imageName>
|
||||
<registryUrl>https://${docker.image.prefix}</registryUrl>
|
||||
<serverId>${azure.containerRegistry}</serverId>
|
||||
<dockerDirectory>docker</dockerDirectory>
|
||||
<resources>
|
||||
<resource>
|
||||
<targetPath>/</targetPath>
|
||||
<directory>${project.build.directory}</directory>
|
||||
<include>${project.build.finalName}.jar</include>
|
||||
</resource>
|
||||
</resources>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>com.microsoft.azure</groupId>
|
||||
<artifactId>azure-webapp-maven-plugin</artifactId>
|
||||
<version>1.1.0</version>
|
||||
<configuration>
|
||||
<authentication>
|
||||
<serverId>azure-auth</serverId>
|
||||
</authentication>
|
||||
<resourceGroup>baeldung-group</resourceGroup>
|
||||
<appName>baeldung-webapp</appName>
|
||||
<appServicePlanName>baeldung-plan</appServicePlanName>
|
||||
<javaVersion>1.8</javaVersion>
|
||||
<!--<javaWebContainer>tomcat 8.5</javaWebContainer>-->
|
||||
<!--<region>japanwest</region>-->
|
||||
<!--<containerSettings>-->
|
||||
<!--<imageName>${docker.image.prefix}/${project.artifactId}</imageName>-->
|
||||
<!--<registryUrl>https://${docker.image.prefix}</registryUrl>-->
|
||||
<!--<serverId>${azure.containerRegistry}</serverId>-->
|
||||
<!--</containerSettings>-->
|
||||
<appSettings>
|
||||
<property>
|
||||
<name>spring.datasource.url</name>
|
||||
<value>jdbc:h2:file:~/test</value>
|
||||
<!--<value>jdbc:mysql://127.0.0.1:55738/localdb</value>-->
|
||||
</property>
|
||||
<property>
|
||||
<name>spring.datasource.username</name>
|
||||
<value>sa</value>
|
||||
<!--<value>azure</value>-->
|
||||
</property>
|
||||
<property>
|
||||
<name>spring.datasource.password</name>
|
||||
<value></value>
|
||||
<!--<value>replace-with-your-password</value>-->
|
||||
</property>
|
||||
</appSettings>
|
||||
<!--<deploymentType>ftp</deploymentType>-->
|
||||
<!--<resources>-->
|
||||
<!--<resource>-->
|
||||
<!--<directory>${project.basedir}/target</directory>-->
|
||||
<!--<targetPath>webapps</targetPath>-->
|
||||
<!--<includes>-->
|
||||
<!--<include>*.war</include>-->
|
||||
<!--</includes>-->
|
||||
<!--</resource>-->
|
||||
<!--</resources>-->
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
|
||||
</project>
|
|
@ -0,0 +1,19 @@
|
|||
package com.baeldung.springboot.azure;
|
||||
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
import org.springframework.boot.builder.SpringApplicationBuilder;
|
||||
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
|
||||
|
||||
@SpringBootApplication
|
||||
public class AzureApplication extends SpringBootServletInitializer {
|
||||
|
||||
@Override
|
||||
protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
|
||||
return application.sources(AzureApplication.class);
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
SpringApplication.run(AzureApplication.class, args);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,34 @@
|
|||
package com.baeldung.springboot.azure;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import static com.baeldung.springboot.azure.User.userNamed;
|
||||
|
||||
/**
|
||||
* @author aiet
|
||||
*/
|
||||
@RestController
|
||||
public class TestController {
|
||||
|
||||
@GetMapping("/hello")
|
||||
public String hello() {
|
||||
return "hello azure!";
|
||||
}
|
||||
|
||||
@Autowired private UserRepository userRepository;
|
||||
|
||||
@PostMapping("/user")
|
||||
public String register(@RequestParam String name) {
|
||||
userRepository.save(userNamed(name));
|
||||
return "registered";
|
||||
}
|
||||
|
||||
@GetMapping("/user")
|
||||
public Iterable<User> userlist() {
|
||||
return userRepository.findAll();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,43 @@
|
|||
package com.baeldung.springboot.azure;
|
||||
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.GeneratedValue;
|
||||
import javax.persistence.GenerationType;
|
||||
import javax.persistence.Id;
|
||||
|
||||
/**
|
||||
* @author aiet
|
||||
*/
|
||||
@Entity
|
||||
public class User {
|
||||
|
||||
public User() {
|
||||
}
|
||||
|
||||
public static User userNamed(String name) {
|
||||
User u = new User();
|
||||
u.setName(name);
|
||||
return u;
|
||||
}
|
||||
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.AUTO)
|
||||
private Integer id;
|
||||
private String name;
|
||||
|
||||
public Integer getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Integer id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,9 @@
|
|||
package com.baeldung.springboot.azure;
|
||||
|
||||
import org.springframework.data.repository.CrudRepository;
|
||||
|
||||
/**
|
||||
* @author aiet
|
||||
*/
|
||||
public interface UserRepository extends CrudRepository<User, Long> {
|
||||
}
|
|
@ -0,0 +1,16 @@
|
|||
server.port=8080
|
||||
server.address=0.0.0.0
|
||||
spring.jpa.hibernate.ddl-auto=create
|
||||
|
||||
logging.file=azure.log
|
||||
logging.level.root=info
|
||||
|
||||
spring.datasource.url=jdbc:h2:file:~/test
|
||||
spring.datasource.username=sa
|
||||
spring.datasource.password=
|
||||
|
||||
#spring.datasource.url=jdbc:mysql://localhost:3306/localdb
|
||||
#spring.datasource.username=your-db-username
|
||||
#spring.datasource.password=your-db-password
|
||||
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
package com.baeldung.springboot.azure;
|
||||
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.springframework.boot.test.context.SpringBootTest;
|
||||
import org.springframework.test.context.junit4.SpringRunner;
|
||||
|
||||
@RunWith(SpringRunner.class)
|
||||
@SpringBootTest
|
||||
public class AzureApplicationIntegrationTest {
|
||||
|
||||
@Test
|
||||
public void contextLoads() {
|
||||
}
|
||||
|
||||
}
|
|
@ -9,7 +9,7 @@ import org.junit.Test;
|
|||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
|
||||
public class AppTest {
|
||||
public class AppUnitTest {
|
||||
|
||||
@Rule
|
||||
public BQTestFactory bqTestFactory = new BQTestFactory();
|
|
@ -5,7 +5,6 @@
|
|||
<groupId>com.example</groupId>
|
||||
<artifactId>spring-boot-camel</artifactId>
|
||||
<version>0.0.1-SNAPSHOT</version>
|
||||
<name>Spring-Boot - Camel API</name>
|
||||
|
||||
<parent>
|
||||
<groupId>com.baeldung</groupId>
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
<parent>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-parent</artifactId>
|
||||
<version>2.0.0.M7</version>
|
||||
<version>1.5.13.RELEASE</version>
|
||||
<relativePath/> <!-- lookup parent from repository -->
|
||||
</parent>
|
||||
|
||||
|
@ -60,28 +60,6 @@
|
|||
</plugins>
|
||||
</build>
|
||||
|
||||
<repositories>
|
||||
<repository>
|
||||
<id>spring-milestones</id>
|
||||
<name>Spring Milestones</name>
|
||||
<url>https://repo.spring.io/milestone</url>
|
||||
<snapshots>
|
||||
<enabled>false</enabled>
|
||||
</snapshots>
|
||||
</repository>
|
||||
</repositories>
|
||||
|
||||
<pluginRepositories>
|
||||
<pluginRepository>
|
||||
<id>spring-milestones</id>
|
||||
<name>Spring Milestones</name>
|
||||
<url>https://repo.spring.io/milestone</url>
|
||||
<snapshots>
|
||||
<enabled>false</enabled>
|
||||
</snapshots>
|
||||
</pluginRepository>
|
||||
</pluginRepositories>
|
||||
|
||||
<properties>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package com.baeldung.cassecuredapp.controllers;
|
||||
|
||||
import org.apache.logging.log4j.Logger;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.log4j.LogManager;
|
||||
import org.apache.log4j.Logger;
|
||||
import org.springframework.security.core.Authentication;
|
||||
import org.springframework.security.core.context.SecurityContextHolder;
|
||||
import org.springframework.security.web.authentication.logout.CookieClearingLogoutHandler;
|
||||
|
|
|
@ -0,0 +1,228 @@
|
|||
<factorypath>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/apereo/cas/cas-server-support-json-service-registry/5.3.0-SNAPSHOT/cas-server-support-json-service-registry-5.3.0-SNAPSHOT.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/logging/log4j/log4j-api/2.11.0/log4j-api-2.11.0.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/logging/log4j/log4j-core/2.11.0/log4j-core-2.11.0.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/logging/log4j/log4j-jcl/2.11.0/log4j-jcl-2.11.0.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/logging/log4j/log4j-slf4j-impl/2.11.0/log4j-slf4j-impl-2.11.0.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/logging/log4j/log4j-web/2.11.0/log4j-web-2.11.0.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/slf4j/slf4j-api/1.7.25/slf4j-api-1.7.25.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/slf4j/jul-to-slf4j/1.7.25/jul-to-slf4j-1.7.25.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/com/lmax/disruptor/3.4.2/disruptor-3.4.2.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/com/google/guava/guava/25.0-jre/guava-25.0-jre.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/com/google/code/findbugs/jsr305/1.3.9/jsr305-1.3.9.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/checkerframework/checker-compat-qual/2.0.0/checker-compat-qual-2.0.0.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/com/google/errorprone/error_prone_annotations/2.1.3/error_prone_annotations-2.1.3.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/com/google/j2objc/j2objc-annotations/1.1/j2objc-annotations-1.1.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/codehaus/mojo/animal-sniffer-annotations/1.14/animal-sniffer-annotations-1.14.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/reflections/reflections/0.9.11/reflections-0.9.11.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/javassist/javassist/3.22.0-GA/javassist-3.22.0-GA.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/springmodules/spring-modules-cache/0.8/spring-modules-cache-0.8.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/commons-attributes/commons-attributes-api/2.1/commons-attributes-api-2.1.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/qdox/qdox/1.5/qdox-1.5.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/commons-attributes/commons-attributes-compiler/2.1/commons-attributes-compiler-2.1.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/concurrent/concurrent/1.3.4/concurrent-1.3.4.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/cglib/cglib-nodep/2.1_3/cglib-nodep-2.1_3.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/geronimo-spec/geronimo-spec-jta/1.0.1B-rc4/geronimo-spec-jta-1.0.1B-rc4.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/opensymphony/oscache/2.1.1/oscache-2.1.1.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/oro/oro/2.0.8/oro-2.0.8.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/commons-io/commons-io/2.6/commons-io-2.6.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/commons/commons-text/1.3/commons-text-1.3.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/commons/commons-pool2/2.5.0/commons-pool2-2.5.0.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/commons-cli/commons-cli/1.4/commons-cli-1.4.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/commons-beanutils/commons-beanutils/1.9.3/commons-beanutils-1.9.3.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/commons-logging/commons-logging/1.2/commons-logging-1.2.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/commons/commons-configuration2/2.2/commons-configuration2-2.2.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/commons-validator/commons-validator/1.6/commons-validator-1.6.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/commons-codec/commons-codec/1.11/commons-codec-1.11.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/commons-jexl/commons-jexl/1.1/commons-jexl-1.1.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/commons/commons-lang3/3.7/commons-lang3-3.7.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/commons-lang/commons-lang/2.6/commons-lang-2.6.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/jooq/jool/0.9.12/jool-0.9.12.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/com/github/lalyos/jfiglet/0.0.8/jfiglet-0.0.8.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/commons-collections/commons-collections/3.2.2/commons-collections-3.2.2.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/commons/commons-collections4/4.1/commons-collections4-4.1.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/joda-time/joda-time/2.9.9/joda-time-2.9.9.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/apereo/inspektr/inspektr-audit/1.8.2.GA/inspektr-audit-1.8.2.GA.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/apereo/inspektr/inspektr-common/1.8.2.GA/inspektr-common-1.8.2.GA.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/com/fasterxml/jackson/core/jackson-core/2.9.3/jackson-core-2.9.3.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/apereo/inspektr/inspektr-support-spring/1.8.2.GA/inspektr-support-spring-1.8.2.GA.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/apereo/inspektr/inspektr-error/1.8.2.GA/inspektr-error-1.8.2.GA.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/apereo/service/persondir/person-directory-impl/1.8.6/person-directory-impl-1.8.6.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/aopalliance/aopalliance/1.0/aopalliance-1.0.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/apereo/service/persondir/person-directory-api/1.8.6/person-directory-api-1.8.6.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/shell/spring-shell/1.2.0.RELEASE/spring-shell-1.2.0.RELEASE.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/spring-aop/4.3.17.RELEASE/spring-aop-4.3.17.RELEASE.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/spring-beans/4.3.17.RELEASE/spring-beans-4.3.17.RELEASE.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/webflow/spring-binding/2.5.0.RELEASE/spring-binding-2.5.0.RELEASE.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/spring-context/4.3.17.RELEASE/spring-context-4.3.17.RELEASE.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/spring-context-support/4.3.17.RELEASE/spring-context-support-4.3.17.RELEASE.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/spring-core/4.3.17.RELEASE/spring-core-4.3.17.RELEASE.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/data/spring-data-mongodb/1.10.7.RELEASE/spring-data-mongodb-1.10.7.RELEASE.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/data/spring-data-commons/1.13.7.RELEASE/spring-data-commons-1.13.7.RELEASE.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/spring-jms/4.3.17.RELEASE/spring-jms-4.3.17.RELEASE.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/spring-messaging/4.3.17.RELEASE/spring-messaging-4.3.17.RELEASE.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/spring-expression/4.3.17.RELEASE/spring-expression-4.3.17.RELEASE.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/spring-jdbc/4.3.17.RELEASE/spring-jdbc-4.3.17.RELEASE.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/spring-orm/4.3.17.RELEASE/spring-orm-4.3.17.RELEASE.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/spring-tx/4.3.17.RELEASE/spring-tx-4.3.17.RELEASE.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/spring-web/4.3.17.RELEASE/spring-web-4.3.17.RELEASE.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/webflow/spring-webflow/2.5.0.RELEASE/spring-webflow-2.5.0.RELEASE.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/apereo/spring-webflow-client-repo/1.0.3/spring-webflow-client-repo-1.0.3.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/spring-webmvc/4.3.17.RELEASE/spring-webmvc-4.3.17.RELEASE.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/com/fasterxml/jackson/core/jackson-databind/2.9.5/jackson-databind-2.9.5.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/com/fasterxml/jackson/datatype/jackson-datatype-guava/2.9.5/jackson-datatype-guava-2.9.5.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/com/fasterxml/jackson/core/jackson-annotations/2.9.5/jackson-annotations-2.9.5.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/com/fasterxml/jackson/jaxrs/jackson-jaxrs-json-provider/2.9.5/jackson-jaxrs-json-provider-2.9.5.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/com/fasterxml/jackson/jaxrs/jackson-jaxrs-base/2.9.5/jackson-jaxrs-base-2.9.5.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/com/fasterxml/jackson/module/jackson-module-jaxb-annotations/2.9.5/jackson-module-jaxb-annotations-2.9.5.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/com/fasterxml/jackson/datatype/jackson-datatype-jsr310/2.9.5/jackson-datatype-jsr310-2.9.5.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/hjson/hjson/3.0.0/hjson-3.0.0.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/com/fasterxml/jackson/dataformat/jackson-dataformat-yaml/2.9.5/jackson-dataformat-yaml-2.9.5.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/httpcomponents/httpclient/4.5.5/httpclient-4.5.5.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/httpcomponents/httpcore/4.4.9/httpcore-4.4.9.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/com/github/axet/wget/1.4.9/wget-1.4.9.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/com/github/axet/threads/0.0.14/threads-0.0.14.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/jsoup/jsoup/1.10.1/jsoup-1.10.1.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/quartz-scheduler/quartz/2.3.0/quartz-2.3.0.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/com/mchange/mchange-commons-java/0.2.11/mchange-commons-java-0.2.11.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/hibernate/hibernate-core/5.2.16.Final/hibernate-core-5.2.16.Final.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/hibernate/javax/persistence/hibernate-jpa-2.1-api/1.0.0.Final/hibernate-jpa-2.1-api-1.0.0.Final.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/antlr/antlr/2.7.7/antlr-2.7.7.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/jboss/spec/javax/transaction/jboss-transaction-api_1.2_spec/1.0.1.Final/jboss-transaction-api_1.2_spec-1.0.1.Final.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/jboss/jandex/2.0.3.Final/jandex-2.0.3.Final.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/hibernate/common/hibernate-commons-annotations/5.0.1.Final/hibernate-commons-annotations-5.0.1.Final.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/dom4j/dom4j/1.6.1/dom4j-1.6.1.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/hibernate/hibernate-hikaricp/5.2.16.Final/hibernate-hikaricp-5.2.16.Final.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/hibernate/hibernate-entitymanager/5.2.16.Final/hibernate-entitymanager-5.2.16.Final.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/jboss/logging/jboss-logging/3.3.1.Final/jboss-logging-3.3.1.Final.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/net/bytebuddy/byte-buddy/1.6.14/byte-buddy-1.6.14.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/hibernate/hibernate-validator/5.4.1.Final/hibernate-validator-5.4.1.Final.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/com/zaxxer/HikariCP/3.1.0/HikariCP-3.1.0.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/javax/el/javax.el-api/3.0.0/javax.el-api-3.0.0.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/glassfish/web/el-impl/2.2/el-impl-2.2.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/javax/el/el-api/2.2/el-api-2.2.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/cloud/spring-cloud-commons/1.3.0.RELEASE/spring-cloud-commons-1.3.0.RELEASE.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/security/spring-security-crypto/4.2.3.RELEASE/spring-security-crypto-4.2.3.RELEASE.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/cloud/spring-cloud-context/1.3.0.RELEASE/spring-cloud-context-1.3.0.RELEASE.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/boot/spring-boot-starter-websocket/1.5.13.RELEASE/spring-boot-starter-websocket-1.5.13.RELEASE.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/boot/spring-boot-starter/1.5.13.RELEASE/spring-boot-starter-1.5.13.RELEASE.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/yaml/snakeyaml/1.17/snakeyaml-1.17.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/spring-websocket/4.3.17.RELEASE/spring-websocket-4.3.17.RELEASE.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/boot/spring-boot-starter-mail/1.5.13.RELEASE/spring-boot-starter-mail-1.5.13.RELEASE.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/com/sun/mail/javax.mail/1.5.6/javax.mail-1.5.6.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/javax/activation/activation/1.1/activation-1.1.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/boot/spring-boot-starter-web/1.5.13.RELEASE/spring-boot-starter-web-1.5.13.RELEASE.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/boot/spring-boot-autoconfigure/1.5.13.RELEASE/spring-boot-autoconfigure-1.5.13.RELEASE.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/boot/spring-boot/1.5.13.RELEASE/spring-boot-1.5.13.RELEASE.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/boot/spring-boot-devtools/1.5.13.RELEASE/spring-boot-devtools-1.5.13.RELEASE.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/boot/spring-boot-starter-actuator/1.5.13.RELEASE/spring-boot-starter-actuator-1.5.13.RELEASE.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/boot/spring-boot-actuator/1.5.13.RELEASE/spring-boot-actuator-1.5.13.RELEASE.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/apereo/cas/cas-server-core-api-services/5.3.0-SNAPSHOT/cas-server-core-api-services-5.3.0-SNAPSHOT.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/apereo/cas/cas-server-core-api-authentication/5.3.0-SNAPSHOT/cas-server-core-api-authentication-5.3.0-SNAPSHOT.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/apereo/cas/cas-server-core-api-protocol/5.3.0-SNAPSHOT/cas-server-core-api-protocol-5.3.0-SNAPSHOT.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/apereo/cas/cas-server-core-api-util/5.3.0-SNAPSHOT/cas-server-core-api-util-5.3.0-SNAPSHOT.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/aspectj/aspectjrt/1.9.1/aspectjrt-1.9.1.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/aspectj/aspectjweaver/1.9.1/aspectjweaver-1.9.1.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/javax/validation/validation-api/1.1.0.Final/validation-api-1.1.0.Final.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/apereo/cas/cas-server-core-services/5.3.0-SNAPSHOT/cas-server-core-services-5.3.0-SNAPSHOT.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/apereo/cas/cas-server-core-api-audit/5.3.0-SNAPSHOT/cas-server-core-api-audit-5.3.0-SNAPSHOT.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/apereo/cas/cas-server-core-api/5.3.0-SNAPSHOT/cas-server-core-api-5.3.0-SNAPSHOT.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/apereo/cas/cas-server-core-services-api/5.3.0-SNAPSHOT/cas-server-core-services-api-5.3.0-SNAPSHOT.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/apereo/cas/cas-server-core-services-authentication/5.3.0-SNAPSHOT/cas-server-core-services-authentication-5.3.0-SNAPSHOT.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/apereo/cas/cas-server-core-web-api/5.3.0-SNAPSHOT/cas-server-core-web-api-5.3.0-SNAPSHOT.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/apereo/cas/cas-server-core-api-logout/5.3.0-SNAPSHOT/cas-server-core-api-logout-5.3.0-SNAPSHOT.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/thymeleaf/thymeleaf-spring4/3.0.9.RELEASE/thymeleaf-spring4-3.0.9.RELEASE.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/thymeleaf/thymeleaf/3.0.9.RELEASE/thymeleaf-3.0.9.RELEASE.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/attoparser/attoparser/2.0.4.RELEASE/attoparser-2.0.4.RELEASE.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/unbescape/unbescape/1.1.5.RELEASE/unbescape-1.1.5.RELEASE.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/boot/spring-boot-starter-thymeleaf/1.5.13.RELEASE/spring-boot-starter-thymeleaf-1.5.13.RELEASE.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/apereo/cas/cas-server-security-filter/2.0.10.2/cas-server-security-filter-2.0.10.2.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/apereo/cas/cas-server-core-authentication-attributes/5.3.0-SNAPSHOT/cas-server-core-authentication-attributes-5.3.0-SNAPSHOT.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/codehaus/groovy/groovy-jsr223/2.4.15/groovy-jsr223-2.4.15.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/codehaus/groovy/groovy/2.4.15/groovy-2.4.15.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/codehaus/groovy/groovy-console/2.4.15/groovy-console-2.4.15.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/codehaus/groovy/groovy-swing/2.4.15/groovy-swing-2.4.15.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/codehaus/groovy/groovy-templates/2.4.15/groovy-templates-2.4.15.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/codehaus/groovy/groovy-xml/2.4.15/groovy-xml-2.4.15.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/codehaus/groovy/groovy-groovysh/2.4.15/groovy-groovysh-2.4.15.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/jline/jline/2.12/jline-2.12.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/apereo/cas/cas-server-core-util-api/5.3.0-SNAPSHOT/cas-server-core-util-api-5.3.0-SNAPSHOT.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/bitbucket/b_c/jose4j/0.6.3/jose4j-0.6.3.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/apereo/cas/cas-server-core-api-ticket/5.3.0-SNAPSHOT/cas-server-core-api-ticket-5.3.0-SNAPSHOT.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/apereo/cas/cas-server-core-api-web/5.3.0-SNAPSHOT/cas-server-core-api-web-5.3.0-SNAPSHOT.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/pac4j/pac4j-cas/3.0.0-RC2/pac4j-cas-3.0.0-RC2.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/jasig/cas/client/cas-client-core/3.5.0/cas-client-core-3.5.0.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/jasig/cas/client/cas-client-support-saml/3.5.0/cas-client-support-saml-3.5.0.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/pac4j/pac4j-config/3.0.0-RC2/pac4j-config-3.0.0-RC2.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/pac4j/pac4j-core/3.0.0-RC2/pac4j-core-3.0.0-RC2.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/pac4j/pac4j-http/3.0.0-RC2/pac4j-http-3.0.0-RC2.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/pac4j/pac4j-jwt/3.0.0-RC2/pac4j-jwt-3.0.0-RC2.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/pac4j/pac4j-oidc/3.0.0-RC2/pac4j-oidc-3.0.0-RC2.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/pac4j/pac4j-mongo/3.0.0-RC2/pac4j-mongo-3.0.0-RC2.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/pac4j/pac4j-oauth/3.0.0-RC2/pac4j-oauth-3.0.0-RC2.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/com/github/scribejava/scribejava-apis/5.3.0/scribejava-apis-5.3.0.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/com/github/scribejava/scribejava-core/5.3.0/scribejava-core-5.3.0.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/pac4j/pac4j-saml/3.0.0-RC2/pac4j-saml-3.0.0-RC2.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/xalan/xalan/2.7.2/xalan-2.7.2.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/xalan/serializer/2.7.2/serializer-2.7.2.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/pac4j/spring-webmvc-pac4j/3.0.0-RC2/spring-webmvc-pac4j-3.0.0-RC2.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/com/nimbusds/nimbus-jose-jwt/5.10/nimbus-jose-jwt-5.10.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/com/github/stephenc/jcip/jcip-annotations/1.0-1/jcip-annotations-1.0-1.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/com/nimbusds/oauth2-oidc-sdk/5.62/oauth2-oidc-sdk-5.62.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/javax/mail/mail/1.4.7/mail-1.4.7.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/com/nimbusds/lang-tag/1.4.3/lang-tag-1.4.3.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/net/minidev/json-smart/1.3.1/json-smart-1.3.1.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/com/google/zxing/core/3.3.2/core-3.3.2.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/bouncycastle/bcpkix-jdk15on/1.59/bcpkix-jdk15on-1.59.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/cryptacular/cryptacular/1.2.2/cryptacular-1.2.2.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/bouncycastle/bcprov-jdk15on/1.59/bcprov-jdk15on-1.59.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/com/vdurmont/semver4j/2.2.0/semver4j-2.2.0.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/com/github/oshi/oshi-core/3.5.0/oshi-core-3.5.0.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/threeten/threetenbp/1.3.6/threetenbp-1.3.6.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/apereo/cas/cas-server-core-configuration-api/5.3.0-SNAPSHOT/cas-server-core-configuration-api-5.3.0-SNAPSHOT.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/apereo/cas/cas-server-core-api-configuration/5.3.0-SNAPSHOT/cas-server-core-api-configuration-5.3.0-SNAPSHOT.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/apereo/cas/cas-server-core-api-configuration-model/5.3.0-SNAPSHOT/cas-server-core-api-configuration-model-5.3.0-SNAPSHOT.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/boot/spring-boot-configuration-processor/1.5.13.RELEASE/spring-boot-configuration-processor-1.5.13.RELEASE.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/json/json/20160810/json-20160810.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/boot/spring-boot-configuration-metadata/1.5.13.RELEASE/spring-boot-configuration-metadata-1.5.13.RELEASE.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/com/github/javaparser/javaparser-core/3.6.5/javaparser-core-3.6.5.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/apereo/cas/cas-server-core-api-webflow/5.3.0-SNAPSHOT/cas-server-core-api-webflow-5.3.0-SNAPSHOT.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/security/spring-security-core/4.2.6.RELEASE/spring-security-core-4.2.6.RELEASE.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/mongodb/mongo-java-driver/3.6.3/mongo-java-driver-3.6.3.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/jasypt/jasypt/1.9.2/jasypt-1.9.2.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/apereo/cas/cas-server-core-services-registry/5.3.0-SNAPSHOT/cas-server-core-services-registry-5.3.0-SNAPSHOT.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/apereo/cas/cas-server-core-api-events/5.3.0-SNAPSHOT/cas-server-core-api-events-5.3.0-SNAPSHOT.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/apereo/cas/cas-server-core-api-validation/5.3.0-SNAPSHOT/cas-server-core-api-validation-5.3.0-SNAPSHOT.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/apereo/cas/cas-server-support-jdbc/5.3.0-SNAPSHOT/cas-server-support-jdbc-5.3.0-SNAPSHOT.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/apereo/cas/cas-server-core-authentication-api/5.3.0-SNAPSHOT/cas-server-core-authentication-api-5.3.0-SNAPSHOT.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/apereo/cas/cas-server-core-authentication-mfa/5.3.0-SNAPSHOT/cas-server-core-authentication-mfa-5.3.0-SNAPSHOT.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/com/github/ben-manes/caffeine/caffeine/2.6.2/caffeine-2.6.2.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/com/github/ben-manes/caffeine/guava/2.6.2/guava-2.6.2.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/com/timgroup/java-statsd-client/3.1.0/java-statsd-client-3.1.0.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/io/dropwizard/metrics/metrics-annotation/3.2.5/metrics-annotation-3.2.5.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/io/dropwizard/metrics/metrics-core/3.2.5/metrics-core-3.2.5.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/io/dropwizard/metrics/metrics-jvm/3.2.5/metrics-jvm-3.2.5.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/io/dropwizard/metrics/metrics-healthchecks/3.2.5/metrics-healthchecks-3.2.5.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/io/dropwizard/metrics/metrics-servlets/3.2.5/metrics-servlets-3.2.5.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/io/dropwizard/metrics/metrics-json/3.2.5/metrics-json-3.2.5.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/com/papertrail/profiler/1.0.2/profiler-1.0.2.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/com/ryantenney/metrics/metrics-spring/3.1.3/metrics-spring-3.1.3.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/apereo/cas/cas-server-support-jdbc-authentication/5.3.0-SNAPSHOT/cas-server-support-jdbc-authentication-5.3.0-SNAPSHOT.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/shiro/shiro-core/1.4.0/shiro-core-1.4.0.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/shiro/shiro-lang/1.4.0/shiro-lang-1.4.0.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/shiro/shiro-cache/1.4.0/shiro-cache-1.4.0.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/shiro/shiro-crypto-hash/1.4.0/shiro-crypto-hash-1.4.0.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/shiro/shiro-crypto-core/1.4.0/shiro-crypto-core-1.4.0.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/shiro/shiro-crypto-cipher/1.4.0/shiro-crypto-cipher-1.4.0.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/shiro/shiro-config-core/1.4.0/shiro-config-core-1.4.0.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/shiro/shiro-config-ogdl/1.4.0/shiro-config-ogdl-1.4.0.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/shiro/shiro-event/1.4.0/shiro-event-1.4.0.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/apereo/cas/cas-server-support-jdbc-drivers/5.3.0-SNAPSHOT/cas-server-support-jdbc-drivers-5.3.0-SNAPSHOT.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/hsqldb/hsqldb/2.4.0/hsqldb-2.4.0.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/postgresql/postgresql/42.2.2/postgresql-42.2.2.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/mysql/mysql-connector-java/8.0.11/mysql-connector-java-8.0.11.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/com/google/protobuf/protobuf-java/2.6.0/protobuf-java-2.6.0.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/mariadb/jdbc/mariadb-java-client/2.2.4/mariadb-java-client-2.2.4.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/net/sourceforge/jtds/jtds/1.3.1/jtds-1.3.1.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="PLUGIN" id="org.eclipse.jst.ws.annotations.core" enabled="true" runInBatchMode="false"/>
|
||||
</factorypath>
|
|
@ -6,10 +6,11 @@ Generic CAS WAR overlay to exercise the latest versions of CAS. This overlay cou
|
|||
# Versions
|
||||
|
||||
```xml
|
||||
<cas.version>5.1.x</cas.version>
|
||||
<cas.version>5.3.x</cas.version>
|
||||
```
|
||||
|
||||
# Requirements
|
||||
|
||||
* JDK 1.8+
|
||||
|
||||
# Configuration
|
||||
|
@ -64,20 +65,23 @@ Run the CAS web application as an executable WAR via Spring Boot. This is most u
|
|||
|
||||
### Warning!
|
||||
|
||||
Be careful with this method of deployment. `bootRun` is not designed to work with already executable WAR artifacts such that CAS server web application. YMMV. Today, uses of this mode ONLY work when there is **NO OTHER** dependency added to the build script and the `cas-server-webapp` is the only present module. See [this issue](https://github.com/apereo/cas/issues/2334) and [this issue](https://github.com/spring-projects/spring-boot/issues/8320) for more info.
|
||||
Be careful with this method of deployment. `bootRun` is not designed to work with already executable WAR artifacts such that CAS server web application. YMMV. Today, uses of this mode ONLY work when there is **NO OTHER** dependency added to the build script and the `cas-server-webapp` is the only present module. See [this issue](https://github.com/spring-projects/spring-boot/issues/8320) for more info.
|
||||
|
||||
|
||||
## Spring Boot App Server Selection
|
||||
There is an app.server property in the pom.xml that can be used to select a spring boot application server.
|
||||
It defaults to "-tomcat" but "-jetty" and "-undertow" are supported.
|
||||
It can also be set to an empty value (nothing) if you want to deploy CAS to an external application server of your choice and you don't want the spring boot libraries included.
|
||||
|
||||
There is an app.server property in the `pom.xml` that can be used to select a spring boot application server.
|
||||
It defaults to `-tomcat` but `-jetty` and `-undertow` are supported.
|
||||
|
||||
It can also be set to an empty value (nothing) if you want to deploy CAS to an external application server of your choice.
|
||||
|
||||
```xml
|
||||
<app.server>-tomcat<app.server>
|
||||
```
|
||||
|
||||
## Windows Build
|
||||
If you are building on windows, try build.cmd instead of build.sh. Arguments are similar but for usage, run:
|
||||
|
||||
If you are building on windows, try `build.cmd` instead of `build.sh`. Arguments are similar but for usage, run:
|
||||
|
||||
```
|
||||
build.cmd help
|
||||
|
@ -86,3 +90,12 @@ build.cmd help
|
|||
## External
|
||||
|
||||
Deploy resultant `target/cas.war` to a servlet container of choice.
|
||||
|
||||
|
||||
## Command Line Shell
|
||||
|
||||
Invokes the CAS Command Line Shell. For a list of commands either use no arguments or use `-h`. To enter the interactive shell use `-sh`.
|
||||
|
||||
```bash
|
||||
./build.sh cli
|
||||
```
|
|
@ -23,8 +23,10 @@
|
|||
@if "%1" == "bootrun" call:bootrun %2 %3 %4
|
||||
@if "%1" == "debug" call:debug %2 %3 %4
|
||||
@if "%1" == "run" call:run %2 %3 %4
|
||||
@if "%1" == "runalone" call:runalone %2 %3 %4
|
||||
@if "%1" == "help" call:help
|
||||
@if "%1" == "gencert" call:gencert
|
||||
@if "%1" == "cli" call:runcli %2 %3 %4
|
||||
|
||||
@rem function section starts here
|
||||
@goto:eof
|
||||
|
@ -38,7 +40,7 @@
|
|||
@goto:eof
|
||||
|
||||
:help
|
||||
@echo "Usage: build.bat [copy|clean|package|run|debug|bootrun|gencert] [optional extra args for maven]"
|
||||
@echo "Usage: build.bat [copy|clean|package|run|debug|bootrun|gencert|cli] [optional extra args for maven or cli]"
|
||||
@echo "To get started on a clean system, run "build.bat copy" and "build.bat gencert", then "build.bat run"
|
||||
@echo "Note that using the copy or gencert arguments will create and/or overwrite the %CAS_DIR% which is outside this project"
|
||||
@goto:eof
|
||||
|
@ -66,6 +68,10 @@
|
|||
call:package %1 %2 %3 & java %JAVA_ARGS% -jar target/cas.war
|
||||
@goto:eof
|
||||
|
||||
:runalone
|
||||
call:package %1 %2 %3 & target/cas.war
|
||||
@goto:eof
|
||||
|
||||
:gencert
|
||||
where /q keytool
|
||||
if ERRORLEVEL 1 (
|
||||
|
@ -80,3 +86,17 @@
|
|||
keytool -exportcert -alias cas -storepass changeit -keystore %CAS_DIR%\thekeystore -file %CAS_DIR%\cas.cer
|
||||
)
|
||||
@goto:eof
|
||||
|
||||
:runcli
|
||||
for /f %%i in ('call %MAVEN_CMD% -q --non-recursive "-Dexec.executable=cmd" "-Dexec.args=/C echo ${cas.version}" "org.codehaus.mojo:exec-maven-plugin:1.3.1:exec"') do set CAS_VERSION=%%i
|
||||
@set CAS_VERSION=%CAS_VERSION: =%
|
||||
@set DOWNLOAD_DIR=target
|
||||
@set COMMAND_FILE=cas-server-support-shell-%CAS_VERSION%.jar
|
||||
@if not exist %DOWNLOAD_DIR% mkdir %DOWNLOAD_DIR%
|
||||
@if not exist %DOWNLOAD_DIR%\%COMMAND_FILE% (
|
||||
@call mvn org.apache.maven.plugins:maven-dependency-plugin:3.0.2:get -DgroupId=org.apereo.cas -DartifactId=cas-server-support-shell -Dversion=%CAS_VERSION% -Dpackaging=jar -DartifactItem.outputDirectory=%DOWNLOAD_DIR% -DartifactItem.destFileName=%COMMAND_FILE% -DremoteRepositories=central::default::http://repo1.maven.apache.org/maven2,snapshots::::https://oss.sonatype.org/content/repositories/snapshots -Dtransitive=false
|
||||
@call mvn org.apache.maven.plugins:maven-dependency-plugin:3.0.2:copy -Dmdep.useBaseVersion=true -Dartifact=org.apereo.cas:cas-server-support-shell:%CAS_VERSION%:jar -DoutputDirectory=%DOWNLOAD_DIR%
|
||||
)
|
||||
@call java %JAVA_ARGS% -jar %DOWNLOAD_DIR%\%COMMAND_FILE% %1 %2 %3
|
||||
|
||||
@goto:eof
|
|
@ -13,24 +13,31 @@ function help() {
|
|||
echo "Usage: build.sh [copy|clean|package|run|debug|bootrun|gencert]"
|
||||
echo " copy: Copy config from ./etc/cas/config to /etc/cas/config"
|
||||
echo " clean: Clean Maven build directory"
|
||||
echo " package: Clean and build CAS war, also call copy"
|
||||
echo " run: Build and run CAS.war via spring boot (java -jar target/cas.war)"
|
||||
echo " package: Clean and build CAS war"
|
||||
echo " run: Build and run cas.war via Java (i.e. java -jar target/cas.war)"
|
||||
echo " runalone: Build and run cas.war on its own as a standalone executable (target/cas.war)"
|
||||
echo " debug: Run CAS.war and listen for Java debugger on port 5000"
|
||||
echo " bootrun: Run with maven spring boot plugin, doesn't work with multiple dependencies"
|
||||
echo " bootrun: Run with maven spring boot plugin"
|
||||
echo " listviews: List all CAS views that ship with the web application and can be customized in the overlay"
|
||||
echo " getview: Ask for a view name to be included in the overlay for customizations"
|
||||
echo " gencert: Create keystore with SSL certificate in location where CAS looks by default"
|
||||
echo " cli: Run the CAS command line shell and pass commands"
|
||||
}
|
||||
|
||||
function clean() {
|
||||
shift
|
||||
./mvnw clean "$@"
|
||||
}
|
||||
|
||||
function package() {
|
||||
shift
|
||||
./mvnw clean package -T 5 "$@"
|
||||
copy
|
||||
# copy
|
||||
}
|
||||
|
||||
function bootrun() {
|
||||
./mvnw clean package spring-boot:run -T 5 "$@"
|
||||
shift
|
||||
./mvnw clean package spring-boot:run -P bootiful -T 5 "$@"
|
||||
}
|
||||
|
||||
function debug() {
|
||||
|
@ -41,14 +48,59 @@ function run() {
|
|||
package && java -jar target/cas.war
|
||||
}
|
||||
|
||||
function runalone() {
|
||||
shift
|
||||
./mvnw clean package -P default,exec "$@"
|
||||
chmod +x target/cas.war
|
||||
target/cas.war
|
||||
}
|
||||
|
||||
function listviews() {
|
||||
shift
|
||||
explodeapp
|
||||
find $PWD/target/cas -type f -name "*.html" | xargs -n 1 basename | sort | more
|
||||
}
|
||||
|
||||
function explodeapp() {
|
||||
if [ ! -d $PWD/target/cas ];then
|
||||
echo "Building the CAS web application and exploding the final war file..."
|
||||
./mvnw clean package war:exploded "$@"
|
||||
fi
|
||||
echo "Exploded the CAS web application file."
|
||||
}
|
||||
|
||||
function getview() {
|
||||
shift
|
||||
explodeapp
|
||||
echo "Searching for view name $@..."
|
||||
results=`find $PWD/target/cas -type f -name "*.html" | grep -i "$@"`
|
||||
echo -e "Found view(s): \n$results"
|
||||
count=`wc -w <<< "$results"`
|
||||
if [ "$count" -eq 1 ];then
|
||||
# echo "Found view $results to include in the overlay"
|
||||
firststring="target/cas/WEB-INF/classes"
|
||||
secondstring="src/main/resources"
|
||||
overlayfile=`echo "${results/$firststring/$secondstring}"`
|
||||
overlaypath=`dirname "${overlayfile}"`
|
||||
# echo "Overlay file is $overlayfile to be created at $overlaypath"
|
||||
mkdir -p $overlaypath
|
||||
cp $results $overlaypath
|
||||
echo "Created view at $overlayfile"
|
||||
ls $overlayfile
|
||||
else
|
||||
echo "More than one view file is found. Narrow down the search query..."
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
function gencert() {
|
||||
if [[ ! -d /etc/cas ]] ; then
|
||||
if [[ ! -d /etc/cas ]] ; then
|
||||
copy
|
||||
fi
|
||||
which keytool
|
||||
if [[ $? -ne 0 ]] ; then
|
||||
echo Error: Java JDK \'keytool\' is not installed or is not in the path
|
||||
exit 1
|
||||
echo Error: Java JDK \'keytool\' is not installed or is not in the path
|
||||
exit 1
|
||||
fi
|
||||
# override DNAME and CERT_SUBJ_ALT_NAMES before calling or use dummy values
|
||||
DNAME="${DNAME:-CN=cas.example.org,OU=Example,OU=Org,C=US}"
|
||||
|
@ -58,21 +110,49 @@ function gencert() {
|
|||
keytool -exportcert -alias cas -storepass changeit -keystore /etc/cas/thekeystore -file /etc/cas/cas.cer
|
||||
}
|
||||
|
||||
function cli() {
|
||||
|
||||
CAS_VERSION=$(./mvnw -q -Dexec.executable="echo" -Dexec.args='${cas.version}' --non-recursive org.codehaus.mojo:exec-maven-plugin:1.3.1:exec 2>/dev/null)
|
||||
# echo "CAS version: $CAS_VERSION"
|
||||
JAR_FILE_NAME="cas-server-support-shell-${CAS_VERSION}.jar"
|
||||
# echo "JAR name: $JAR_FILE_NAME"
|
||||
JAR_PATH="org/apereo/cas/cas-server-support-shell/${CAS_VERSION}/${JAR_FILE_NAME}"
|
||||
# echo "JAR path: $JAR_PATH"
|
||||
|
||||
JAR_FILE_LOCAL="$HOME/.m2/repository/$JAR_PATH";
|
||||
# echo "Local JAR file path: $JAR_FILE_LOCAL";
|
||||
if [ -f "$JAR_FILE_LOCAL" ]; then
|
||||
# echo "Using JAR file locally at $JAR_FILE_LOCAL"
|
||||
java -jar $JAR_FILE_LOCAL "$@"
|
||||
exit 0;
|
||||
fi
|
||||
|
||||
DOWNLOAD_DIR=./target
|
||||
COMMAND_FILE="${DOWNLOAD_DIR}/${JAR_FILE_NAME}"
|
||||
if [ ! -f "$COMMAND_FILE" ]; then
|
||||
mkdir -p $DOWNLOAD_DIR
|
||||
./mvnw org.apache.maven.plugins:maven-dependency-plugin:3.0.2:get -DgroupId=org.apereo.cas -DartifactId=cas-server-support-shell -Dversion=$CAS_VERSION -Dpackaging=jar -DartifactItem.outputDirectory=$DOWNLOAD_DIR -DremoteRepositories=central::default::http://repo1.maven.apache.org/maven2,snapshots::::https://oss.sonatype.org/content/repositories/snapshots -Dtransitive=false
|
||||
./mvnw org.apache.maven.plugins:maven-dependency-plugin:3.0.2:copy -Dmdep.useBaseVersion=true -Dartifact=org.apereo.cas:cas-server-support-shell:$CAS_VERSION:jar -DoutputDirectory=$DOWNLOAD_DIR
|
||||
fi
|
||||
java -jar $COMMAND_FILE "$@"
|
||||
exit 0;
|
||||
|
||||
}
|
||||
|
||||
if [ $# -eq 0 ]; then
|
||||
echo -e "No commands provided. Defaulting to [run]\n"
|
||||
run
|
||||
exit 0
|
||||
fi
|
||||
|
||||
|
||||
case "$1" in
|
||||
"copy")
|
||||
copy
|
||||
copy
|
||||
;;
|
||||
"clean")
|
||||
shift
|
||||
clean "$@"
|
||||
;;
|
||||
;;
|
||||
"package")
|
||||
shift
|
||||
package "$@"
|
||||
|
@ -87,11 +167,23 @@ case "$1" in
|
|||
"run")
|
||||
run "$@"
|
||||
;;
|
||||
"runalone")
|
||||
runalone "$@"
|
||||
;;
|
||||
"listviews")
|
||||
listviews "$@"
|
||||
;;
|
||||
"gencert")
|
||||
gencert "$@"
|
||||
;;
|
||||
"getview")
|
||||
getview "$@"
|
||||
;;
|
||||
"cli")
|
||||
shift
|
||||
cli "$@"
|
||||
;;
|
||||
*)
|
||||
help
|
||||
;;
|
||||
esac
|
||||
|
||||
|
|
|
@ -92,7 +92,7 @@
|
|||
<AsyncLogger name="org.openid4java" level="warn" />
|
||||
<AsyncLogger name="org.ldaptive" level="warn" />
|
||||
<AsyncLogger name="com.hazelcast" level="warn" />
|
||||
<AsyncLogger name="org.jasig.spring" level="warn" />
|
||||
<AsyncLogger name="org.apereo.spring" level="warn" />
|
||||
|
||||
<!-- Log perf stats only to perfStats.log -->
|
||||
<AsyncLogger name="perfStatsLogger" level="info" additivity="false" includeLocation="true">
|
||||
|
|
Binary file not shown.
|
@ -1 +1,3 @@
|
|||
distributionUrl=https\://repository.apache.org/content/repositories/releases/org/apache/maven/apache-maven/3.5.0/apache-maven-3.5.0-bin.zip
|
||||
#Maven download properties
|
||||
#Fri Dec 01 21:35:11 MST 2017
|
||||
distributionUrl=https\://repository.apache.org/content/repositories/releases/org/apache/maven/apache-maven/3.5.2/apache-maven-3.5.2-bin.zip
|
||||
|
|
|
@ -7,37 +7,23 @@
|
|||
<artifactId>cas-server</artifactId>
|
||||
<packaging>war</packaging>
|
||||
<version>1.0</version>
|
||||
|
||||
<parent>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-parent</artifactId>
|
||||
<version>${org.springframework.boot.spring-boot-starter-parent.version}</version>
|
||||
<relativePath/> <!-- lookup parent from repository -->
|
||||
</parent>
|
||||
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.apereo.cas</groupId>
|
||||
<artifactId>cas-server-webapp${app.server}</artifactId>
|
||||
<version>${cas.version}</version>
|
||||
<type>war</type>
|
||||
<scope>runtime</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apereo.cas</groupId>
|
||||
<artifactId>cas-server-support-json-service-registry</artifactId>
|
||||
<version>${cas.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apereo.cas</groupId>
|
||||
<artifactId>cas-server-support-jdbc</artifactId>
|
||||
<version>${cas.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apereo.cas</groupId>
|
||||
<artifactId>cas-server-support-jdbc-drivers</artifactId>
|
||||
<version>${cas.version}</version>
|
||||
</dependency>
|
||||
<groupId>org.apereo.cas</groupId>
|
||||
<artifactId>cas-server-support-json-service-registry</artifactId>
|
||||
<version>${cas.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apereo.cas</groupId>
|
||||
<artifactId>cas-server-support-jdbc</artifactId>
|
||||
<version>${cas.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apereo.cas</groupId>
|
||||
<artifactId>cas-server-support-jdbc-drivers</artifactId>
|
||||
<version>${cas.version}</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
|
@ -45,7 +31,7 @@
|
|||
<plugin>
|
||||
<groupId>com.rimerosolutions.maven.plugins</groupId>
|
||||
<artifactId>wrapper-maven-plugin</artifactId>
|
||||
<version>${wrapper-maven-plugin.version}</version>
|
||||
<version>0.0.4</version>
|
||||
<configuration>
|
||||
<verifyDownload>true</verifyDownload>
|
||||
<checksumAlgorithm>MD5</checksumAlgorithm>
|
||||
|
@ -56,22 +42,30 @@
|
|||
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||
<version>${springboot.version}</version>
|
||||
<configuration>
|
||||
<mainClass>org.springframework.boot.loader.WarLauncher</mainClass>
|
||||
<mainClass>${mainClassName}</mainClass>
|
||||
<addResources>true</addResources>
|
||||
<executable>${isExecutable}</executable>
|
||||
<layout>WAR</layout>
|
||||
</configuration>
|
||||
<executions>
|
||||
<execution>
|
||||
<goals>
|
||||
<goal>repackage</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-war-plugin</artifactId>
|
||||
<version>${maven-war-plugin.version}</version>
|
||||
<version>2.6</version>
|
||||
<configuration>
|
||||
<warName>cas</warName>
|
||||
<failOnMissingWebXml>false</failOnMissingWebXml>
|
||||
<recompressZippedFiles>false</recompressZippedFiles>
|
||||
<archive>
|
||||
<compress>false</compress>
|
||||
<manifestFile>${project.build.directory}/war/work/org.apereo.cas/cas-server-webapp${app.server}/META-INF/MANIFEST.MF
|
||||
</manifestFile>
|
||||
<manifestFile>${manifestFileToUse}</manifestFile>
|
||||
</archive>
|
||||
<overlays>
|
||||
<overlay>
|
||||
|
@ -84,47 +78,26 @@
|
|||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<version>${maven-compiler-plugin.version}</version>
|
||||
<configuration>
|
||||
<source>${maven.compiler.source}</source>
|
||||
<target>${maven.compiler.target}</target>
|
||||
</configuration>
|
||||
<version>3.3</version>
|
||||
</plugin>
|
||||
</plugins>
|
||||
<finalName>cas</finalName>
|
||||
</build>
|
||||
|
||||
<profiles>
|
||||
<profile>
|
||||
<activation>
|
||||
<activeByDefault>false</activeByDefault>
|
||||
</activation>
|
||||
<id>pgp</id>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>com.github.s4u.plugins</groupId>
|
||||
<artifactId>pgpverify-maven-plugin</artifactId>
|
||||
<version>${pgpverify-maven-plugin.version}</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<goals>
|
||||
<goal>check</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
<configuration>
|
||||
<pgpKeyServer>hkp://pool.sks-keyservers.net</pgpKeyServer>
|
||||
<pgpKeysCachePath>${settings.localRepository}/pgpkeys-cache</pgpKeysCachePath>
|
||||
<scope>test</scope>
|
||||
<verifyPomFiles>true</verifyPomFiles>
|
||||
<failNoSignature>false</failNoSignature>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</profile>
|
||||
</profiles>
|
||||
<properties>
|
||||
<cas.version>5.3.0-SNAPSHOT</cas.version>
|
||||
<springboot.version>1.5.13.RELEASE</springboot.version>
|
||||
<!-- app.server could be -jetty, -undertow, -tomcat, or blank if you plan to provide appserver -->
|
||||
<app.server>-tomcat</app.server>
|
||||
|
||||
<mainClassName>org.springframework.boot.loader.WarLauncher</mainClassName>
|
||||
<isExecutable>false</isExecutable>
|
||||
<manifestFileToUse>${project.build.directory}/war/work/org.apereo.cas/cas-server-webapp${app.server}/META-INF/MANIFEST.MF</manifestFileToUse>
|
||||
|
||||
<maven.compiler.source>1.8</maven.compiler.source>
|
||||
<maven.compiler.target>1.8</maven.compiler.target>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
</properties>
|
||||
|
||||
<repositories>
|
||||
<repository>
|
||||
|
@ -151,25 +124,110 @@
|
|||
<id>shibboleth-releases</id>
|
||||
<url>https://build.shibboleth.net/nexus/content/repositories/releases</url>
|
||||
</repository>
|
||||
<repository>
|
||||
<id>spring-milestones</id>
|
||||
<url>https://repo.spring.io/milestone</url>
|
||||
</repository>
|
||||
</repositories>
|
||||
|
||||
<properties>
|
||||
<cas.version>5.1.4</cas.version>
|
||||
<springboot.version>1.5.3.RELEASE</springboot.version>
|
||||
<!-- app.server could be -jetty, -undertow, -tomcat, or blank if you plan to provide appserver -->
|
||||
<app.server>-tomcat</app.server>
|
||||
<maven.compiler.source>1.8</maven.compiler.source>
|
||||
<maven.compiler.target>1.8</maven.compiler.target>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<org.springframework.boot.spring-boot-starter-parent.version>2.0.0.M7</org.springframework.boot.spring-boot-starter-parent.version>
|
||||
<wrapper-maven-plugin.version>0.0.4</wrapper-maven-plugin.version>
|
||||
<maven-war-plugin.version>2.6</maven-war-plugin.version>
|
||||
<maven-compiler-plugin.version>3.7.0</maven-compiler-plugin.version>
|
||||
<pgpverify-maven-plugin.version>1.1.0</pgpverify-maven-plugin.version>
|
||||
</properties>
|
||||
<profiles>
|
||||
<profile>
|
||||
<activation>
|
||||
<activeByDefault>true</activeByDefault>
|
||||
</activation>
|
||||
<id>default</id>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.apereo.cas</groupId>
|
||||
<artifactId>cas-server-webapp${app.server}</artifactId>
|
||||
<version>${cas.version}</version>
|
||||
<type>war</type>
|
||||
<scope>runtime</scope>
|
||||
</dependency>
|
||||
<!--
|
||||
...Additional dependencies may be placed here...
|
||||
-->
|
||||
</dependencies>
|
||||
</profile>
|
||||
|
||||
</project>
|
||||
<profile>
|
||||
<activation>
|
||||
<activeByDefault>false</activeByDefault>
|
||||
</activation>
|
||||
<id>exec</id>
|
||||
<properties>
|
||||
<mainClassName>org.apereo.cas.web.CasWebApplication</mainClassName>
|
||||
<isExecutable>true</isExecutable>
|
||||
<manifestFileToUse></manifestFileToUse>
|
||||
</properties>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>com.soebes.maven.plugins</groupId>
|
||||
<artifactId>echo-maven-plugin</artifactId>
|
||||
<version>0.3.0</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<phase>prepare-package</phase>
|
||||
<goals>
|
||||
<goal>echo</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
<configuration>
|
||||
<echos>
|
||||
<echo>Executable profile to make the generated CAS web application executable.</echo>
|
||||
</echos>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</profile>
|
||||
|
||||
<profile>
|
||||
<activation>
|
||||
<activeByDefault>false</activeByDefault>
|
||||
</activation>
|
||||
<id>bootiful</id>
|
||||
<properties>
|
||||
<app.server>-tomcat</app.server>
|
||||
<isExecutable>false</isExecutable>
|
||||
</properties>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.apereo.cas</groupId>
|
||||
<artifactId>cas-server-webapp${app.server}</artifactId>
|
||||
<version>${cas.version}</version>
|
||||
<type>war</type>
|
||||
<scope>runtime</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</profile>
|
||||
|
||||
<profile>
|
||||
<activation>
|
||||
<activeByDefault>false</activeByDefault>
|
||||
</activation>
|
||||
<id>pgp</id>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>com.github.s4u.plugins</groupId>
|
||||
<artifactId>pgpverify-maven-plugin</artifactId>
|
||||
<version>1.1.0</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<goals>
|
||||
<goal>check</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
<configuration>
|
||||
<pgpKeyServer>hkp://pool.sks-keyservers.net</pgpKeyServer>
|
||||
<pgpKeysCachePath>${settings.localRepository}/pgpkeys-cache</pgpKeysCachePath>
|
||||
<scope>test</scope>
|
||||
<verifyPomFiles>true</verifyPomFiles>
|
||||
<failNoSignature>false</failNoSignature>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</profile>
|
||||
</profiles>
|
||||
</project>
|
||||
|
|
|
@ -43,7 +43,7 @@ spring.http.encoding.force=true
|
|||
##
|
||||
#CAS CONFIG LOCATION
|
||||
#
|
||||
cas.standalone.config=classpath:/etc/cas/config
|
||||
standalone.config=classpath:/etc/cas/config
|
||||
|
||||
|
||||
##
|
||||
|
@ -109,7 +109,7 @@ cas.authn.jdbc.query[0].sql=SELECT * FROM users WHERE email = ?
|
|||
cas.authn.jdbc.query[0].url=jdbc:mysql://127.0.0.1:3306/test?useUnicode=true&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=UTC
|
||||
cas.authn.jdbc.query[0].dialect=org.hibernate.dialect.MySQLDialect
|
||||
cas.authn.jdbc.query[0].user=root
|
||||
cas.authn.jdbc.query[0].password=root
|
||||
cas.authn.jdbc.query[0].password=1234
|
||||
cas.authn.jdbc.query[0].ddlAuto=none
|
||||
#cas.authn.jdbc.query[0].driverClass=com.mysql.jdbc.Driver
|
||||
cas.authn.jdbc.query[0].driverClass=com.mysql.cj.jdbc.Driver
|
||||
|
|
|
@ -3,38 +3,7 @@ cas.server.prefix: https://localhost:643/cas
|
|||
|
||||
cas.adminPagesSecurity.ip=127\.0\.0\.1
|
||||
|
||||
logging.config: file:/etc/cas/config/log4j2.xml
|
||||
|
||||
cas.serviceRegistry.initFromJson=true
|
||||
cas.serviceRegistry.config.location=classpath:/services
|
||||
|
||||
cas.authn.accept.users=
|
||||
cas.authn.accept.name=
|
||||
|
||||
|
||||
#CAS Database Authentication Property
|
||||
|
||||
# cas.authn.jdbc.query[0].healthQuery=
|
||||
# cas.authn.jdbc.query[0].isolateInternalQueries=false
|
||||
# cas.authn.jdbc.query[0].failFast=true
|
||||
# cas.authn.jdbc.query[0].isolationLevelName=ISOLATION_READ_COMMITTED
|
||||
# cas.authn.jdbc.query[0].leakThreshold=10
|
||||
# cas.authn.jdbc.query[0].propagationBehaviorName=PROPAGATION_REQUIRED
|
||||
# cas.authn.jdbc.query[0].batchSize=1
|
||||
# cas.authn.jdbc.query[0].maxAgeDays=180
|
||||
# cas.authn.jdbc.query[0].autocommit=false
|
||||
# cas.authn.jdbc.query[0].idleTimeout=5000
|
||||
# cas.authn.jdbc.query[0].credentialCriteria=
|
||||
# cas.authn.jdbc.query[0].name=
|
||||
# cas.authn.jdbc.query[0].order=0
|
||||
# cas.authn.jdbc.query[0].dataSourceName=
|
||||
# cas.authn.jdbc.query[0].dataSourceProxy=false
|
||||
# cas.authn.jdbc.query[0].fieldExpired=
|
||||
# cas.authn.jdbc.query[0].fieldDisabled=
|
||||
# cas.authn.jdbc.query[0].principalAttributeList=sn,cn:commonName,givenName
|
||||
# cas.authn.jdbc.query[0].passwordEncoder.type=NONE|DEFAULT|STANDARD|BCRYPT|SCRYPT|PBKDF2|com.example.CustomPasswordEncoder
|
||||
# cas.authn.jdbc.query[0].passwordEncoder.characterEncoding=
|
||||
# cas.authn.jdbc.query[0].passwordEncoder.encodingAlgorithm=
|
||||
# cas.authn.jdbc.query[0].passwordEncoder.secret=
|
||||
# cas.authn.jdbc.query[0].passwordEncoder.strength=16
|
||||
# cas.authn.jdbc.query[0].principalTransformation.suffix=
|
||||
# cas.authn.jdbc.query[0].principalTransformation.caseConversion=NONE|UPPERCASE|LOWERCASE
|
||||
# cas.authn.jdbc.query[0].principalTransformation.prefix=
|
||||
cas.serviceRegistry.config.location=classpath:/services
|
|
@ -92,7 +92,7 @@
|
|||
<AsyncLogger name="org.openid4java" level="warn" />
|
||||
<AsyncLogger name="org.ldaptive" level="warn" />
|
||||
<AsyncLogger name="com.hazelcast" level="warn" />
|
||||
<AsyncLogger name="org.jasig.spring" level="warn" />
|
||||
<AsyncLogger name="org.apereo.spring" level="warn" />
|
||||
|
||||
<!-- Log perf stats only to perfStats.log -->
|
||||
<AsyncLogger name="perfStatsLogger" level="info" additivity="false" includeLocation="true">
|
||||
|
|
Binary file not shown.
Binary file not shown.
|
@ -0,0 +1,117 @@
|
|||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!-- Specify the refresh internal in seconds. -->
|
||||
<Configuration monitorInterval="5" packages="org.apereo.cas.logging">
|
||||
<Properties>
|
||||
<!--
|
||||
Default log directory is the current directory but that can be overridden with -Dcas.log.dir=<logdir>
|
||||
Or you can change this property to a new default
|
||||
-->
|
||||
<Property name="cas.log.dir" >.</Property>
|
||||
<!-- To see more CAS specific logging, adjust this property to info or debug or run server with -Dcas.log.leve=debug -->
|
||||
<Property name="cas.log.level" >warn</Property>
|
||||
</Properties>
|
||||
<Appenders>
|
||||
<Console name="console" target="SYSTEM_OUT">
|
||||
<PatternLayout pattern="%d %p [%c] - <%m>%n"/>
|
||||
</Console>
|
||||
<RollingFile name="file" fileName="${sys:cas.log.dir}/cas.log" append="true"
|
||||
filePattern="${sys:cas.log.dir}/cas-%d{yyyy-MM-dd-HH}-%i.log">
|
||||
<PatternLayout pattern="%d %p [%c] - <%m>%n"/>
|
||||
<Policies>
|
||||
<OnStartupTriggeringPolicy />
|
||||
<SizeBasedTriggeringPolicy size="10 MB"/>
|
||||
<TimeBasedTriggeringPolicy />
|
||||
</Policies>
|
||||
</RollingFile>
|
||||
<RollingFile name="auditlogfile" fileName="${sys:cas.log.dir}/cas_audit.log" append="true"
|
||||
filePattern="${sys:cas.log.dir}/cas_audit-%d{yyyy-MM-dd-HH}-%i.log">
|
||||
<PatternLayout pattern="%d %p [%c] - %m%n"/>
|
||||
<Policies>
|
||||
<OnStartupTriggeringPolicy />
|
||||
<SizeBasedTriggeringPolicy size="10 MB"/>
|
||||
<TimeBasedTriggeringPolicy />
|
||||
</Policies>
|
||||
</RollingFile>
|
||||
|
||||
<RollingFile name="perfFileAppender" fileName="${sys:cas.log.dir}/perfStats.log" append="true"
|
||||
filePattern="${sys:cas.log.dir}/perfStats-%d{yyyy-MM-dd-HH}-%i.log">
|
||||
<PatternLayout pattern="%m%n"/>
|
||||
<Policies>
|
||||
<OnStartupTriggeringPolicy />
|
||||
<SizeBasedTriggeringPolicy size="10 MB"/>
|
||||
<TimeBasedTriggeringPolicy />
|
||||
</Policies>
|
||||
</RollingFile>
|
||||
|
||||
<CasAppender name="casAudit">
|
||||
<AppenderRef ref="auditlogfile" />
|
||||
</CasAppender>
|
||||
<CasAppender name="casFile">
|
||||
<AppenderRef ref="file" />
|
||||
</CasAppender>
|
||||
<CasAppender name="casConsole">
|
||||
<AppenderRef ref="console" />
|
||||
</CasAppender>
|
||||
<CasAppender name="casPerf">
|
||||
<AppenderRef ref="perfFileAppender" />
|
||||
</CasAppender>
|
||||
</Appenders>
|
||||
<Loggers>
|
||||
<!-- If adding a Logger with level set higher than warn, make category as selective as possible -->
|
||||
<!-- Loggers inherit appenders from Root Logger unless additivity is false -->
|
||||
<AsyncLogger name="org.apereo" level="${sys:cas.log.level}" includeLocation="true"/>
|
||||
<AsyncLogger name="org.apereo.services.persondir" level="${sys:cas.log.level}" includeLocation="true"/>
|
||||
<AsyncLogger name="org.apereo.cas.web.flow" level="info" includeLocation="true"/>
|
||||
<AsyncLogger name="org.apache" level="warn" />
|
||||
<AsyncLogger name="org.apache.http" level="error" />
|
||||
<AsyncLogger name="org.springframework" level="warn" />
|
||||
<AsyncLogger name="org.springframework.cloud.server" level="warn" />
|
||||
<AsyncLogger name="org.springframework.cloud.client" level="warn" />
|
||||
<AsyncLogger name="org.springframework.cloud.bus" level="warn" />
|
||||
<AsyncLogger name="org.springframework.aop" level="warn" />
|
||||
<AsyncLogger name="org.springframework.boot" level="warn" />
|
||||
<AsyncLogger name="org.springframework.boot.actuate.autoconfigure" level="warn" />
|
||||
<AsyncLogger name="org.springframework.webflow" level="warn" />
|
||||
<AsyncLogger name="org.springframework.session" level="warn" />
|
||||
<AsyncLogger name="org.springframework.amqp" level="error" />
|
||||
<AsyncLogger name="org.springframework.integration" level="warn" />
|
||||
<AsyncLogger name="org.springframework.messaging" level="warn" />
|
||||
<AsyncLogger name="org.springframework.web" level="warn" />
|
||||
<AsyncLogger name="org.springframework.orm.jpa" level="warn" />
|
||||
<AsyncLogger name="org.springframework.scheduling" level="warn" />
|
||||
<AsyncLogger name="org.springframework.context.annotation" level="error" />
|
||||
<AsyncLogger name="org.springframework.boot.devtools" level="error" />
|
||||
<AsyncLogger name="org.springframework.web.socket" level="warn" />
|
||||
<AsyncLogger name="org.thymeleaf" level="warn" />
|
||||
<AsyncLogger name="org.pac4j" level="warn" />
|
||||
<AsyncLogger name="org.opensaml" level="warn"/>
|
||||
<AsyncLogger name="net.sf.ehcache" level="warn" />
|
||||
<AsyncLogger name="com.couchbase" level="warn" includeLocation="true"/>
|
||||
<AsyncLogger name="com.ryantenney.metrics" level="warn" />
|
||||
<AsyncLogger name="net.jradius" level="warn" />
|
||||
<AsyncLogger name="org.openid4java" level="warn" />
|
||||
<AsyncLogger name="org.ldaptive" level="warn" />
|
||||
<AsyncLogger name="com.hazelcast" level="warn" />
|
||||
<AsyncLogger name="org.apereo.spring" level="warn" />
|
||||
|
||||
<!-- Log perf stats only to perfStats.log -->
|
||||
<AsyncLogger name="perfStatsLogger" level="info" additivity="false" includeLocation="true">
|
||||
<AppenderRef ref="casPerf"/>
|
||||
</AsyncLogger>
|
||||
|
||||
<!-- Log audit to all root appenders, and also to audit log (additivity is not false) -->
|
||||
<AsyncLogger name="org.apereo.inspektr.audit.support" level="info" includeLocation="true" >
|
||||
<AppenderRef ref="casAudit"/>
|
||||
</AsyncLogger>
|
||||
|
||||
<!-- All Loggers inherit appenders specified here, unless additivity="false" on the Logger -->
|
||||
<AsyncRoot level="warn">
|
||||
<AppenderRef ref="casFile"/>
|
||||
<!--
|
||||
For deployment to an application server running as service,
|
||||
delete the casConsole appender below
|
||||
-->
|
||||
<AppenderRef ref="casConsole"/>
|
||||
</AsyncRoot>
|
||||
</Loggers>
|
||||
</Configuration>
|
11
cdi/pom.xml
11
cdi/pom.xml
|
@ -8,16 +8,12 @@
|
|||
|
||||
<parent>
|
||||
<groupId>com.baeldung</groupId>
|
||||
<artifactId>parent-modules</artifactId>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
<artifactId>parent-spring-4</artifactId>
|
||||
<version>0.0.1-SNAPSHOT</version>
|
||||
<relativePath>../parent-spring-4</relativePath>
|
||||
</parent>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.springframework</groupId>
|
||||
<artifactId>spring-core</artifactId>
|
||||
<version>${spring.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework</groupId>
|
||||
<artifactId>spring-context</artifactId>
|
||||
|
@ -42,7 +38,6 @@
|
|||
</dependencies>
|
||||
|
||||
<properties>
|
||||
<spring.version>4.3.4.RELEASE</spring.version>
|
||||
<aspectjweaver.version>1.8.9</aspectjweaver.version>
|
||||
<weld-se-core.version>2.4.1.Final</weld-se-core.version>
|
||||
</properties>
|
||||
|
|
|
@ -28,12 +28,6 @@
|
|||
<artifactId>groovy-sql</artifactId>
|
||||
<version>${groovy-sql.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.junit.jupiter</groupId>
|
||||
<artifactId>junit-jupiter-engine</artifactId>
|
||||
<version>${junit.jupiter.version}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.junit.platform</groupId>
|
||||
<artifactId>junit-platform-runner</artifactId>
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
|
||||
### Relevant Articles:
|
||||
|
||||
- [Java 10 LocalVariable Type-Inference](http://www.baeldung.com/java-10-local-variable-type-inference)
|
||||
- [Guide to Java 10](http://www.baeldung.com/java-10-overview)
|
|
@ -50,4 +50,6 @@
|
|||
- [Filtering Kotlin Collections](http://www.baeldung.com/kotlin-filter-collection)
|
||||
- [How to Find an Element in a List with Java](http://www.baeldung.com/find-list-element-java)
|
||||
- [Measure Elapsed Time in Java](http://www.baeldung.com/java-measure-elapsed-time)
|
||||
- [Java Optional – orElse() vs orElseGet()](http://www.baeldung.com/java-optional-or-else-vs-or-else-get)
|
||||
- [An Introduction to Java.util.Hashtable Class](http://www.baeldung.com/java-hash-table)
|
||||
|
||||
|
|
|
@ -9,17 +9,12 @@
|
|||
|
||||
<parent>
|
||||
<groupId>com.baeldung</groupId>
|
||||
<artifactId>parent-modules</artifactId>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
<artifactId>parent-java</artifactId>
|
||||
<version>0.0.1-SNAPSHOT</version>
|
||||
<relativePath>../parent-java</relativePath>
|
||||
</parent>
|
||||
|
||||
<dependencies>
|
||||
<!-- utils -->
|
||||
<dependency>
|
||||
<groupId>com.google.guava</groupId>
|
||||
<artifactId>guava</artifactId>
|
||||
<version>${guava.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.commons</groupId>
|
||||
<artifactId>commons-collections4</artifactId>
|
||||
|
@ -200,6 +195,16 @@
|
|||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<version>3.1</version>
|
||||
<configuration>
|
||||
<source>1.8</source>
|
||||
<target>1.8</target>
|
||||
<compilerArgument>-parameters</compilerArgument>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||
|
|
|
@ -0,0 +1,28 @@
|
|||
package com.baeldung.hashtable;
|
||||
|
||||
public class Word {
|
||||
private String name;
|
||||
|
||||
public Word(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public boolean equals(Object o) {
|
||||
if (o == this)
|
||||
return true;
|
||||
if (!(o instanceof Word))
|
||||
return false;
|
||||
|
||||
Word word = (Word) o;
|
||||
return word.getName().equals(this.name) ? true : false;
|
||||
|
||||
}
|
||||
|
||||
public int hashCode() {
|
||||
return name.hashCode();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,34 @@
|
|||
package com.baeldung.optional;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
import java.util.Random;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
public class OrElseAndOrElseGet {
|
||||
|
||||
public static List<String> names = Arrays.asList("John", "Jones", "Kelly", "Cristina", "Raven");
|
||||
|
||||
private static final Logger LOG = LoggerFactory.getLogger(OrElseAndOrElseGet.class);
|
||||
|
||||
public String getRandomName() {
|
||||
LOG.info("getRandomName() method - start");
|
||||
Random random = new Random();
|
||||
int index = random.nextInt(5);
|
||||
LOG.info("getRandomName() method - end");
|
||||
return names.get(index);
|
||||
}
|
||||
|
||||
public String getNameUsingOrElse(String name) {
|
||||
return Optional.ofNullable(name)
|
||||
.orElse(getRandomName());
|
||||
}
|
||||
|
||||
public String getNameUsingOrElseGet(String name) {
|
||||
return Optional.ofNullable(name)
|
||||
.orElseGet(() -> getRandomName());
|
||||
}
|
||||
}
|
|
@ -0,0 +1,37 @@
|
|||
package com.baeldung.optional;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
import org.openjdk.jmh.annotations.Benchmark;
|
||||
import org.openjdk.jmh.annotations.BenchmarkMode;
|
||||
import org.openjdk.jmh.annotations.Fork;
|
||||
import org.openjdk.jmh.annotations.Mode;
|
||||
import org.openjdk.jmh.annotations.OutputTimeUnit;
|
||||
import org.openjdk.jmh.annotations.Scope;
|
||||
import org.openjdk.jmh.annotations.State;
|
||||
import org.openjdk.jmh.runner.RunnerException;
|
||||
|
||||
@Fork(1)
|
||||
@State(Scope.Benchmark)
|
||||
@BenchmarkMode(Mode.AverageTime)
|
||||
@OutputTimeUnit(TimeUnit.NANOSECONDS)
|
||||
public class OrElseAndOrElseGetBenchmarkRunner {
|
||||
|
||||
private OrElseAndOrElseGet orElsevsOrElseGet = new OrElseAndOrElseGet();
|
||||
|
||||
public static void main(String[] args) throws RunnerException, IOException {
|
||||
org.openjdk.jmh.Main.main(args);
|
||||
}
|
||||
|
||||
@Benchmark
|
||||
public String orElseBenchmark() {
|
||||
return orElsevsOrElseGet.getNameUsingOrElse("baeldung");
|
||||
}
|
||||
|
||||
@Benchmark
|
||||
public String orElseGetBenchmark() {
|
||||
return orElsevsOrElseGet.getNameUsingOrElseGet("baeldung");
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,18 @@
|
|||
package com.baeldung.reflect;
|
||||
|
||||
public class Person {
|
||||
|
||||
private String fullName;
|
||||
|
||||
public Person(String fullName) {
|
||||
this.fullName = fullName;
|
||||
}
|
||||
|
||||
public void setFullName(String fullName) {
|
||||
this.fullName = fullName;
|
||||
}
|
||||
|
||||
public String getFullName() {
|
||||
return fullName;
|
||||
}
|
||||
}
|
|
@ -9,7 +9,7 @@ import org.junit.Test;
|
|||
|
||||
import com.baeldung.counter.CounterUtil.MutableInteger;
|
||||
|
||||
public class CounterTest {
|
||||
public class CounterUnitTest {
|
||||
|
||||
@Test
|
||||
public void whenMapWithWrapperAsCounter_runsSuccessfully() {
|
|
@ -7,7 +7,7 @@ import java.util.List;
|
|||
|
||||
import org.junit.Test;
|
||||
|
||||
public class FindACustomerInGivenListTest {
|
||||
public class FindACustomerInGivenListUnitTest {
|
||||
|
||||
private static List<Customer> customers = new ArrayList<>();
|
||||
|
|
@ -0,0 +1,274 @@
|
|||
package com.baeldung.hashtable;
|
||||
|
||||
import java.util.ConcurrentModificationException;
|
||||
import java.util.Enumeration;
|
||||
import java.util.Hashtable;
|
||||
import java.util.Iterator;
|
||||
import java.util.Map;
|
||||
|
||||
import static org.junit.Assert.*;
|
||||
import static org.hamcrest.Matchers.*;
|
||||
import org.junit.Test;
|
||||
|
||||
public class HashtableUnitTest {
|
||||
|
||||
@Test
|
||||
public void whenPutAndGet_thenReturnsValue() {
|
||||
Hashtable<Word, String> table = new Hashtable<Word, String>();
|
||||
|
||||
Word word = new Word("cat");
|
||||
table.put(word, "an animal");
|
||||
|
||||
String definition = table.get(word);
|
||||
|
||||
assertEquals("an animal", definition);
|
||||
|
||||
definition = table.remove(word);
|
||||
|
||||
assertEquals("an animal", definition);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void whenThesameInstanceOfKey_thenReturnsValue() {
|
||||
Hashtable<Word, String> table = new Hashtable<Word, String>();
|
||||
Word word = new Word("cat");
|
||||
table.put(word, "an animal");
|
||||
String extracted = table.get(word);
|
||||
assertEquals("an animal", extracted);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void whenEqualsOverridden_thenReturnsValue() {
|
||||
Hashtable<Word, String> table = new Hashtable<Word, String>();
|
||||
Word word = new Word("cat");
|
||||
table.put(word, "an animal");
|
||||
String extracted = table.get(new Word("cat"));
|
||||
assertEquals("an animal", extracted);
|
||||
}
|
||||
|
||||
@Test(expected = NullPointerException.class)
|
||||
public void whenNullKey_thenException() {
|
||||
Hashtable<Word, String> table = new Hashtable<Word, String>();
|
||||
table.put(null, "an animal");
|
||||
}
|
||||
|
||||
@Test(expected = ConcurrentModificationException.class)
|
||||
public void whenIterate_thenFailFast() {
|
||||
|
||||
Hashtable<Word, String> table = new Hashtable<Word, String>();
|
||||
table.put(new Word("cat"), "an animal");
|
||||
table.put(new Word("dog"), "another animal");
|
||||
|
||||
Iterator<Word> it = table.keySet().iterator();
|
||||
System.out.println("iterator created");
|
||||
|
||||
table.remove(new Word("dog"));
|
||||
System.out.println("element removed");
|
||||
|
||||
while (it.hasNext()) {
|
||||
Word key = it.next();
|
||||
System.out.println(table.get(key));
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
public void whenEnumerate_thenNotFailFast() {
|
||||
|
||||
Hashtable<Word, String> table = new Hashtable<Word, String>();
|
||||
table.put(new Word("1"), "one");
|
||||
table.put(new Word("2"), "two");
|
||||
table.put(new Word("3"), "three");
|
||||
table.put(new Word("4"), "four");
|
||||
table.put(new Word("5"), "five");
|
||||
table.put(new Word("6"), "six");
|
||||
table.put(new Word("7"), "seven");
|
||||
table.put(new Word("8"), "eight");
|
||||
|
||||
Enumeration<Word> enumKey = table.keys();
|
||||
System.out.println("Enumeration created");
|
||||
table.remove(new Word("1"));
|
||||
System.out.println("element removed");
|
||||
while (enumKey.hasMoreElements()) {
|
||||
Word key = enumKey.nextElement();
|
||||
System.out.println(table.get(key));
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
public void whenAddElements_thenIterationOrderUnpredicable() {
|
||||
|
||||
Hashtable<Word, String> table = new Hashtable<Word, String>();
|
||||
table.put(new Word("1"), "one");
|
||||
table.put(new Word("2"), "two");
|
||||
table.put(new Word("3"), "three");
|
||||
table.put(new Word("4"), "four");
|
||||
table.put(new Word("5"), "five");
|
||||
table.put(new Word("6"), "six");
|
||||
table.put(new Word("7"), "seven");
|
||||
table.put(new Word("8"), "eight");
|
||||
|
||||
Iterator<Map.Entry<Word, String>> it = table.entrySet().iterator();
|
||||
while (it.hasNext()) {
|
||||
Map.Entry<Word, String> entry = it.next();
|
||||
System.out.println(entry.getValue());
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
public void whenGetOrDefault_thenDefaultGot() {
|
||||
|
||||
Hashtable<Word, String> table = new Hashtable<Word, String>();
|
||||
table.put(new Word("cat"), "a small domesticated carnivorous mammal");
|
||||
Word key = new Word("dog");
|
||||
String definition;
|
||||
|
||||
// old way
|
||||
/* if (table.containsKey(key)) {
|
||||
definition = table.get(key);
|
||||
} else {
|
||||
definition = "not found";
|
||||
}*/
|
||||
|
||||
// new way
|
||||
definition = table.getOrDefault(key, "not found");
|
||||
|
||||
assertThat(definition, is("not found"));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void whenPutifAbsent_thenNotRewritten() {
|
||||
|
||||
Hashtable<Word, String> table = new Hashtable<Word, String>();
|
||||
table.put(new Word("cat"), "a small domesticated carnivorous mammal");
|
||||
|
||||
String definition = "an animal";
|
||||
// old way
|
||||
/* if (!table.containsKey(new Word("cat"))) {
|
||||
table.put(new Word("cat"), definition);
|
||||
}*/
|
||||
// new way
|
||||
table.putIfAbsent(new Word("cat"), definition);
|
||||
|
||||
assertThat(table.get(new Word("cat")), is("a small domesticated carnivorous mammal"));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void whenRemovePair_thenCheckKeyAndValue() {
|
||||
|
||||
Hashtable<Word, String> table = new Hashtable<Word, String>();
|
||||
table.put(new Word("cat"), "a small domesticated carnivorous mammal");
|
||||
|
||||
// old way
|
||||
/* if (table.get(new Word("cat")).equals("an animal")) {
|
||||
table.remove(new Word("cat"));
|
||||
}*/
|
||||
|
||||
// new way
|
||||
boolean result = table.remove(new Word("cat"), "an animal");
|
||||
|
||||
assertThat(result, is(false));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void whenReplacePair_thenValueChecked() {
|
||||
|
||||
Hashtable<Word, String> table = new Hashtable<Word, String>();
|
||||
table.put(new Word("cat"), "a small domesticated carnivorous mammal");
|
||||
|
||||
String definition = "an animal";
|
||||
|
||||
// old way
|
||||
/* if (table.containsKey(new Word("cat")) && table.get(new Word("cat")).equals("a small domesticated carnivorous mammal")) {
|
||||
table.put(new Word("cat"), definition);
|
||||
}*/
|
||||
// new way
|
||||
table.replace(new Word("cat"), "a small domesticated carnivorous mammal", definition);
|
||||
|
||||
assertThat(table.get(new Word("cat")), is("an animal"));
|
||||
|
||||
}
|
||||
|
||||
@Test
|
||||
public void whenKeyIsAbsent_thenNotRewritten() {
|
||||
|
||||
Hashtable<Word, String> table = new Hashtable<Word, String>();
|
||||
table.put(new Word("cat"), "a small domesticated carnivorous mammal");
|
||||
|
||||
// old way
|
||||
/* if (!table.containsKey(cat)) {
|
||||
String definition = "an animal";// calculate
|
||||
table.put(new Word("cat"), definition);
|
||||
}
|
||||
*/
|
||||
// new way
|
||||
|
||||
table.computeIfAbsent(new Word("cat"), key -> "an animal");
|
||||
assertThat(table.get(new Word("cat")), is("a small domesticated carnivorous mammal"));
|
||||
|
||||
}
|
||||
|
||||
@Test
|
||||
public void whenKeyIsPresent_thenComputeIfPresent() {
|
||||
|
||||
Hashtable<Word, String> table = new Hashtable<Word, String>();
|
||||
table.put(new Word("cat"), "a small domesticated carnivorous mammal");
|
||||
|
||||
Word cat = new Word("cat");
|
||||
// old way
|
||||
/* if (table.containsKey(cat)) {
|
||||
String concatination = cat.getName() + " - " + table.get(cat);
|
||||
table.put(cat, concatination);
|
||||
}*/
|
||||
|
||||
// new way
|
||||
table.computeIfPresent(cat, (key, value) -> key.getName() + " - " + value);
|
||||
|
||||
assertThat(table.get(cat), is("cat - a small domesticated carnivorous mammal"));
|
||||
|
||||
}
|
||||
|
||||
@Test
|
||||
public void whenCompute_thenForAllKeys() {
|
||||
|
||||
Hashtable<String, Integer> table = new Hashtable<String, Integer>();
|
||||
String[] animals = { "cat", "dog", "dog", "cat", "bird", "mouse", "mouse" };
|
||||
for (String animal : animals) {
|
||||
table.compute(animal, (key, value) -> (value == null ? 1 : value + 1));
|
||||
}
|
||||
assertThat(table.values(), hasItems(2, 2, 2, 1));
|
||||
|
||||
}
|
||||
|
||||
@Test
|
||||
public void whenInsteadOfCompute_thenMerge() {
|
||||
|
||||
Hashtable<String, Integer> table = new Hashtable<String, Integer>();
|
||||
String[] animals = { "cat", "dog", "dog", "cat", "bird", "mouse", "mouse" };
|
||||
for (String animal : animals) {
|
||||
table.merge(animal, 1, (oldValue, value) -> (oldValue + value));
|
||||
}
|
||||
assertThat(table.values(), hasItems(2, 2, 2, 1));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void whenForeach_thenIterate() {
|
||||
|
||||
Hashtable<Word, String> table = new Hashtable<Word, String>();
|
||||
table.put(new Word("cat"), "a small domesticated carnivorous mammal");
|
||||
table.put(new Word("dog"), "another animal");
|
||||
table.forEach((k, v) -> System.out.println(k.getName() + " - " + v)
|
||||
|
||||
);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void whenReplaceall_thenNoIterationNeeded() {
|
||||
|
||||
Hashtable<Word, String> table = new Hashtable<Word, String>();
|
||||
table.put(new Word("cat"), "a small domesticated carnivorous mammal");
|
||||
table.put(new Word("dog"), "another animal");
|
||||
table.replaceAll((k, v) -> k.getName() + " - " + v);
|
||||
|
||||
assertThat(table.values(), hasItems("cat - a small domesticated carnivorous mammal", "dog - another animal"));
|
||||
}
|
||||
}
|
|
@ -16,7 +16,7 @@ import org.junit.Test;
|
|||
* @author Santosh Thakur
|
||||
*/
|
||||
|
||||
public class IteratorsTest {
|
||||
public class IteratorsUnitTest {
|
||||
|
||||
@Test
|
||||
public void whenFailFast_ThenThrowsException() {
|
|
@ -0,0 +1,44 @@
|
|||
package com.baeldung.java8.optional;
|
||||
|
||||
import org.junit.Test;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import static org.junit.Assert.*;
|
||||
|
||||
import com.baeldung.optional.OrElseAndOrElseGet;
|
||||
|
||||
public class OrElseAndOrElseGetUnitTest {
|
||||
|
||||
private OrElseAndOrElseGet orElsevsOrElseGet = new OrElseAndOrElseGet();
|
||||
|
||||
private static final Logger LOG = LoggerFactory.getLogger(OrElseAndOrElseGetUnitTest.class);
|
||||
|
||||
@Test
|
||||
public void givenNonEmptyOptional_whenOrElseUsed_thenGivenStringReturned() {
|
||||
LOG.info("In givenNonEmptyOptional_whenOrElseUsed_thenGivenStringReturned()");
|
||||
String name = orElsevsOrElseGet.getNameUsingOrElse("baeldung");
|
||||
assertEquals(name, "baeldung");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void givenEmptyOptional_whenOrElseUsed_thenRandomStringReturned() {
|
||||
LOG.info("In givenEmptyOptional_whenOrElseUsed_thenRandomStringReturned()");
|
||||
String name = orElsevsOrElseGet.getNameUsingOrElse(null);
|
||||
assertTrue(orElsevsOrElseGet.names.contains(name));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void givenNonEmptyOptional_whenOrElseGetUsed_thenGivenStringReturned() {
|
||||
LOG.info("In givenNonEmptyOptional_whenOrElseGetUsed_thenGivenStringReturned()");
|
||||
String name = orElsevsOrElseGet.getNameUsingOrElseGet("baeldung");
|
||||
assertEquals(name, "baeldung");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void givenEmptyOptional_whenOrElseGetUsed_thenRandomStringReturned() {
|
||||
LOG.info("In givenEmptyOptional_whenOrElseGetUsed_thenRandomStringReturned()");
|
||||
String name = orElsevsOrElseGet.getNameUsingOrElseGet(null);
|
||||
assertTrue(orElsevsOrElseGet.names.contains(name));
|
||||
}
|
||||
}
|
|
@ -7,7 +7,7 @@ import java.util.List;
|
|||
import org.junit.Test;
|
||||
import static org.junit.Assert.*;
|
||||
|
||||
public class PrimeGeneratorTest {
|
||||
public class PrimeGeneratorUnitTest {
|
||||
@Test
|
||||
public void whenBruteForced_returnsSuccessfully() {
|
||||
final List<Integer> primeNumbers = primeNumbersBruteForce(20);
|
|
@ -0,0 +1,34 @@
|
|||
package com.baeldung.reflect;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
import java.lang.reflect.Parameter;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
public class MethodParamNameUnitTest {
|
||||
|
||||
@Test
|
||||
public void whenGetConstructorParams_thenOk()
|
||||
throws NoSuchMethodException, SecurityException {
|
||||
List<Parameter> parameters
|
||||
= Arrays.asList(Person.class.getConstructor(String.class).getParameters());
|
||||
Optional<Parameter> parameter
|
||||
= parameters.stream().filter(Parameter::isNamePresent).findFirst();
|
||||
assertThat(parameter.get().getName()).isEqualTo("fullName");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void whenGetMethodParams_thenOk()
|
||||
throws NoSuchMethodException, SecurityException {
|
||||
List<Parameter> parameters
|
||||
= Arrays.asList(
|
||||
Person.class.getMethod("setFullName", String.class).getParameters());
|
||||
Optional<Parameter> parameter
|
||||
= parameters.stream().filter(Parameter::isNamePresent).findFirst();
|
||||
assertThat(parameter.get().getName()).isEqualTo("fullName");
|
||||
}
|
||||
}
|
|
@ -9,7 +9,7 @@ import static org.assertj.core.api.Assertions.*;
|
|||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
|
||||
public class ExecutorTest {
|
||||
public class ExecutorUnitTest {
|
||||
Article article;
|
||||
Stream<Author> stream;
|
||||
Spliterator<Author> spliterator;
|
|
@ -7,7 +7,7 @@ import java.util.List;
|
|||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
|
||||
public class StreamApiTest {
|
||||
public class StreamApiUnitTest {
|
||||
|
||||
@Test
|
||||
public void givenList_whenGetLastElementUsingReduce_thenReturnLastElement() {
|
|
@ -8,7 +8,7 @@ import java.util.List;
|
|||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
|
||||
public class StreamIndicesTest {
|
||||
public class StreamIndicesUnitTest {
|
||||
|
||||
@Test
|
||||
public void whenCalled_thenReturnListOfEvenIndexedStrings() {
|
|
@ -16,7 +16,7 @@ import org.junit.Test;
|
|||
import com.baeldung.stream.mycollectors.MyImmutableListCollector;
|
||||
import com.google.common.collect.ImmutableList;
|
||||
|
||||
public class StreamToImmutableTest {
|
||||
public class StreamToImmutableUnitTest {
|
||||
|
||||
@Test
|
||||
public void whenUsingCollectingToImmutableSet_thenSuccess() {
|
|
@ -8,7 +8,7 @@ import java.util.stream.Stream;
|
|||
|
||||
import org.junit.Test;
|
||||
|
||||
public class SupplierStreamTest {
|
||||
public class SupplierStreamUnitTest {
|
||||
|
||||
@Test(expected = IllegalStateException.class)
|
||||
public void givenStream_whenStreamUsedTwice_thenThrowException() {
|
|
@ -9,7 +9,7 @@ import java.time.temporal.TemporalAdjuster;
|
|||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
|
||||
public class CustomTemporalAdjusterTest {
|
||||
public class CustomTemporalAdjusterUnitTest {
|
||||
|
||||
private static final TemporalAdjuster NEXT_WORKING_DAY = new CustomTemporalAdjuster();
|
||||
|
|
@ -7,7 +7,7 @@ import java.time.temporal.TemporalAdjusters;
|
|||
import org.junit.Assert;
|
||||
import org.junit.Test;
|
||||
|
||||
public class TemporalAdjustersTest {
|
||||
public class TemporalAdjustersUnitTest {
|
||||
|
||||
@Test
|
||||
public void whenAdjust_thenNextSunday() {
|
|
@ -24,3 +24,4 @@
|
|||
- [Method Handles in Java](http://www.baeldung.com/java-method-handles)
|
||||
- [Introduction to Chronicle Queue](http://www.baeldung.com/java-chronicle-queue)
|
||||
- [A Guide to Java 9 Modularity](http://www.baeldung.com/java-9-modularity)
|
||||
- [Optional orElse Optional](http://www.baeldung.com/java-optional-or-else-optional)
|
||||
|
|
|
@ -47,6 +47,11 @@
|
|||
<version>${awaitility.version}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.google.guava</groupId>
|
||||
<artifactId>guava</artifactId>
|
||||
<version>${guava.version}</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
|
@ -89,6 +94,7 @@
|
|||
<awaitility.version>1.7.0</awaitility.version>
|
||||
<maven.compiler.source>1.9</maven.compiler.source>
|
||||
<maven.compiler.target>1.9</maven.compiler.target>
|
||||
<guava.version>25.1-jre</guava.version>
|
||||
</properties>
|
||||
|
||||
</project>
|
||||
|
|
|
@ -0,0 +1,26 @@
|
|||
package com.baeldung.optionals;
|
||||
|
||||
import java.util.Optional;
|
||||
|
||||
public class Optionals {
|
||||
|
||||
public static <T> Optional<T> or(Optional<T> optional, Optional<T> fallback) {
|
||||
return optional.isPresent() ? optional : fallback;
|
||||
}
|
||||
|
||||
public static Optional<String> getName(Optional<String> name) {
|
||||
return name.or(() -> getCustomMessage());
|
||||
}
|
||||
|
||||
public static com.google.common.base.Optional<String> getOptionalGuavaName(com.google.common.base.Optional<String> name) {
|
||||
return name.or(getCustomMessageGuava());
|
||||
}
|
||||
|
||||
private static Optional<String> getCustomMessage() {
|
||||
return Optional.of("Name not provided");
|
||||
}
|
||||
|
||||
private static com.google.common.base.Optional<String> getCustomMessageGuava() {
|
||||
return com.google.common.base.Optional.of("Name not provided");
|
||||
}
|
||||
}
|
|
@ -0,0 +1,199 @@
|
|||
package com.baeldung.java9.modules;
|
||||
|
||||
import static org.hamcrest.CoreMatchers.is;
|
||||
import static org.hamcrest.CoreMatchers.nullValue;
|
||||
import static org.hamcrest.Matchers.contains;
|
||||
import static org.hamcrest.Matchers.containsInAnyOrder;
|
||||
import static org.hamcrest.collection.IsEmptyCollection.empty;
|
||||
import static org.junit.Assert.*;
|
||||
|
||||
import java.lang.module.ModuleDescriptor;
|
||||
import java.lang.module.ModuleDescriptor.*;
|
||||
import java.sql.Date;
|
||||
import java.sql.Driver;
|
||||
import java.util.HashMap;
|
||||
import java.util.Set;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
|
||||
public class ModuleAPIUnitTest {
|
||||
|
||||
public static final String JAVA_BASE_MODULE_NAME = "java.base";
|
||||
|
||||
private Module javaBaseModule;
|
||||
private Module javaSqlModule;
|
||||
private Module module;
|
||||
|
||||
@Before
|
||||
public void setUp() {
|
||||
Class<HashMap> hashMapClass = HashMap.class;
|
||||
javaBaseModule = hashMapClass.getModule();
|
||||
|
||||
Class<Date> dateClass = Date.class;
|
||||
javaSqlModule = dateClass.getModule();
|
||||
|
||||
Class<Person> personClass = Person.class;
|
||||
module = personClass.getModule();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void whenCheckingIfNamed_thenModuleIsNamed() {
|
||||
assertThat(javaBaseModule.isNamed(), is(true));
|
||||
assertThat(javaBaseModule.getName(), is(JAVA_BASE_MODULE_NAME));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void whenCheckingIfNamed_thenModuleIsUnnamed() {
|
||||
assertThat(module.isNamed(), is(false));
|
||||
assertThat(module.getName(), is(nullValue()));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void whenExtractingPackagesContainedInAModule_thenModuleContainsOnlyFewOfThem() {
|
||||
assertTrue(javaBaseModule.getPackages().contains("java.lang.annotation"));
|
||||
assertFalse(javaBaseModule.getPackages().contains("java.sql"));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void whenRetrievingClassLoader_thenClassLoaderIsReturned() {
|
||||
assertThat(
|
||||
module.getClassLoader().getClass().getName(),
|
||||
is("jdk.internal.loader.ClassLoaders$AppClassLoader")
|
||||
);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void whenGettingAnnotationsPresentOnAModule_thenNoAnnotationsArePresent() {
|
||||
assertThat(javaBaseModule.getAnnotations().length, is(0));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void whenGettingLayerOfAModule_thenModuleLayerInformationAreAvailable() {
|
||||
ModuleLayer javaBaseModuleLayer = javaBaseModule.getLayer();
|
||||
|
||||
assertTrue(javaBaseModuleLayer.configuration().findModule(JAVA_BASE_MODULE_NAME).isPresent());
|
||||
assertThat(javaBaseModuleLayer.configuration().modules().size(), is(78));
|
||||
assertTrue(javaBaseModuleLayer.parents().get(0).configuration().parents().isEmpty());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void whenRetrievingModuleDescriptor_thenTypeOfModuleIsInferred() {
|
||||
ModuleDescriptor javaBaseModuleDescriptor = javaBaseModule.getDescriptor();
|
||||
ModuleDescriptor javaSqlModuleDescriptor = javaSqlModule.getDescriptor();
|
||||
|
||||
assertFalse(javaBaseModuleDescriptor.isAutomatic());
|
||||
assertFalse(javaBaseModuleDescriptor.isOpen());
|
||||
assertFalse(javaSqlModuleDescriptor.isAutomatic());
|
||||
assertFalse(javaSqlModuleDescriptor.isOpen());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void givenModuleName_whenBuildingModuleDescriptor_thenBuilt() {
|
||||
Builder moduleBuilder = ModuleDescriptor.newModule("baeldung.base");
|
||||
|
||||
ModuleDescriptor moduleDescriptor = moduleBuilder.build();
|
||||
|
||||
assertThat(moduleDescriptor.name(), is("baeldung.base"));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void givenModules_whenAccessingModuleDescriptorRequires_thenRequiresAreReturned() {
|
||||
Set<Requires> javaBaseRequires = javaBaseModule.getDescriptor().requires();
|
||||
Set<Requires> javaSqlRequires = javaSqlModule.getDescriptor().requires();
|
||||
|
||||
Set<String> javaSqlRequiresNames = javaSqlRequires.stream()
|
||||
.map(Requires::name)
|
||||
.collect(Collectors.toSet());
|
||||
|
||||
assertThat(javaBaseRequires, empty());
|
||||
assertThat(javaSqlRequires.size(), is(3));
|
||||
assertThat(javaSqlRequiresNames, containsInAnyOrder("java.base", "java.xml", "java.logging"));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void givenModules_whenAccessingModuleDescriptorProvides_thenProvidesAreReturned() {
|
||||
Set<Provides> javaBaseProvides = javaBaseModule.getDescriptor().provides();
|
||||
Set<Provides> javaSqlProvides = javaSqlModule.getDescriptor().provides();
|
||||
|
||||
Set<String> javaBaseProvidesService = javaBaseProvides.stream()
|
||||
.map(Provides::service)
|
||||
.collect(Collectors.toSet());
|
||||
|
||||
assertThat(javaBaseProvidesService, contains("java.nio.file.spi.FileSystemProvider"));
|
||||
assertThat(javaSqlProvides, empty());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void givenModules_whenAccessingModuleDescriptorExports_thenExportsAreReturned() {
|
||||
Set<Exports> javaBaseExports = javaBaseModule.getDescriptor().exports();
|
||||
Set<Exports> javaSqlExports = javaSqlModule.getDescriptor().exports();
|
||||
|
||||
Set<String> javaSqlExportsSource = javaSqlExports.stream()
|
||||
.map(Exports::source)
|
||||
.collect(Collectors.toSet());
|
||||
|
||||
assertThat(javaBaseExports.size(), is(108));
|
||||
assertThat(javaSqlExports.size(), is(3));
|
||||
assertThat(javaSqlExportsSource, containsInAnyOrder("java.sql", "javax.transaction.xa", "javax.sql"));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void givenModules_whenAccessingModuleDescriptorUses_thenUsesAreReturned() {
|
||||
Set<String> javaBaseUses = javaBaseModule.getDescriptor().uses();
|
||||
Set<String> javaSqlUses = javaSqlModule.getDescriptor().uses();
|
||||
|
||||
assertThat(javaBaseUses.size(), is(34));
|
||||
assertThat(javaSqlUses, contains("java.sql.Driver"));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void givenModules_whenAccessingModuleDescriptorOpen_thenOpenAreReturned() {
|
||||
Set<Opens> javaBaseUses = javaBaseModule.getDescriptor().opens();
|
||||
Set<Opens> javaSqlUses = javaSqlModule.getDescriptor().opens();
|
||||
|
||||
assertThat(javaBaseUses, empty());
|
||||
assertThat(javaSqlUses, empty());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void whenAddingReadsToAModule_thenModuleCanReadNewModule() {
|
||||
Module updatedModule = module.addReads(javaSqlModule);
|
||||
|
||||
assertTrue(updatedModule.canRead(javaSqlModule));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void whenExportingPackage_thenPackageIsExported() {
|
||||
Module updatedModule = module.addExports("com.baeldung.java9.modules", javaSqlModule);
|
||||
|
||||
assertTrue(updatedModule.isExported("com.baeldung.java9.modules"));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void whenOpeningAModulePackage_thenPackagedIsOpened() {
|
||||
Module updatedModule = module.addOpens("com.baeldung.java9.modules", javaSqlModule);
|
||||
|
||||
assertTrue(updatedModule.isOpen("com.baeldung.java9.modules", javaSqlModule));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void whenAddingUsesToModule_thenUsesIsAdded() {
|
||||
Module updatedModule = module.addUses(Driver.class);
|
||||
|
||||
assertTrue(updatedModule.canUse(Driver.class));
|
||||
}
|
||||
|
||||
private class Person {
|
||||
private String name;
|
||||
|
||||
public Person(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,51 @@
|
|||
package com.baeldung.optionals;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
|
||||
import java.util.Optional;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
public class OptionalsTest {
|
||||
|
||||
@Test
|
||||
public void givenOptional_whenEmptyValue_thenCustomMessage() {
|
||||
assertEquals(Optional.of("Name not provided"), Optionals.getName(Optional.ofNullable(null)));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void givenOptional_whenValue_thenOptional() {
|
||||
String name = "Filan Fisteku";
|
||||
Optional<String> optionalString = Optional.ofNullable(name);
|
||||
assertEquals(optionalString, Optionals.getName(optionalString));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void givenOptional_whenValue_thenOptionalGeneralMethod() {
|
||||
String name = "Filan Fisteku";
|
||||
String missingOptional = "Name not provided";
|
||||
Optional<String> optionalString = Optional.ofNullable(name);
|
||||
Optional<String> fallbackOptionalString = Optional.ofNullable(missingOptional);
|
||||
assertEquals(optionalString, Optionals.or(optionalString, fallbackOptionalString));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void givenEmptyOptional_whenValue_thenOptionalGeneralMethod() {
|
||||
String missingOptional = "Name not provided";
|
||||
Optional<String> optionalString = Optional.empty();
|
||||
Optional<String> fallbackOptionalString = Optional.ofNullable(missingOptional);
|
||||
assertEquals(fallbackOptionalString, Optionals.or(optionalString, fallbackOptionalString));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void givenGuavaOptional_whenInvoke_thenOptional() {
|
||||
String name = "Filan Fisteku";
|
||||
com.google.common.base.Optional<String> stringOptional = com.google.common.base.Optional.of(name);
|
||||
assertEquals(stringOptional, Optionals.getOptionalGuavaName(stringOptional));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void givenGuavaOptional_whenNull_thenDefaultText() {
|
||||
assertEquals(com.google.common.base.Optional.of("Name not provided"), Optionals.getOptionalGuavaName(com.google.common.base.Optional.fromNullable(null)));
|
||||
}
|
||||
}
|
|
@ -28,3 +28,5 @@
|
|||
- [A Guide to TreeSet in Java](http://www.baeldung.com/java-tree-set)
|
||||
- [Java TreeMap vs HashMap](http://www.baeldung.com/java-treemap-vs-hashmap)
|
||||
- [How to TDD a List Implementation in Java](http://www.baeldung.com/java-test-driven-list)
|
||||
- [How to Store Duplicate Keys in a Map in Java?](http://www.baeldung.com/java-map-duplicate-keys)
|
||||
- [Getting the Size of an Iterable in Java](http://www.baeldung.com/java-iterable-size)
|
||||
|
|
|
@ -8,10 +8,11 @@
|
|||
<name>core-java-collections</name>
|
||||
|
||||
<parent>
|
||||
<groupId>com.baeldung</groupId>
|
||||
<artifactId>parent-modules</artifactId>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
<groupId>com.baeldung</groupId>
|
||||
<artifactId>parent-java</artifactId>
|
||||
<version>0.0.1-SNAPSHOT</version>
|
||||
<relativePath>../parent-java</relativePath>
|
||||
</parent>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
|
@ -25,11 +26,6 @@
|
|||
<artifactId>collections-generic</artifactId>
|
||||
<version>${collections-generic.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.google.guava</groupId>
|
||||
<artifactId>guava</artifactId>
|
||||
<version>${guava.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.commons</groupId>
|
||||
<artifactId>commons-collections4</artifactId>
|
||||
|
@ -55,7 +51,6 @@
|
|||
</dependencies>
|
||||
|
||||
<properties>
|
||||
<guava.version>22.0</guava.version>
|
||||
<commons-lang3.version>3.5</commons-lang3.version>
|
||||
<commons-collections4.version>4.1</commons-collections4.version>
|
||||
<collections-generic.version>4.01</collections-generic.version>
|
||||
|
|
|
@ -0,0 +1,65 @@
|
|||
package com.baeldung.java.iterable;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.stream.StreamSupport;
|
||||
|
||||
import org.apache.commons.collections4.IterableUtils;
|
||||
|
||||
import com.google.common.collect.Iterables;
|
||||
|
||||
/**
|
||||
* Provides methods for getting the size of an {@link Iterable} object.
|
||||
*/
|
||||
public class IterableSize {
|
||||
|
||||
/**
|
||||
* Get the size of {@code Iterable} using Java 7.
|
||||
*
|
||||
* @param data the iterable
|
||||
* @return the size of the iterable
|
||||
*/
|
||||
public static int sizeUsingJava7(final Iterable data) {
|
||||
|
||||
if (data instanceof Collection) {
|
||||
return ((Collection<?>) data).size();
|
||||
}
|
||||
int counter = 0;
|
||||
for (final Object i : data) {
|
||||
counter++;
|
||||
}
|
||||
return counter;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the size of {@code Iterable} using Java 8.
|
||||
*
|
||||
* @param data the iterable
|
||||
* @return the size of the iterable
|
||||
*/
|
||||
public static long sizeUsingJava8(final Iterable data) {
|
||||
|
||||
return StreamSupport.stream(data.spliterator(), false).count();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the size of {@code Iterable} using Apache Collections.
|
||||
*
|
||||
* @param data the iterable
|
||||
* @return the size of the iterable
|
||||
*/
|
||||
public static int sizeUsingApacheCollections(final Iterable data) {
|
||||
|
||||
return IterableUtils.size(data);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the size of {@code Iterable} using Google Guava.
|
||||
*
|
||||
* @param data the iterable
|
||||
* @return the size of the iterable
|
||||
*/
|
||||
public static int sizeUsingGoogleGuava(final Iterable data) {
|
||||
|
||||
return Iterables.size(data);
|
||||
}
|
||||
}
|
|
@ -8,7 +8,7 @@ import java.util.List;
|
|||
|
||||
import static org.junit.Assert.*;
|
||||
|
||||
public class ArrayConvertToListTest {
|
||||
public class ArrayConvertToListUnitTest {
|
||||
|
||||
@Test
|
||||
public void givenAnStringArray_whenConvertArrayToList_thenListCreated() {
|
|
@ -6,7 +6,7 @@ import java.util.Deque;
|
|||
import static org.junit.Assert.*;
|
||||
import org.junit.Test;
|
||||
|
||||
public class ArrayDequeTest {
|
||||
public class ArrayDequeUnitTest {
|
||||
|
||||
@Test
|
||||
public void whenOffer_addsAtLast() {
|
|
@ -0,0 +1,59 @@
|
|||
package com.baeldung.java.iterable;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
|
||||
import java.sql.SQLException;
|
||||
import java.util.List;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import com.google.common.collect.Lists;
|
||||
|
||||
class IterableSizeUnitTest {
|
||||
|
||||
private final List<String> list = Lists.newArrayList("Apple", "Orange", "Banana");
|
||||
|
||||
private Iterable data;
|
||||
|
||||
@Test
|
||||
void whenUsingJava7_iterableOfCollectionType_thenCorrectSize() {
|
||||
|
||||
final int size = IterableSize.sizeUsingJava7(list);
|
||||
|
||||
assertEquals(3, size);
|
||||
}
|
||||
|
||||
@Test
|
||||
void whenUsingJava7_iterableNotOfCollectionType_thenCorrect() {
|
||||
|
||||
final SQLException exception = new SQLException();
|
||||
exception.setNextException(new SQLException());
|
||||
final int size = IterableSize.sizeUsingJava7(exception);
|
||||
|
||||
assertEquals(2, size);
|
||||
}
|
||||
|
||||
@Test
|
||||
void whenUsingJava8_thenCorrect() {
|
||||
|
||||
final long size = IterableSize.sizeUsingJava8(list);
|
||||
|
||||
assertEquals(3, size);
|
||||
}
|
||||
|
||||
@Test
|
||||
void whenUsingApacheCollections_thenCorrect() {
|
||||
|
||||
final int size = IterableSize.sizeUsingApacheCollections(list);
|
||||
|
||||
assertEquals(3, size);
|
||||
}
|
||||
|
||||
@Test
|
||||
void whenUsingGoogleGuava_thenCorrect() {
|
||||
|
||||
final int size = IterableSize.sizeUsingGoogleGuava(list);
|
||||
|
||||
assertEquals(3, size);
|
||||
}
|
||||
}
|
|
@ -23,8 +23,8 @@ import com.google.common.collect.LinkedHashMultimap;
|
|||
import com.google.common.collect.Multimap;
|
||||
import com.google.common.collect.TreeMultimap;
|
||||
|
||||
public class MapMultipleValuesTest {
|
||||
private static final Logger LOG = LoggerFactory.getLogger(MapMultipleValuesTest.class);
|
||||
public class MapMultipleValuesUnitTest {
|
||||
private static final Logger LOG = LoggerFactory.getLogger(MapMultipleValuesUnitTest.class);
|
||||
|
||||
@Test
|
||||
public void givenHashMap_whenPuttingTwice_thenReturningFirstValue() {
|
|
@ -9,17 +9,12 @@
|
|||
|
||||
<parent>
|
||||
<groupId>com.baeldung</groupId>
|
||||
<artifactId>parent-modules</artifactId>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
<artifactId>parent-java</artifactId>
|
||||
<version>0.0.1-SNAPSHOT</version>
|
||||
<relativePath>../parent-java</relativePath>
|
||||
</parent>
|
||||
|
||||
<dependencies>
|
||||
<!-- utils -->
|
||||
<dependency>
|
||||
<groupId>com.google.guava</groupId>
|
||||
<artifactId>guava</artifactId>
|
||||
<version>${guava.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.commons</groupId>
|
||||
<artifactId>commons-collections4</artifactId>
|
||||
|
|
|
@ -9,7 +9,7 @@ import java.util.stream.IntStream;
|
|||
|
||||
import org.junit.Test;
|
||||
|
||||
public class ThreadSafeCounterTest {
|
||||
public class ThreadSafeCounterIntegrationTest {
|
||||
|
||||
@Test
|
||||
public void givenMultiThread_whenSafeCounterWithLockIncrement() throws InterruptedException {
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue