Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
dariah
dariahsp
Commits
80d50e1b
Commit
80d50e1b
authored
Nov 10, 2020
by
Gradl, Tobias
Browse files
14: Finalize Spring MVC example app
Task-Url:
#14
parent
36d59542
Pipeline
#17809
passed with stage
in 1 minute and 57 seconds
Changes
10
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
build.gradle
View file @
80d50e1b
...
...
@@ -38,7 +38,6 @@ allprojects {
}
subprojects
{
apply
plugin:
'io.spring.dependency-management'
apply
plugin:
'java'
apply
plugin:
'maven-publish'
apply
plugin:
'eclipse'
...
...
dariahsp-sample-boot/build.gradle
View file @
80d50e1b
plugins
{
id
'war'
id
'org.springframework.boot'
version
"2.3.4.RELEASE"
id
'io.spring.dependency-management'
}
dependencies
{
...
...
dariahsp-sample-boot/src/main/java/eu/dariah/de/dariahsp/sample/config/SampleSecurityConfig.java
View file @
80d50e1b
package
eu.dariah.de.dariahsp.sample.config
;
import
org.springframework.boot.context.properties.ConfigurationProperties
;
import
org.springframework.boot.web.server.WebServerFactoryCustomizer
;
import
org.springframework.boot.web.servlet.server.ConfigurableServletWebServerFactory
;
import
org.springframework.context.annotation.Bean
;
import
org.springframework.context.annotation.Configuration
;
import
org.springframework.context.annotation.Import
;
...
...
@@ -11,11 +8,9 @@ import eu.dariah.de.dariahsp.config.SecurityConfig;
import
eu.dariah.de.dariahsp.config.web.AuthInfoConfigurer
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
lombok.extern.slf4j.Slf4j
;
@Data
@EqualsAndHashCode
(
callSuper
=
false
)
@Slf4j
@Configuration
@ConfigurationProperties
(
prefix
=
"auth"
)
@Import
({
AuthInfoConfigurer
.
class
})
...
...
dariahsp-sample-mvc/build.gradle
deleted
100644 → 0
View file @
36d59542
plugins
{
id
'war'
}
ext
{
tilesVersion
=
"3.0.8"
jstlVersion
=
"1.2"
}
dependencies
{
implementation
project
(
':dariahsp-core'
)
//implementation "org.apache.tiles:tiles-core:$tilesVersion"
//implementation "org.apache.tiles:tiles-jsp:$tilesVersion"
//implementation "org.apache.tiles:tiles-api:$tilesVersion"
implementation
"org.springframework:spring-webmvc"
implementation
"javax.servlet:jstl:$jstlVersion"
providedCompile
"javax.servlet:javax.servlet-api:$servletApiVersion"
providedCompile
"javax.servlet.jsp:javax.servlet.jsp-api:$jspApiVersion"
/*implementation "javax.servlet:jstl:$jstlVersion"
providedCompile "javax.servlet:javax.servlet-api:$servletApiVersion"
providedCompile "javax.servlet.jsp:javax.servlet.jsp-api:$jspApiVersion"
/*compile 'de.unibamberg.minf.core:core-web:5.1.2-RELEASE'
compile 'org.springframework:spring-context:4.3.6.RELEASE'
compile 'org.springframework:spring-core:4.3.6.RELEASE'
compile 'org.springframework:spring-beans:4.3.6.RELEASE'
compile 'org.springframework:spring-webmvc:4.3.6.RELEASE'
compile 'org.apache.tiles:tiles-core:3.0.7'
compile 'org.apache.tiles:tiles-jsp:3.0.7'
compile 'org.apache.tiles:tiles-api:3.0.7'
compile 'javax.servlet:jstl:1.2'
compile 'org.yaml:snakeyaml:1.18'
testCompile 'org.springframework:spring-test:4.3.6.RELEASE'
testCompile 'junit:junit:4.12'
providedCompile 'javax.servlet:javax.servlet-api:3.1.0'
providedCompile 'javax.servlet.jsp:jsp-api:2.2'*/
}
description
=
'dariahsp - sample web application'
\ No newline at end of file
dariahsp-sample-mvc/src/main/java/eu/dariah/de/dariahsp/sample/SampleWebInitializer.java
deleted
100644 → 0
View file @
36d59542
package
eu.dariah.de.dariahsp.sample
;
import
org.springframework.web.servlet.support.AbstractAnnotationConfigDispatcherServletInitializer
;
import
eu.dariah.de.dariahsp.sample.config.SampleMvcConfig
;
public
class
SampleWebInitializer
extends
AbstractAnnotationConfigDispatcherServletInitializer
{
@Override
protected
Class
<?>[]
getRootConfigClasses
()
{
return
null
;
}
@Override
protected
Class
<?>[]
getServletConfigClasses
()
{
return
new
Class
[]
{
SampleMvcConfig
.
class
};
}
@Override
protected
String
[]
getServletMappings
()
{
return
new
String
[]
{
"/"
};
}
}
dariahsp-sample-mvc/src/main/java/eu/dariah/de/dariahsp/sample/config/SampleMvcConfig.java
deleted
100644 → 0
View file @
36d59542
package
eu.dariah.de.dariahsp.sample.config
;
import
org.springframework.context.annotation.ComponentScan
;
import
org.springframework.context.annotation.Configuration
;
import
org.springframework.web.servlet.config.annotation.WebMvcConfigurer
;
@Configuration
@ComponentScan
({
"eu.dariah.de.dariahsp.sample"
})
public
class
SampleMvcConfig
implements
WebMvcConfigurer
{
}
dariahsp-sample-mvc/src/main/java/eu/dariah/de/dariahsp/sample/controller/SampleController.java
deleted
100644 → 0
View file @
36d59542
package
eu.dariah.de.dariahsp.sample.controller
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.servlet.ModelAndView
;
public
class
SampleController
{
@RequestMapping
(
"/greet"
)
public
ModelAndView
showview
()
{
ModelAndView
mv
=
new
ModelAndView
();
mv
.
setViewName
(
"result.jsp"
);
mv
.
addObject
(
"result"
,
"GeeksForGeeks Welcomes "
+
"you to Spring!"
);
return
mv
;
}
}
dariahsp-sample-mvc/src/main/webapp/WEB-INF/view/greet.jsp
deleted
100644 → 0
View file @
36d59542
<%@ page
language=
"java"
contentType=
"text/html; charset=ISO-8859-1"
pageEncoding=
"ISO-8859-1"
isELIgnored=
"false"
%>
<!DOCTYPE html>
<html>
<head>
<meta
charset=
"ISO-8859-1"
>
<title>
Insert title here
</title>
</head>
<body>
<h1>
${result}
</h1>
</body>
</html>
dariahsp-sample-mvc/src/main/webapp/WEB-INF/view/index.jsp
deleted
100644 → 0
View file @
36d59542
<html>
<body>
<h2>
Hello World!
</h2>
<form
action=
"greet"
>
<input
type=
"submit"
value=
"Press to greet"
>
</form>
</body>
</html>
settings.gradle
View file @
80d50e1b
rootProject
.
name
=
'dariahsp'
include
(
':dariahsp-core'
)
include
(
':dariahsp-sample-boot'
)
include
(
':dariahsp-sample-mvc'
)
include
(
':dariahsp-sample-boot'
)
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment