「.NET 開発基盤部会 Wiki」は、「Open棟梁Project」,「OSSコンソーシアム .NET開発基盤部会」によって運営されています。
OAuth2、OIDCのID Federation(連携)コードを書くために、
イントラ・プロシキ環境下で無い。
32bitと64bitがあるので揃えること。
server.port = 8090
security.user.name=hoge security.user.password=hoge
pom.xmlをダブルクリックして開き、Dependenciesタグの各属性に入力してOKを押下する。
<dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-thymeleaf</artifactId> </dependency>
package com.example.test1; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.RequestMapping; @Controller public class HeloController { @RequestMapping("/{num}") public String index(@PathVariable int num, Model model) { int res = 0; for(int i = 1;i <= num;i++) res += i; model.addAttribute("msg", "total: " + res); return "index"; } }
<!DOCTYPE HTML> <html xmlns:th="http://www.thymeleaf.org"> <head> <title>top page</title> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <style> h1 { font-size:18pt; font-weight:bold; color:gray; } body { font-size:13pt; color:gray; margin:5px 25px; } </style> </head> <body> <h1>Helo page</h1> <p class="msg" th:text="${msg}"></p> </body> </html>