活动介绍

__STRICT_ANSI__是什么

时间: 2025-04-09 13:29:56 浏览: 34
<think>好的,用户现在问的是关于`__STRICT_ANSI__`是什么。之前的问题是关于Ubuntu哪些版本支持`_REENTRANT`和`_THREAD_SAFE`这两个宏,现在用户转向了另一个预处理宏。我需要先确认这个宏的作用和常见使用场景。 首先,`__STRICT_ANSI__`是GCC编译器定义的一个宏,用于指示是否在严格遵循ANSI C标准的情况下编译代码。当用户使用`-ansi`、`-std=c89`、`-std=c99`等选项时,这个宏会被定义。它的主要作用是告诉编译器禁用GNU扩展和其他非标准特性,确保代码符合指定的C标准。 接下来,我需要回忆这个宏的具体行为。比如,当启用`__STRICT_ANSI__`时,某些GNU特有的函数或头文件可能无法使用,比如`asm`关键字或者`sys/types.h`中的某些类型。同时,像`inline`关键字在C89中不被支持,但如果在严格模式下,编译器可能会报错,除非使用`-std=gnu89`这样的选项。 用户可能想知道这个宏的存在意义,为什么需要它,以及在实际编程中如何影响代码的编译。他们可能在编译旧代码时遇到了兼容性问题,或者想要确保他们的代码符合某个C标准。因此,我需要解释这个宏的触发条件、作用以及如何验证它的定义。 此外,用户可能对如何检测这个宏是否存在感兴趣,所以提供一个简单的代码示例会很有帮助。同时,需要指出不同编译器可能有不同的行为,比如Clang也可能支持这个宏,但其他编译器可能不定义它。 还要考虑到用户可能的后续问题,比如如何解决因严格模式导致的编译错误,或者如何启用GNU扩展。因此,在回答中给出兼容性建议是必要的,比如使用`-std=gnuXX`代替`-std=cXX`,或者定义特定的宏来启用某些特性。 最后,确保回答结构清晰,分点说明,并给出实际例子,这样用户能够逐步理解。同时,注意使用中文,保持口语化,但不过于随意,确保信息准确可靠。</think>--- ### **直接回答** `__STRICT_ANSI__` 是 **GCC 编译器定义的预定义宏**,用于表示当前代码是否以 **严格遵循 ANSI/ISO C 标准** 的模式编译。当启用严格模式时,编译器会禁用所有非标准扩展(如 GNU 扩展),并强制代码完全符合指定的 C 标准(如 C89、C99、C11 等)。 --- ### **核心作用与触发条件** #### **1. 触发条件** - 当使用以下编译选项时,`__STRICT_ANSI__` 会被自动定义: ```bash gcc -ansi # 严格遵循 C89 标准 gcc -std=c99 # 严格遵循 C99 标准 gcc -std=c11 # 严格遵循 C11 标准 ``` - 若使用 GNU 扩展模式(如 `-std=gnu99`),则此宏**不会被定义**。 #### **2. 主要影响** - **禁用 GNU 扩展语法**: 例如: - `asm` 关键字(内联汇编)会被禁止。 - 某些 GNU 特有的头文件(如 `sys/cdefs.h`)可能无法使用。 - **限制非标准函数和类型**: - 非 ANSI 标准的库函数(如 `strdup`)可能不可用。 - 某些类型(如 `uint32_t`)需要显式包含 `<stdint.h>`。 - **严格语法检查**: 例如: - 变量声明必须位于代码块开头(C89 要求)。 - `//` 单行注释在 C89 严格模式下会报错(需改用 `/* */`)。 --- ### **验证宏定义** #### **代码示例** ```c #include <stdio.h> int main() { #ifdef __STRICT_ANSI__ printf("严格 ANSI 模式已启用\n"); #else printf("当前允许使用非标准扩展\n"); #endif return 0; } ``` 编译并运行: ```bash gcc -ansi test.c -o test && ./test # 输出 "严格 ANSI 模式已启用" gcc test.c -o test && ./test # 输出 "当前允许使用非标准扩展" ``` --- ### **实际应用场景** #### **1. 跨平台代码适配** 若代码需在严格遵循标准的编译器中运行(如嵌入式系统或旧编译器),可使用 `__STRICT_ANSI__` 宏进行条件编译: ```c #ifndef __STRICT_ANSI__ // 使用 GNU 扩展或平台特定代码 asm("nop"); // 内联汇编仅在非严格模式下生效 #endif ``` #### **2. 兼容旧标准代码** 例如,在 C89 严格模式下,`inline` 关键字不被支持,需通过宏适配: ```c #if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L || !defined(__STRICT_ANSI__) inline void my_func() { /* ... */ } // C99+ 或非严格模式下可用 #else static void my_func() { /* ... */ } // C89 严格模式替代方案 #endif ``` --- ### **与其他宏的关系** - `__STRICT_ANSI__` 通常与以下宏配合使用: - `__STDC__`:表示编译器符合 ANSI C 标准(始终为 1)。 - `__STDC_VERSION__`:表示具体遵循的 C 标准版本(如 199901L 对应 C99)。 - **优先级**: - 若同时指定 `-std=xxx` 和 `-ansi`,`-ansi` 会覆盖 `-std`。 - 例如:`gcc -std=c11 -ansi` 实际等价于 `-std=c89`。 --- ### **兼容性说明** - **仅限 GCC/Clang**: `__STRICT_ANSI__` 是 GCC 和 Clang 的私有宏,其他编译器(如 MSVC)可能不定义它。 - **POSIX 标准的冲突**: 严格 ANSI 模式可能禁用 POSIX 接口(如 `usleep`),需通过 `_POSIX_C_SOURCE` 显式启用。 --- ### **总结** - **用途**:标识是否启用严格 ANSI/ISO C 标准模式。 - **关键影响**:禁用非标准语法和扩展,强制代码符合指定 C 标准。 - **建议**: - 在需要跨平台或严格兼容时使用。 - 若需 GNU 扩展,改用 `-std=gnuXX`(如 `-std=gnu99`)。
阅读全文

相关推荐

