登录
首页 » Java » spring oauth2.0 sso(单点登录)

spring oauth2.0 sso(单点登录)

于 2021-11-06 发布
0 271
下载积分: 1 下载次数: 1

代码说明:

含完整源码以及数据库 spring-security-oauth2-server 是 授权服务器(oauth2-server) spring-boot-oauth2-client 是单点登录客户端应用

下载说明:请别用迅雷下载,失败请重下,重下不扣分!

发表评论

0 个回复

  • android 播放网络MP3 音乐播放
    简单的基本功能,实测可行。 核心代码:package com.sharpandroid.music.activity;import java.io.IOException;import android.app.Activity;import android.os.Bundle;import android.util.Log;import android.view.View;import android.widget.Button;import android.widget.ImageButton;import android.widget.SeekBar;import android.widget.TextView;import com.sharpandroid.music.R;import com.sharpandroid.music.StreamingMediaPlayer;public class MediaPlayer extends Activity { private Button streamButton; private ImageButton playButton; private boolean isPlaying; private TextView playTime; private StreamingMediaPlayer audioStreamer; @Override public void onCreate(Bundle icicle) { super.onCreate(icicle); setContentView(R.layout.main); initControls(); } private void initControls() { playTime=(TextView) findViewById(R.id.playTime); streamButton = (Button) findViewById(R.id.button_stream); streamButton.setOnClickListener(new View.OnClickListener() { public void onClick(View view) { startStreamingAudio(); }}); playButton = (ImageButton) findViewById(R.id.button_play); playButton.setEnabled(false); playButton.setOnClickListener(new View.OnClickListener() { public void onClick(View view) { if (audioStreamer.getMediaPlayer().isPlaying()) { audioStreamer.getMediaPlayer().pause(); playButton.setImageResource(R.drawable.button_play); } else { audioStreamer.getMediaPlayer().start(); audioStreamer.startPlayProgressUpdater(); playButton.setImageResource(R.drawable.button_pause); } isPlaying = !isPlaying; }}); } private void startStreamingAudio() { try { final SeekBar progressBar = (SeekBar) findViewById(R.id.progress_bar); if ( audioStreamer != null) { audioStreamer.interrupt(); } audioStreamer = new StreamingMediaPlayer(this, playButton, streamButton, progressBar,playTime); audioStreamer.startStreaming("http://192.168.64.1/xa.mp3",5208, 216); streamButton.setEnabled(false); } catch (IOException e) { Log.e(getClass().getName(), "读取音乐出错!", e); } }}
    2014-05-26下载
    积分:1
  • android 短信打电话 实例源码下载
    android 发短信打电话 实例源码下载
    2014-05-10下载
    积分:1
  • 七牛云SDK源码
    七牛云SDK源码
    2015-05-19下载
    积分:1
  • android 登录特效例子源码 含loding效果
    android 登录特效
    2013-09-10下载
    积分:1
  • android 接收蓝牙数据绘制成波形
    android 接收蓝牙数据绘制成波形
    2021-05-06下载
    积分:1
  • android 语音识别例子源码下载
    android 语音识别例子源码下载
    2015-04-30下载
    积分:1
  • android aidl跨进程调用 完整源码下载(含客户端和服务端源码)
    这两天在学习aidl跨进程调用,研究了一天终于写出了个helloword。。做下记录吧。根据官方提供的指南,开发aidl跨进程调用,主要分以下步骤:1.         创建.aidl文件-该文件(YourInterface.aidl)定义了客户端可用的方法和数据的接口。2.         在makefile文件中加入.aidl文件-(Eclipse中的ADT插件提供管理功能)Android包括名为AIDL的编译器,位于tools/文件夹。3.         实现接口-AIDL编译器从AIDL接口文件中利用Java语言创建接口,该接口有一个继承的命名为Stub的内部抽象类(并且实现了一些IPC调用的附加方法),要做的就是创建一个继承YourInterface.Stub的类并且实现在.aidl文件中声明的方法。4.         向客户端公开接口-如果是编写服务,应该继承Service并且重载Service.onBind(Intent) 以返回实现了接口的对象实例上面的东西真的很官方。。下面结合我的例子做一下学习总结:先开发服务器端1.创建一个aidl文件,可以看提供的源码。创建完成后,eclipse插件自动在gen目录下生成同名字的java文件。里面包含一个Stub抽象类,这个类继承自android.os.Binder,这个类是实现整个远程调用的核心。2.然后创建一个类来继承上面说到的那个Stub抽象类,实现里面的抽象方法。(这些抽象方法是根据aidl文件自动生成的)。3.创建一个自定义Service继承自Service,实现其onBind方法,注意此onBind方法必须返回第二步创建的那个Stub类的子类。然后在xml中声明此service,注意此service的声明必须包含一个action,此action也用于客户端的调用使用。(在下面的客户端开发中会有介绍)。4.创建一个activity,此activity只要实现把service启动了即可。这样服务器端就开发完毕,运行后启动了一个可供远程调用的service。关键还是通过onBind暴露一个Binder给客户端。Binder哪来呢?就是通过aidl文件adt会自动生成一个抽象类Stub继承自Binder,只需要创建一个类实现这个Stub的抽象方法即可。然后开发客户端:1.客户端也需要一个aidl文件,注意客户端的aidl文件的包名必须和服务器端的aidl包名一致,名字也相同。创建完后同样会在gen下生成一个接口。2.创建一个Activity,包含变量ServiceConnection con,实现其onServiceConnected和onServiceDisconnected方法,onServiceConnected方法生成第一步那个接口的实现类的对象。con对象用于在onCreate中绑定service,这个service的action必须为服务器端声明的那个service的配置action。绑定中用到con会执行onServiceConnected方法生成aidl对象iPerson。然后就可以通过iPerson来调用aidl里的任意方法返回服务器的东西。客户端开发完毕。关键点是创建aidl文件自动生成了一个接口,在activity中必须绑定服务程序开启的service,在绑定过程中初始化aidl对象。然后就可用aidl对象调用任意方法了。OK,可以运行看效果了。过程真的很繁琐。。但是好像也只能这样了。最主要的还是服务端onBind暴露,然后客户端bindService得到aidl对象。
    2020-12-01 17:29:26下载
    积分:1
  • android open gl 示例代码下载
    [实例简介]Open GL 入门级示例 [实例截图] [核心代码]package com.china.gltry;import javax.microedition.khronos.egl.EGL10;import javax.microedition.khronos.egl.EGL11;import javax.microedition.khronos.egl.EGLConfig;import javax.microedition.khronos.egl.EGLContext;import javax.microedition.khronos.egl.EGLDisplay;import javax.microedition.khronos.egl.EGLSurface;import javax.microedition.khronos.opengles.GL;import android.view.SurfaceHolder;/** * An EGL helper class. */public class EGLHelper{ public EGLHelper() { } /** * Initialize EGL for a given configuration spec. * @param configSpec */ public void start(int[] configSpec){ /* * Get an EGL instance */ mEgl = (EGL10) EGLContext.getEGL(); /* * Get to the default display. */ mEglDisplay = mEgl.eglGetDisplay(EGL10.EGL_DEFAULT_DISPLAY); /* * We can now initialize EGL for that display */ int[] version = new int[2]; mEgl.eglInitialize(mEglDisplay, version); EGLConfig[] configs = new EGLConfig[1]; int[] num_config = new int[1]; mEgl.eglChooseConfig(mEglDisplay, configSpec, configs, 1, num_config); mEglConfig = configs[0]; /* * Create an OpenGL ES context. This must be done only once, an * OpenGL context is a somewhat heavy object. */ mEglContext = mEgl.eglCreateContext(mEglDisplay, mEglConfig, EGL10.EGL_NO_CONTEXT, null); mEglSurface = null; } /* * Create and return an OpenGL surface */ public GL createSurface(SurfaceHolder holder) { /* * The window size has changed, so we need to create a new * surface. */ if (mEglSurface != null) { /* * Unbind and destroy the old EGL surface, if * there is one. */ mEgl.eglMakeCurrent(mEglDisplay, EGL10.EGL_NO_SURFACE, EGL10.EGL_NO_SURFACE, EGL10.EGL_NO_CONTEXT); mEgl.eglDestroySurface(mEglDisplay, mEglSurface); } /* * Create an EGL surface we can render into. */ mEglSurface = mEgl.eglCreateWindowSurface(mEglDisplay, mEglConfig, holder, null); /* * Before we can issue GL commands, we need to make sure * the context is current and bound to a surface. */ mEgl.eglMakeCurrent(mEglDisplay, mEglSurface, mEglSurface, mEglContext); GL gl = mEglContext.getGL(); return gl; } /** * Display the current render surface. * @return false if the context has been lost. */ public boolean swap() { mEgl.eglSwapBuffers(mEglDisplay, mEglSurface); /* * Always check for EGL_CONTEXT_LOST, which means the context * and all associated data were lost (For instance because * the device went to sleep). We need to sleep until we * get a new surface. */ return mEgl.eglGetError() != EGL11.EGL_CONTEXT_LOST; } public void finish() { if (mEglSurface != null) { mEgl.eglMakeCurrent(mEglDisplay, EGL10.EGL_NO_SURFACE, EGL10.EGL_NO_SURFACE, EGL10.EGL_NO_CONTEXT); mEgl.eglDestroySurface(mEglDisplay, mEglSurface); mEglSurface = null; } if (mEglContext != null) { mEgl.eglDestroyContext(mEglDisplay, mEglContext); mEglContext = null; } if (mEglDisplay != null) { mEgl.eglTerminate(mEglDisplay); mEglDisplay = null; } } EGL10 mEgl; EGLDisplay mEglDisplay; EGLSurface mEglSurface; EGLConfig mEglConfig; EGLContext mEglContext;}
    2015-04-06下载
    积分:1
  • 调用系统相册拍照
    调用系统相册拍照
    2013-09-06下载
    积分:1
  • android GroupActivity TabActivity(选项卡实例源码下载)
    android GroupActivity TabActivity(选项卡实例源码下载)
    2014-05-30下载
    积分:1
  • 696518资源总数
  • 106242会员总数
  • 10今日下载