Giter Site home page Giter Site logo

表单提交参数绑定不了 about solon HOT 3 CLOSED

noear avatar noear commented on July 20, 2024
表单提交参数绑定不了

from solon.

Comments (3)

gollyhu avatar gollyhu commented on July 20, 2024

Java1.8以上才支持这个参数: -parameters

from solon.

noear avatar noear commented on July 20, 2024

赞!!!Solon 支持:java 1.8, java 11, java 17 (不支持 1.8 以下);;;控制器获取参数的技术处理有2种:

  1. 使用 @param 注解 //会增加很多代码量,看着不优雅
@Post
@Mapping("/api/removes")
public String remove(@Param("ids") String ids) {
	return ids;
}

2 增加编译参数:-parameters

<plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-compiler-plugin</artifactId>
    <version>3.8.1</version>
    <configuration>
        <compilerArgument>-parameters</compilerArgument>
        <source>1.8</source>
        <target>1.8</target>
        <encoding>UTF-8</encoding>
    </configuration>
</plugin>

solon-parent 里已添加了这条引用。

from solon.

noear avatar noear commented on July 20, 2024

另外,1.9.4 已发布

from solon.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.