Skip to content

Commit 140e0bd

Browse files
authored
Merge pull request #25844 from rsherget/springboot-websocket-fat-test
Springboot websocket fat test
2 parents bb85bf1 + 6bf8a19 commit 140e0bd

36 files changed

+697
-130
lines changed
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<classpath>
3+
<classpathentry kind="src" output="bin/main" path="src/main/java">
4+
<attributes>
5+
<attribute name="gradle_scope" value="main"/>
6+
<attribute name="gradle_used_by_scope" value="main,test"/>
7+
</attributes>
8+
</classpathentry>
9+
<classpathentry kind="src" output="bin/main" path="src/main/resources">
10+
<attributes>
11+
<attribute name="gradle_scope" value="main"/>
12+
<attribute name="gradle_used_by_scope" value="main,test"/>
13+
</attributes>
14+
</classpathentry>
15+
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-17/"/>
16+
<classpathentry kind="con" path="org.eclipse.buildship.core.gradleclasspathcontainer"/>
17+
<classpathentry kind="output" path="bin/default"/>
18+
</classpath>
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
/bin/
2+
/bin_test/
3+
/generated/
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<projectDescription>
3+
<name>io.openliberty.springboot.fat30.security.app</name>
4+
<comment></comment>
5+
<projects>
6+
</projects>
7+
<buildSpec>
8+
<buildCommand>
9+
<name>org.eclipse.jdt.core.javabuilder</name>
10+
<arguments>
11+
</arguments>
12+
</buildCommand>
13+
<buildCommand>
14+
<name>org.eclipse.buildship.core.gradleprojectbuilder</name>
15+
<arguments>
16+
</arguments>
17+
</buildCommand>
18+
<buildCommand>
19+
<name>bndtools.core.bndbuilder</name>
20+
<arguments>
21+
</arguments>
22+
</buildCommand>
23+
</buildSpec>
24+
<natures>
25+
<nature>org.eclipse.jdt.core.javanature</nature>
26+
<nature>bndtools.core.bndnature</nature>
27+
<nature>org.eclipse.buildship.core.gradleprojectnature</nature>
28+
</natures>
29+
<filteredResources>
30+
<filter>
31+
<id>1690812734863</id>
32+
<name></name>
33+
<type>30</type>
34+
<matcher>
35+
<id>org.eclipse.core.resources.regexFilterMatcher</id>
36+
<arguments>node_modules|\.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__</arguments>
37+
</matcher>
38+
</filter>
39+
</filteredResources>
40+
</projectDescription>
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
compileErrorAction=build
2+
eclipse.preferences.version=1
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
connection.project.dir=..
2+
eclipse.preferences.version=1
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
eclipse.preferences.version=1
2+
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
3+
org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate
4+
org.eclipse.jdt.core.compiler.codegen.targetPlatform=17
5+
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
6+
org.eclipse.jdt.core.compiler.compliance=17
7+
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
8+
org.eclipse.jdt.core.compiler.debug.localVariable=generate
9+
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
10+
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
11+
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
12+
org.eclipse.jdt.core.compiler.source=17
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
#*******************************************************************************
2+
# Copyright (c) 2017, 2023 IBM Corporation and others.
3+
# All rights reserved. This program and the accompanying materials
4+
# are made available under the terms of the Eclipse Public License 2.0
5+
# which accompanies this distribution, and is available at
6+
# http://www.eclipse.org/legal/epl-2.0/
7+
#
8+
# SPDX-License-Identifier: EPL-2.0
9+
#
10+
# Contributors:
11+
# IBM Corporation - initial API and implementation
12+
#*******************************************************************************
13+
-include= \
14+
~../cnf/resources/bnd/bundle.props, \
15+
~../cnf/resources/bnd/bundle.spring.props
16+
-nouses=true
17+
18+
bVersion=1.0
19+
20+
test.project: true
21+
instrument.disabled: true
22+
publish.wlp.jar.disabled: true
23+
24+
javac.source: 17
25+
javac.target: 17
26+
27+
src: \
28+
src/main/java, \
29+
src/main/resources
30+
31+
# Specify bundles to be added to the classpath of a VM used in testing.
32+
# Entries in the -testpath instruction enable the Eclipse Package Explorer
33+
# to resolve compile dependencies for test classes. The instruction is not
34+
# required to build Spring Boot test artifacts. Each entry requies a
35+
# corresponding entry in file cnf/oss_depenendcies.maven.
36+
# Ref: https://bndtools.org/manual/packageexplorer.html
37+
38+
-testpath: \
39+
org.springframework.boot:spring-boot;${springBootVersion30}, \
40+
org.springframework.boot:spring-boot-autoconfigure;${springBootVersion30}, \
41+
\
42+
org.springframework:spring-beans;${springVersion30}, \
43+
org.springframework:spring-context;${springVersion30}, \
44+
org.springframework:spring-core;${springVersion30}, \
45+
org.springframework:spring-web;${springVersion30}, \
46+
org.springframework:spring-webmvc;${springVersion30}, \
47+
\
48+
org.springframework.security:spring-security-config;${springSecurityVersion30}, \
49+
org.springframework.security:spring-security-core;${springSecurityVersion30}, \
50+
org.springframework.security:spring-security-crypto;${springSecurityVersion30}, \
51+
org.springframework.security:spring-security-web;${springSecurityVersion30}, \
52+
\
53+
io.openliberty.jakarta.servlet.6.0
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
/*******************************************************************************
2+
* Copyright (c) 2017, 2023 IBM Corporation and others.
3+
* All rights reserved. This program and the accompanying materials
4+
* are made available under the terms of the Eclipse Public License 2.0
5+
* which accompanies this distribution, and is available at
6+
* http://www.eclipse.org/legal/epl-2.0/
7+
*
8+
* SPDX-License-Identifier: EPL-2.0
9+
*
10+
* Contributors:
11+
* IBM Corporation - initial API and implementation
12+
********************************************************************************/
13+
14+
// https://plugins.gradle.org/plugin/org.springframework.boot
15+
plugins {
16+
id 'org.springframework.boot' version '3.0.7'
17+
}
18+
apply from: '../wlp-gradle/subprojects/spring.gradle'
19+
def sv = springVersions[ '3.0' ]
20+
21+
apply plugin: 'java'
22+
apply plugin: 'io.spring.dependency-management'
23+
24+
group = 'io.openliberty.example.spring'
25+
version = '0.0.1-SNAPSHOT'
26+
sourceCompatibility = 17
27+
28+
apply from: '../wlp-gradle/subprojects/maven-central-mirror.gradle'
29+
30+
dependencies {
31+
implementation('org.springframework.boot:spring-boot' + ':' + sv['springBoot.fat'])
32+
implementation('org.springframework.boot:spring-boot-autoconfigure' + ':' + sv['springBoot.fat'])
33+
34+
implementation('org.springframework.boot:spring-boot-starter-web') // + ':' + sv['springBoot']) // x
35+
implementation('org.springframework.boot:spring-boot-starter-thymeleaf') // + ':' + sv['springBoot']) // x
36+
implementation('org.springframework.boot:spring-boot-starter-security') // + ':' + sv['springBoot']) // x
37+
implementation('org.thymeleaf.extras:thymeleaf-extras-springsecurity6')
38+
39+
implementation('org.springframework:spring-beans' + ':' + sv['spring.fat'])
40+
implementation('org.springframework:spring-core' + ':' + sv['spring.fat'])
41+
implementation('org.springframework:spring-context' + ':' + sv['spring.fat'])
42+
implementation('org.springframework:spring-web' + ':' + sv['spring.fat'])
43+
implementation('org.springframework:spring-webmvc' + ':' + sv['spring.fat'])
44+
45+
implementation('org.springframework.security:spring-security-config' + ':' + sv['springSecurity.fat'])
46+
implementation('org.springframework.security:spring-security-core' + ':' + sv['springSecurity.fat'])
47+
implementation('org.springframework.security:spring-security-web' + ':' + sv['springSecurity.fat'])
48+
49+
implementation('org.webjars:bootstrap:5.2.3')
50+
implementation('org.webjars:webjars-locator:0.46')
51+
implementation('org.webjars:jquery:3.6.4')
52+
}
53+
54+
bootJar {
55+
duplicatesStrategy 'warn'
56+
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
/*******************************************************************************
2+
* Copyright (c) 2018,2023 IBM Corporation and others.
3+
* All rights reserved. This program and the accompanying materials
4+
* are made available under the terms of the Eclipse Public License 2.0
5+
* which accompanies this distribution, and is available at
6+
* http://www.eclipse.org/legal/epl-2.0/
7+
*
8+
* SPDX-License-Identifier: EPL-2.0
9+
*
10+
* Contributors:
11+
* IBM Corporation - initial API and implementation
12+
*******************************************************************************/
13+
package com.ibm.ws.springboot.fat30.test.app;
14+
15+
16+
import org.springframework.boot.web.server.MimeMappings;
17+
import org.springframework.boot.web.server.WebServerFactoryCustomizer;
18+
import org.springframework.boot.web.servlet.server.ConfigurableServletWebServerFactory;
19+
import org.springframework.stereotype.Component;
20+
21+
@Component
22+
public class CustomizationBean implements WebServerFactoryCustomizer<ConfigurableServletWebServerFactory> {
23+
24+
@Override
25+
public void customize(ConfigurableServletWebServerFactory server) {
26+
MimeMappings mappings = new MimeMappings(MimeMappings.DEFAULT);
27+
mappings.add("weby","application/json");
28+
server.setMimeMappings(mappings);
29+
}
30+
31+
}

0 commit comments

Comments
 (0)