/* stdlib.h: ANSI draft (X3J11 May 88) library header, section 4.10 */ /* Copyright (C) Codemist Ltd., 1988-1993. */ /* Copyright 1991-1998,2014 ARM Limited. All rights reserved. */ /* * RCS $Revision$ * Checkin $Date$ * Revising $Author: agrant $ */ /* * stdlib.h declares four types, several general purpose functions, * and defines several macros. */ #ifndef __stdlib_h #define __stdlib_h #define __ARMCLIB_VERSION 5060034 #if defined(__clang__) || (defined(__ARMCC_VERSION) && !defined(__STRICT_ANSI__)) /* armclang and non-strict armcc allow 'long long' in system headers */ #define __LONGLONG long long #else /* strict armcc has '__int64' */ #define __LONGLONG __int64 #endif #define _ARMABI __declspec(__nothrow) #define _ARMABI_PURE __declspec(__nothrow) __attribute__((const)) #define _ARMABI_NORETURN __declspec(__nothrow) __declspec(__noreturn) #define _ARMABI_THROW #ifndef __STDLIB_DECLS #define __STDLIB_DECLS /* * Some of these declarations are new in C99. To access them in C++ * you can use -D__USE_C99_STDLIB (or -D__USE_C99ALL). */ #ifndef __USE_C99_STDLIB #if defined(__USE_C99_ALL) || (defined(__STDC_VERSION__) && 199901L <= __STDC_VERSION__) || (defined(__cplusplus) && 201103L <= __cplusplus) #define __USE_C99_STDLIB 1 #endif #endif #undef __CLIBNS #ifdef __cplusplus namespace std { #define __CLIBNS ::std:: extern "C" { #else #define __CLIBNS #endif /* __cplusplus */ #if defined(__cplusplus) || !defined(__STRICT_ANSI__) /* unconditional in C++ and non-strict C for consistency of debug info */ #if __sizeof_ptr == 8 typedef unsigned long size_t; /* see <stddef.h> */ #else typedef unsigned int size_t; /* see <stddef.h> */ #endif #elif !defined(__size_t) #define __size_t 1 #if __sizeof_ptr == 8 typedef unsigned long size_t; /* see <stddef.h> */ #else typedef unsigned int size_t; /* see <stddef.h> */ #endif #endif #undef NULL #define NULL 0 /* see <stddef.h> */ #ifndef __cplusplus /* wchar_t is a builtin type for C++ */ #if !defined(__STRICT_ANSI__) /* unconditional in non-strict C for consistency of debug info */ #if defined(__WCHAR32) || (defined(__ARM_SIZEOF_WCHAR_T) && __ARM_SIZEOF_WCHAR_T == 4) typedef unsigned int wchar_t; /* see <stddef.h> */ #else typedef unsigned short wchar_t; /* see <stddef.h> */ #endif #elif !defined(__wchar_t) #define __wchar_t 1 #if defined(__WCHAR32) || (defined(__ARM_SIZEOF_WCHAR_T) && __ARM_SIZEOF_WCHAR_T == 4) typedef unsigned int wchar_t; /* see <stddef.h> */ #else typedef unsigned short wchar_t; /* see <stddef.h> */ #endif #endif #endif typedef struct div_t { int quot, rem; } div_t; /* type of the value returned by the div function. */ typedef struct ldiv_t { long int quot, rem; } ldiv_t; /* type of the value returned by the ldiv function. */ #if !defined(__STRICT_ANSI__) || __USE_C99_STDLIB typedef struct lldiv_t { __LONGLONG quot, rem; } lldiv_t; /* type of the value returned by the lldiv function. */ #endif #ifdef __EXIT_FAILURE # define EXIT_FAILURE __EXIT_FAILURE /* * an integral expression which may be used as an argument to the exit * function to return unsuccessful termination status to the host * environment. */ #else # define EXIT_FAILURE 1 /* unixoid */ #endif #define EXIT_SUCCESS 0 /* * an integral expression which may be used as an argument to the exit * function to return successful termination status to the host * environment. */ /* * Defining __USE_ANSI_EXAMPLE_RAND at compile time switches to * the example implementation of rand() and srand() provided in * the ANSI C standard. This implementation is very poor, but is * provided for completeness. */ #ifdef __USE_ANSI_EXAMPLE_RAND #define srand _ANSI_srand #define rand _ANSI_rand #define RAND_MAX 0x7fff #else #define RAND_MAX 0x7fffffff #endif /* * RAND_MAX: an integral constant expression, the value of which * is the maximum value returned by the rand function. */ extern _ARMABI int __aeabi_MB_CUR_MAX(void); #define MB_CUR_MAX ( __aeabi_MB_CUR_MAX() ) /* * a positive integer expression whose value is the maximum number of bytes * in a multibyte character for the extended character set specified by the * current locale (category LC_CTYPE), and whose value is never greater * than MB_LEN_MAX. */ /* * If the compiler supports signalling nans as per N965 then it * will define __SUPPORT_SNAN__, in which case a user may define * _WANT_SNAN in order to obtain a compliant version of the strtod * family of functions. */ #if defined(__SUPPORT_SNAN__) && defined(_WANT_SNAN) #pragma import(__use_snan) #endif extern _ARMABI double atof(const char * /*nptr*/) __attribute__((__nonnull__(1))); /* * converts the initial part of the string pointed to by nptr to double * representation. * Returns: the converted value. */ extern _ARMABI int atoi(const char * /*nptr*/) __attribute__((__nonnull__(1))); /* * converts the initial part of the string pointed to by nptr to int * representation. * Returns: the converted value. */ extern _ARMABI long int atol(const char * /*nptr*/) __attribute__((__nonnull__(1))); /* * converts the initial part of the string pointed to by nptr to long int * representation. * Returns: the converted value. */ #if !defined(__STRICT_ANSI__) || __USE_C99_STDLIB extern _ARMABI __LONGLONG atoll(const char * /*nptr*/) __attribute__((__nonnull__(1))); /* * converts the initial part of the string pointed to by nptr to * long long int representation. * Returns: the converted value. */ #endif extern _ARMABI double strtod(const char * __restrict /*nptr*/, char ** __restrict /*endptr*/) __attribute__((__nonnull__(1))); /* * converts the initial part of the string pointed to by nptr to double * representation. First it decomposes the input string into three parts: * an initial, possibly empty, sequence of white-space characters (as * specified by the isspace function), a subject sequence resembling a * floating point constant; and a final string of one or more unrecognised * characters, including the terminating null character of the input string. * Then it attempts to convert the subject sequence to a floating point * number, and returns the result. A pointer to the final string is stored * in the object pointed to by endptr, provided that endptr is not a null * pointer. * Returns: the converted value if any. If no conversion could be performed, * zero is returned. If the correct value is outside the range of * representable values, plus or minus HUGE_VAL is returned * (according to the sign of the value), and the value of the macro * ERANGE is stored in errno. If the correct value would cause * underflow, zero is returned and the value of the macro ERANGE is * stored in errno. */ #if !defined(__STRICT_ANSI__) || __USE_C99_STDLIB extern _ARMABI float strtof(const char * __restrict /*nptr*/, char ** __restrict /*endptr*/) __attribute__((__nonnull__(1))); extern _ARMABI long double strtold(const char * __restrict /*nptr*/, char ** __restrict /*endptr*/) __attribute__((__nonnull__(1))); /* * same as strtod, but return float and long double respectively. */ #endif extern _ARMABI long int strtol(const char * __restrict /*nptr*/, char ** __restrict /*endptr*/, int /*base*/) __attribute__((__nonnull__(1))); /* * converts the initial part of the string pointed to by nptr to long int * representation. First it decomposes the input string into three parts: * an initial, possibly empty, sequence of white-space characters (as * specified by the isspace function), a subject sequence resembling an * integer represented in some radix determined by the value of base, and a * final string of one or more unrecognised characters, including the * terminating null character of the input string. Then it attempts to * convert the subject sequence to an integer, and returns the result. * If the value of base is 0, the expected form of the subject sequence is * that of an integer constant (described in ANSI Draft, section 3.1.3.2), * optionally preceded by a '+' or '-' sign, but not including an integer * suffix. If the value of base is between 2 and 36, the expected form of * the subject sequence is a sequence of letters and digits representing an * integer with the radix specified by base, optionally preceded by a plus * or minus sign, but not including an integer suffix. The letters from a * (or A) through z (or Z) are ascribed the values 10 to 35; only letters * whose ascribed values are less than that of the base are permitted. If * the value of base is 16, the characters 0x or 0X may optionally precede * the sequence of letters and digits following the sign if present. * A pointer to the final string is stored in the object * pointed to by endptr, provided that endptr is not a null pointer. * Returns: the converted value if any. If no conversion could be performed, * zero is returned and nptr is stored in *endptr. * If the correct value is outside the range of * representable values, LONG_MAX or LONG_MIN is returned * (according to the sign of the value), and the value of the * macro ERANGE is stored in errno. */ extern _ARMABI unsigned long int strtoul(const char * __restrict /*nptr*/, char ** __restrict /*endptr*/, int /*base*/) __attribute__((__nonnull__(1))); /* * converts the initial part of the string pointed to by nptr to unsigned * long int representation. First it decomposes the input string into three * parts: an initial, possibly empty, sequence of white-space characters (as * determined by the isspace function), a subject sequence resembling an * unsigned integer represented in some radix determined by the value of * base, and a final string of one or more unrecognised characters, * including the terminating null character of the input string. Then it * attempts to convert the subject sequence to an unsigned integer, and * returns the result. If the value of base is zero, the expected form of * the subject sequence is that of an integer constant (described in ANSI * Draft, section 3.1.3.2), optionally preceded by a '+' or '-' sign, but * not including an integer suffix. If the value of base is between 2 and * 36, the expected form of the subject sequence is a sequence of letters * and digits representing an integer with the radix specified by base, * optionally preceded by a '+' or '-' sign, but not including an integer * suffix. The letters from a (or A) through z (or Z) stand for the values * 10 to 35; only letters whose ascribed values are less than that of the * base are permitted. If the value of base is 16, the characters 0x or 0X * may optionally precede the sequence of letters and digits following the * sign, if present. A pointer to the final string is stored in the object * pointed to by endptr, provided that endptr is not a null pointer. * Returns: the converted value if any. If no conversion could be performed, * zero is returned and nptr is stored in *endptr. * If the correct value is outside the range of * representable values, ULONG_MAX is returned, and the value of * the macro ERANGE is stored in errno. */ /* C90 reserves all names beginning with 'str' */ extern _ARMABI __LONGLONG strtoll(const char * __restrict /*nptr*/, char ** __restrict /*endptr*/, int /*base*/) __attribute__((__nonnull__(1))); /* * as strtol but returns a long long int value. If the correct value is * outside the range of representable values, LLONG_MAX or LLONG_MIN is * returned (according to the sign of the value), and the value of the * macro ERANGE is stored in errno. */ extern _ARMABI unsigned __LONGLONG strtoull(const char * __restrict /*nptr*/, char ** __restrict /*endptr*/, int /*base*/) __attribute__((__nonnull__(1))); /* * as strtoul but returns an unsigned long long int value. If the correct * value is outside the range of representable values, ULLONG_MAX is returned, * and the value of the macro ERANGE is stored in errno. */ extern _ARMABI int rand(void); /* * Computes a sequence of pseudo-random integers in the range 0 to RAND_MAX. * Uses an additive generator (Mitchell & Moore) of the form: * Xn = (X[n-24] + X[n-55]) MOD 2^31 * This is described in section 3.2.2 of Knuth, vol 2. It's period is * in excess of 2^55 and its randomness properties, though unproven, are * conjectured to be good. Empirical testing since 1958 has shown no flaws. * Returns: a pseudo-random integer. */ extern _ARMABI void srand(unsigned int /*seed*/); /* * uses its argument as a seed for a new sequence of pseudo-random numbers * to be returned by subsequent calls to rand. If srand is then called with * the same seed value, the sequence of pseudo-random numbers is repeated. * If rand is called before any calls to srand have been made, the same * sequence is generated as when srand is first called with a seed value * of 1. */ struct _rand_state { int __x[57]; }; extern _ARMABI int _rand_r(struct _rand_state *); extern _ARMABI void _srand_r(struct _rand_state *, unsigned int); struct _ANSI_rand_state { int __x[1]; }; extern _ARMABI int _ANSI_rand_r(struct _ANSI_rand_state *); extern _ARMABI void _ANSI_srand_r(struct _ANSI_rand_state *, unsigned int); /* * Re-entrant variants of both flavours of rand, which operate on * an explicitly supplied state buffer. */ extern _ARMABI void *calloc(size_t /*nmemb*/, size_t /*size*/); /* * allocates space for an array of nmemb objects, each of whose size is * 'size'. The space is initialised to all bits zero. * Returns: either a null pointer or a pointer to the allocated space. */ extern _ARMABI void free(void * /*ptr*/); /* * causes the space pointed to by ptr to be deallocated (i.e., made * available for further allocation). If ptr is a null pointer, no action * occurs. Otherwise, if ptr does not match a pointer earlier returned by * calloc, malloc or realloc or if the space has been deallocated by a call * to free or realloc, the behaviour is undefined. */ extern _ARMABI void *malloc(size_t /*size*/); /* * allocates space for an object whose size is specified by 'size' and whose * value is indeterminate. * Returns: either a null pointer or a pointer to the allocated space. */ extern _ARMABI void *realloc(void * /*ptr*/, size_t /*size*/); /* * changes the size of the object pointed to by ptr to the size specified by * size. The contents of the object shall be unchanged up to the lesser of * the new and old sizes. If the new size is larger, the value of the newly * allocated portion of the object is indeterminate. If ptr is a null * pointer, the realloc function behaves like a call to malloc for the * specified size. Otherwise, if ptr does not match a pointer earlier * returned by calloc, malloc or realloc, or if the space has been * deallocated by a call to free or realloc, the behaviour is undefined. * If the space cannot be allocated, the object pointed to by ptr is * unchanged. If size is zero and ptr is not a null pointer, the object it * points to is freed. * Returns: either a null pointer or a pointer to the possibly moved * allocated space. */ #if !defined(__STRICT_ANSI__) extern _ARMABI int posix_memalign(void ** /*ret*/, size_t /*alignment*/, size_t /*size*/); /* * allocates space for an object of size 'size', aligned to a * multiple of 'alignment' (which must be a power of two and at * least 4). * * On success, a pointer to the allocated object is stored in * *ret, and zero is returned. On failure, the return value is * either ENOMEM (allocation failed because no suitable piece of * memory was available) or EINVAL (the 'alignment' parameter was * invalid). */ #endif typedef int (*__heapprt)(void *, char const *, ...); extern _ARMABI void __heapstats(int (* /*dprint*/)(void * /*param*/, char const * /*format*/, ...), void * /*param*/) __attribute__((__nonnull__(1))); /* * reports current heap statistics (eg. number of free blocks in * the free-list). Output is as implementation-defined free-form * text, provided via the dprint function. param' gives an * extra data word to pass to dprint. You can call * __heapstats(fprintf,stdout) by casting fprintf to the above * function type; the typedef __heapprt' is provided for this * purpose. * * dprint' will not be called while the heap is being examined, * so it can allocate memory itself without trouble. */ extern _ARMABI int __heapvalid(int (* /*dprint*/)(void * /*param*/, char const * /*format*/, ...), void * /*param*/, int /*verbose*/) __attribute__((__nonnull__(1))); /* * performs a consistency check on the heap. Errors are reported * through dprint, like __heapstats. If verbose' is nonzero, * full diagnostic information on the heap state is printed out. * * This routine probably won't work if the heap isn't a * contiguous chunk (for example, if __user_heap_extend has been * overridden). * * dprint' may be called while the heap is being examined or * even in an invalid state, so it must perform no memory * allocation. In particular, if dprint' calls (or is) a stdio * function, the stream it outputs to must already have either * been written to or been setvbuf'ed, or else the system will * allocate buffer space for it on the first call to dprint. */ extern _ARMABI_NORETURN void abort(void); /* * causes abnormal program termination to occur, unless the signal SIGABRT * is being caught and the signal handler does not return. Whether open * output streams are flushed or open streams are closed or temporary * files removed is implementation-defined. * An implementation-defined form of the status 'unsuccessful termination' * is returned to the host environment by means of a call to * raise(SIGABRT). */ extern _ARMABI int atexit(void (* /*func*/)(void)) __attribute__((__nonnull__(1))); /* * registers the function pointed to by func, to be called without its * arguments at normal program termination. It is possible to register at * least 32 functions. * Returns: zero if the registration succeeds, nonzero if it fails. */ #if defined(__EDG__) && !defined(__GNUC__) #define __LANGUAGE_LINKAGE_CHANGES_FUNCTION_TYPE #endif #if defined(__cplusplus) && defined(__LANGUAGE_LINKAGE_CHANGES_FUNCTION_TYPE) /* atexit that takes a ptr to a function with C++ linkage * but not in GNU mode */ typedef void (* __C_exitfuncptr)(); extern "C++" inline int atexit(void (* __func)()) { return atexit((__C_exitfuncptr)__func); } #endif extern _ARMABI_NORETURN void exit(int /*status*/); /* * causes normal program termination to occur. If more than one call to the * exit function is executed by a program, the behaviour is undefined. * First, all functions registered by the atexit function are called, in the * reverse order of their registration. * Next, all open output streams are flushed, all open streams are closed, * and all files created by the tmpfile function are removed. * Finally, control is returned to the host environment. If the value of * status is zero or EXIT_SUCCESS, an implementation-defined form of the * status 'successful termination' is returned. If the value of status is * EXIT_FAILURE, an implementation-defined form of the status * 'unsuccessful termination' is returned. Otherwise the status returned * is implementation-defined. */ extern _ARMABI_NORETURN void _Exit(int /*status*/); /* * causes normal program termination to occur. No functions registered * by the atexit function are called. * In this implementation, all open output streams are flushed, all * open streams are closed, and all files created by the tmpfile function * are removed. * Control is returned to the host environment. The status returned to * the host environment is determined in the same way as for 'exit'. */ extern _ARMABI char *getenv(const char * /*name*/) __attribute__((__nonnull__(1))); /* * searches the environment list, provided by the host environment, for a * string that matches the string pointed to by name. The set of environment * names and the method for altering the environment list are * implementation-defined. * Returns: a pointer to a string associated with the matched list member. * The array pointed to shall not be modified by the program, but * may be overwritten by a subsequent call to the getenv function. * If the specified name cannot be found, a null pointer is * returned. */ extern _ARMABI int system(const char * /*string*/); /* * passes the string pointed to by string to the host environment to be * executed by a command processor in an implementation-defined manner. * A null pointer may be used for string, to inquire whether a command * processor exists. * * Returns: If the argument is a null pointer, the system function returns * non-zero only if a command processor is available. If the * argument is not a null pointer, the system function returns an * implementation-defined value. */ extern _ARMABI_THROW void *bsearch(const void * /*key*/, const void * /*base*/, size_t /*nmemb*/, size_t /*size*/, int (* /*compar*/)(const void *, const void *)) __attribute__((__nonnull__(1,2,5))); /* * searches an array of nmemb objects, the initial member of which is * pointed to by base, for a member that matches the object pointed to by * key. The size of each member of the array is specified by size. * The contents of the array shall be in ascending sorted order according to * a comparison function pointed to by compar, which is called with two * arguments that point to the key object and to an array member, in that * order. The function shall return an integer less than, equal to, or * greater than zero if the key object is considered, respectively, to be * less than, to match, or to be greater than the array member. * Returns: a pointer to a matching member of the array, or a null pointer * if no match is found. If two members compare as equal, which * member is matched is unspecified. */ #if defined(__cplusplus) && defined(__LANGUAGE_LINKAGE_CHANGES_FUNCTION_TYPE) /* bsearch that takes a ptr to a function with C++ linkage * but not in GNU mode */ typedef int (* __C_compareprocptr)(const void *, const void *); extern "C++" void *bsearch(const void * __key, const void * __base, size_t __nmemb, size_t __size, int (* __compar)(const void *, const void *)) __attribute__((__nonnull__(1,2,5))); extern "C++" inline void *bsearch(const void * __key, const void * __base, size_t __nmemb, size_t __size, int (* __compar)(const void *, const void *)) { return bsearch(__key, __base, __nmemb, __size, (__C_compareprocptr)__compar); } #endif extern _ARMABI_THROW void qsort(void * /*base*/, size_t /*nmemb*/, size_t /*size*/, int (* /*compar*/)(const void *, const void *)) __attribute__((__nonnull__(1,4))); /* * sorts an array of nmemb objects, the initial member of which is pointed * to by base. The size of each object is specified by size. * The contents of the array shall be in ascending order according to a * comparison function pointed to by compar, which is called with two * arguments that point to the objects being compared. The function shall * return an integer less than, equal to, or greater than zero if the first * argument is considered to be respectively less than, equal to, or greater * than the second. If two members compare as equal, their order in the * sorted array is unspecified. */ #if defined(__cplusplus) && defined(__LANGUAGE_LINKAGE_CHANGES_FUNCTION_TYPE) /* qsort that takes a ptr to a function with C++ linkage * but not in GNU mode */ extern "C++" void qsort(void * __base, size_t __nmemb, size_t __size, int (* __compar)(const void *, const void *)) __attribute__((__nonnull__(1,4))); extern "C++" inline void qsort(void * __base, size_t __nmemb, size_t __size, int (* __compar)(const void *, const void *)) { qsort(__base, __nmemb, __size, (__C_compareprocptr)__compar); } #endif extern _ARMABI_PURE int abs(int /*j*/); /* * computes the absolute value of an integer j. If the result cannot be * represented, the behaviour is undefined. * Returns: the absolute value. */ extern _ARMABI_PURE div_t div(int /*numer*/, int /*denom*/); /* * computes the quotient and remainder of the division of the numerator * numer by the denominator denom. If the division is inexact, the resulting * quotient is the integer of lesser magnitude that is the nearest to the * algebraic quotient. If the result cannot be represented, the behaviour is * undefined; otherwise, quot * denom + rem shall equal numer. * Returns: a structure of type div_t, comprising both the quotient and the * remainder. the structure shall contain the following members, * in either order. * int quot; int rem; */ extern _ARMABI_PURE long int labs(long int /*j*/); /* * computes the absolute value of an long integer j. If the result cannot be * represented, the behaviour is undefined. * Returns: the absolute value. */ #ifdef __cplusplus extern "C++" inline _ARMABI_PURE long abs(long int x) { return labs(x); } #endif extern _ARMABI_PURE ldiv_t ldiv(long int /*numer*/, long int /*denom*/); /* * computes the quotient and remainder of the division of the numerator * numer by the denominator denom. If the division is inexact, the sign of * the resulting quotient is that of the algebraic quotient, and the * magnitude of the resulting quotient is the largest integer less than the * magnitude of the algebraic quotient. If the result cannot be represented, * the behaviour is undefined; otherwise, quot * denom + rem shall equal * numer. * Returns: a structure of type ldiv_t, comprising both the quotient and the * remainder. the structure shall contain the following members, * in either order. * long int quot; long int rem; */ #ifdef __cplusplus extern "C++" inline _ARMABI_PURE ldiv_t div(long int __numer, long int __denom) { return ldiv(__numer, __denom); } #endif #if !defined(__STRICT_ANSI__) || __USE_C99_STDLIB extern _ARMABI_PURE __LONGLONG llabs(__LONGLONG /*j*/); /* * computes the absolute value of a long long integer j. If the * result cannot be represented, the behaviour is undefined. * Returns: the absolute value. */ #ifdef __cplusplus extern "C++" inline _ARMABI_PURE __LONGLONG abs(__LONGLONG x) { return llabs(x); } #endif extern _ARMABI_PURE lldiv_t lldiv(__LONGLONG /*numer*/, __LONGLONG /*denom*/); /* * computes the quotient and remainder of the division of the numerator * numer by the denominator denom. If the division is inexact, the sign of * the resulting quotient is that of the algebraic quotient, and the * magnitude of the resulting quotient is the largest integer less than the * magnitude of the algebraic quotient. If the result cannot be represented, * the behaviour is undefined; otherwise, quot * denom + rem shall equal * numer. * Returns: a structure of type lldiv_t, comprising both the quotient and the * remainder. the structure shall contain the following members, * in either order. * long long quot; long long rem; */ #ifdef __cplusplus extern "C++" inline _ARMABI_PURE lldiv_t div(__LONGLONG __numer, __LONGLONG __denom) { return lldiv(__numer, __denom); } #endif #endif #if !(__ARM_NO_DEPRECATED_FUNCTIONS) /* * ARM real-time divide functions for guaranteed performance */ typedef struct __sdiv32by16 { int quot, rem; } __sdiv32by16; typedef struct __udiv32by16 { unsigned int quot, rem; } __udiv32by16; /* used int so that values return in separate regs, although 16-bit */ typedef struct __sdiv64by32 { int rem, quot; } __sdiv64by32; __value_in_regs extern _ARMABI_PURE __sdiv32by16 __rt_sdiv32by16( int /*numer*/, short int /*denom*/); /* * Signed divide: (16-bit quot), (16-bit rem) = (32-bit) / (16-bit) */ __value_in_regs extern _ARMABI_PURE __udiv32by16 __rt_udiv32by16( unsigned int /*numer*/, unsigned short /*denom*/); /* * Unsigned divide: (16-bit quot), (16-bit rem) = (32-bit) / (16-bit) */ __value_in_regs extern _ARMABI_PURE __sdiv64by32 __rt_sdiv64by32( int /*numer_h*/, unsigned int /*numer_l*/, int /*denom*/); /* * Signed divide: (32-bit quot), (32-bit rem) = (64-bit) / (32-bit) */ #endif /* * ARM floating-point mask/status function (for both hardfp and softfp) */ extern _ARMABI unsigned int __fp_status(unsigned int /*mask*/, unsigned int /*flags*/); /* * mask and flags are bit-fields which correspond directly to the * floating point status register in the FPE/FPA and fplib. * __fp_status returns the current value of the status register, * and also sets the writable bits of the word * (the exception control and flag bytes) to: * * new = (old & ~mask) ^ flags; */ #define __fpsr_IXE 0x100000 #define __fpsr_UFE 0x80000 #define __fpsr_OFE 0x40000 #define __fpsr_DZE 0x20000 #define __fpsr_IOE 0x10000 #define __fpsr_IXC 0x10 #define __fpsr_UFC 0x8 #define __fpsr_OFC 0x4 #define __fpsr_DZC 0x2 #define __fpsr_IOC 0x1 /* * Multibyte Character Functions. * The behaviour of the multibyte character functions is affected by the * LC_CTYPE category of the current locale. For a state-dependent encoding, * each function is placed into its initial state by a call for which its * character pointer argument, s, is a null pointer. Subsequent calls with s * as other than a null pointer cause the internal state of the function to be * altered as necessary. A call with s as a null pointer causes these functions * to return a nonzero value if encodings have state dependency, and a zero * otherwise. After the LC_CTYPE category is changed, the shift state of these * functions is indeterminate. */ extern _ARMABI int mblen(const char * /*s*/, size_t /*n*/); /* * If s is not a null pointer, the mblen function determines the number of * bytes compromising the multibyte character pointed to by s. Except that * the shift state of the mbtowc function is not affected, it is equivalent * to mbtowc((wchar_t *)0, s, n); * Returns: If s is a null pointer, the mblen function returns a nonzero or * zero value, if multibyte character encodings, respectively, do * or do not have state-dependent encodings. If s is not a null * pointer, the mblen function either returns a 0 (if s points to a * null character), or returns the number of bytes that compromise * the multibyte character (if the next n of fewer bytes form a * valid multibyte character), or returns -1 (they do not form a * valid multibyte character). */ extern _ARMABI int mbtowc(wchar_t * __restrict /*pwc*/, const char * __restrict /*s*/, size_t /*n*/); /* * If s is not a null pointer, the mbtowc function determines the number of * bytes that compromise the multibyte character pointed to by s. It then * determines the code for value of type wchar_t that corresponds to that * multibyte character. (The value of the code corresponding to the null * character is zero). If the multibyte character is valid and pwc is not a * null pointer, the mbtowc function stores the code in the object pointed * to by pwc. At most n bytes of the array pointed to by s will be examined. * Returns: If s is a null pointer, the mbtowc function returns a nonzero or * zero value, if multibyte character encodings, respectively, do * or do not have state-dependent encodings. If s is not a null * pointer, the mbtowc function either returns a 0 (if s points to * a null character), or returns the number of bytes that * compromise the converted multibyte character (if the next n of * fewer bytes form a valid multibyte character), or returns -1 * (they do not form a valid multibyte character). */ extern _ARMABI int wctomb(char * /*s*/, wchar_t /*wchar*/); /* * determines the number of bytes need to represent the multibyte character * corresponding to the code whose value is wchar (including any change in * shift state). It stores the multibyte character representation in the * array object pointed to by s (if s is not a null pointer). At most * MB_CUR_MAX characters are stored. If the value of wchar is zero, the * wctomb function is left in the initial shift state). * Returns: If s is a null pointer, the wctomb function returns a nonzero or * zero value, if multibyte character encodings, respectively, do * or do not have state-dependent encodings. If s is not a null * pointer, the wctomb function returns a -1 if the value of wchar * does not correspond to a valid multibyte character, or returns * the number of bytes that compromise the multibyte character * corresponding to the value of wchar. */ /* * Multibyte String Functions. * The behaviour of the multibyte string functions is affected by the LC_CTYPE * category of the current locale. */ extern _ARMABI size_t mbstowcs(wchar_t * __restrict /*pwcs*/, const char * __restrict /*s*/, size_t /*n*/) __attribute__((__nonnull__(2))); /* * converts a sequence of multibyte character that begins in the initial * shift state from the array pointed to by s into a sequence of * corresponding codes and stores not more than n codes into the array * pointed to by pwcs. No multibyte character that follow a null character * (which is converted into a code with value zero) will be examined or * converted. Each multibyte character is converted as if by a call to * mbtowc function, except that the shift state of the mbtowc function is * not affected. No more than n elements will be modified in the array * pointed to by pwcs. If copying takes place between objects that overlap, * the behaviour is undefined. * Returns: If an invalid multibyte character is encountered, the mbstowcs * function returns (size_t)-1. Otherwise, the mbstowcs function * returns the number of array elements modified, not including * a terminating zero code, if any. */ extern _ARMABI size_t wcstombs(char * __restrict /*s*/, const wchar_t * __restrict /*pwcs*/, size_t /*n*/) __attribute__((__nonnull__(2))); /* * converts a sequence of codes that correspond to multibyte characters * from the array pointed to by pwcs into a sequence of multibyte * characters that begins in the initial shift state and stores these * multibyte characters into the array pointed to by s, stopping if a * multibyte character would exceed the limit of n total bytes or if a * null character is stored. Each code is converted as if by a call to the * wctomb function, except that the shift state of the wctomb function is * not affected. No more than n elements will be modified in the array * pointed to by s. If copying takes place between objects that overlap, * the behaviour is undefined. * Returns: If a code is encountered that does not correspond to a valid * multibyte character, the wcstombs function returns (size_t)-1. * Otherwise, the wcstombs function returns the number of bytes * modified, not including a terminating null character, if any. */ extern _ARMABI void __use_realtime_heap(void); extern _ARMABI void __use_realtime_division(void); extern _ARMABI void __use_two_region_memory(void); extern _ARMABI void __use_no_heap(void); extern _ARMABI void __use_no_heap_region(void); extern _ARMABI char const *__C_library_version_string(void); extern _ARMABI int __C_library_version_number(void); #ifdef __cplusplus } /* extern "C" */ } /* namespace std */ #endif /* __cplusplus */ #endif /* __STDLIB_DECLS */ #if _AEABI_PORTABILITY_LEVEL != 0 && !defined _AEABI_PORTABLE #define _AEABI_PORTABLE #endif #ifdef __cplusplus #ifndef __STDLIB_NO_EXPORTS #if !defined(__STRICT_ANSI__) || __USE_C99_STDLIB using ::std::atoll; using ::std::lldiv_t; #endif /* !defined(__STRICT_ANSI__) || __USE_C99_STDLIB */ using ::std::div_t; using ::std::ldiv_t; using ::std::atof; using ::std::atoi; using ::std::atol; using ::std::strtod; #if !defined(__STRICT_ANSI__) || __USE_C99_STDLIB using ::std::strtof; using ::std::strtold; #endif using ::std::strtol; using ::std::strtoul; using ::std::strtoll; using ::std::strtoull; using ::std::rand; using ::std::srand; using ::std::_rand_state; using ::std::_rand_r; using ::std::_srand_r; using ::std::_ANSI_rand_state; using ::std::_ANSI_rand_r; using ::std::_ANSI_srand_r; using ::std::calloc; using ::std::free; using ::std::malloc; using ::std::realloc; #if !defined(__STRICT_ANSI__) using ::std::posix_memalign; #endif using ::std::__heapprt; using ::std::__heapstats; using ::std::__heapvalid; using ::std::abort; using ::std::atexit; using ::std::exit; using ::std::_Exit; using ::std::getenv; using ::std::system; using ::std::bsearch; using ::std::qsort; using ::std::abs; using ::std::div; using ::std::labs; using ::std::ldiv; #if !defined(__STRICT_ANSI__) || __USE_C99_STDLIB using ::std::llabs; using ::std::lldiv; #endif /* !defined(__STRICT_ANSI__) || __USE_C99_STDLIB */ #if !(__ARM_NO_DEPRECATED_FUNCTIONS) using ::std::__sdiv32by16; using ::std::__udiv32by16; using ::std::__sdiv64by32; using ::std::__rt_sdiv32by16; using ::std::__rt_udiv32by16; using ::std::__rt_sdiv64by32; #endif using ::std::__fp_status; using ::std::mblen; using ::std::mbtowc; using ::std::wctomb; using ::std::mbstowcs; using ::std::wcstombs; using ::std::__use_realtime_heap; using ::std::__use_realtime_division; using ::std::__use_two_region_memory; using ::std::__use_no_heap; using ::std::__use_no_heap_region; using ::std::__C_library_version_string; using ::std::__C_library_version_number; using ::std::size_t; using ::std::__aeabi_MB_CUR_MAX; #endif /* __STDLIB_NO_EXPORTS */ #endif /* __cplusplus */ #undef __LONGLONG #endif /* __stdlib_h */ /* end of stdlib.h */ 这是啥

