C:\Users\muhiuddin.TOWERTECH\test\testapp>ng build --target=production
Run Code Online (Sandbox Code Playgroud)
要么
C:\Users\muhiuddin.TOWERTECH\test\testapp>ng run
Run Code Online (Sandbox Code Playgroud)
当我运行一个新项目或构建它时,给我"无法确定项目或目标为架构师命令"错误.我是Angular的新手.请给我简单的解决方案.
Angular CLI: 6.0.8
Node: 9.3.0
OS: win32 x64
Angular: 6.0.7
Run Code Online (Sandbox Code Playgroud)
无法确定Architect命令的项目或目标.错误:无法确定Architect命令的项目或目标.在MergeMapSubscriber的MergeMapSubscriber._loadWorkspaceAndArchitect.pipe.operators_1.concatMap [as project](C:\ Users\muhiuddin.TOWERTECH\test\testapp \node_modules\@angular\cli\models\architect-command.js:62:27). MergeMapSubscriber._next中的_tryNext(C:\ Users\muhiuddin.TOWERTECH\test\testapp \node_modules\rxjs\internal\operators\mergeMap.js:65:27)(C:\ Users\muhiuddin.TOWERTECH\test\testapp \node_modules\rxjs\internal\operators\mergeMap.js:55:18)在MergeMapSubscriber.Subscriber.next(C:\ Users\muhiuddin.TOWERTECH\test\testapp \node_modules\rxjs\internal\Subscriber.js:64:18)at at TapSubscriber.next(C:\ Users\muhiuddin.TOWERTECH\test\testapp \node_modules\rxjs\internal\Subscriber.js:64:18)在MergeMapSubscriber.notifyNext(C:\ Users\muhiuddin.TOWERTECH\test\testapp \node_modules\rxjs\internal\operators\mergeMap.js:84:26) )在InnerSubscriber._next(C:\ Users\muhiuddin.TOW ERTECH\test\testapp \node_modules\rxjs\internal\InnerSubscriber.js:25:21)在InnerSubscriber.Subscriber.next(C:\ Users\muhiuddin.TOWERTECH\test\testapp \node_modules\rxjs\internal\Subscriber.js: 64:18)在MapSubscriber._next(C:\ Users\muhiuddin.TOWERTECH\test\testapp \node_modules\rxjs\internal\operators\map.js:52:26)
我使用的是 Spring Boot 3,没有 WebSecurityConfigurationAdapter。以下为代码。但是 .authorizeRequests().antMatchers("/api/auth/**").permitAll(); 它给出错误。附屏幕截图。
我想允许“/api/auth/**”。
AuthorizeRequests() 似乎在 SpringBoot 3 中已弃用。有其他选择吗???
@EnableGlobalMethodSecurity(prePostEnabled=true) 似乎也已弃用。任何新的解决方案。

提前致谢。
package com.example.tokenAuth.security;
import com.example.tokenAuth.security.jwt.AuthEntryPointJwt;
import com.example.tokenAuth.security.jwt.AuthTokenFilter;
import com.example.tokenAuth.security.services.UserDetailsServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.security.authentication.AuthenticationManager;
import org.springframework.security.authentication.dao.DaoAuthenticationProvider;
import org.springframework.security.config.annotation.authentication.configuration.AuthenticationConfiguration;
import org.springframework.security.config.annotation.method.configuration.EnableGlobalMethodSecurity;
import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;
import org.springframework.security.config.http.SessionCreationPolicy;
import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
import org.springframework.security.crypto.password.PasswordEncoder;
import org.springframework.security.web.SecurityFilterChain;
import org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter;
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
import org.springframework.security.config.annotation.web.configuration.WebSecurityCustomizer;
@Configuration
@EnableWebSecurity
@EnableGlobalMethodSecurity(prePostEnabled = true)
public class WebSecurityConfig
{
@Autowired
UserDetailsServiceImpl userDetailsService;
@Autowired
private AuthEntryPointJwt unauthorizedHandler;
@Bean
public AuthTokenFilter authenticationJwtTokenFilter()
{
return new AuthTokenFilter();
}
@Bean …Run Code Online (Sandbox Code Playgroud)