GitLab

構文
git branch -m 変更前branch名 変更後branch名
使用例
1.ローカルのブランチ名変更
$ git branch -m before_branch after_branch ...

SpringMVC

構文
@GetMapping(path = “xxx”, produces = “application/json”)
使用例1

@GetMapping(path ...

SpringMVC

構文
@PostMapping(path = “xxx”, consumes = “application/json”)
使用例1

@PostMapping(pat ...

SpringMVC

説明
メソッドパラメーターを URI テンプレート変数にバインドする必要があることを示すアノテーション。
使用例1

@GetMapping("/students/{studentId}/users/{userId ...

Kotlin

構文
@GetMapping(“/{パラメータ名}”)
fun 関数名(@PathVariable 関数: 型)
サンプルコード

@RestController@RequestMa ...

SpringMVC

説明
@PostMapping は @RequestMapping(method = RequestMethod.POST) のショートカットとして機能する合成アノテーションです。
サンプルコード

@RestCo ...

SpringMVC

構文
@ComponentScan(“xxx”)
@Configuration クラスで使用するコンポーネントスキャンディレクティブを構成します。Spring XML の <context ...

SpringMVC

構文
DispatcherServlet 変数名= new DispatcherServlet(xxx);
変数名.addServlet(xxx,xxx)
サンプルコード

public class Tes ...

Kotlin

構文
@Controller
class クラス名
サンプルコード

import org.springframework.ui.set@Controllerclass UserController { @ ...

Swift

1.NSString型からInt型へ変換
var cft : NSString = NSString.init(string: “56”)
var num : Int = cft.integer ...

Swift

構文
let 変数名B = String(変数名A)

サンプルコード
let cft = 56;
let resA = String(cft);
let resB = cft.descrip ...

Swift

1.IntからNSNumberに変換
var cftA : Int = 666
var nn : NSNumber = NSNumber.init(value: cftA)

2.NSNumberからIntに ...

Swift

構文
let 変数名 = Int(文字列)!

サンプルコード
let ss = “678”
let k = Int(ss)!

print(“k = \ ...

SpringMVC

構文
@Controller
public class クラス名

サンプルコード

@Controllerpublic class UsetController { @GetMapping("/user ...

Ruby

1.クラスの定義

class Sample def setAddr(str) @@addr = str end def getAddr() return @@addr endend

2.クラスのインスタンス作成
cf ...

Ruby

1.セミコロン(;)なし 使用例
puts “AA01\n”
puts “BB02\n”
puts “CC03\n”

2.セミ ...

Ruby

サンプルコード
a = 9; b = 2
puts “Result is #{ a * b }”

strN= “User007”
puts ̶ ...

Java

構文
BigDecimal 変数名 = new BigDecimal(文字列)
Javaコード

package com.arkgame.study.it;import java.math.BigDecimal;p ...