为什么String参数附加了" ="?

时间:2017-03-05 08:04:27

标签: spring jsp model-view-controller crud mybatis

我想" yjw"不是" yjw ="

帮助我。

我的jsp:

$("#memberList tbody").on("click","tr",function(e){
e.preventDefault();
var memId = $(this).find("td:first").text();
alert(memId);
 $.ajax({
      url: "http://localhost:8080/pjw/memberDetailInfo",
      type: "post",
      dataType: "text",
      data: memId,
      success: function(respBody){
      }
    });

控制器:

    @RequestMapping(value="/memberDetailInfo", method = RequestMethod.POST)
public String memberDetail(
        Model model,
        @RequestBody String memId){
    logger.info("회원 상세 정보 조회 진입.");
    System.out.println(memId);
    // 멤버 객체 생성
    MemberVO memberVO = new MemberVO();

    memberVO = service.getMemebr(memId);

    model.addAttribute("memberVO", memberVO);

    return "/memberDetailInfo";
}

调试信息:

INFO : com.naver.pjw.web.MemberManagerController - 회원 상세 정보 조회 진입.
yjw=
DEBUG: org.mybatis.spring.SqlSessionUtils - Creating a new SqlSession
DEBUG: org.mybatis.spring.SqlSessionUtils - SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@6b8b105e] was not registered for synchronization because synchronization is not active
DEBUG: org.springframework.jdbc.datasource.DataSourceUtils - Fetching JDBC Connection from DataSource
DEBUG: org.springframework.jdbc.datasource.DriverManagerDataSource - Creating new JDBC DriverManager Connection to [jdbc:log4jdbc:mysql://127.0.0.1:3306/miniproject]
INFO : jdbc.connection - 3. Connection opened  java.sql.DriverManager.getConnection(null:-1)
DEBUG: jdbc.connection - open connections:  3 (1)
DEBUG: jdbc.audit - 3. Connection.new Connection returned   java.sql.DriverManager.getConnection(null:-1)
DEBUG: jdbc.audit - 3. Connection.getAutoCommit() returned true  org.mybatis.spring.transaction.SpringManagedTransaction.openConnection(SpringManagedTransaction.java:82)
DEBUG: org.mybatis.spring.transaction.SpringManagedTransaction - JDBC Connection [net.sf.log4jdbc.ConnectionSpy@28ec8d6e] will not be managed by Spring
DEBUG: jdbc.audit - 3. PreparedStatement.new PreparedStatement returned   org.apache.ibatis.executor.statement.PreparedStatementHandler.instantiateStatement(PreparedStatementHandler.java:75)
DEBUG: jdbc.audit - 3. Connection.prepareStatement(SELECT * FROM MEMBER WHERE MEM_ID=?) returned net.sf.log4jdbc.PreparedStatementSpy@1b5671cd  org.apache.ibatis.executor.statement.PreparedStatementHandler.instantiateStatement(PreparedStatementHandler.java:75)
DEBUG: jdbc.audit - 3. PreparedStatement.setString(1, "yjw=") returned   org.apache.ibatis.type.StringTypeHandler.setNonNullParameter(StringTypeHandler.java:31)
DEBUG: jdbc.sqlonly -  org.apache.ibatis.executor.statement.PreparedStatementHandler.query(PreparedStatementHandler.java:59)
3. SELECT * FROM MEMBER WHERE MEM_ID='yjw=' 
DEBUG: jdbc.sqltiming -  org.apache.ibatis.executor.statement.PreparedStatementHandler.query(PreparedStatementHandler.java:59)
3. SELECT * FROM MEMBER WHERE MEM_ID='yjw='  {executed in 1 msec}
DEBUG: jdbc.audit - 3. PreparedStatement.execute() returned true  org.apache.ibatis.executor.statement.PreparedStatementHandler.query(PreparedStatementHandler.java:59)
DEBUG: jdbc.resultset - 3. ResultSet.new ResultSet returned   org.apache.ibatis.executor.resultset.DefaultResultSetHandler.getFirstResultSet(DefaultResultSetHandler.java:175)
DEBUG: jdbc.audit - 3. PreparedStatement.getResultSet() returned net.sf.log4jdbc.ResultSetSpy@50e6b861  org.apache.ibatis.executor.resultset.DefaultResultSetHandler.getFirstResultSet(DefaultResultSetHandler.java:175)
DEBUG: jdbc.resultset - 3. ResultSet.getMetaData() returned com.mysql.jdbc.ResultSetMetaData@4a99e52a - Field level information: 
    com.mysql.jdbc.Field@6d296ea[catalog=miniproject,tableName=MEMBER,originalTableName=member,columnName=MEM_ID,originalColumnName=MEM_ID,mysqlType=253(FIELD_TYPE_VAR_STRING),flags= PRIMARY_KEY, charsetIndex=33, charsetName=UTF-8]
    com.mysql.jdbc.Field@2ea247e4[catalog=miniproject,tableName=MEMBER,originalTableName=member,columnName=MEM_NAME,originalColumnName=MEM_NAME,mysqlType=253(FIELD_TYPE_VAR_STRING),flags=, charsetIndex=33, charsetName=UTF-8]
    com.mysql.jdbc.Field@4be2d7e1[catalog=miniproject,tableName=MEMBER,originalTableName=member,columnName=MEM_PASS,originalColumnName=MEM_PASS,mysqlType=253(FIELD_TYPE_VAR_STRING),flags=, charsetIndex=33, charsetName=UTF-8]
    com.mysql.jdbc.Field@4ed7db02[catalog=miniproject,tableName=MEMBER,originalTableName=member,columnName=MEM_NICKNAME,originalColumnName=MEM_NICKNAME,mysqlType=253(FIELD_TYPE_VAR_STRING),flags=, charsetIndex=33, charsetName=UTF-8]
    com.mysql.jdbc.Field@5ca061f4[catalog=miniproject,tableName=MEMBER,originalTableName=member,columnName=MEM_JOB,originalColumnName=MEM_JOB,mysqlType=253(FIELD_TYPE_VAR_STRING),flags=, charsetIndex=33, charsetName=UTF-8]
    com.mysql.jdbc.Field@600180e3[catalog=miniproject,tableName=MEMBER,originalTableName=member,columnName=MEM_ADDR,originalColumnName=MEM_ADDR,mysqlType=253(FIELD_TYPE_VAR_STRING),flags=, charsetIndex=33, charsetName=UTF-8]
    com.mysql.jdbc.Field@3d011edd[catalog=miniproject,tableName=MEMBER,originalTableName=member,columnName=MEM_EMAIL,originalColumnName=MEM_EMAIL,mysqlType=253(FIELD_TYPE_VAR_STRING),flags=, charsetIndex=33, charsetName=UTF-8]
    com.mysql.jdbc.Field@4d7ecdb4[catalog=miniproject,tableName=MEMBER,originalTableName=member,columnName=MEM_NUMBER,originalColumnName=MEM_NUMBER,mysqlType=253(FIELD_TYPE_VAR_STRING),flags=, charsetIndex=33, charsetName=UTF-8]
    com.mysql.jdbc.Field@120eba2e[catalog=miniproject,tableName=MEMBER,originalTableName=member,columnName=MEM_POINT,originalColumnName=MEM_POINT,mysqlType=3(FIELD_TYPE_LONG),flags=, charsetIndex=63, charsetName=US-ASCII]
    com.mysql.jdbc.Field@7ee42614[catalog=miniproject,tableName=MEMBER,originalTableName=member,columnName=MEM_BIRTH,originalColumnName=MEM_BIRTH,mysqlType=253(FIELD_TYPE_VAR_STRING),flags=, charsetIndex=33, charsetName=UTF-8]  org.apache.ibatis.executor.resultset.ResultSetWrapper.<init>(ResultSetWrapper.java:56)
DEBUG: jdbc.resultset - 3. ResultSet.getType() returned 1003  org.apache.ibatis.executor.resultset.DefaultResultSetHandler.skipRows(DefaultResultSetHandler.java:314)
INFO : jdbc.resultsettable - |-------|---------|---------|-------------|--------|---------|----------|-----------|----------|----------|
INFO : jdbc.resultsettable - |MEM_ID |MEM_NAME |MEM_PASS |MEM_NICKNAME |MEM_JOB |MEM_ADDR |MEM_EMAIL |MEM_NUMBER |MEM_POINT |MEM_BIRTH |
INFO : jdbc.resultsettable - |-------|---------|---------|-------------|--------|---------|----------|-----------|----------|----------|
INFO : jdbc.resultsettable - |-------|---------|---------|-------------|--------|---------|----------|-----------|----------|----------|
DEBUG: jdbc.resultset - 3. ResultSet.next() returned false  org.apache.ibatis.executor.resultset.DefaultResultSetHandler.shouldProcessMoreRows(DefaultResultSetHandler.java:310)
DEBUG: jdbc.resultset - 3. ResultSet.close() returned null  org.apache.ibatis.executor.resultset.DefaultResultSetHandler.closeResultSet(DefaultResultSetHandler.java:210)
DEBUG: jdbc.audit - 3. PreparedStatement.getConnection() returned net.sf.log4jdbc.ConnectionSpy@28ec8d6e  org.apache.ibatis.executor.resultset.DefaultResultSetHandler.getNextResultSet(DefaultResultSetHandler.java:194)
DEBUG: jdbc.audit - 3. Connection.getMetaData() returned com.mysql.jdbc.JDBC4DatabaseMetaData@708e4f4e  org.apache.ibatis.executor.resultset.DefaultResultSetHandler.getNextResultSet(DefaultResultSetHandler.java:194)
DEBUG: jdbc.audit - 3. PreparedStatement.getMoreResults() returned false  org.apache.ibatis.executor.resultset.DefaultResultSetHandler.getNextResultSet(DefaultResultSetHandler.java:196)
DEBUG: jdbc.audit - 3. PreparedStatement.getUpdateCount() returned -1  org.apache.ibatis.executor.resultset.DefaultResultSetHandler.getNextResultSet(DefaultResultSetHandler.java:196)
DEBUG: jdbc.audit - 3. PreparedStatement.close() returned   org.apache.ibatis.executor.BaseExecutor.closeStatement(BaseExecutor.java:239)
DEBUG: org.mybatis.spring.SqlSessionUtils - Closing non transactional SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@6b8b105e]
DEBUG: org.springframework.jdbc.datasource.DataSourceUtils - Returning JDBC Connection to DataSource
INFO : jdbc.connection - 3. Connection closed  org.springframework.jdbc.datasource.DataSourceUtils.doReleaseConnection(DataSourceUtils.java:333)
DEBUG: jdbc.connection - open connections:  none
DEBUG: jdbc.audit - 3. Connection.close() returned   org.springframework.jdbc.datasource.DataSourceUtils.doReleaseConnection(DataSourceUtils.java:333)
Sun Mar 05 17:02:24 KST 2017 WARN: Establishing SSL connection without server's identity verification is not recommended. According to MySQL 5.5.45+, 5.6.26+ and 5.7.6+ requirements SSL connection must be established by default if explicit option isn't set. For compliance with existing applications not using SSL the verifyServerCertificate property is set to 'false'. You need either to explicitly disable SSL by setting useSSL=false, or set useSSL=true and provide truststore for server certificate verification.

0 个答案:

没有答案