我正在尝试使用微服务架构构建一个简单的应用程序。以下是我创建的 3 个微服务的详细信息。
1] Customer.
database: mongodb
server : embeded tomcat server.
port : 8081
2] vendor.
database: mongodb
server : embeded tomcat server.
port : 8082
3] product.
database: mongodb
server : embeded tomcat server.
port : 8083
Run Code Online (Sandbox Code Playgroud)
所有 3 个微型计算机都在嵌入式 tomcat 服务器上运行。现在我想为所有这些 micros 创建一个通用网关 [API gateway]。这可以帮助我根据收到的请求来路由我的请求,例如:- 例如,如果我收到http://hostname:port_of_gateway/customer的请求。阅读本文后,我需要将请求路由到我的客户微控制器并获取其响应并将其发送回客户端。我可以使用哪种弹簧工具来实现此目的?
我正在尝试使用 spring boot 和 spring security 创建一个 Rest API。以下是我为获取授权令牌所做的代码更改的详细信息:-
1]授权服务器配置
@Configuration
@EnableAuthorizationServer
public class AuthorizationServerConfig extends AuthorizationServerConfigurerAdapter {
@Autowired
private AuthenticationManager authenticationManager;
@Autowired
private TokenStore tokenStore;
@Autowired
private UserApprovalHandler userApprovalHandler;
@Override
public void configure(AuthorizationServerEndpointsConfigurer endpoints) throws Exception {
endpoints.tokenStore(tokenStore).userApprovalHandler(userApprovalHandler)
.authenticationManager(authenticationManager);
}
@Override
public void configure(ClientDetailsServiceConfigurer clients) throws Exception {
clients.inMemory().withClient("my-trusted-client")
.authorizedGrantTypes("client_credentials", "password", "refresh_token" )
.authorities("ROLE_CLIENT").scopes("read","write","trust")
.secret("secret")
.accessTokenValiditySeconds(5000)
.refreshTokenValiditySeconds(6000).autoApprove(true);
}
@Override
public void configure(AuthorizationServerSecurityConfigurer security) throws Exception {
security.checkTokenAccess("isAuthenticated()");
}
@Override
@Bean
public AuthenticationManager authenticationManagerBean() throws Exception {
return super.authenticationManagerBean();
} …Run Code Online (Sandbox Code Playgroud) 当我尝试运行以下查询时出现上述错误。
select ROW_NUMBER() OVER (PARTITION BY col1 ORDER By col1) as ROW , dt.* from view dt
Run Code Online (Sandbox Code Playgroud)
谁能告诉我我在这里做错了什么?
输出:
ORA-00923: FROM keyword not found where expected
00923. 00000 - "FROM keyword not found where expected"
*Cause:
*Action:
Error at Line: 1 Column: 87
Run Code Online (Sandbox Code Playgroud)