◀ 18. 【Spring】@RequestMappingアノテーションとは ▶
本稿はSpringFrameworkの@RequestMappingについて説明します。
@RequestMappingとは
@RequestMappingを記述することでメソッドに対してURLをマッピングさせることができます。
以下の例では"/index"にGETでリクエストがあった場合、index()メソッドが実行されるということになります。
@RestController public class HelloController { @RequestMapping(path = "/index", method = RequestMethod.GET) public String index() { return "Hello!!"; } } |
パスやリクエスト方式を複数指定する場合は以下のように記述できます。
@RequestMapping(path = { "/", "/index" }, method = { GET, POST }) |
子ページ
子ページはありません
人気ページ
最近更新/作成されたページ
- dasdsa (2022-11-13 07:57:24)
- Sydney top independent escorts (2022-11-13 07:56:58)
- 'include' is not defined (2022-06-09 22:05:10)
- 【django】ログイン 認証機能 (2022-06-06 14:30:24)
- [Dockerエラー] WSL 2 installation is incomplete. (2022-06-02 15:34:14)
- 【Laravelエラー】does not comply with psr-4 autoloading standard. Skipping. (2021-11-28 18:13:59)
- 複数のデータベースに接続する方法 (2021-11-16 12:58:24)
- SQLSTATE[22007]: Invalid datetime format: 1366 Incorrect string value: ~ (2021-11-07 07:19:55)
- 【Laravelエラー】Invalid request (Unsupported SSL request) (2021-11-01 04:19:34)
- 【Laravelエラー】Database hosts array is empty. (2021-10-04 00:01:48)
最近コメントのあったページ
- 【Spring Boot (JPA編)】DB接続設定からエンティティおよびリポジトリの作成、値の取得まで (2023-02-02 23:24:30)
- 【Spring Boot (JPA編)】DB接続設定からエンティティおよびリポジトリの作成、値の取得まで (2023-02-02 22:04:19)
- 【Spring】file: 外部ファイルの読み込み (2023-02-02 21:21:47)
- ビルド・パスが不完全であるため、プロジェクトはビルドされませんでした。org.apache.tomcat.InstanceManager のクラス・ファイルが見つかりません。ビルド・パスを修正... (2023-02-02 21:06:05)
- jQueryにおける値と要素の削除 (2023-02-02 20:48:16)
- 【Spring Boot (JPA編)】DB接続設定からエンティティおよびリポジトリの作成、値の取得まで (2023-02-02 20:43:41)
- 【Spring】@Columnアノテーションとは (2023-02-02 20:36:01)
- 型 org.apache.tomcat.InstanceManager を解決できません。必要な .class ファイルから間接的に参照されています (2023-02-02 20:29:20)
- 【Spring Boot (JPA編)】DB接続設定からエンティティおよびリポジトリの作成、値の取得まで (2023-02-02 20:01:26)
- 【Spring Boot (JPA編)】DB接続設定からエンティティおよびリポジトリの作成、値の取得まで (2023-02-02 19:58:03)
最近の質問
- 質問です (2020-02-20 12:19:36)
- フリーランスの単価って高いですか? (2020-02-12 19:56:16)
- 情報系のaoを受けるつもりなんですが何かおすすめのソフトはありますか? (2020-02-12 19:54:22)
- test3 (2020-02-08 23:50:54)
- セレクトボックスのCSSのcontentで三角の部分が押せない (2019-07-03 13:06:10)
- GCPのwp-config.phpでpermission denied (2019-06-05 20:04:08)
- Spring FrameworkのEntityのカラム名の大文字小文字、アンスコについて (2019-02-01 07:13:49)
- PHP(Laravel)からPythonのプログラムを呼び出したいのですがどうすればよいでしょうか。 (2018-12-06 06:26:57)
- djangoを本番環境にデプロイしたいのですがどのレンタルサーバー or VPSサーバーがよいですか (2018-12-01 12:04:18)
- Django administrationのUsernameとPasswordについて (2018-11-30 11:55:20)
- Google Adsenseでアダルトコンテンツと誤認されてしまいました。 (2018-09-09 17:15:36)
- Google MapsをUnityで使用する方法&料金 (2018-08-28 02:37:26)
- Amazon PA-APIのSort=salesrankが効かない (2018-07-21 08:54:25)
- 楽観ロックと悲観ロックの違い (2018-01-11 05:05:33)
- レンタルサーバーって沢山ありますけどどこがいいでしょうか?AWSってどうなんですか? (2018-01-09 10:03:20)
- ディープラーニングのライブラリってどれがオススメですか? (2018-01-06 05:15:40)
- Webスクレイピングってどこまでが違法なんでしょうか? (2018-01-06 05:09:08)
- 人工知能(AI)、機械学習、ディープラーニングの違い (2018-01-06 02:40:44)
コメント一覧
コメントを削除してもよろしいでしょうか?
No.839 |
guest
| 2022-12-28 04:35:47
<a href="http://www.hydroxychloroquinex.com/#">chloroquine phosphate generic name</a>No.838 |
guest
| 2022-12-27 03:42:11
<a href="http://www.hydroxychloroquinex.com/">aralen pill</a>No.837 |
guest
| 2022-12-13 14:43:27
<a href="http://candipharm.com/ ">http://candipharm.com/</a>No.836 |
guest
| 2021-12-20 17:57:17
Cephalexin For Cellulitis BabyNo.814 |
guest
| 2021-12-09 22:10:42
Ricambi PropeciaNo.813 |
guest
| 2021-12-09 07:00:57
Amoxicillin Dosages For DogsNo.811 |
guest
| 2021-12-07 15:11:07
cialis generic online cheapNo.809 |
guest
| 2021-12-06 19:59:40
Cialis For Daily Use PricesNo.802 |
guest
| 2021-12-04 17:37:22
Buy Zithromax 500mg OnlineNo.799 |
guest
| 2021-12-04 05:35:33
Viagra Ohne Rezept In HamburgNo.788 |
guest
| 2021-11-16 09:40:32
Overnight4usa ReviewsNo.787 |
guest
| 2021-11-16 01:21:21
Ricetta Viagra Dei PoveriNo.783 |
guest
| 2021-11-11 09:49:40
Achat De Cytotec En LigneNo.781 |
guest
| 2021-11-09 18:39:43
Generic Levitra WorkNo.780 |
guest
| 2021-11-09 11:46:05
Cialis HoncodeNo.778 |
guest
| 2021-11-07 18:38:18
tamsulosin tadalafil combinationNo.776 |
guest
| 2021-11-05 15:46:03
5mg Generic LevitraNo.770 |
guest
| 2021-11-02 05:10:27
Levitra Ohne Rezept Auf RechnungNo.767 |
guest
| 2021-10-31 01:23:27
Apotheke ViagraNo.630 |
guest
| 2021-10-07 09:25:31
Picture Of AmoxicillinNo.521 |
guest
| 2021-10-02 02:53:50
buy accutane 20mgNo.520 |
guest
| 2021-10-01 05:12:12
Let me introduce myself. I am Mike Myrthil, director of operations for Nutritional Products International, a global brand management company based in Boca Raton, Florida. NPI works with international and domestic health and wellness brand manufacturers who are seeking to enter the U.S. market or expand their sales in America. I recently came across your brand and would like to discuss how NPI can help you expand your distribution reach in the United States. We provide expertise in all areas of distribution: • Turnkey/One-stop solution • Active accounts with major U.S. distributors and retailers • An executive team that has held executive positions with Walmart and Amazon, the two largest online and brick-and-mortar retailers in the U.S., and Glanbia, the world’s largest sports nutrition company. • Proven sales force with public relations, branding, and marketing all under one roof • Focus on new and existing product lines • Warehousing and logistics NPI has a long, successful track record of taking brands to market in the United States. We meet regularly with buyers from large and small retail chains in the country. NPI is your fast track to the retail market. Please contact me directly so that we can discuss your brand further. Kind Regards, Mike, Mike Myrthil Director of Operations Nutritional Products International 101 Plaza Real S, Ste #224 Boca Raton, FL 33432 Office: 561-544-071 Mike.m@nutricompany.comNo.492 |
guest
| 2021-09-21 15:38:54
Penicillin Or Amoxicillin On Line DoctorsNo.491 |
guest
| 2021-09-21 15:12:14
Pediatric Dosing AmoxicillinNo.488 |
guest
| 2021-09-18 13:29:10
Pyridium Best Buy Cheapeast Express DeliveryNo.486 |
guest
| 2021-09-16 05:32:32
normal cialis dosageNo.478 |
guest
| 2021-09-07 07:58:46
Kamagra 100mg Generic Viagra For SaleNo.475 |
guest
| 2021-09-01 04:29:37
Sobredosis De PropeciaNo.473 |
guest
| 2021-08-31 21:02:49
Comprar Cialis PriligyNo.471 |
guest
| 2021-08-29 02:46:34
Amoxicillin Powder