updated dependencies, cleanup request method

This commit is contained in:
marius 2020-04-18 18:28:56 +02:00
parent 6e9b874df6
commit 7230f1145f
2 changed files with 4 additions and 27 deletions

28
pom.xml
View File

@ -5,7 +5,7 @@
<parent> <parent>
<groupId>org.springframework.boot</groupId> <groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId> <artifactId>spring-boot-starter-parent</artifactId>
<version>2.1.1.RELEASE</version> <version>2.2.6.RELEASE</version>
<relativePath/> <!-- lookup parent from repository --> <relativePath/> <!-- lookup parent from repository -->
</parent> </parent>
<groupId>com.becausesec</groupId> <groupId>com.becausesec</groupId>
@ -16,7 +16,7 @@
<properties> <properties>
<java.version>1.8</java.version> <java.version>1.8</java.version>
<kotlin.version>1.2.71</kotlin.version> <kotlin.version>1.3.71</kotlin.version>
<docker.image.prefix>because</docker.image.prefix> <docker.image.prefix>because</docker.image.prefix>
</properties> </properties>
@ -61,30 +61,6 @@
<sourceDirectory>${project.basedir}/src/main/kotlin</sourceDirectory> <sourceDirectory>${project.basedir}/src/main/kotlin</sourceDirectory>
<testSourceDirectory>${project.basedir}/src/test/kotlin</testSourceDirectory> <testSourceDirectory>${project.basedir}/src/test/kotlin</testSourceDirectory>
<plugins> <plugins>
<plugin>
<groupId>org.sonarsource.scanner.maven</groupId>
<artifactId>sonar-maven-plugin</artifactId>
<version>3.5.0.1254</version>
</plugin>
<plugin>
<groupId>org.owasp</groupId>
<artifactId>dependency-check-maven</artifactId>
<version>4.0.2</version>
<configuration>
<format>ALL</format>
</configuration>
</plugin>
<plugin>
<groupId>com.spotify</groupId>
<artifactId>dockerfile-maven-plugin</artifactId>
<version>1.4.9</version>
<configuration>
<repository>${docker.image.prefix}/${project.artifactId}</repository>
</configuration>
</plugin>
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>

View File

@ -5,6 +5,7 @@ import org.springframework.beans.factory.annotation.Autowired
import org.springframework.stereotype.Controller import org.springframework.stereotype.Controller
import org.springframework.ui.Model import org.springframework.ui.Model
import org.springframework.web.bind.annotation.RequestMapping import org.springframework.web.bind.annotation.RequestMapping
import org.springframework.web.bind.annotation.RequestMethod
@Controller @Controller
class JokeController { class JokeController {
@ -12,7 +13,7 @@ class JokeController {
@Autowired @Autowired
lateinit var jokeService: JokeService lateinit var jokeService: JokeService
@RequestMapping(value=["/", ""]) @RequestMapping(value=["/", ""], method = [RequestMethod.GET])
fun showJoke(model : Model) : String { fun showJoke(model : Model) : String {
model.addAttribute("joke", jokeService.joke) model.addAttribute("joke", jokeService.joke)
return "chucknorris" return "chucknorris"