首页
学习
活动
专区
圈层
工具
发布
    • 综合排序
    • 最热优先
    • 最新优先
    时间不限
  • 来自专栏Play & Scala 技术分享

    Play Scala 2.5.x - Play Web开发基础

    创建登录Controller 在controllers目录下创建ApplicationController类: package controllers import play.api.mvc._ class ApplicationController extends Controller { def login = Action { Ok(views.html.login("用户登录")) GET /doLogin controllers.ApplicationController.doLogin(userName: String, password: String) 加上数据验证 通常登录操作使用Post请求,所以我们调整一下routes: POST /doLogin controllers.ApplicationController.doLogin play.api.data.Forms._ class ApplicationController extends Controller { def login = Action { Ok

    1.7K80发布于 2018-05-17
  • 来自专栏WindCoder

    springBoot初探-创建项目

    中添加springboot依赖: compile("org.springframework.boot:spring-boot-starter-web:1.5.8.RELEASE") 创建含main函数的AppLicationController WindCoder * Date: 2017-11-12 * Time: 22:30 下午 */ @Controller @EnableAutoConfiguration public class AppLicationController Spring-boot test One"; } public static void main(String[] args){ SpringApplication.run(AppLicationController.class ,args); } } 运行 在AppLicationController类处右键-执行run即可。 WindCoder * Date: 2017-11-12 * Time: 22:30 下午 */ @Controller @SpringBootApplication public class AppLicationController

    86610发布于 2018-09-19
  • 来自专栏氧化先生的专栏

    rails api+react+jwt验证教程

    class User < ApplicationRecord has_secure_password end 6.在applicatio_controller.rb中添加如下字段: class ApplicationController this file, see http://guides.rubyonrails.org/routing.html end 13,tokens控制器 class TokensController < ApplicationController

    2.4K10发布于 2019-01-14
  • 来自专栏技术杂记

    Rails MVC 和 CRUD(7)

    create 方法 [root@h202 blog]# cat app/controllers/articles_controller.rb class ArticlesController < ApplicationController articles_controller.rb [root@h202 blog]# cat app/controllers/articles_controller.rb class ArticlesController < ApplicationController articles_controller.rb [root@h202 blog]# cat app/controllers/articles_controller.rb class ArticlesController < ApplicationController

    45810发布于 2021-11-24
  • 来自专栏技术杂记

    Rails MVC 和 CRUD(9)

    articles_controller.rb [root@h202 blog]# cat app/controllers/articles_controller.rb class ArticlesController < ApplicationController articles_controller.rb [root@h202 blog]# cat app/controllers/articles_controller.rb class ArticlesController < ApplicationController articles_controller.rb [root@h202 blog]# cat app/controllers/articles_controller.rb class ArticlesController < ApplicationController

    46320发布于 2021-11-25
  • 来自专栏Linyb极客之路

    Java中的上下文对象设计模式

    request, response); requestContextMap.put("dispatcher", dispatcher); // Create ApplicationController instance ApplicationController applicationController = new ApplicationControllerImpl (); // Request processing ResponseContext responseContext = applicationController.handleRequest (requestContextMap); // Response processing applicationController.handleResponse

    3.5K30发布于 2019-05-07
  • 来自专栏技术杂记

    Rails 构建评论功能(10)

    articles_controller.rb [root@h202 blog]# cat app/controllers/articles_controller.rb class ArticlesController < ApplicationController end end [root@h202 blog]# head -n 4 app/controllers/articles_controller.rb class ArticlesController < ApplicationController

    50030发布于 2021-10-20
  • 来自专栏技术杂记

    Rails MVC 和 CRUD(5)

    创建了一个叫 ArticlesController 的类,继承自 ApplicationController 这次报错变了,成了找不到 new 方法 ---- 定义 new 方法 [root@h202 articles_controller.rb [root@h202 blog]# cat app/controllers/articles_controller.rb class ArticlesController < ApplicationController

    71220发布于 2021-11-24
  • 来自专栏技术沉淀

    Rails应用分页: Will Paginate

    #without paginagtion class PostsController < ApplicationController def index @posts = Post.all.order ('created_at desc') end end #with pagination class PostsController < ApplicationController def

    53530发布于 2018-06-28
  • 来自专栏忽如寄的前端周刊

    Rails布局和视图渲染

    调用 render 方法 调用 redirect_to 方法 调用 head 方法,向浏览器发送只含HTTP首部的响应 一个控制器: class BooksController < ApplicationController 指定控制器的布局 在控制器中使用 layout 声明,可以覆盖默认使用的布局约定: class ProductsController < ApplicationController layout "inventory" end 若要指定整个应用使用的布局,可以在ApplicationController类中使用layout声明: class ApplicationController < ActionController ::Base layout "main" end 在运行时选择布局 使用符号把布局延后到处理请求时再选择: class ProductsController < ApplicationController 根据条件设定布局 使用 :only 和 :except 选项,可以设定条件 class ProductsController < ApplicationController layout "product

    5.5K30发布于 2019-07-24
  • 来自专栏技术杂记

    Rails 构建评论功能(11)

    comments_controller.rb [root@h202 blog]# cat app/controllers/comments_controller.rb class CommentsController < ApplicationController end [root@h202 blog]# head -n 4 app/controllers/comments_controller.rb class CommentsController < ApplicationController

    65730发布于 2021-10-21
  • 来自专栏

    RoR: Ruby On Rails 的 Web Service 2 使用before_invocation进行验证调用权限

    password" => :string},{"user" => :string}],   :returns => [:string] end Controller class BlogController < ApplicationController

    1.7K30发布于 2018-09-12
  • 来自专栏王清培的专栏

    .NET应用架构设计—重新认识分层架构(现代企业级应用分层架构核心设计要素)

    1 namespace CompanySourceSearch.ApplicationController.Interface 2 { 3 using CompanySourceSearch.Service.Contract 1 namespace CompanySourceSearch.ApplicationController 2 { 3 using CompanySourceSearch.ApplicationController.Interface CompanySourceSearch.ServiceDto.Response; 5 using CompanySourceSearch.ServiceDto.Request; 6 using CompanySourceSearch.ApplicationController.Interface 1 namespace CompanySourceSearch.ApplicationController 2 { 3 using CompanySourceSearch.ApplicationController.Interface 1 namespace CompanySourceSearch.ApplicationController 2 { 3 using CompanySourceSearch.ApplicationController.Interface

    1.4K81发布于 2018-01-08
  • 来自专栏技术杂记

    Rails 构建评论功能(8)

    comments_controller.rb [root@h202 blog]# cat app/controllers/comments_controller.rb class CommentsController < ApplicationController

    57030发布于 2021-10-20
  • 来自专栏技术杂记

    Rails MVC 和 CRUD(12)

    articles_controller.rb [root@h202 blog]# cat app/controllers/articles_controller.rb class ArticlesController < ApplicationController

    56920发布于 2021-11-25
  • 来自专栏快乐阿超

    apache-incubator-streampark源码编译本地运行(六)

    streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/controller/ApplicationController.java

    63921编辑于 2023-09-07
  • 来自专栏技术杂记

    Rails MVC 和 CRUD(13)

    articles_controller.rb [root@h202 blog]# cat app/controllers/articles_controller.rb class ArticlesController < ApplicationController

    43010发布于 2021-11-25
  • 来自专栏技术杂记

    Rails 构建评论功能(4)

    comments.scss [root@h202 blog]# cat app/controllers/comments_controller.rb class CommentsController < ApplicationController

    61130发布于 2021-10-20
  • 来自专栏技术杂记

    Rails 构建评论功能(5)

    comments_controller.rb [root@h202 blog]# cat app/controllers/comments_controller.rb class CommentsController < ApplicationController

    50230发布于 2021-10-20
  • 来自专栏技术杂记

    Rails MVC 和 CRUD(14)

    articles_controller.rb [root@h202 blog]# cat app/controllers/articles_controller.rb class ArticlesController < ApplicationController

    47320发布于 2021-11-25
领券