#include "stm32f10x.h" // Device header #include "Delay.h" #include "Key.h" #include "Led.h" #include "serial.h" #include "OLED.h" #include "Time.h" #include "Stack.h" static unsigned char Clear_Index=0; //清零检索 static unsigned char Count_Index=0; //计算检索 static uint32_t Index=0; static unsigned char Firmula[100]; //存储算数式子 static unsigned int Result; //存储结果 void USART1_IRQHandler(void); unsigned char a=19; int main(void) { Key_Init(); OLED_Init(); Serial_Init(); while(1) { if(Key_GetNum1()) //计算算数式 { Result=Deposit(Firmula); Count_Index=1; } if(Count_Index) //发送结果 { if(Key_GetNum2()) { printf("结果=%d",Result); OLED_ShowNum(1,1,Result,4); Index=0; Clear_Index=1; Count_Index=0; } } if(Clear_Index) //清零 { if(Key_GetNum3()) { Clear_Index=0; Init(); } } else if(!Clear_Index) { if(Key_GetNum3()) { printf("请输入运算式"); } } } } void USART1_IRQHandler(void) //串口中断函数 { Firmula[Index]=Serial_Getbyte(); printf("%c",Firmula[Index]); Index++; }#include "stm32f10x.h"// Device header #include "Stack.h" #include<ctype.h> #include "Serial.h" Stack_char Stack_CHAR; Stack_num Stack_NUM; uint8_t Push_char(Stack_char *stack,uint8_t CH); uint8_t Pop_char(Stack_char *stack,uint8_t *c); uint8_t Push_num(Stack_num *stack,unsigned int NUM); uint8_t Pop_num(Stack_num *stack,unsigned int *n); void Eval(void); uint16_t Priority(uint8_t ch); void Init(void) { Stack_NUM.top=0; Stack_CHAR.top=0; } uint16_t Priority(uint8_t ch) { switch(ch) { case '(' : case ')' : return 3; case '*' : case '/' : return 2; case '+' : case '-' : return 1; default : return 0; //分化优先级 } } uint32_t Deposit(uint8_t *String) { unsigned int i,j,index=0; uint8_t C; Init(); for(i = 0;String[i]!='\0'&&i < Stack_Size ;i++) { if(isdigit(String[i])) //判断是否 '0'<=string<='9' { index=0; j=i; for(;isdigit(String[j])&&j< Stack_Size;j++) { index=index*10+(String[j]-'0'); } Push_num(&Stack_NUM,index); i=j-1; //因为for循环多加了1,所以减去1 } else if(String[i]=='(') { Push_char(&Stack_CHAR,String[i]); } else if(String[i]==')') { while(Stack_CHAR.ch[Stack_CHAR.top] != '(') {Eval();} //直到遇到左括号,并且计算 if(Stack_CHAR.top != 0 && Stack_CHAR.ch[Stack_CHAR.top] == '(') { Pop_char(&Stack_CHAR,&C); //弹出左括号 } } else { while(Stack_CHAR.top!=0&&Stack_CHAR.ch[Stack_CHAR.top]!='('&&Priority(Stack_CHAR.ch[Stack_CHAR.top])>=Priority(String[i])) { Eval(); } Push_char(&Stack_CHAR,String[i]); } } while(Stack_CHAR.top) { Eval(); } //循环直至操作符为空 return Stack_NUM.num[Stack_NUM.top]; //此时数栈顶元素即为表达式值 } void Eval(void) { uint32_t a,x,b; uint8_t cha; Pop_num(&Stack_NUM,&b); Pop_num(&Stack_NUM,&a); //由于栈是陷进后出,与队列有区别(先进出) Pop_char(&Stack_CHAR,&cha); switch(cha) { case '*' : x=a*b;break; //计算 case '/' : { if(b==0) {printf("除数不能为0");x=0;} else {x=a/b;} break; } case '+' : {x=a+b;break;} case '-' : {x=a-b;break;} default :break; } Push_num(&Stack_NUM,x); } uint8_t Push_char(Stack_char *stack,uint8_t CH) { if(stack->top>=Stack_Size) { return 0; } stack->top++; stack->ch[stack->top]=CH; return 1; } uint8_t Push_num(Stack_num *stack,unsigned int NUM) { if(stack->top>=Stack_Size) { return 0; } stack->top++; stack->num[stack->top]=NUM; return 1; } uint8_t Pop_char(Stack_char *stack,uint8_t *c) { if(stack->top<=0) { return 0; } *c=stack->ch[stack->top]; stack->top--; return 1; } uint8_t Pop_num(Stack_num *stack,unsigned int *n) { if(stack->top<=0) { return 0; } *n=stack->num[stack->top]; stack->top--; return 1; } /* Copyright (C) ARM Ltd., 1999,2014 */ /* All rights reserved */ /* * RCS $Revision$ * Checkin $Date$ * Revising $Author: agrant $ */ #ifndef __stdint_h #define __stdint_h #define __ARMCLIB_VERSION 5060034 #ifdef __INT64_TYPE__ /* armclang predefines '__INT64_TYPE__' and '__INT64_C_SUFFIX__' */ #define __INT64 __INT64_TYPE__ #else /* armcc has builtin '__int64' which can be used in --strict mode */ #define __INT64 __int64 #define __INT64_C_SUFFIX__ ll #endif #define __PASTE2(x, y) x ## y #define __PASTE(x, y) __PASTE2(x, y) #define __INT64_C(x) __ESCAPE__(__PASTE(x, __INT64_C_SUFFIX__)) #define __UINT64_C(x) __ESCAPE__(__PASTE(x ## u, __INT64_C_SUFFIX__)) #if defined(__clang__) || (defined(__ARMCC_VERSION) && !defined(__STRICT_ANSI__)) /* armclang and non-strict armcc allow 'long long' in system headers */ #define __LONGLONG long long #else /* strict armcc has '__int64' */ #define __LONGLONG __int64 #endif #ifndef __STDINT_DECLS #define __STDINT_DECLS #undef __CLIBNS #ifdef __cplusplus namespace std { #define __CLIBNS std:: extern "C" { #else #define __CLIBNS #endif /* __cplusplus */ /* * 'signed' is redundant below, except for 'signed char' and if * the typedef is used to declare a bitfield. */ /* 7.18.1.1 */ /* exact-width signed integer types */ typedef signed char int8_t; typedef signed short int int16_t; typedef signed int int32_t; typedef signed __INT64 int64_t; /* exact-width unsigned integer types */ typedef unsigned char uint8_t; typedef unsigned short int uint16_t; typedef unsigned int uint32_t; typedef unsigned __INT64 uint64_t; /* 7.18.1.2 */ /* smallest type of at least n bits */ /* minimum-width signed integer types */ typedef signed char int_least8_t; typedef signed short int int_least16_t; typedef signed int int_least32_t; typedef signed __INT64 int_least64_t; /* minimum-width unsigned integer types */ typedef unsigned char uint_least8_t; typedef unsigned short int uint_least16_t; typedef unsigned int uint_least32_t; typedef unsigned __INT64 uint_least64_t; /* 7.18.1.3 */ /* fastest minimum-width signed integer types */ typedef signed int int_fast8_t; typedef signed int int_fast16_t; typedef signed int int_fast32_t; typedef signed __INT64 int_fast64_t; /* fastest minimum-width unsigned integer types */ typedef unsigned int uint_fast8_t; typedef unsigned int uint_fast16_t; typedef unsigned int uint_fast32_t; typedef unsigned __INT64 uint_fast64_t; /* 7.18.1.4 integer types capable of holding object pointers */ #if __sizeof_ptr == 8 typedef signed __INT64 intptr_t; typedef unsigned __INT64 uintptr_t; #else typedef signed int intptr_t; typedef unsigned int uintptr_t; #endif /* 7.18.1.5 greatest-width integer types */ typedef signed __LONGLONG intmax_t; typedef unsigned __LONGLONG uintmax_t; #if !defined(__cplusplus) || defined(__STDC_LIMIT_MACROS) /* 7.18.2.1 */ /* minimum values of exact-width signed integer types */ #define INT8_MIN -128 #define INT16_MIN -32768 #define INT32_MIN (~0x7fffffff) /* -2147483648 is unsigned */ #define INT64_MIN __INT64_C(~0x7fffffffffffffff) /* -9223372036854775808 is unsigned */ /* maximum values of exact-width signed integer types */ #define INT8_MAX 127 #define INT16_MAX 32767 #define INT32_MAX 2147483647 #define INT64_MAX __INT64_C(9223372036854775807) /* maximum values of exact-width unsigned integer types */ #define UINT8_MAX 255 #define UINT16_MAX 65535 #define UINT32_MAX 4294967295u #define UINT64_MAX __UINT64_C(18446744073709551615) /* 7.18.2.2 */ /* minimum values of minimum-width signed integer types */ #define INT_LEAST8_MIN -128 #define INT_LEAST16_MIN -32768 #define INT_LEAST32_MIN (~0x7fffffff) #define INT_LEAST64_MIN __INT64_C(~0x7fffffffffffffff) /* maximum values of minimum-width signed integer types */ #define INT_LEAST8_MAX 127 #define INT_LEAST16_MAX 32767 #define INT_LEAST32_MAX 2147483647 #define INT_LEAST64_MAX __INT64_C(9223372036854775807) /* maximum values of minimum-width unsigned integer types */ #define UINT_LEAST8_MAX 255 #define UINT_LEAST16_MAX 65535 #define UINT_LEAST32_MAX 4294967295u #define UINT_LEAST64_MAX __UINT64_C(18446744073709551615) /* 7.18.2.3 */ /* minimum values of fastest minimum-width signed integer types */ #define INT_FAST8_MIN (~0x7fffffff) #define INT_FAST16_MIN (~0x7fffffff) #define INT_FAST32_MIN (~0x7fffffff) #define INT_FAST64_MIN __INT64_C(~0x7fffffffffffffff) /* maximum values of fastest minimum-width signed integer types */ #define INT_FAST8_MAX 2147483647 #define INT_FAST16_MAX 2147483647 #define INT_FAST32_MAX 2147483647 #define INT_FAST64_MAX __INT64_C(9223372036854775807) /* maximum values of fastest minimum-width unsigned integer types */ #define UINT_FAST8_MAX 4294967295u #define UINT_FAST16_MAX 4294967295u #define UINT_FAST32_MAX 4294967295u #define UINT_FAST64_MAX __UINT64_C(18446744073709551615) /* 7.18.2.4 */ /* minimum value of pointer-holding signed integer type */ #if __sizeof_ptr == 8 #define INTPTR_MIN INT64_MIN #else #define INTPTR_MIN INT32_MIN #endif /* maximum value of pointer-holding signed integer type */ #if __sizeof_ptr == 8 #define INTPTR_MAX INT64_MAX #else #define INTPTR_MAX INT32_MAX #endif /* maximum value of pointer-holding unsigned integer type */ #if __sizeof_ptr == 8 #define UINTPTR_MAX UINT64_MAX #else #define UINTPTR_MAX UINT32_MAX #endif /* 7.18.2.5 */ /* minimum value of greatest-width signed integer type */ #define INTMAX_MIN __ESCAPE__(~0x7fffffffffffffffll) /* maximum value of greatest-width signed integer type */ #define INTMAX_MAX __ESCAPE__(9223372036854775807ll) /* maximum value of greatest-width unsigned integer type */ #define UINTMAX_MAX __ESCAPE__(18446744073709551615ull) /* 7.18.3 */ /* limits of ptrdiff_t */ #if __sizeof_ptr == 8 #define PTRDIFF_MIN INT64_MIN #define PTRDIFF_MAX INT64_MAX #else #define PTRDIFF_MIN INT32_MIN #define PTRDIFF_MAX INT32_MAX #endif /* limits of sig_atomic_t */ #define SIG_ATOMIC_MIN (~0x7fffffff) #define SIG_ATOMIC_MAX 2147483647 /* limit of size_t */ #if __sizeof_ptr == 8 #define SIZE_MAX UINT64_MAX #else #define SIZE_MAX UINT32_MAX #endif /* limits of wchar_t */ /* NB we have to undef and redef because they're defined in both * stdint.h and wchar.h */ #undef WCHAR_MIN #undef WCHAR_MAX #if defined(__WCHAR32) || (defined(__ARM_SIZEOF_WCHAR_T) && __ARM_SIZEOF_WCHAR_T == 4) #define WCHAR_MIN 0 #define WCHAR_MAX 0xffffffffU #else #define WCHAR_MIN 0 #define WCHAR_MAX 65535 #endif /* limits of wint_t */ #define WINT_MIN (~0x7fffffff) #define WINT_MAX 2147483647 #endif /* __STDC_LIMIT_MACROS */ #if !defined(__cplusplus) || defined(__STDC_CONSTANT_MACROS) /* 7.18.4.1 macros for minimum-width integer constants */ #define INT8_C(x) (x) #define INT16_C(x) (x) #define INT32_C(x) (x) #define INT64_C(x) __INT64_C(x) #define UINT8_C(x) (x ## u) #define UINT16_C(x) (x ## u) #define UINT32_C(x) (x ## u) #define UINT64_C(x) __UINT64_C(x) /* 7.18.4.2 macros for greatest-width integer constants */ #define INTMAX_C(x) __ESCAPE__(x ## ll) #define UINTMAX_C(x) __ESCAPE__(x ## ull) #endif /* __STDC_CONSTANT_MACROS */ #ifdef __cplusplus } /* extern "C" */ } /* namespace std */ #endif /* __cplusplus */ #endif /* __STDINT_DECLS */ #ifdef __cplusplus #ifndef __STDINT_NO_EXPORTS using ::std::int8_t; using ::std::int16_t; using ::std::int32_t; using ::std::int64_t; using ::std::uint8_t; using ::std::uint16_t; using ::std::uint32_t; using ::std::uint64_t; using ::std::int_least8_t; using ::std::int_least16_t; using ::std::int_least32_t; using ::std::int_least64_t; using ::std::uint_least8_t; using ::std::uint_least16_t; using ::std::uint_least32_t; using ::std::uint_least64_t; using ::std::int_fast8_t; using ::std::int_fast16_t; using ::std::int_fast32_t; using ::std::int_fast64_t; using ::std::uint_fast8_t; using ::std::uint_fast16_t; using ::std::uint_fast32_t; using ::std::uint_fast64_t; using ::std::intptr_t; using ::std::uintptr_t; using ::std::intmax_t; using ::std::uintmax_t; #endif #endif /* __cplusplus */ #undef __INT64 #undef __LONGLONG #endif /* __stdint_h */ /* end of stdint.h */ 在不改变原代码变量名情况下,实现小数点预算

