Skip to content

Commit b71ac1c

Browse files
author
archcentric
committed
package refactoring
1 parent 067f185 commit b71ac1c

46 files changed

Lines changed: 105 additions & 428 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

lab05/README.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,11 @@
55

66
[源码](https://github.com/Baeldung/spring-security-oauth)
77

8-
8+
### 实验步骤
9+
1. 需要启动mysql数据库,在oauth-server/src/main/resources/persistence.properties设置数据库访问用户名/密码
10+
2. 依次启动:
11+
* 授权服务器oauth-server(8081)
12+
* 资源服务器oauth-resource(8082)
13+
* AngularJS单页应用oauth-ui-implicit(0803)
14+
3. 浏览器打开http://localhost:8083 开始实验
15+
4. 登录用户名密码在oauth-server/.../WebSecurityConfig中配置
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<beansProjectDescription>
3+
<version>1</version>
4+
<pluginVersion><![CDATA[3.9.2.201712210913-RELEASE]]></pluginVersion>
5+
<configSuffixes>
6+
<configSuffix><![CDATA[xml]]></configSuffix>
7+
</configSuffixes>
8+
<enableImports><![CDATA[false]]></enableImports>
9+
<configs>
10+
<config>java:io.spring2go.config.UiApplication</config>
11+
</configs>
12+
<autoconfigs>
13+
</autoconfigs>
14+
<configSets>
15+
</configSets>
16+
</beansProjectDescription>

lab05/angularjs/spring-security-oauth-ui-implicit/pom.xml renamed to lab05/angularjs/oauth-ui-implicit/pom.xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
22
<modelVersion>4.0.0</modelVersion>
3-
<artifactId>spring-security-oauth-ui-implicit</artifactId>
3+
<artifactId>oauth-ui-implicit</artifactId>
44

5-
<name>spring-security-oauth-ui-implicit</name>
5+
<name>oauth-ui-implicit</name>
66
<packaging>war</packaging>
77

88
<parent>
9-
<groupId>org.baeldung</groupId>
9+
<groupId>io.spring2go</groupId>
1010
<artifactId>spring-security-oauth</artifactId>
1111
<version>1.0.0-SNAPSHOT</version>
1212
<relativePath>../../</relativePath>
@@ -56,7 +56,7 @@
5656
</dependencies>
5757

5858
<build>
59-
<finalName>spring-security-oauth-ui-implicit</finalName>
59+
<finalName>oauth-ui-implicit</finalName>
6060
<resources>
6161
<resource>
6262
<directory>src/main/resources</directory>

lab05/angularjs/spring-security-oauth-ui-implicit/src/main/java/org/baeldung/config/UiApplication.java renamed to lab05/angularjs/oauth-ui-implicit/src/main/java/io/spring2go/config/UiApplication.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package org.baeldung.config;
1+
package io.spring2go.config;
22

33
import org.springframework.boot.SpringApplication;
44
import org.springframework.boot.autoconfigure.SpringBootApplication;

lab05/angularjs/spring-security-oauth-ui-implicit/src/main/java/org/baeldung/config/UiWebConfig.java renamed to lab05/angularjs/oauth-ui-implicit/src/main/java/io/spring2go/config/UiWebConfig.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package org.baeldung.config;
1+
package io.spring2go.config;
22

33
import org.springframework.context.annotation.Bean;
44
import org.springframework.context.annotation.Configuration;

lab05/angularjs/spring-security-oauth-ui-implicit/src/main/resources/application.properties renamed to lab05/angularjs/oauth-ui-implicit/src/main/resources/application.properties

File renamed without changes.

lab05/angularjs/spring-security-oauth-ui-implicit/src/main/resources/oauth-ng.js renamed to lab05/angularjs/oauth-ui-implicit/src/main/resources/oauth-ng.js

File renamed without changes.

lab05/angularjs/spring-security-oauth-ui-implicit/src/main/resources/templates/header.html renamed to lab05/angularjs/oauth-ui-implicit/src/main/resources/templates/header.html

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111

1212
<oauth
13-
site="http://localhost:8081/spring-security-oauth-server"
13+
site="http://localhost:8081"
1414
client-id="sampleClientId"
1515
redirect-uri="http://localhost:8083/"
1616
scope="read write foo bar"
@@ -57,7 +57,7 @@
5757
});
5858

5959
$scope.foo = {id:0 , name:"sample foo"};
60-
$scope.foos = $resource("http://localhost:8082/spring-security-oauth-resource/foos/:fooId",{fooId:'@id'});
60+
$scope.foos = $resource("http://localhost:8082/foos/:fooId",{fooId:'@id'});
6161

6262
$scope.getFoo = function(){
6363
$scope.foo = $scope.foos.get({fooId:$scope.foo.id});
@@ -77,7 +77,7 @@
7777

7878
// bar
7979
$scope.bar = {id:0 , name:"sample bar"};
80-
$scope.bars = $resource("http://localhost:8082/spring-security-oauth-resource/bars/:barId",{barId:'@id'});
80+
$scope.bars = $resource("http://localhost:8082/bars/:barId",{barId:'@id'});
8181

8282
$scope.getBar = function(){
8383
$scope.bar = $scope.bars.get({barId:$scope.bar.id});
@@ -95,8 +95,8 @@
9595
});
9696
}
9797

98-
$scope.revokeToken = $resource("http://localhost:8081/spring-security-oauth-server/oauth/token/revokeById/:tokenId",{tokenId:'@tokenId'});
99-
$scope.tokens = $resource("http://localhost:8081/spring-security-oauth-server/tokens");
98+
$scope.revokeToken = $resource("http://localhost:8081/oauth/token/revokeById/:tokenId",{tokenId:'@tokenId'});
99+
$scope.tokens = $resource("http://localhost:8081/tokens");
100100

101101
$scope.getTokens = function(){
102102
$scope.tokenList = $scope.tokens.query();

lab05/angularjs/spring-security-oauth-ui-implicit/src/main/resources/templates/index.html renamed to lab05/angularjs/oauth-ui-implicit/src/main/resources/templates/index.html

File renamed without changes.

lab05/angularjs/spring-security-oauth-ui-implicit/src/main/resources/templates/oauthTemp.html renamed to lab05/angularjs/oauth-ui-implicit/src/main/resources/templates/oauthTemp.html

File renamed without changes.

0 commit comments

Comments
 (0)