我有一个Ionic2我想添加的应用程序GooglePlus Authentication.
我收到以下错误:
据我了解,这是因为我没有设置redirect_uri.
题
我应该用什么redirect_uri(Authorized redirect URIs)用于Ionic2应用程序?我在哪里找到它?
以下适用于Facebook登录.
UPDATE
按照这些说明,我将其更改REVERSED_CLIENT_ID为以下格式:
"com.googleusercontent.apps.uniqueId"
Run Code Online (Sandbox Code Playgroud)
所以我认为我已经取得了进展.
我现在得到以下错误iOS:
从这里阅读,这意味着credentials不应该为Web Application 这里创建.但是,如果我创建它iOS,它将如何工作Android?或者还Android没有使用这些凭据?
因为Android,当我尝试登录时,我只是得到一个undefined错误消息的异常.
所以我有两个问题:
iOS 客户端ID 而不是?Web applicationAndroid?UPDATE
因为iOS我添加了一个iOS Client Id并更改了我的REVERSED CLIENT ID以匹配,并且喜欢Android,它促使我登录我的Google帐户.这看起来像是进一步的进展.
但是,一旦我登录,就像Android …
我正在使用Java8并且有一个可以在我的localhost上完美运行的聊天服务器,但是当我将它部署到OpenShift服务器时,我收到以下错误:
java.net.SocketException:权限被拒绝
Run Code Online (Sandbox Code Playgroud)2016-09-05 10:36:11,300 INFO [stdout] (Thread-125) Starting Chat server on localhost:8000 ... 2016-09-05 10:36:13,194 ERROR [stderr] (Thread-125) Exception in thread "Thread-125" java.net.SocketException: Permission denied 2016-09-05 10:36:13,194 ERROR [stderr] (Thread-125) at sun.nio.ch.Net.bind0(Native Method) 2016-09-05 10:36:13,195 ERROR [stderr] (Thread-125) at sun.nio.ch.Net.bind(Net.java:433) 2016-09-05 10:36:13,195 ERROR [stderr] (Thread-125) at sun.nio.ch.Net.bind(Net.java:425) 2016-09-05 10:36:13,195 ERROR [stderr] (Thread-125) at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:223) 2016-09-05 10:36:13,195 ERROR [stderr] (Thread-125) at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:74) 2016-09-05 10:36:13,196 ERROR [stderr] (Thread-125) at io.netty.channel.socket.nio.NioServerSocketChannel.doBind(NioServerSocketChannel.java:125) 2016-09-05 10:36:13,196 ERROR [stderr] (Thread-125) at io.netty.channel.AbstractChannel$AbstractUnsafe.bind(AbstractChannel.java:476) 2016-09-05 …
我正在使用Ionic3,并且:
<span class="char-left">{{REVIEW_MAX_LENGTH-ratingModel.review.length}} characters left</span>
Run Code Online (Sandbox Code Playgroud)
我想class在填充另一个值时有条件地更改该值,即将ratingForm.controls.review.length > 0值更改为class="char-left-error".
我确实看过ng-class,但似乎无法让它发挥作用.
任何帮助赞赏.
我有一个Ionic 2应用程序,它可以在Xcode 8.2.1模拟器环境中构建并可测试,例如iPhone7(Build Successful).
当我尝试Archive使用应用创建ipa要在设备上设置的文件时,我会按照这些说明操作.但是Product -> Archive灰暗了.所以我将活动方案更改为Generic iOS Device.
但是当我点击时Product -> Archive,我明白了Build Failed.
theWhoZoo具有冲突的配置设置.theWhoZoo会自动签名进行开发,但手动指定了冲突的代码签名身份iPhone Distribution.在构建设置编辑器中将代码签名标识值设置为"iPhone Developer",或在项目编辑器中切换到手动签名.SDK"iOS 10.2"中的产品类型"应用"需要代码签名
如果有人可以建议我如何解决这个问题来建立一个档案馆,我将不胜感激.
我有MacOS Sierra。我已经安装了正在运行的MySQL Server,但是,在Mac Book重新启动后,我无法启动MySQL Server。
我试图从更改端口3306到3307了在my.cnf文件中。
题
我将不胜感激有关如何启动MySQL Server的帮助,并希望它能在MacOS Boot up上自动启动。
(我是Mac的新手,如果这是一个基本问题,请您道歉)。
更新
寻找错误记录,找不到今天(2/2/2017)时间戳的任何内容。
data目录中没有任何内容:
自从我尝试启动MySQL服务器(2017年2月2日之后09:00)以来,没有修改带有“ mysql”的文件。
我有一个 Angular 9(* 更新,这应该是 Angular 11),它是在 Ubuntu 和 Mac 机器上开发的。以下命令运行没有问题:
npm install
Run Code Online (Sandbox Code Playgroud)
所以现在我需要将其部署到Linux Centos 7服务器上。所以我对它进行了 Docker 化。当 Dockerfile 想要执行时npm install,会出现以下错误:
Step 4/13 : RUN npm install
---> Running in 42f10bf7732c
npm notice
npm notice New patch version of npm available! 7.4.0 -> 7.4.3
npm notice Changelog: <https://github.com/npm/cli/releases/tag/v7.4.3>
npm notice Run `npm install -g npm@7.4.3` to update!
npm notice
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: nexct-ng-ui@0.0.0
npm …Run Code Online (Sandbox Code Playgroud) 我正在使用Ionic 2.
第1页(SearchPage) - > popover - >第2页(MapPage) - >第1页(SearchPage)(menuToggle not working)
我有一个根页面(SearchPage):
HTML
<ion-header>
<ion-navbar>
<button menuToggle>
<ion-icon name="menu"></ion-icon>
</button>
</ion-navbar>
</ion-header>
Run Code Online (Sandbox Code Playgroud)
TS
presentPopover(event: Event): void {
let popover: Popover = this.popoverController.create(SearchPopOverPage, {
ev: event,
employeeModel: this.employeeModel
});
popover.present();
}
Run Code Online (Sandbox Code Playgroud)
酥料饼
presentFilterMap(event: Event) {
this.viewCtrl.dismiss().then(() => {
this.nav.push(MapPage, {
ev: event,
employeeModel: this.employeeModel,
fromSearch: true
})
});
}
Run Code Online (Sandbox Code Playgroud)
但是当我尝试返回根页面(带参数)时,它会显示菜单切换按钮(3行),但是当我点击它时它不起作用(即什么都不做,它应该显示侧面菜单).
返回root的ts(MapPage)文件:
this.nav.insert(0, SearchPage, {
employeeModel: this.employeeModel
});
Run Code Online (Sandbox Code Playgroud)
如果我尝试popToRoot(options),这可以工作,菜单切换按钮正在工作.但是,它不会使用新参数重新加载页面.
有什么想法我应该如何导航回带有参数的根页面?
谢谢
更新:我尝试了以下内容,但它没有回到根目录:
let options = …Run Code Online (Sandbox Code Playgroud) 我有以下代码使用Ionic Native Geolocation:
import { Geolocation } from 'ionic-native';
this.platform.ready().then(() => {
alert('loadMap about to getCurrentPosition');
Geolocation.getCurrentPosition(options).then((position) => {
alert('loadMap getCurrentPosition');
let latLng: google.maps.LatLng = new google.maps.LatLng(position.coords.latitude, position.coords.longitude);
bound.extend(latLng);
this.load(bound);
});
});
Run Code Online (Sandbox Code Playgroud)
当我ionic serve在浏览器中运行它时,或者我构建它并在iOS Simulator(Xcode)上运行它时,它可以工作.但是,当我构建它Android并尝试运行它时,第一个警报被触发,但不是第二个.
这Android仅仅意味着,Geolocation.getCurrentPosition...不起作用.
我确实有另一个可以渲染地图的页面this.map = new google.maps.Map(htmlElement, mapOptions);,所以看起来问题在于获取当前位置.当我安装应用程序时,我确实得到了这条消息:
Run Code Online (Sandbox Code Playgroud)Allow AppName to access the device's location? DENY ALLOW
我点击了Allow.
有没有人知道我做错了什么,或者Android安装和构建过程中是否有一些缺失的步骤?
谢谢
我正在使用JPA并具有以下内容:
ProductEntity
@Basic
@Column(name = "PRODUCT_ID", nullable = false, length = 128)
private String productId;
@ManyToOne
@JoinColumn(name = "PARENT_ID")
private ProductEntity parent;
Run Code Online (Sandbox Code Playgroud)
如您所见,产品表可以有父级.有效地是父母的孩子关系.
我有一个保存在数据库中的产品,然后我添加了一些子产品,每个产品都有相同的父产品.
子产品具有ProductEntity parent =父产品;
ProductEntity parentProductEntity = ...
ProductEntity childProductEntity1 = ...
ProductEntity childProductEntity2 = ...
em.persist(parentProductEntity);
childProductEntity1.setParent(parentProductEntity);
childProductEntity2.setParent(parentProductEntity);
em.merge(childProductEntity1);
Run Code Online (Sandbox Code Playgroud)数据(它永远不会插入最后两个子行)
ID PRODUCT_ID PARENT_ID
1 1 null
2 2 1
3 3 1
Run Code Online (Sandbox Code Playgroud)
问题
然后我尝试保存每个孩子的产品.但是我收到一个错误,表明存在重复键(productId).保存子项时,它也会尝试保存父项的重复项.
引起:org.postgresql.util.PSQLException:错误:重复键值违反唯一约束"t_osm_product_product_id_uindex"
题
我如何改变我正在做的事情来成功保存每个儿童产品?
谢谢
我有一个 Java 11 Spring Boot 2.5.1 应用程序。
Swagger 通过 http 在本地工作:
我添加了 Swagger,它在我的本地主机上完美运行:
http://localhost:8085/swagger-ui/index.html#/
Swagger 无法通过 https 远程工作:
但是,当我将其部署到远程服务器时,出现以下错误:
https://mycompany.co/pow-wow/swagger-ui/index.html#/
错误
无法加载远程配置。
注意:远程服务器是通过https访问的。
REST 端点可在远程服务器上访问。
例如 GET https://mycompany.co/pow-wow/powwow/test-me按预期返回 200。
问题
如何通过远程服务器访问 Swagger?
代码
pom.xml
<!-- Swagger -->
<dependency>
<groupId>org.springdoc</groupId>
<artifactId>springdoc-openapi-ui</artifactId>
<version>1.6.7</version>
</dependency>
Run Code Online (Sandbox Code Playgroud)
WebSecurityConfig.java
@Configuration
@EnableWebSecurity
public class WebSecurityConfig extends WebSecurityConfigurerAdapter {
@Override
protected void configure(HttpSecurity http) throws Exception {
//http.csrf().disable().authorizeRequests().antMatchers("/powwow/*").hasRole("USER").and().httpBasic();
//http.csrf().disable().authorizeRequests().antMatchers("/*").permitAll().and().httpBasic();
http.sessionManagement().sessionCreationPolicy(SessionCreationPolicy.STATELESS).and()
.authorizeRequests().antMatchers("/soapWS/**").permitAll().and()
.authorizeRequests().antMatchers("/swagger-ui/**", "/v3/api-docs/**").permitAll().and()
.authorizeRequests().antMatchers("/actuator/**").permitAll()
.anyRequest().authenticated().and()
.httpBasic().and()
.csrf().disable();
}
}
Run Code Online (Sandbox Code Playgroud)
更多信息:
当访问Swagger时查看浏览器中的网络流量。
在本地,有一个电话:
http://localhost:8085/v3/api-docs/swagger-config
返回:
{"configUrl":"/v3/api-docs/swagger-config","oauth2RedirectUrl":"http://localhost:8085/swagger-ui/oauth2-redirect.html","url":"/v3/api-docs","validatorUrl":""}
Run Code Online (Sandbox Code Playgroud)
远程调用:
ionic2 ×5
angular ×4
java ×3
typescript ×2
angularjs ×1
database ×1
docker ×1
geolocation ×1
ionic-native ×1
ionic3 ×1
ios ×1
javascript ×1
jpa ×1
macos ×1
mysql ×1
npm ×1
openshift ×1
sockets ×1
spring-boot ×1
swagger ×1
xcode ×1
xcode8 ×1