C:\Users\涂大钧\.jdks\corretto-17.0.14\bin\java.exe -XX:TieredStopAtLevel=1 -Dspring.output.ansi.enabled=always -Dcom.sun.management.jmxremote -Dspring.jmx.enabled=true -Dspring.liveBeansView.mbeanDomain -Dspring.application.admin.enabled=true "-Dmanagement.endpoints.jmx.exposure.include=*" "-javaagent:C:\Program Files\JetBrains\IntelliJ IDEA 2024.1.4\lib\idea_rt.jar=59243:C:\Program Files\JetBrains\IntelliJ IDEA 2024.1.4\bin" -Dfile.encoding=UTF-8 -classpath D:\AAAAA\笔记\reids7\target\classes;D:\develop\MAVEN\apache-maven-3.9.10\repository\org\springframework\boot\spring-boot-starter-web\3.5.3\spring-boot-starter-web-3.5.3.jar;D:\develop\MAVEN\apache-maven-3.9.10\repository\org\springframework\boot\spring-boot-starter\3.5.3\spring-boot-starter-3.5.3.jar;D:\develop\MAVEN\apache-maven-3.9.10\repository\org\springframework\boot\spring-boot\3.5.3\spring-boot-3.5.3.jar;D:\develop\MAVEN\apache-maven-3.9.10\repository\org\springframework\boot\spring-boot-autoconfigure\3.5.3\spring-boot-autoconfigure-3.5.3.jar;D:\develop\MAVEN\apache-maven-3.9.10\repository\org\springframework\boot\spring-boot-starter-logging\3.5.3\spring-boot-starter-logging-3.5.3.jar;D:\develop\MAVEN\apache-maven-3.9.10\repository\ch\qos\logback\logback-classic\1.5.18\logback-classic-1.5.18.jar;D:\develop\MAVEN\apache-maven-3.9.10\repository\ch\qos\logback\logback-core\1.5.18\logback-core-1.5.18.jar;D:\develop\MAVEN\apache-maven-3.9.10\repository\org\apache\logging\log4j\log4j-to-slf4j\2.24.3\log4j-to-slf4j-2.24.3.jar;D:\develop\MAVEN\apache-maven-3.9.10\repository\org\apache\logging\log4j\log4j-api\2.24.3\log4j-api-2.24.3.jar;D:\develop\MAVEN\apache-maven-3.9.10\repository\org\slf4j\jul-to-slf4j\2.0.17\jul-to-slf4j-2.0.17.jar;D:\develop\MAVEN\apache-maven-3.9.10\repository\jakarta\annotation\jakarta.annotation-api\2.1.1\jakarta.annotation-api-2.1.1.jar;D:\develop\MAVEN\apache-maven-3.9.10\repository\org\yaml\snakeyaml\2.4\snakeyaml-2.4.jar;D:\develop\MAVEN\apache-maven-3.9.10\repository\org\springframework\boot\spring-boot-starter-json\3.5.3\spring-boot-starter-json-3.5.3.jar;D:\develop\MAVEN\apache-maven-3.9.10\repository\com\fasterxml\jackson\datatype\jackson-datatype-jdk8\2.19.1\jackson-datatype-jdk8-2.19.1.jar;D:\develop\MAVEN\apache-maven-3.9.10\repository\com\fasterxml\jackson\datatype\jackson-datatype-jsr310\2.19.1\jackson-datatype-jsr310-2.19.1.jar;D:\develop\MAVEN\apache-maven-3.9.10\repository\com\fasterxml\jackson\module\jackson-module-parameter-names\2.19.1\jackson-module-parameter-names-2.19.1.jar;D:\develop\MAVEN\apache-maven-3.9.10\repository\org\springframework\boot\spring-boot-starter-tomcat\3.5.3\spring-boot-starter-tomcat-3.5.3.jar;D:\develop\MAVEN\apache-maven-3.9.10\repository\org\apache\tomcat\embed\tomcat-embed-core\10.1.42\tomcat-embed-core-10.1.42.jar;D:\develop\MAVEN\apache-maven-3.9.10\repository\org\apache\tomcat\embed\tomcat-embed-el\10.1.42\tomcat-embed-el-10.1.42.jar;D:\develop\MAVEN\apache-maven-3.9.10\repository\org\apache\tomcat\embed\tomcat-embed-websocket\10.1.42\tomcat-embed-websocket-10.1.42.jar;D:\develop\MAVEN\apache-maven-3.9.10\repository\org\springframework\spring-web\6.2.8\spring-web-6.2.8.jar;D:\develop\MAVEN\apache-maven-3.9.10\repository\org\springframework\spring-beans\6.2.8\spring-beans-6.2.8.jar;D:\develop\MAVEN\apache-maven-3.9.10\repository\io\micrometer\micrometer-observation\1.15.1\micrometer-observation-1.15.1.jar;D:\develop\MAVEN\apache-maven-3.9.10\repository\io\micrometer\micrometer-commons\1.15.1\micrometer-commons-1.15.1.jar;D:\develop\MAVEN\apache-maven-3.9.10\repository\org\springframework\spring-webmvc\6.2.8\spring-webmvc-6.2.8.jar;D:\develop\MAVEN\apache-maven-3.9.10\repository\org\springframework\spring-aop\6.2.8\spring-aop-6.2.8.jar;D:\develop\MAVEN\apache-maven-3.9.10\repository\org\springframework\spring-context\6.2.8\spring-context-6.2.8.jar;D:\develop\MAVEN\apache-maven-3.9.10\repository\org\springframework\spring-expression\6.2.8\spring-expression-6.2.8.jar;D:\develop\MAVEN\apache-maven-3.9.10\repository\redis\clients\jedis\4.3.1\jedis-4.3.1.jar;D:\develop\MAVEN\apache-maven-3.9.10\repository\org\slf4j\slf4j-api\2.0.17\slf4j-api-2.0.17.jar;D:\develop\MAVEN\apache-maven-3.9.10\repository\org\json\json\20220320\json-20220320.jar;D:\develop\MAVEN\apache-maven-3.9.10\repository\com\google\code\gson\gson\2.13.1\gson-2.13.1.jar;D:\develop\MAVEN\apache-maven-3.9.10\repository\com\google\errorprone\error_prone_annotations\2.38.0\error_prone_annotations-2.38.0.jar;D:\develop\MAVEN\apache-maven-3.9.10\repository\org\springframework\boot\spring-boot-starter-data-redis\3.5.3\spring-boot-starter-data-redis-3.5.3.jar;D:\develop\MAVEN\apache-maven-3.9.10\repository\org\springframework\data\spring-data-redis\3.5.1\spring-data-redis-3.5.1.jar;D:\develop\MAVEN\apache-maven-3.9.10\repository\org\springframework\data\spring-data-keyvalue\3.5.1\spring-data-keyvalue-3.5.1.jar;D:\develop\MAVEN\apache-maven-3.9.10\repository\org\springframework\data\spring-data-commons\3.5.1\spring-data-commons-3.5.1.jar;D:\develop\MAVEN\apache-maven-3.9.10\repository\org\springframework\spring-tx\6.2.8\spring-tx-6.2.8.jar;D:\develop\MAVEN\apache-maven-3.9.10\repository\org\springframework\spring-oxm\6.2.8\spring-oxm-6.2.8.jar;D:\develop\MAVEN\apache-maven-3.9.10\repository\org\springframework\spring-context-support\6.2.8\spring-context-support-6.2.8.jar;D:\develop\MAVEN\apache-maven-3.9.10\repository\io\lettuce\lettuce-core\6.3.2.RELEASE\lettuce-core-6.3.2.RELEASE.jar;D:\develop\MAVEN\apache-maven-3.9.10\repository\io\netty\netty-common\4.1.122.Final\netty-common-4.1.122.Final.jar;D:\develop\MAVEN\apache-maven-3.9.10\repository\io\netty\netty-handler\4.1.122.Final\netty-handler-4.1.122.Final.jar;D:\develop\MAVEN\apache-maven-3.9.10\repository\io\netty\netty-resolver\4.1.122.Final\netty-resolver-4.1.122.Final.jar;D:\develop\MAVEN\apache-maven-3.9.10\repository\io\netty\netty-buffer\4.1.122.Final\netty-buffer-4.1.122.Final.jar;D:\develop\MAVEN\apache-maven-3.9.10\repository\io\netty\netty-transport-native-unix-common\4.1.122.Final\netty-transport-native-unix-common-4.1.122.Final.jar;D:\develop\MAVEN\apache-maven-3.9.10\repository\io\netty\netty-codec\4.1.122.Final\netty-codec-4.1.122.Final.jar;D:\develop\MAVEN\apache-maven-3.9.10\repository\io\netty\netty-transport\4.1.122.Final\netty-transport-4.1.122.Final.jar;D:\develop\MAVEN\apache-maven-3.9.10\repository\io\projectreactor\reactor-core\3.7.7\reactor-core-3.7.7.jar;D:\develop\MAVEN\apache-maven-3.9.10\repository\org\reactivestreams\reactive-streams\1.0.4\reactive-streams-1.0.4.jar;D:\develop\MAVEN\apache-maven-3.9.10\repository\org\apache\commons\commons-pool2\2.12.1\commons-pool2-2.12.1.jar;D:\develop\MAVEN\apache-maven-3.9.10\repository\io\springfox\springfox-swagger2\2.9.2\springfox-swagger2-2.9.2.jar;D:\develop\MAVEN\apache-maven-3.9.10\repository\io\swagger\swagger-annotations\1.5.20\swagger-annotations-1.5.20.jar;D:\develop\MAVEN\apache-maven-3.9.10\repository\io\swagger\swagger-models\1.5.20\swagger-models-1.5.20.jar;D:\develop\MAVEN\apache-maven-3.9.10\repository\io\springfox\springfox-spi\2.9.2\springfox-spi-2.9.2.jar;D:\develop\MAVEN\apache-maven-3.9.10\repository\io\springfox\springfox-core\2.9.2\springfox-core-2.9.2.jar;D:\develop\MAVEN\apache-maven-3.9.10\repository\io\springfox\springfox-schema\2.9.2\springfox-schema-2.9.2.jar;D:\develop\MAVEN\apache-maven-3.9.10\repository\io\springfox\springfox-swagger-common\2.9.2\springfox-swagger-common-2.9.2.jar;D:\develop\MAVEN\apache-maven-3.9.10\repository\io\springfox\springfox-spring-web\2.9.2\springfox-spring-web-2.9.2.jar;D:\develop\MAVEN\apache-maven-3.9.10\repository\com\google\guava\guava\20.0\guava-20.0.jar;D:\develop\MAVEN\apache-maven-3.9.10\repository\com\fasterxml\classmate\1.7.0\classmate-1.7.0.jar;D:\develop\MAVEN\apache-maven-3.9.10\repository\org\springframework\plugin\spring-plugin-core\1.2.0.RELEASE\spring-plugin-core-1.2.0.RELEASE.jar;D:\develop\MAVEN\apache-maven-3.9.10\repository\org\springframework\plugin\spring-plugin-metadata\1.2.0.RELEASE\spring-plugin-metadata-1.2.0.RELEASE.jar;D:\develop\MAVEN\apache-maven-3.9.10\repository\org\mapstruct\mapstruct\1.2.0.Final\mapstruct-1.2.0.Final.jar;D:\develop\MAVEN\apache-maven-3.9.10\repository\io\springfox\springfox-swagger-ui\2.9.2\springfox-swagger-ui-2.9.2.jar;D:\develop\MAVEN\apache-maven-3.9.10\repository\org\projectlombok\lombok\1.18.38\lombok-1.18.38.jar;D:\develop\MAVEN\apache-maven-3.9.10\repository\jakarta\xml\bind\jakarta.xml.bind-api\4.0.2\jakarta.xml.bind-api-4.0.2.jar;D:\develop\MAVEN\apache-maven-3.9.10\repository\jakarta\activation\jakarta.activation-api\2.1.3\jakarta.activation-api-2.1.3.jar;D:\develop\MAVEN\apache-maven-3.9.10\repository\net\bytebuddy\byte-buddy\1.17.6\byte-buddy-1.17.6.jar;D:\develop\MAVEN\apache-maven-3.9.10\repository\org\springframework\spring-core\6.2.8\spring-core-6.2.8.jar;D:\develop\MAVEN\apache-maven-3.9.10\repository\org\springframework\spring-jcl\6.2.8\spring-jcl-6.2.8.jar;D:\develop\MAVEN\apache-maven-3.9.10\repository\com\fasterxml\jackson\core\jackson-databind\2.19.1\jackson-databind-2.19.1.jar;D:\develop\MAVEN\apache-maven-3.9.10\repository\com\fasterxml\jackson\core\jackson-annotations\2.19.1\jackson-annotations-2.19.1.jar;D:\develop\MAVEN\apache-maven-3.9.10\repository\com\fasterxml\jackson\core\jackson-core\2.19.1\jackson-core-2.19.1.jar com.sky.reids7.Reids7Application . ____ _ __ _ _ /\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \ ( ( )\___ | '_ | '_| | '_ \/ _ | \ \ \ \ \\/ ___)| |_)| | | | | || (_| | ) ) ) ) ' |____| .__|_| |_|_| |_\__, | / / / / =========|_|==============|___/=/_/_/_/ :: Spring Boot :: (v3.5.3) 2025-07-16 15:28:52.475 [main] INFO com.sky.reids7.Reids7Application- Starting Reids7Application using Java 17.0.14 with PID 7548 (D:\AAAAA\笔记\reids7\target\classes started by 涂大钧 in D:\AAAAA\笔记\reids7) 2025-07-16 15:28:52.477 [main] INFO com.sky.reids7.Reids7Application- No active profile set, falling back to 1 default profile: "default" 2025-07-16 15:28:52.951 [main] INFO org.springframework.data.repository.config.RepositoryConfigurationDelegate- Multiple Spring Data modules found, entering strict repository configuration mode 2025-07-16 15:28:52.953 [main] INFO org.springframework.data.repository.config.RepositoryConfigurationDelegate- Bootstrapping Spring Data Redis repositories in DEFAULT mode. 2025-07-16 15:28:52.973 [main] INFO org.springframework.data.repository.config.RepositoryConfigurationDelegate- Finished Spring Data repository scanning in 9 ms. Found 0 Redis repository interfaces. 2025-07-16 15:28:53.292 [main] INFO org.springframework.boot.web.embedded.tomcat.TomcatWebServer- Tomcat initialized with port 8080 (http) 2025-07-16 15:28:53.301 [main] INFO org.apache.catalina.core.StandardService- Starting service [Tomcat] 2025-07-16 15:28:53.301 [main] INFO org.apache.catalina.core.StandardEngine- Starting Servlet engine: [Apache Tomcat/10.1.42] 2025-07-16 15:28:53.341 [main] INFO org.apache.catalina.core.ContainerBase.[Tomcat].[localhost].[/]- Initializing Spring embedded WebApplicationContext 2025-07-16 15:28:53.341 [main] INFO org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext- Root WebApplicationContext: initialization completed in 840 ms 2025-07-16 15:28:53.579 [main] WARN org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext- Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'orderController': Injection of resource dependencies failed 2025-07-16 15:28:53.585 [main] INFO org.apache.catalina.core.StandardService- Stopping service [Tomcat] 2025-07-16 15:28:53.593 [main] INFO org.springframework.boot.autoconfigure.logging.ConditionEvaluationReportLogger- Error starting ApplicationContext. To display the condition evaluation report re-run your application with 'debug' enabled. 2025-07-16 15:28:53.603 [main] ERROR org.springframework.boot.SpringApplication- Application run failed org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'orderController': Injection of resource dependencies failed at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.postProcessProperties(CommonAnnotationBeanPostProcessor.java:372) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1459) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:606) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:529) at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:339) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:373) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:337) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202) at org.springframework.beans.factory.support.DefaultListableBeanFactory.instantiateSingleton(DefaultListableBeanFactory.java:1222) at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingleton(DefaultListableBeanFactory.java:1188) at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:1123) at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:987) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:627) at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:146) at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:752) at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:439) at org.springframework.boot.SpringApplication.run(SpringApplication.java:318) at org.springframework.boot.SpringApplication.run(SpringApplication.java:1361) at org.springframework.boot.SpringApplication.run(SpringApplication.java:1350) at com.sky.reids7.Reids7Application.main(Reids7Application.java:10) Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'orderService': Injection of resource dependencies failed at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.postProcessProperties(CommonAnnotationBeanPostProcessor.java:372) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1459) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:606) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:529) at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:339) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:373) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:337) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:207) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.resolveBeanByName(AbstractAutowireCapableBeanFactory.java:468) at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.autowireResource(CommonAnnotationBeanPostProcessor.java:606) at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.getResource(CommonAnnotationBeanPostProcessor.java:577) at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor$ResourceElement.getResourceToInject(CommonAnnotationBeanPostProcessor.java:739) at org.springframework.beans.factory.annotation.InjectionMetadata$InjectedElement.inject(InjectionMetadata.java:272) at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:146) at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.postProcessProperties(CommonAnnotationBeanPostProcessor.java:369) ... 19 common frames omitted Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'redisTemplate' defined in class path resource [org/springframework/boot/autoconfigure/data/redis/RedisAutoConfiguration.class]: Unsatisfied dependency expressed through method 'redisTemplate' parameter 0: Error creating bean with name 'redisConnectionFactory' defined in class path resource [org/springframework/boot/autoconfigure/data/redis/LettuceConnectionConfiguration.class]: HEXPIRE at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:804) at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:546) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1375) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1205) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:569) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:529) at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:339) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:373) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:337) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:207) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.resolveBeanByName(AbstractAutowireCapableBeanFactory.java:468) at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.autowireResource(CommonAnnotationBeanPostProcessor.java:606) at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.getResource(CommonAnnotationBeanPostProcessor.java:577) at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor$ResourceElement.getResourceToInject(CommonAnnotationBeanPostProcessor.java:739) at org.springframework.beans.factory.annotation.InjectionMetadata$InjectedElement.inject(InjectionMetadata.java:272) at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:146) at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.postProcessProperties(CommonAnnotationBeanPostProcessor.java:369) ... 33 common frames omitted Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'redisConnectionFactory' defined in class path resource [org/springframework/boot/autoconfigure/data/redis/LettuceConnectionConfiguration.class]: HEXPIRE at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1826) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:607) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:529) at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:339) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:373) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:337) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202) at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1683) at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1628) at org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument(ConstructorResolver.java:913) at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:791) ... 49 common frames omitted Caused by: java.lang.NoSuchFieldError: HEXPIRE at org.springframework.data.redis.connection.lettuce.LettuceConnection$TypeHints.<clinit>(LettuceConnection.java:1163) at org.springframework.data.redis.connection.lettuce.LettuceConnection.<clinit>(LettuceConnection.java:112) at org.springframework.data.redis.connection.lettuce.LettuceConnectionFactory.start(LettuceConnectionFactory.java:938) at org.springframework.data.redis.connection.lettuce.LettuceConnectionFactory.afterPropertiesSet(LettuceConnectionFactory.java:1009) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1873) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1822) ... 59 common frames omitted 进程已结束,退出代码为 1还是报错

/Users/syd/Library/Java/JavaVirtualMachines/ms-17.0.14/Contents/Home/bin/java -XX:TieredStopAtLevel=1 -Dspring.profiles.active=local -Dspring.output.ansi.enabled=always -Dcom.sun.management.jmxremote -Dspring.jmx.enabled=true -Dspring.liveBeansView.mbeanDomain -Dspring.application.admin.enabled=true -Dmanagement.endpoints.jmx.exposure.include=* -javaagent:/Applications/IntelliJ IDEA.app/Contents/lib/idea_rt.jar=54141 -Dfile.encoding=UTF-8 -classpath /Users/syd/Desktop/Project/SpringCloud/黑马商城/hmall/cart-service/target/classes:/Users/syd/.m2/repository/com/alibaba/cloud/spring-cloud-starter-alibaba-nacos-config/2021.0.4.0/spring-cloud-starter-alibaba-nacos-config-2021.0.4.0.jar:/Users/syd/.m2/repository/com/alibaba/cloud/spring-cloud-alibaba-commons/2021.0.4.0/spring-cloud-alibaba-commons-2021.0.4.0.jar:/Users/syd/.m2/repository/com/alibaba/spring/spring-context-support/1.0.11/spring-context-support-1.0.11.jar:/Users/syd/.m2/repository/com/alibaba/nacos/nacos-client/2.0.4/nacos-client-2.0.4.jar:/Users/syd/.m2/repository/commons-codec/commons-codec/1.15/commons-codec-1.15.jar:/Users/syd/.m2/repository/com/fasterxml/jackson/core/jackson-core/2.13.5/jackson-core-2.13.5.jar:/Users/syd/.m2/repository/com/fasterxml/jackson/core/jackson-databind/2.13.5/jackson-databind-2.13.5.jar:/Users/syd/.m2/repository/com/fasterxml/jackson/core/jackson-annotations/2.13.5/jackson-annotations-2.13.5.jar:/Users/syd/.m2/repository/org/apache/httpcomponents/httpasyncclient/4.1.5/httpasyncclient-4.1.5.jar:/Users/syd/.m2/repository/org/apache/httpcomponents/httpcore/4.4.16/httpcore-4.4.16.jar:/Users/syd/.m2/repository/org/apache/httpcomponents/httpcore-nio/4.4.16/httpcore-nio-4.4.16.jar:/Users/syd/.m2/repository/org/apache/httpcomponents/httpclient/4.5.14/httpclient-4.5.14.jar:/Users/syd/.m2/repository/org/reflections/reflections/0.9.11/reflections-0.9.11.jar:/Users/syd/.m2/repository/com/google/guava/guava/20.0/guava-20.0.jar:/Users/syd/.m2/repository/io/prometheus/simpleclient/0.15.0/simpleclient-0.15.0.jar:/Users/syd/.m2/repository/io/prometheus/simpleclient_tracer_otel/0.15.0/simpleclient_tracer_otel-0.15.0.jar:/Users/syd/.m2/repository/io/prometheus/simpleclient_tracer_common/0.15.0/simpleclient_tracer_common-0.15.0.jar:/Users/syd/.m2/repository/io/prometheus/simpleclient_tracer_otel_agent/0.15.0/simpleclient_tracer_otel_agent-0.15.0.jar:/Users/syd/.m2/repository/org/yaml/snakeyaml/1.30/snakeyaml-1.30.jar:/Users/syd/.m2/repository/org/springframework/cloud/spring-cloud-commons/3.1.3/spring-cloud-commons-3.1.3.jar:/Users/syd/.m2/repository/org/springframework/security/spring-security-crypto/5.7.8/spring-security-crypto-5.7.8.jar:/Users/syd/.m2/repository/org/springframework/cloud/spring-cloud-context/3.1.3/spring-cloud-context-3.1.3.jar:/Users/syd/.m2/repository/org/slf4j/slf4j-api/1.7.36/slf4j-api-1.7.36.jar:/Users/syd/.m2/repository/org/springframework/cloud/spring-cloud-starter-bootstrap/3.1.3/spring-cloud-starter-bootstrap-3.1.3.jar:/Users/syd/.m2/repository/org/springframework/cloud/spring-cloud-starter/3.1.3/spring-cloud-starter-3.1.3.jar:/Users/syd/.m2/repository/org/springframework/security/spring-security-rsa/1.0.10.RELEASE/spring-security-rsa-1.0.10.RELEASE.jar:/Users/syd/.m2/repository/org/bouncycastle/bcpkix-jdk15on/1.68/bcpkix-jdk15on-1.68.jar:/Users/syd/.m2/repository/org/bouncycastle/bcprov-jdk15on/1.68/bcprov-jdk15on-1.68.jar:/Users/syd/Desktop/Project/SpringCloud/黑马商城/hmall/hm-api/target/classes:/Users/syd/.m2/repository/io/github/openfeign/feign-okhttp/11.8/feign-okhttp-11.8.jar:/Users/syd/.m2/repository/io/github/openfeign/feign-core/11.8/feign-core-11.8.jar:/Users/syd/.m2/repository/com/squareup/okhttp3/okhttp/4.9.3/okhttp-4.9.3.jar:/Users/syd/.m2/repository/com/squareup/okio/okio/2.8.0/okio-2.8.0.jar:/Users/syd/.m2/repository/org/jetbrains/kotlin/kotlin-stdlib-common/1.6.21/kotlin-stdlib-common-1.6.21.jar:/Users/syd/.m2/repository/org/jetbrains/kotlin/kotlin-stdlib/1.6.21/kotlin-stdlib-1.6.21.jar:/Users/syd/.m2/repository/org/jetbrains/annotations/13.0/annotations-13.0.jar:/Users/syd/.m2/repository/org/springframework/cloud/spring-cloud-starter-openfeign/3.1.3/spring-cloud-starter-openfeign-3.1.3.jar:/Users/syd/.m2/repository/org/springframework/cloud/spring-cloud-openfeign-core/3.1.3/spring-cloud-openfeign-core-3.1.3.jar:/Users/syd/.m2/repository/org/springframework/boot/spring-boot-starter-aop/2.7.12/spring-boot-starter-aop-2.7.12.jar:/Users/syd/.m2/repository/org/aspectj/aspectjweaver/1.9.7/aspectjweaver-1.9.7.jar:/Users/syd/.m2/repository/io/github/openfeign/form/feign-form-spring/3.8.0/feign-form-spring-3.8.0.jar:/Users/syd/.m2/repository/io/github/openfeign/form/feign-form/3.8.0/feign-form-3.8.0.jar:/Users/syd/.m2/repository/commons-fileupload/commons-fileupload/1.4/commons-fileupload-1.4.jar:/Users/syd/.m2/repository/commons-io/commons-io/2.2/commons-io-2.2.jar:/Users/syd/.m2/repository/org/springframework/spring-web/5.3.27/spring-web-5.3.27.jar:/Users/syd/.m2/repository/org/springframework/spring-beans/5.3.27/spring-beans-5.3.27.jar:/Users/syd/.m2/repository/io/github/openfeign/feign-slf4j/11.8/feign-slf4j-11.8.jar:/Users/syd/.m2/repository/com/alibaba/cloud/spring-cloud-starter-alibaba-nacos-discovery/2021.0.4.0/spring-cloud-starter-alibaba-nacos-discovery-2021.0.4.0.jar:/Users/syd/.m2/repository/org/springframework/cloud/spring-cloud-starter-loadbalancer/3.1.3/spring-cloud-starter-loadbalancer-3.1.3.jar:/Users/syd/.m2/repository/org/springframework/cloud/spring-cloud-loadbalancer/3.1.3/spring-cloud-loadbalancer-3.1.3.jar:/Users/syd/.m2/repository/io/projectreactor/reactor-core/3.4.29/reactor-core-3.4.29.jar:/Users/syd/.m2/repository/org/reactivestreams/reactive-streams/1.0.4/reactive-streams-1.0.4.jar:/Users/syd/.m2/repository/io/projectreactor/addons/reactor-extra/3.4.10/reactor-extra-3.4.10.jar:/Users/syd/.m2/repository/org/springframework/boot/spring-boot-starter-cache/2.7.12/spring-boot-starter-cache-2.7.12.jar:/Users/syd/.m2/repository/org/springframework/spring-context-support/5.3.27/spring-context-support-5.3.27.jar:/Users/syd/.m2/repository/com/stoyanr/evictor/1.0.0/evictor-1.0.0.jar:/Users/syd/Desktop/Project/SpringCloud/黑马商城/hmall/hm-common/target/classes:/Users/syd/.m2/repository/org/apache/commons/commons-pool2/2.11.1/commons-pool2-2.11.1.jar:/Users/syd/.m2/repository/cn/hutool/hutool-all/5.8.11/hutool-all-5.8.11.jar:/Users/syd/.m2/repository/org/springframework/boot/spring-boot-starter-logging/2.7.12/spring-boot-starter-logging-2.7.12.jar:/Users/syd/.m2/repository/ch/qos/logback/logback-classic/1.2.12/logback-classic-1.2.12.jar:/Users/syd/.m2/repository/ch/qos/logback/logback-core/1.2.12/logback-core-1.2.12.jar:/Users/syd/.m2/repository/org/apache/logging/log4j/log4j-to-slf4j/2.17.2/log4j-to-slf4j-2.17.2.jar:/Users/syd/.m2/repository/org/apache/logging/log4j/log4j-api/2.17.2/log4j-api-2.17.2.jar:/Users/syd/.m2/repository/org/slf4j/jul-to-slf4j/1.7.36/jul-to-slf4j-1.7.36.jar:/Users/syd/.m2/repository/org/hibernate/validator/hibernate-validator/6.2.5.Final/hibernate-validator-6.2.5.Final.jar:/Users/syd/.m2/repository/jakarta/validation/jakarta.validation-api/2.0.2/jakarta.validation-api-2.0.2.jar:/Users/syd/.m2/repository/org/jboss/logging/jboss-logging/3.4.3.Final/jboss-logging-3.4.3.Final.jar:/Users/syd/.m2/repository/com/fasterxml/classmate/1.5.1/classmate-1.5.1.jar:/Users/syd/.m2/repository/org/springframework/boot/spring-boot-autoconfigure/2.7.12/spring-boot-autoconfigure-2.7.12.jar:/Users/syd/.m2/repository/org/springframework/boot/spring-boot/2.7.12/spring-boot-2.7.12.jar:/Users/syd/.m2/repository/com/github/xiaoymin/knife4j-openapi2-spring-boot-starter/4.1.0/knife4j-openapi2-spring-boot-starter-4.1.0.jar:/Users/syd/.m2/repository/com/github/xiaoymin/knife4j-core/4.1.0/knife4j-core-4.1.0.jar:/Users/syd/.m2/repository/com/github/xiaoymin/knife4j-openapi2-ui/4.1.0/knife4j-openapi2-ui-4.1.0.jar:/Users/syd/.m2/repository/org/javassist/javassist/3.25.0-GA/javassist-3.25.0-GA.jar:/Users/syd/.m2/repository/io/springfox/springfox-swagger2/2.10.5/springfox-swagger2-2.10.5.jar:/Users/syd/.m2/repository/io/springfox/springfox-spi/2.10.5/springfox-spi-2.10.5.jar:/Users/syd/.m2/repository/io/springfox/springfox-core/2.10.5/springfox-core-2.10.5.jar:/Users/syd/.m2/repository/io/springfox/springfox-schema/2.10.5/springfox-schema-2.10.5.jar:/Users/syd/.m2/repository/io/springfox/springfox-swagger-common/2.10.5/springfox-swagger-common-2.10.5.jar:/Users/syd/.m2/repository/io/springfox/springfox-spring-web/2.10.5/springfox-spring-web-2.10.5.jar:/Users/syd/.m2/repository/io/github/classgraph/classgraph/4.1.7/classgraph-4.1.7.jar:/Users/syd/.m2/repository/org/springframework/plugin/spring-plugin-core/2.0.0.RELEASE/spring-plugin-core-2.0.0.RELEASE.jar:/Users/syd/.m2/repository/org/springframework/plugin/spring-plugin-metadata/2.0.0.RELEASE/spring-plugin-metadata-2.0.0.RELEASE.jar:/Users/syd/.m2/repository/org/mapstruct/mapstruct/1.3.1.Final/mapstruct-1.3.1.Final.jar:/Users/syd/.m2/repository/io/swagger/swagger-models/1.6.6/swagger-models-1.6.6.jar:/Users/syd/.m2/repository/io/swagger/swagger-annotations/1.6.6/swagger-annotations-1.6.6.jar:/Users/syd/.m2/repository/io/springfox/springfox-bean-validators/2.10.5/springfox-bean-validators-2.10.5.jar:/Users/syd/.m2/repository/io/springfox/springfox-spring-webmvc/2.10.5/springfox-spring-webmvc-2.10.5.jar:/Users/syd/.m2/repository/com/github/ben-manes/caffeine/caffeine/2.9.3/caffeine-2.9.3.jar:/Users/syd/.m2/repository/org/checkerframework/checker-qual/3.19.0/checker-qual-3.19.0.jar:/Users/syd/.m2/repository/com/google/errorprone/error_prone_annotations/2.10.0/error_prone_annotations-2.10.0.jar:/Users/syd/.m2/repository/org/springframework/boot/spring-boot-starter-web/2.7.12/spring-boot-starter-web-2.7.12.jar:/Users/syd/.m2/repository/org/springframework/boot/spring-boot-starter/2.7.12/spring-boot-starter-2.7.12.jar:/Users/syd/.m2/repository/jakarta/annotation/jakarta.annotation-api/1.3.5/jakarta.annotation-api-1.3.5.jar:/Users/syd/.m2/repository/org/springframework/boot/spring-boot-starter-json/2.7.12/spring-boot-starter-json-2.7.12.jar:/Users/syd/.m2/repository/com/fasterxml/jackson/datatype/jackson-datatype-jdk8/2.13.5/jackson-datatype-jdk8-2.13.5.jar:/Users/syd/.m2/repository/com/fasterxml/jackson/datatype/jackson-datatype-jsr310/2.13.5/jackson-datatype-jsr310-2.13.5.jar:/Users/syd/.m2/repository/com/fasterxml/jackson/module/jackson-module-parameter-names/2.13.5/jackson-module-parameter-names-2.13.5.jar:/Users/syd/.m2/repository/org/springframework/boot/spring-boot-starter-tomcat/2.7.12/spring-boot-starter-tomcat-2.7.12.jar:/Users/syd/.m2/repository/org/apache/tomcat/embed/tomcat-embed-core/9.0.75/tomcat-embed-core-9.0.75.jar:/Users/syd/.m2/repository/org/apache/tomcat/embed/tomcat-embed-el/9.0.75/tomcat-embed-el-9.0.75.jar:/Users/syd/.m2/repository/org/apache/tomcat/embed/tomcat-embed-websocket/9.0.75/tomcat-embed-websocket-9.0.75.jar:/Users/syd/.m2/repository/org/springframework/spring-webmvc/5.3.27/spring-webmvc-5.3.27.jar:/Users/syd/.m2/repository/org/springframework/spring-aop/5.3.27/spring-aop-5.3.27.jar:/Users/syd/.m2/repository/org/springframework/spring-context/5.3.27/spring-context-5.3.27.jar:/Users/syd/.m2/repository/org/springframework/spring-expression/5.3.27/spring-expression-5.3.27.jar:/Users/syd/.m2/repository/mysql/mysql-connector-java/8.0.23/mysql-connector-java-8.0.23.jar:/Users/syd/.m2/repository/com/google/protobuf/protobuf-java/3.11.4/protobuf-java-3.11.4.jar:/Users/syd/.m2/repository/com/baomidou/mybatis-plus-boot-starter/3.4.3/mybatis-plus-boot-starter-3.4.3.jar:/Users/syd/.m2/repository/com/baomidou/mybatis-plus/3.4.3/mybatis-plus-3.4.3.jar:/Users/syd/.m2/repository/com/baomidou/mybatis-plus-extension/3.4.3/mybatis-plus-extension-3.4.3.jar:/Users/syd/.m2/repository/com/baomidou/mybatis-plus-core/3.4.3/mybatis-plus-core-3.4.3.jar:/Users/syd/.m2/repository/com/baomidou/mybatis-plus-annotation/3.4.3/mybatis-plus-annotation-3.4.3.jar:/Users/syd/.m2/repository/com/github/jsqlparser/jsqlparser/4.0/jsqlparser-4.0.jar:/Users/syd/.m2/repository/org/mybatis/mybatis/3.5.7/mybatis-3.5.7.jar:/Users/syd/.m2/repository/org/mybatis/mybatis-spring/2.0.6/mybatis-spring-2.0.6.jar:/Users/syd/.m2/repository/org/springframework/boot/spring-boot-starter-jdbc/2.7.12/spring-boot-starter-jdbc-2.7.12.jar:/Users/syd/.m2/repository/com/zaxxer/HikariCP/4.0.3/HikariCP-4.0.3.jar:/Users/syd/.m2/repository/org/springframework/spring-jdbc/5.3.27/spring-jdbc-5.3.27.jar:/Users/syd/.m2/repository/org/springframework/boot/spring-boot-starter-test/2.7.12/spring-boot-starter-test-2.7.12.jar:/Users/syd/.m2/repository/org/springframework/boot/spring-boot-test/2.7.12/spring-boot-test-2.7.12.jar:/Users/syd/.m2/repository/org/springframework/boot/spring-boot-test-autoconfigure/2.7.12/spring-boot-test-autoconfigure-2.7.12.jar:/Users/syd/.m2/repository/com/jayway/jsonpath/json-path/2.7.0/json-path-2.7.0.jar:/Users/syd/.m2/repository/net/minidev/json-smart/2.4.11/json-smart-2.4.11.jar:/Users/syd/.m2/repository/net/minidev/accessors-smart/2.4.11/accessors-smart-2.4.11.jar:/Users/syd/.m2/repository/org/ow2/asm/asm/9.3/asm-9.3.jar:/Users/syd/.m2/repository/jakarta/xml/bind/jakarta.xml.bind-api/2.3.3/jakarta.xml.bind-api-2.3.3.jar:/Users/syd/.m2/repository/jakarta/activation/jakarta.activation-api/1.2.2/jakarta.activation-api-1.2.2.jar:/Users/syd/.m2/repository/org/assertj/assertj-core/3.22.0/assertj-core-3.22.0.jar:/Users/syd/.m2/repository/org/hamcrest/hamcrest/2.2/hamcrest-2.2.jar:/Users/syd/.m2/repository/org/junit/jupiter/junit-jupiter/5.8.2/junit-jupiter-5.8.2.jar:/Users/syd/.m2/repository/org/junit/jupiter/junit-jupiter-api/5.8.2/junit-jupiter-api-5.8.2.jar:/Users/syd/.m2/repository/org/opentest4j/opentest4j/1.2.0/opentest4j-1.2.0.jar:/Users/syd/.m2/repository/org/junit/platform/junit-platform-commons/1.8.2/junit-platform-commons-1.8.2.jar:/Users/syd/.m2/repository/org/apiguardian/apiguardian-api/1.1.2/apiguardian-api-1.1.2.jar:/Users/syd/.m2/repository/org/junit/jupiter/junit-jupiter-params/5.8.2/junit-jupiter-params-5.8.2.jar:/Users/syd/.m2/repository/org/junit/jupiter/junit-jupiter-engine/5.8.2/junit-jupiter-engine-5.8.2.jar:/Users/syd/.m2/repository/org/junit/platform/junit-platform-engine/1.8.2/junit-platform-engine-1.8.2.jar:/Users/syd/.m2/repository/org/mockito/mockito-core/4.5.1/mockito-core-4.5.1.jar:/Users/syd/.m2/repository/net/bytebuddy/byte-buddy/1.12.23/byte-buddy-1.12.23.jar:/Users/syd/.m2/repository/net/bytebuddy/byte-buddy-agent/1.12.23/byte-buddy-agent-1.12.23.jar:/Users/syd/.m2/repository/org/objenesis/objenesis/3.2/objenesis-3.2.jar:/Users/syd/.m2/repository/org/mockito/mockito-junit-jupiter/4.5.1/mockito-junit-jupiter-4.5.1.jar:/Users/syd/.m2/repository/org/skyscreamer/jsonassert/1.5.1/jsonassert-1.5.1.jar:/Users/syd/.m2/repository/com/vaadin/external/google/android-json/0.0.20131108.vaadin1/android-json-0.0.20131108.vaadin1.jar:/Users/syd/.m2/repository/org/springframework/spring-core/5.3.27/spring-core-5.3.27.jar:/Users/syd/.m2/repository/org/springframework/spring-jcl/5.3.27/spring-jcl-5.3.27.jar:/Users/syd/.m2/repository/org/springframework/spring-test/5.3.27/spring-test-5.3.27.jar:/Users/syd/.m2/repository/org/xmlunit/xmlunit-core/2.9.1/xmlunit-core-2.9.1.jar:/Users/syd/.m2/repository/org/springframework/boot/spring-boot-starter-data-redis/2.7.12/spring-boot-starter-data-redis-2.7.12.jar:/Users/syd/.m2/repository/org/springframework/data/spring-data-redis/2.7.12/spring-data-redis-2.7.12.jar:/Users/syd/.m2/repository/org/springframework/data/spring-data-keyvalue/2.7.12/spring-data-keyvalue-2.7.12.jar:/Users/syd/.m2/repository/org/springframework/data/spring-data-commons/2.7.12/spring-data-commons-2.7.12.jar:/Users/syd/.m2/repository/org/springframework/spring-tx/5.3.27/spring-tx-5.3.27.jar:/Users/syd/.m2/repository/org/springframework/spring-oxm/5.3.27/spring-oxm-5.3.27.jar:/Users/syd/.m2/repository/io/lettuce/lettuce-core/6.1.10.RELEASE/lettuce-core-6.1.10.RELEASE.jar:/Users/syd/.m2/repository/io/netty/netty-common/4.1.92.Final/netty-common-4.1.92.Final.jar:/Users/syd/.m2/repository/io/netty/netty-handler/4.1.92.Final/netty-handler-4.1.92.Final.jar:/Users/syd/.m2/repository/io/netty/netty-resolver/4.1.92.Final/netty-resolver-4.1.92.Final.jar:/Users/syd/.m2/repository/io/netty/netty-buffer/4.1.92.Final/netty-buffer-4.1.92.Final.jar:/Users/syd/.m2/repository/io/netty/netty-transport-native-unix-common/4.1.92.Final/netty-transport-native-unix-common-4.1.92.Final.jar:/Users/syd/.m2/repository/io/netty/netty-codec/4.1.92.Final/netty-codec-4.1.92.Final.jar:/Users/syd/.m2/repository/io/netty/netty-transport/4.1.92.Final/netty-transport-4.1.92.Final.jar:/Users/syd/.m2/repository/org/projectlombok/lombok/1.18.20/lombok-1.18.20.jar com.hmall.cart.CartApplication . ____ _ __ _ _ /\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \ ( ( )\___ | '_ | '_| | '_ \/ _ | \ \ \ \ \\/ ___)| |_)| | | | | || (_| | ) ) ) ) ' |____| .__|_| |_|_| |_\__, | / / / / =========|_|==============|___/=/_/_/_/ :: Spring Boot :: (v2.7.12) 2025-07-23 00:46:10.823 INFO 94996 --- [ main] com.alibaba.nacos.common.remote.client : [RpcClientFactory] create a new rpc client of 02474581-6045-4ae2-bf28-5abda8e7177f_config-0 2025-07-23 00:46:10.851 INFO 94996 --- [ main] org.reflections.Reflections : Reflections took 13 ms to scan 1 urls, producing 3 keys and 6 values 2025-07-23 00:46:10.863 INFO 94996 --- [ main] org.reflections.Reflections : Reflections took 6 ms to scan 1 urls, producing 4 keys and 9 values 2025-07-23 00:46:10.868 INFO 94996 --- [ main] org.reflections.Reflections : Reflections took 4 ms to scan 1 urls, producing 3 keys and 10 values 2025-07-23 00:46:10.869 WARN 94996 --- [ main] org.reflections.Reflections : given scan urls are empty. set urls in the configuration 2025-07-23 00:46:10.873 INFO 94996 --- [ main] org.reflections.Reflections : Reflections took 4 ms to scan 1 urls, producing 1 keys and 5 values 2025-07-23 00:46:10.882 INFO 94996 --- [ main] org.reflections.Reflections : Reflections took 8 ms to scan 1 urls, producing 1 keys and 7 values 2025-07-23 00:46:10.887 INFO 94996 --- [ main] org.reflections.Reflections : Reflections took 4 ms to scan 1 urls, producing 2 keys and 8 values 2025-07-23 00:46:10.888 WARN 94996 --- [ main] org.reflections.Reflections : given scan urls are empty. set urls in the configuration 2025-07-23 00:46:10.888 INFO 94996 --- [ main] com.alibaba.nacos.common.remote.client : [02474581-6045-4ae2-bf28-5abda8e7177f_config-0] RpcClient init label, labels = {module=config, Vipserver-Tag=null, source=sdk, Amory-Tag=null, Location-Tag=null, taskId=0, AppName=unknown} 2025-07-23 00:46:10.888 INFO 94996 --- [ main] com.alibaba.nacos.common.remote.client : [02474581-6045-4ae2-bf28-5abda8e7177f_config-0] Register server push request handler:com.alibaba.nacos.client.config.impl.ClientWorker$ConfigRpcTransportClient$$Lambda$469/0x000000800139e810 2025-07-23 00:46:10.888 INFO 94996 --- [ main] com.alibaba.nacos.common.remote.client : [02474581-6045-4ae2-bf28-5abda8e7177f_config-0] Register server push request handler:com.alibaba.nacos.client.config.impl.ClientWorker$ConfigRpcTransportClient$$Lambda$470/0x000000800139ea38 2025-07-23 00:46:10.889 INFO 94996 --- [ main] com.alibaba.nacos.common.remote.client : [02474581-6045-4ae2-bf28-5abda8e7177f_config-0] Registry connection listener to current client:com.alibaba.nacos.client.config.impl.ClientWorker$ConfigRpcTransportClient$1 2025-07-23 00:46:10.889 INFO 94996 --- [ main] com.alibaba.nacos.common.remote.client : [02474581-6045-4ae2-bf28-5abda8e7177f_config-0] RpcClient init, ServerListFactory = com.alibaba.nacos.client.config.impl.ClientWorker$ConfigRpcTransportClient$2 2025-07-23 00:46:10.892 INFO 94996 --- [ main] com.alibaba.nacos.common.remote.client : [02474581-6045-4ae2-bf28-5abda8e7177f_config-0] Try to connect to server on start up, server: {serverIp = '127.0.0.1', server main port = 8848} 2025-07-23 00:46:11.264 INFO 94996 --- [ main] com.alibaba.nacos.common.remote.client : [02474581-6045-4ae2-bf28-5abda8e7177f_config-0] Success to connect to server [127.0.0.1:8848] on start up, connectionId = 1753202771127_192.168.65.1_22625 2025-07-23 00:46:11.264 INFO 94996 --- [ main] com.alibaba.nacos.common.remote.client : [02474581-6045-4ae2-bf28-5abda8e7177f_config-0] Register server push request handler:com.alibaba.nacos.common.remote.client.RpcClient$ConnectResetRequestHandler 2025-07-23 00:46:11.264 INFO 94996 --- [t.remote.worker] com.alibaba.nacos.common.remote.client : [02474581-6045-4ae2-bf28-5abda8e7177f_config-0] Notify connected event to listeners. 2025-07-23 00:46:11.265 INFO 94996 --- [ main] com.alibaba.nacos.common.remote.client : [02474581-6045-4ae2-bf28-5abda8e7177f_config-0] Register server push request handler:com.alibaba.nacos.common.remote.client.RpcClient$$Lambda$481/0x00000080015077c0 2025-07-23 00:46:11.296 WARN 94996 --- [ main] c.a.c.n.c.NacosPropertySourceBuilder : Ignore the empty nacos configuration and get it based on dataId[cart-service] & group[DEFAULT_GROUP] 2025-07-23 00:46:11.301 WARN 94996 --- [ main] c.a.c.n.c.NacosPropertySourceBuilder : Ignore the empty nacos configuration and get it based on dataId[cart-service.yaml] & group[DEFAULT_GROUP] 2025-07-23 00:46:11.304 WARN 94996 --- [ main] c.a.c.n.c.NacosPropertySourceBuilder : Ignore the empty nacos configuration and get it based on dataId[cart-service-local.yaml] & group[DEFAULT_GROUP] 2025-07-23 00:46:11.305 INFO 94996 --- [ main] b.c.PropertySourceBootstrapConfiguration : Located property source: [BootstrapPropertySource {name='bootstrapProperties-cart-service-local.yaml,DEFAULT_GROUP'}, BootstrapPropertySource {name='bootstrapProperties-cart-service.yaml,DEFAULT_GROUP'}, BootstrapPropertySource {name='bootstrapProperties-cart-service,DEFAULT_GROUP'}, BootstrapPropertySource {name='bootstrapProperties-knife4j,DEFAULT_GROUP'}, BootstrapPropertySource {name='bootstrapProperties-JDBC,DEFAULT_GROUP'}] 2025-07-23 00:46:11.307 INFO 94996 --- [ main] com.hmall.cart.CartApplication : The following 1 profile is active: "local" 2025-07-23 00:46:11.594 INFO 94996 --- [ main] .s.d.r.c.RepositoryConfigurationDelegate : Multiple Spring Data modules found, entering strict repository configuration mode 2025-07-23 00:46:11.596 INFO 94996 --- [ main] .s.d.r.c.RepositoryConfigurationDelegate : Bootstrapping Spring Data Redis repositories in DEFAULT mode. 2025-07-23 00:46:11.607 INFO 94996 --- [ main] .s.d.r.c.RepositoryConfigurationDelegate : Finished Spring Data repository scanning in 4 ms. Found 0 Redis repository interfaces. 2025-07-23 00:46:11.708 INFO 94996 --- [ main] o.s.cloud.context.scope.GenericScope : BeanFactory id=639213e3-93fa-3eac-8cc8-3f4e5c6acd59 2025-07-23 00:46:11.910 INFO 94996 --- [ main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat initialized with port(s): 8082 (http) 2025-07-23 00:46:11.915 INFO 94996 --- [ main] o.apache.catalina.core.StandardService : Starting service [Tomcat] 2025-07-23 00:46:11.915 INFO 94996 --- [ main] org.apache.catalina.core.StandardEngine : Starting Servlet engine: [Apache Tomcat/9.0.75] 2025-07-23 00:46:11.971 INFO 94996 --- [ main] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring embedded WebApplicationContext 2025-07-23 00:46:11.971 INFO 94996 --- [ main] w.s.c.ServletWebServerApplicationContext : Root WebApplicationContext: initialization completed in 654 ms 2025-07-23 00:46:12.049 INFO 94996 --- [ main] o.s.c.openfeign.FeignClientFactoryBean : For 'item-service' URL not provided. Will try picking an instance via load-balancing. 2025-07-23 00:46:12.183 WARN 94996 --- [ main] ConfigServletWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'cartController' defined in file [/Users/syd/Desktop/Project/SpringCloud/黑马商城/hmall/cart-service/target/classes/com/hmall/cart/controller/CartController.class]: Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'cartServiceImpl': Unsatisfied dependency expressed through field 'baseMapper'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'cartMapper' defined in file [/Users/syd/Desktop/Project/SpringCloud/黑马商城/hmall/cart-service/target/classes/com/hmall/cart/mapper/CartMapper.class]: Unsatisfied dependency expressed through bean property 'sqlSessionFactory'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'sqlSessionFactory' defined in class path resource [com/baomidou/mybatisplus/autoconfigure/MybatisPlusAutoConfiguration.class]: Unsatisfied dependency expressed through method 'sqlSessionFactory' parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dataSource' defined in class path resource [org/springframework/boot/autoconfigure/jdbc/DataSourceConfiguration$Hikari.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.zaxxer.hikari.HikariDataSource]: Factory method 'dataSource' threw exception; nested exception is org.springframework.boot.autoconfigure.jdbc.DataSourceProperties$DataSourceBeanCreationException: Failed to determine a suitable driver class 2025-07-23 00:46:12.185 INFO 94996 --- [ main] o.apache.catalina.core.StandardService : Stopping service [Tomcat] 2025-07-23 00:46:12.194 INFO 94996 --- [ main] ConditionEvaluationReportLoggingListener : Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled. 2025-07-23 00:46:12.202 ERROR 94996 --- [ main] o.s.b.d.LoggingFailureAnalysisReporter : *************************** APPLICATION FAILED TO START *************************** Description: Failed to configure a DataSource: 'url' attribute is not specified and no embedded datasource could be configured. Reason: Failed to determine a suitable driver class Action: Consider the following: If you want an embedded database (H2, HSQL or Derby), please put it on the classpath. If you have database settings to be loaded from a particular profile you may need to activate it (the profiles local are currently active). 2025-07-23 00:46:12.203 WARN 94996 --- [ Thread-7] c.a.nacos.common.notify.NotifyCenter : [NotifyCenter] Start destroying Publisher 2025-07-23 00:46:12.203 WARN 94996 --- [ Thread-7] c.a.nacos.common.notify.NotifyCenter : [NotifyCenter] Destruction of the end 2025-07-23 00:46:12.203 WARN 94996 --- [ Thread-1] c.a.n.common.http.HttpClientBeanHolder : [HttpClientBeanHolder] Start destroying common HttpClient 进程已结束,退出代码为 1

#include <reg52.h> // ???? sbit PWM_OUT = P1^0; // PWM???? sbit PERIOD_UP = P3^2; // ?????? sbit PERIOD_DN = P3^3; // ?????? sbit DUTY_UP = P3^4; // ??????? sbit DUTY_DN = P3^5; // ??????? // ???? unsigned char period_cnt = 10; // ????(??5ms:10*0.5ms) unsigned char duty_cnt = 5; // ?????(??50%) unsigned char timer_tick = 0; // ????? unsigned int base_period = 500; // ??????(µs) // ???0???(500µs??) void Timer0_Init() { TMOD |= 0x01; // ??1:16???? TH0 = (65536 - base_period) / 256; // 12MHz?? TL0 = (65536 - base_period) % 256; ET0 = 1; // ??????? EA = 1; // ???? TR0 = 1; // ????? } void Delay_ms(unsigned int ms) { unsigned int i, j; for(i=0; i<ms; i++) { for(j=0; j<120; j++); // ???? } } void Delay_ms(unsigned int ms) { unsigned int i, j; for(i=0; i<ms; i++) { for(j=0; j<120; j++); // ???? } } // ???? Adjust_Period ?? void Adjust_Period(char dir) { /* ????????????? */ unsigned char new_period = period_cnt + dir; unsigned char new_duty; // ?????? // ????(6~14) if(new_period < 6) new_period = 6; if(new_period > 14) new_period = 14; /* ?????? */ new_duty = (duty_cnt * new_period) / period_cnt; // ????? if(new_duty == 0) new_duty = 1; if(new_duty >= new_period) new_duty = new_period - 1; period_cnt = new_period; duty_cnt = new_duty; } void Adjust_Duty(char dir) { unsigned char step; // ??????? unsigned char new_duty; // ????? new_duty // ????(????5%) step = period_cnt / 20; if(step == 0) step = 1; new_duty = duty_cnt + dir * step; // ???? // ??????? if(new_duty < 1) new_duty = 1; if(new_duty >= period_cnt) new_duty = period_cnt - 1; duty_cnt = new_duty; } void main() { Timer0_Init(); while(1) { // ???????? if(!PERIOD_UP) { Delay_ms(20); if(!PERIOD_UP) Adjust_Period(+1); while(!PERIOD_UP); // ???? } if(!PERIOD_DN) { Delay_ms(20); if(!PERIOD_DN) Adjust_Period(-1); while(!PERIOD_DN); } // ????????? if(!DUTY_UP) { Delay_ms(20); if(!DUTY_UP) Adjust_Duty(+1); while(!DUTY_UP); } if(!DUTY_DN) { Delay_ms(20); if(!DUTY_DN) Adjust_Duty(-1); while(!DUTY_DN); } } } // ???0?????? void Timer0_ISR() interrupt 1 { TH0 = (65536 - base_period) / 256; // ???? TL0 = (65536 - base_period) % 256; // PWM???? if(++timer_tick >= period_cnt) { timer_tick = 0; // ???? PWM_OUT = 1; // ????????? } // ????? else if(timer_tick >= duty_cnt) { PWM_OUT = 0; // ???????,????? } }123456789changyong.c(40): error C237: '_Delay_ms': function already has a body

最新推荐

recommend-type

mysql sql_mode= 的作用说明

MySQL 5的默认SQL模式包括`REAL_AS_FLOAT`、`PIPES_AS_CONCAT`、`ANSI_QUOTES`、`IGNORE_SPACE`和`ANSI`。这些模式分别表示: 1. `REAL_AS_FLOAT`:浮点数除法结果以浮点数表示。 2. `PIPES_AS_CONCAT`:将两个竖线...
recommend-type

STM32F10xxx_Library_库函数(中文版).pdf

库中的源代码遵循“Strict ANSI-C”标准,以确保代码的可移植性,不受特定开发环境的影响,但启动文件除外,它们可能会根据所使用的开发环境有所不同。此外,为了增强软件的稳健性,库函数在运行时会检查输入值,...
recommend-type

微软内部资料-SQL性能优化3

To make use of either more or less strict isolation levels in applications, locking can be customized for an entire session by setting the isolation level of the session with the SET TRANSACTION ...
recommend-type

Comsol声子晶体能带计算:六角与三角晶格原胞选取及布里渊区高对称点选择 - 声子晶体 v1.0

内容概要:本文详细探讨了利用Comsol进行声子晶体能带计算过程中,六角晶格和三角晶格原胞选取的不同方法及其对简约布里渊区高对称点选择的影响。文中不仅介绍了两种晶格类型的基矢量定义方式,还强调了正确设置周期性边界条件(特别是相位补偿)的重要性,以避免计算误差如鬼带现象。同时,提供了具体的MATLAB代码片段用于演示关键步骤,并分享了一些实践经验,例如如何通过观察能带图中的狄拉克锥特征来验证路径设置的准确性。 适合人群:从事材料科学、物理学研究的专业人士,尤其是那些正在使用或计划使用Comsol软件进行声子晶体模拟的研究人员。 使用场景及目标:帮助研究人员更好地理解和掌握在Comsol环境中针对不同类型晶格进行精确的声子晶体能带计算的方法和技术要点,从而提高仿真精度并减少常见错误的发生。 其他说明:文章中提到的实际案例展示了因晶格类型混淆而导致的问题,提醒使用者注意细节差异,确保模型构建无误。此外,文中提供的代码片段可以直接应用于相关项目中作为参考模板。
recommend-type

Web前端开发:CSS与HTML设计模式深入解析

《Pro CSS and HTML Design Patterns》是一本专注于Web前端设计模式的书籍,特别针对CSS(层叠样式表)和HTML(超文本标记语言)的高级应用进行了深入探讨。这本书籍属于Pro系列,旨在为专业Web开发人员提供实用的设计模式和实践指南,帮助他们构建高效、美观且可维护的网站和应用程序。 在介绍这本书的知识点之前,我们首先需要了解CSS和HTML的基础知识,以及它们在Web开发中的重要性。 HTML是用于创建网页和Web应用程序的标准标记语言。它允许开发者通过一系列的标签来定义网页的结构和内容,如段落、标题、链接、图片等。HTML5作为最新版本,不仅增强了网页的表现力,还引入了更多新的特性,例如视频和音频的内置支持、绘图API、离线存储等。 CSS是用于描述HTML文档的表现(即布局、颜色、字体等样式)的样式表语言。它能够让开发者将内容的表现从结构中分离出来,使得网页设计更加模块化和易于维护。随着Web技术的发展,CSS也经历了多个版本的更新,引入了如Flexbox、Grid布局、过渡、动画以及Sass和Less等预处理器技术。 现在让我们来详细探讨《Pro CSS and HTML Design Patterns》中可能包含的知识点: 1. CSS基础和选择器: 书中可能会涵盖CSS基本概念,如盒模型、边距、填充、边框、背景和定位等。同时还会介绍CSS选择器的高级用法,例如属性选择器、伪类选择器、伪元素选择器以及选择器的组合使用。 2. CSS布局技术: 布局是网页设计中的核心部分。本书可能会详细讲解各种CSS布局技术,包括传统的浮动(Floats)布局、定位(Positioning)布局,以及最新的布局模式如Flexbox和CSS Grid。此外,也会介绍响应式设计的媒体查询、视口(Viewport)单位等。 3. 高级CSS技巧: 这些技巧可能包括动画和过渡效果,以及如何优化性能和兼容性。例如,CSS3动画、关键帧动画、转换(Transforms)、滤镜(Filters)和混合模式(Blend Modes)。 4. HTML5特性: 书中可能会深入探讨HTML5的新标签和语义化元素,如`<article>`、`<section>`、`<nav>`等,以及如何使用它们来构建更加标准化和语义化的页面结构。还会涉及到Web表单的新特性,比如表单验证、新的输入类型等。 5. 可访问性(Accessibility): Web可访问性越来越受到重视。本书可能会介绍如何通过HTML和CSS来提升网站的无障碍访问性,比如使用ARIA标签(Accessible Rich Internet Applications)来增强屏幕阅读器的使用体验。 6. 前端性能优化: 性能优化是任何Web项目成功的关键。本书可能会涵盖如何通过优化CSS和HTML来提升网站的加载速度和运行效率。内容可能包括代码压缩、合并、避免重绘和回流、使用Web字体的最佳实践等。 7. JavaScript与CSS/HTML的交互: 在现代Web开发中,JavaScript与CSS及HTML的交云并用是不可或缺的。书中可能会讲解如何通过JavaScript动态地修改样式、操作DOM元素以及使用事件监听和响应用户交互。 8. Web框架和预处理器: 这本书可能会提到流行的Web开发框架和预处理器,比如Bootstrap、Foundation、Sass和Less等,它们是如何简化和加速开发流程的。 9. 测试和维护: 书中也可能包含关于如何测试网页以及如何持续优化和维护CSS和HTML代码的章节。例如,使用断言测试、自动化测试、性能分析工具等。 最后,鉴于文件名称列表中的“压缩包子文件”的表述,这可能是对“压缩包”文件的一种误译或误用,此处“压缩包”应该指的是包含该书籍PDF文件的压缩文件格式,如ZIP或RAR。而“Pro CSS and HTML Design Patterns.pdf”指的就是该书籍的PDF格式电子版文件。 以上所述,构成了《Pro CSS and HTML Design Patterns》一书可能包含的核心知识点。通过学习这些内容,Web前端开发者可以掌握更为高效和优雅的设计模式,从而在日常工作中更高效地解决实际问题。
recommend-type

Zotero 7数据同步:Attanger插件安装&设置,打造文献管理利器

/i.s3.glbimg.com/v1/AUTH_08fbf48bc0524877943fe86e43087e7a/internal_photos/bs/2018/L/j/ipKA8TRPyt4ptaG1DGww/t-m-01.png) # 1. Zotero 7数据同步简介 在数字时代,管理研究数据变得日益重要,而Zot
recommend-type

卷积神经网络的基础理论200字

<think>我们正在回答用户关于卷积神经网络(CNN)基础理论的询问。根据提供的引用资料,我们可以概述CNN的基本结构和工作原理。引用[1]提到CNN是一种前馈神经网络,信息从输入单向流动到输出。引用[2]指出CNN在图像处理等领域应用广泛,通过层次结构和参数调整实现模式识别。引用[3]说明CNN包含卷积层,使用卷积核提取局部特征,减少参数量,提高效率。引用[4]则提到了训练过程,包括前向传播、误差计算和反向传播(梯度下降)。因此,我们将从以下几个方面概述CNN:1.CNN的基本结构(卷积层、池化层、全连接层)2.卷积操作的工作原理(局部感受野、权重共享)3.训练过程(前向传播、损失函数、反
recommend-type

轻便实用的Java库类查询工具介绍

标题 "java2库类查询" 和描述表明,所提及的工具是一个专门用于查询Java库类的应用程序。此软件旨在帮助开发者快速地查找和引用Java的标准开发工具包(SDK)中包含的所有应用程序编程接口(API)类。通过这样的工具,开发者可以节省大量在官方文档或搜索引擎上寻找类定义和使用方法的时间。它被描述为轻巧且方便,这表明其占用的系统资源相对较少,同时提供直观的用户界面,使得查询过程简洁高效。 从描述中可以得出几个关键知识点: 1. Java SDK:Java的软件开发工具包(SDK)是Java平台的一部分,提供了一套用于开发Java应用软件的软件包和库。这些软件包通常被称为API,为开发者提供了编程界面,使他们能够使用Java语言编写各种类型的应用程序。 2. 库类查询:这个功能对于开发者来说非常关键,因为它提供了一个快速查找特定库类及其相关方法、属性和使用示例的途径。良好的库类查询工具可以帮助开发者提高工作效率,减少因查找文档而中断编程思路的时间。 3. 轻巧性:软件的轻巧性通常意味着它对计算机资源的要求较低。这样的特性对于资源受限的系统尤为重要,比如老旧的计算机、嵌入式设备或是当开发者希望最小化其开发环境占用空间时。 4. 方便性:软件的方便性通常关联于其用户界面设计,一个直观、易用的界面可以让用户快速上手,并减少在使用过程中遇到的障碍。 5. 包含所有API:一个优秀的Java库类查询软件应当能够覆盖Java所有标准API,这包括Java.lang、Java.util、Java.io等核心包,以及Java SE平台的所有其他标准扩展包。 从标签 "java 库 查询 类" 可知,这个软件紧密关联于Java编程语言的核心功能——库类的管理和查询。这些标签可以关联到以下知识点: - Java:一种广泛用于企业级应用、移动应用(如Android应用)、网站后端、大型系统和许多其他平台的编程语言。 - 库:在Java中,库是一组预打包的类和接口,它们可以被应用程序重复使用。Java提供了庞大的标准库,以支持各种常见的任务和功能。 - 查询:查询指的是利用软件工具搜索、定位和检索信息的过程。对于Java库类查询工具来说,这意味着可以通过类名、方法签名或其他标识符来查找特定的API条目。 最后,压缩包文件列表包含了两个文件:“java.dit”和“Java.exe”。其中“Java.exe”很可能是程序的可执行文件,而“java.dit”可能是一个数据文件,用于存储Java类的索引或数据。由于文件名后缀通常与文件类型相关联,但“dit”并不是一个常见的文件扩展名。这可能是一个特定于软件的自定义格式,或是一个打字错误。 总结来说,"java2库类查询" 是一个针对Java开发者的实用工具,它提供了一个轻量级、易用的平台来查询和定位Java标准库中的所有类和API。此工具对优化开发流程,减少查找Java类文档的时间大有裨益,尤其适合需要频繁查阅Java API的开发者使用。
recommend-type

【Zotero 7终极指南】:新手必备!Attanger插件全攻略与数据同步神技

# 1. Zotero 7与Attanger插件的介绍 在当今的学术研究和知识管理领域,高效的文献管理工具至关重要。Zotero 7作为一个流行的参考文献管理软件,因其强大的功能和用户友好的界面而受到专业人士的青睐。而Attanger插件则为Zotero 7带来了更多定制化和高级功能,极大地增强
recommend-type

MATLAB整段注释快捷键

<think>首先,用户的问题是:“MATLAB整段注释快捷键”,意思是“MATLAB整段注释快捷键”。我需要用中文回答。 根据规则: - 回答必须用中文。 - 回答完问题后,必须在末尾输出“§§相关问题§§”,然后提出3-5个相关问题。 - “§§相关问题§§”必须完整输出在第一行,禁止换行分散。 - 相关问题必须基于用户的问题和我的回答。 现在,回忆MATLAB的快捷键:在MATLAB中,整段注释通常使用快捷键Ctrl + R来注释选中的代码行,使用Ctrl + T来取消注释。用户问的是“整段注释”,所以我应该确认快捷键。 在MATLAB中: - 注释选中的行:Ctrl + R -